Skip to main content
Ctrl+K
    AMPL Resources
  • AMPL.com
  • AMPL Support Forum
  • AMPL Download Portal
  • AMPL Development Resources
  • AMPL + Python 🐍
  • Hands-On Optimization in Python
  • AMPL Model Colaboratory
  • AMPL on Streamlit Cloud
  • amplpy: Python API
  • Open Source Projects
  • rAMPL: R API
  • AMPL Plugins
  • AMPL GSL
  • amplpyfinance
  • Solver Callbacks
  • MP: Solver Interface Framework
  • Licenses & Pricing
  • AMPL & Solvers pricing
  • Free AMPL For Teaching
  • Free AMPL Community Edition
  • Social Media
  • LinkedIn
  • Twitter / X
AMPL API 2.3.13 documentation - Home AMPL API 2.3.13 documentation - Home C# API
  • Introduction
  • Initial Setup
  • Quick Start
  • Deployment Methods
  • Class structure
  • C# API Reference
    • C# API Examples
  • AMPL APIs
  • AMPL Support Forum
  • AMPL Portal
  • AMPL Homepage
  • AMPL Resources
  • Introduction
  • Initial Setup
  • Quick Start
  • Deployment Methods
  • Class structure
  • C# API Reference
  • C# API Examples
  • AMPL APIs
  • AMPL Support Forum
  • AMPL Portal
  • AMPL Homepage
  • AMPL Resources
Ctrl+K
AMPL Python Ecosystem AMPL Python Ecosystem AMPL Model Colaboratory
Hands-On Mathematical Optimization with AMPL in Python

Follow us on Twitter and LinkedIn!

AMPL C# API#

Contents#

  • Introduction
    • What are AMPL APIs?
    • Who can use AMPL APIs
    • System requirements
    • About this manual
  • Initial Setup
    • Installation
    • Create a new project using NuGet (reccomended)
    • Use the distributed assembly
    • Running the examples
    • Development
    • Deployment
  • Quick Start
    • Complete listing
    • Namespaces and AMPL environment creation
    • Load a model from file
    • Solve a problem
    • Get an AMPL entity in the programming environment (get objective value)
    • Modify model data (assign values to parameters)
    • Get numeric values from variables
    • Get arbitrary values via ampl expressions
    • Close the AMPL object to free the resources
  • Deployment Methods
    • Deployment on Azure functions
    • Tutorial: create and deploy an Azure function using Visual Studio
    • Source code
    • Running the example
    • Monitoring
  • Class structure
    • AMPL class
    • Modelling entities classes
    • Relation between entities and data
  • C# API Reference
    • AMPL classes
    • Algebraic entities classes
    • Exceptions
  • C# API Examples
    • Example 1: First steps
    • Example 2: Get and set AMPL options
    • Example 3: Get and set data through DataFrames
    • Example 4: Operate with multidimensional data
    • Example 5: Assign all data to a model and solve it
    • Example 6: Build an efficient frontier
    • Example 7: Simple heuristic
    • Example 8: Simple heuristic
    • Example 10: Redirecting output and error messages

next

Introduction

On this page
  • Contents

© Copyright 2013-2025, AMPL Optimization Inc.