Amplpy Versions Save

Python API for AMPL

v0.14.0

1 week ago

Recent changes:

0.14.0 - 2024-05-21

  • Allow assigning values to indexed sets from a dictionary with the lists of members for every index.
  • Add AMPL.get_iis() to return dictionaries with variables and constraints in IIS.
  • Add AMPL.get_solution() to return a dictionary with the solution.

0.13.3 - 2024-02-20

  • Fix issues with AMPL.solve(verbose=False) when the solver argument was not set.

0.13.2 - 2024-01-05

  • OutputHandler: Flush standard output after every message.

0.13.1 - 2023-12-29

  • Upgrade libampl to 2.3.7-20231229.
  • Upgrade ampltools to 0.7.3 adding amplpy.bundle command.
  • Fix issue with environment variables on Windows in a generic way.
  • Add return_output and solvername_options arguments to AMPL.solve
    • You can now do ampl.solve(solver="gurobi", gurobi_options="outlev=1").

0.13.0 - 2023-12-26

  • [Breaking] amplpy.modules now have priority in the PATH.
  • Fix ampl_libpath issue on Windows.

v0.13.1

5 months ago

Recent changes:

0.13.1 - 2023-12-29

  • Upgrade libampl to 2.3.7-20231229.
  • Upgrade ampltools to 0.7.3 adding amplpy.bundle command.
  • Fix issue with environment variables on Windows in a generic way.
  • Add return_output and solvername_options arguments to AMPL.solve
    • You can now do ampl.solve(solver="gurobi", gurobi_options="outlev=1").

0.13.0 - 2023-12-26

  • [Breaking] amplpy.modules now have priority in the PATH.
  • Fix ampl_libpath issue on Windows.

0.12.2 - 2023-12-11

  • Upgrade libampl to 2.3.6-20231130.
  • Add solver argument to AMPL.solve.

0.12.1 - 2023-09-21

  • Fix Parameter.set_values with np.ndarray objects.

v0.12.0

8 months ago

Changelog:

  • Upgrade libampl to 2.2.0-20230825.
  • Use x-ampl by default if available.
  • Add properties AMPL.solve_result/AMPL.solve_result_num.
  • Add arguments to AMPL.solve to specify problem name and verbosity.
  • Allow passing pandas.Series to AMPL.set_data and Parameter.set_values.
  • Add AMPL.snapshot, and implement AMPL.export_model/AMPL.export_data using it.
  • [Breaking] Drop Python 3.5 compatibility.
  • [Breaking] Deprecate direct access methods to amplpy.DataFrame. Deprecated methods are still available with _ prefix.

v0.11.0

11 months ago

Changelog:

  • Upgrade libampl to 2.1.2-20230618.
  • Add AMPL.write, PresolveException, and InfeasibilityException.
  • Improve handling of numpy types.
  • Allow assigning values to sets from iterables.
  • [Breaking] Drop async functionalities.
  • [Breaking] DataFrame.to_pandas: start using multi-index by default.
  • [Breaking] Drop Python 2.7 compatibility.
  • [Breaking] Iterating over non-indexed sets now iterates over set members.

v0.9.0

1 year ago

Changelog:

# 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]

v0.8.5

1 year ago

Changelog:

  • Update libampl to 2.0.11-20220823.
  • Ensure that times and gentimes default to disabled.

v0.8.4

1 year ago

Changelog:

  • Update libampl to 2.0.10-20220627.
  • Disable options times and gentimes during internal operations.

v0.8.3

1 year ago

Changes:

  • Improved handling of numpy types

v0.8.2

2 years ago

Changes:

  • [BREAKING] Raise RuntimeError in Entity.get_values if there are any issues with the data.
  • Update libampl to 2.0.9.20220527.
  • Fixed hanging when license check fails on Windows.
  • Add ampltools as dependency.
  • Allow '-' in option names.
  • Drop 32-bit support.

v0.8.1

2 years ago

Changes:

  • [BREAKING] Raise KeyError exceptions instead of TypeError when accessing entities that do not exist.