AMPL.Api.runtime.win-x64 2.3.7-beta5

Prefix Reserved
This is a prerelease version of AMPL.Api.runtime.win-x64.
There is a newer version of this package available.
See the version list below for details.

Requires NuGet 4.1.0 or higher.

dotnet add package AMPL.Api.runtime.win-x64 --version 2.3.7-beta5                
NuGet\Install-Package AMPL.Api.runtime.win-x64 -Version 2.3.7-beta5                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AMPL.Api.runtime.win-x64" Version="2.3.7-beta5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AMPL.Api.runtime.win-x64 --version 2.3.7-beta5                
#r "nuget: AMPL.Api.runtime.win-x64, 2.3.7-beta5"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AMPL.Api.runtime.win-x64 as a Cake Addin
#addin nuget:?package=AMPL.Api.runtime.win-x64&version=2.3.7-beta5&prerelease

// Install AMPL.Api.runtime.win-x64 as a Cake Tool
#tool nuget:?package=AMPL.Api.runtime.win-x64&version=2.3.7-beta5&prerelease                

AMPL API

What is AMPL API?

AMPL API is an interface that allows developers to access the features of the AMPL interpreter from within a programming language. All model generation and solver interaction is handled directly by AMPL, which leads to great stability and speed; the library just acts as an intermediary, and the added overhead (in terms of memory and CPU usage) depends mostly on how much data is read back from AMPL, the size of the model as such is irrelevant. Functions for directly assigning data to AMPL parameters and sets are provided, which can be used instead or in conjuction to the normal AMPL data reading procedures.

Simple example

using (ampl.AMPL a = new ampl.AMPL()) {
    a.Eval("var x<=3; maximize z:x;")
    a.Solve();
    var z=a.GetObjective("z");
    Console.WriteLine($"Objective is: {z.Value})
}

Redirecting AMPL output


 using (var ampl = new AMPL())
{
    ampl.Eval("var x{1..3};");
    ampl.Eval("maximize z: sum{i in 1..3} x[i];");

    // Redirect output using lambda expression
    ampl.EnableOutputRouting();
    ampl.Output += (kind, message) => Console.Write("Got AMPL message:\n{0}\n", message);
    ampl.Eval("display x,z;");
}


Product Compatible and additional computed target framework versions.
.NET Framework net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • net6.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on AMPL.Api.runtime.win-x64:

Package Downloads
AMPL.Api

API for AMPL

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.3.11-beta1 140 5/7/2024
2.3.10 1,617 5/6/2024
2.3.9 2,586 4/2/2024
2.3.9-beta1 151 3/27/2024
2.3.8 614 2/22/2024
2.3.8-fix1 167 3/26/2024
2.3.7-beta5 249 1/10/2024
2.3.6-beta5 271 11/30/2023
2.3.6-beta2 158 11/29/2023
2.3.5 337 11/23/2023
2.3.4 199 11/22/2023
2.3.4-beta2 178 11/24/2023
2.3.4-beta1 196 11/24/2023
2.3.3 195 11/8/2023
2.3.2 219 11/7/2023
2.3.1 414 11/7/2023