September 2022

Production mix - Model 6, Pyomo abstract

21 September 2022 (1,571 words)

Abstract

In this article we continue the Python Production mix series, using the Pyomo library. Specifically, we build Model 6, which changes Model 5 to:

  • Declare the model as a Pyomo pyo.AbstractModel, rather than as a pyo.ConcreteModel.
  • Read the data from a dat file rather than a json file.

These changes show that, contrary to how abstract and concrete models are portrayed in most blogs, there is actually little difference between abstract and concrete Pyomo models.


Production mix - Model 5, Pyomo using def

5 September 2022 (1,891 words)

Light steps

In this article we continue the Python Production mix series, using the Pyomo library. Specifically, we build Model 5, which changes Model 4 to:

  • Define the constraints and objective function using def function blocks.
  • Output the slack values and dual prices (also known as shadow prices) for each constraint.

These changes give us more control over how the model is defined and provide more information about the solution.


Results 1 - 2 of 2