App Logic
Make on-the-fly model mods
Constraints
App Logic
Model Assembly at Runtime
AMPL
We add functionality to our script that drops unneeded constraints per user-specified options, effectively changing the form of our optimization model on-the-fly. We also discuss extreme approaches to such run-time model construction, in light of the modular nature of optimization model components.
Switch our glue language to Python
Python
App Logic
AMPL
Having worked thus far in only the AMPL modeling and scripting languages respectively, we jettison the AMPL scripting language and replace it with Python. This transforms our model into a component callable from within Python via the AMPL-Python API.
'Glue' Languages
General Languages
Python
App Logic
Discussing the use and interchangeability of general languages which ‘glue’ optimization application components together and implement out-of-model app logic.