AMPL.Api 2.3.10

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.

Requires NuGet 4.1.0 or higher.

dotnet add package AMPL.Api --version 2.3.10
                    
NuGet\Install-Package AMPL.Api -Version 2.3.10
                    
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" Version="2.3.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AMPL.Api" Version="2.3.10" />
                    
Directory.Packages.props
<PackageReference Include="AMPL.Api" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AMPL.Api --version 2.3.10
                    
#r "nuget: AMPL.Api, 2.3.10"
                    
#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.
#addin nuget:?package=AMPL.Api&version=2.3.10
                    
Install as a Cake Addin
#tool nuget:?package=AMPL.Api&version=2.3.10
                    
Install as a Cake Tool

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 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 131 5/7/2024
2.3.10 1,898 5/6/2024
2.3.9 4,702 4/2/2024
2.3.9-beta1 113 3/27/2024
2.3.8 544 2/22/2024
2.3.8-fix1 121 3/26/2024
2.3.7-beta5 156 1/10/2024
2.3.6-beta5 174 11/30/2023
2.3.6-beta2 108 11/29/2023
2.3.5 285 11/23/2023
2.3.4 132 11/22/2023
2.3.4-beta2 116 11/24/2023
2.3.4-beta1 128 11/24/2023
2.3.3 152 11/8/2023
2.3.2 138 11/7/2023
2.3.1 381 11/7/2023
2.3.0 147 11/6/2023