I am learning Pyomo Abstract Modeling from a Book.
I have an example that has an objective functionEquation is here to minimize the cost of establishing a warehouse at optimal locations to build warehouses to meet delivery demands. The authors modeled the objective with this script Script is here.
Here in the script "model.d" is "Param" and "model.x" is "Var" Why he has used Param for "model.d" and "Var" for "model.x"? Please take spare precious time to help me to get out of this.
Not only in
pyomo
, but in general, for Operations Researchs or Optimization. AParameter
is a given value that you know prior solving the problem. On the other hand, aVariable
is a value that you will find solving the problem in order to get the best solution.Suposse that in your problem
model.d
is the cost of constructing the warehousemodel.x
. This means that for each potential warehousex
, construct it costd
. This assumme that if your building a warehouse, you know the capital cost of constructing such a warehouse, therefore, it is known before solving the problem, thenmodel.d
is aparameter
.model.x
isvariable
since you don't know whether if construct it or not. You want want the model to tell you that, therefore, it is avariable