Overview
If your model is written in Pyomo, you create a Python module with the following functions. The remaining chapters in this section describe each one in detail.
scenario_creator– builds a Pyomo model for one scenario (see scenario_creator function)scenario_names_creator– returns the list of scenario names (see Helper Functions in the Model File)kw_creator– returns keyword arguments for the scenario creator (see Helper Functions in the Model File)inparser_adder– adds problem-specific command-line arguments (see Helper Functions in the Model File)scenario_denouement– called at termination (can beNone; see Helper Functions in the Model File)
Once you have these functions, you can use generic_cylinders.py
(see generic_cylinders.py) to solve your problem using the EF or
the hub-and-spoke system. See the farmer directory in examples
for a complete working example (farmer.py and farmer_generic.bash).
For models written in an algebraic modeling language other than Pyomo (e.g., AMPL or GAMS), see AML Agnosticism. For models supplied as SMPS-format files, see SMPS Format Support.