Python API for AMPL
ampl.solve(solver="gurobi", gurobi_options="outlev=1")
.ampl.solve(solver="gurobi", gurobi_options="outlev=1")
.Changelog:
Changelog:
Changelog:
amplpy.modules
to simplify installation of AMPL and all solvers across all Python environments including (Google Colab, Docker Containers, Continuous Integration Tools, etc.)# Install Python API for AMPL
$ python -m pip install amplpy --upgrade
# Install solver modules (e.g., HiGHS, CBC, Gurobi)
$ python -m amplpy.modules install highs cbc gurobi
# Activate your license (e.g., free https://ampl.com/ce license)
$ python -m amplpy.modules activate <license-uuid>
# Import in Python
$ python
>>> from amplpy import AMPL
>>> ampl = AMPL() # instantiate AMPL object
[Documentation] [AMPL Modules for Python] [Available on Google Colab]
Changelog:
Changelog:
Changes:
Changes:
Changes:
KeyError
exceptions instead of TypeError
when accessing entities that do not exist.