
356 Introduction to Computational Models with Python
respectively. The first 26 units of P
4
and P
5
have sale prices of $5.85
each; all excess units have a sale price of $4.50 each. The operational
costs of device s A and B are $5.25 per hour, and $ 5.85 fo r device C. The
cost of materials for products P
1
and P
4
are $2.75. For products P
2
, P
3
,
and P
5
the materials cost is $2.25. Hint: assume that x
i
, i = 1 . . . 5 are
the number of units produced of the various products and use two new
variables y
4
and y
5
for the units produced of P
4
and P
5
, respectively
in excess of 26. Write the formulation of the mathematical optimization
problem. Use Pyomo and Pulp to