AMPL.Api.runtime.osx-x64 2.3.6-beta5

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

// Install AMPL.Api.runtime.osx-x64 as a Cake Tool
#tool nuget:?package=AMPL.Api.runtime.osx-x64&version=2.3.6-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;");
}


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.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 128 5/7/2024
2.3.10 1,447 5/6/2024
2.3.9 1,996 4/2/2024
2.3.9-beta1 143 3/27/2024
2.3.8 602 2/22/2024
2.3.8-fix1 149 3/26/2024
2.3.7-beta5 228 1/10/2024
2.3.6-beta5 230 11/30/2023
2.3.6-beta2 173 11/29/2023
2.3.5 312 11/23/2023
2.3.4 201 11/22/2023
2.3.4-beta2 168 11/24/2023
2.3.4-beta1 172 11/24/2023
2.3.3 195 11/8/2023
2.3.2 202 11/7/2023
2.3.1 326 11/7/2023