AMPL.Api
2.3.3
Prefix Reserved
See the version list below for details.
Requires NuGet 4.1.0 or higher.
dotnet add package AMPL.Api --version 2.3.3
NuGet\Install-Package AMPL.Api -Version 2.3.3
<PackageReference Include="AMPL.Api" Version="2.3.3" />
paket add AMPL.Api --version 2.3.3
#r "nuget: AMPL.Api, 2.3.3"
// Install AMPL.Api as a Cake Addin #addin nuget:?package=AMPL.Api&version=2.3.3 // Install AMPL.Api as a Cake Tool #tool nuget:?package=AMPL.Api&version=2.3.3
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.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. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6
- AMPL.Api.runtime.linux-x64 (>= 2.3.3)
- AMPL.Api.runtime.osx-x64 (>= 2.3.3)
- AMPL.Api.runtime.win-x64 (>= 2.3.3)
-
.NETStandard 2.0
- AMPL.Api.runtime.linux-x64 (>= 2.3.3)
- AMPL.Api.runtime.osx-x64 (>= 2.3.3)
- AMPL.Api.runtime.win-x64 (>= 2.3.3)
-
net6.0
- AMPL.Api.runtime.linux-x64 (>= 2.3.3)
- AMPL.Api.runtime.osx-x64 (>= 2.3.3)
- AMPL.Api.runtime.win-x64 (>= 2.3.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.3.11-beta1 | 101 | 5/7/2024 |
2.3.10 | 1,558 | 5/6/2024 |
2.3.9 | 2,365 | 4/2/2024 |
2.3.9-beta1 | 94 | 3/27/2024 |
2.3.8 | 512 | 2/22/2024 |
2.3.8-fix1 | 99 | 3/26/2024 |
2.3.7-beta5 | 138 | 1/10/2024 |
2.3.6-beta5 | 156 | 11/30/2023 |
2.3.6-beta2 | 86 | 11/29/2023 |
2.3.5 | 263 | 11/23/2023 |
2.3.4 | 111 | 11/22/2023 |
2.3.4-beta2 | 95 | 11/24/2023 |
2.3.4-beta1 | 111 | 11/24/2023 |
2.3.3 | 126 | 11/8/2023 |
2.3.2 | 115 | 11/7/2023 |
2.3.1 | 289 | 11/7/2023 |
2.3.0 | 123 | 11/6/2023 |