AMPL.Api.runtime.linux-x64 2.3.9

Prefix Reserved
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.linux-x64 --version 2.3.9                
NuGet\Install-Package AMPL.Api.runtime.linux-x64 -Version 2.3.9                
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.linux-x64" Version="2.3.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AMPL.Api.runtime.linux-x64 --version 2.3.9                
#r "nuget: AMPL.Api.runtime.linux-x64, 2.3.9"                
#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.linux-x64 as a Cake Addin
#addin nuget:?package=AMPL.Api.runtime.linux-x64&version=2.3.9

// Install AMPL.Api.runtime.linux-x64 as a Cake Tool
#tool nuget:?package=AMPL.Api.runtime.linux-x64&version=2.3.9                

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;");
}


There are no supported framework assets in this 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.linux-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 133 5/7/2024
2.3.10 1,574 5/6/2024
2.3.9 2,492 4/2/2024
2.3.9-beta1 152 3/27/2024
2.3.8 610 2/22/2024
2.3.8-fix1 177 3/26/2024
2.3.7-beta5 233 1/10/2024
2.3.6-beta5 207 11/30/2023
2.3.6-beta2 104 11/29/2023
2.3.5 309 11/23/2023
2.3.4 186 11/22/2023
2.3.4-beta2 139 11/24/2023
2.3.4-beta1 157 11/24/2023
2.3.3 193 11/8/2023
2.3.2 139 11/7/2023
2.3.1 371 11/7/2023