AMPL.Api.runtime.win-x64 2.3.9-beta1

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
This is a prerelease version of AMPL.Api.runtime.win-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.win-x64 --version 2.3.9-beta1
NuGet\Install-Package AMPL.Api.runtime.win-x64 -Version 2.3.9-beta1
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.win-x64" Version="2.3.9-beta1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AMPL.Api.runtime.win-x64 --version 2.3.9-beta1
#r "nuget: AMPL.Api.runtime.win-x64, 2.3.9-beta1"
#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.win-x64 as a Cake Addin
#addin nuget:?package=AMPL.Api.runtime.win-x64&version=2.3.9-beta1&prerelease

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


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.win-x64:

Package Downloads
AMPL.Api The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

API for AMPL

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.3.9 323 4/2/2024
2.3.9-beta1 77 3/27/2024
2.3.8 546 2/22/2024
2.3.8-fix1 114 3/26/2024
2.3.7-beta5 178 1/10/2024
2.3.6-beta5 206 11/30/2023
2.3.6-beta2 121 11/29/2023
2.3.5 273 11/23/2023
2.3.4 141 11/22/2023
2.3.4-beta2 122 11/24/2023
2.3.4-beta1 142 11/24/2023
2.3.3 135 11/8/2023
2.3.2 152 11/7/2023
2.3.1 188 11/7/2023