AMPL.Api.runtime.osx-x64
2.3.9-beta1
Prefix Reserved
See the version list below for details.
Requires NuGet 4.1.0 or higher.
dotnet add package AMPL.Api.runtime.osx-x64 --version 2.3.9-beta1
NuGet\Install-Package AMPL.Api.runtime.osx-x64 -Version 2.3.9-beta1
<PackageReference Include="AMPL.Api.runtime.osx-x64" Version="2.3.9-beta1" />
paket add AMPL.Api.runtime.osx-x64 --version 2.3.9-beta1
#r "nuget: AMPL.Api.runtime.osx-x64, 2.3.9-beta1"
// Install AMPL.Api.runtime.osx-x64 as a Cake Addin #addin nuget:?package=AMPL.Api.runtime.osx-x64&version=2.3.9-beta1&prerelease // Install AMPL.Api.runtime.osx-x64 as a Cake Tool #tool nuget:?package=AMPL.Api.runtime.osx-x64&version=2.3.9-beta1&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;");
}
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.osx-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 | 145 | 5/7/2024 |
2.3.10 | 1,586 | 5/6/2024 |
2.3.9 | 2,459 | 4/2/2024 |
2.3.9-beta1 | 160 | 3/27/2024 |
2.3.8 | 622 | 2/22/2024 |
2.3.8-fix1 | 168 | 3/26/2024 |
2.3.7-beta5 | 248 | 1/10/2024 |
2.3.6-beta5 | 253 | 11/30/2023 |
2.3.6-beta2 | 173 | 11/29/2023 |
2.3.5 | 330 | 11/23/2023 |
2.3.4 | 221 | 11/22/2023 |
2.3.4-beta2 | 185 | 11/24/2023 |
2.3.4-beta1 | 191 | 11/24/2023 |
2.3.3 | 214 | 11/8/2023 |
2.3.2 | 221 | 11/7/2023 |
2.3.1 | 394 | 11/7/2023 |