374 Introduction to Computational Models with Python
47 model.DConst3 = Constraint(expr=
48 model.x[1,3] + model.x[2,3] + model.x[3,3] >= 1000)
49 model.DConst4 = Constraint(expr=
50 model.x[1,4] + model.x[2,4] + model.x[3,4] >= 500.0)
Running the model produces the following output listing. Note that the
optimal total trans por tation cost is 141, 000 and some of the va lue s of x are
zero. If x
i,j
= 0, then the amount of the product to be transported from
supply point i to demand point j is zero. In this problem, the total dema nd
of demand point D1 is satisfied by the amount 400 from supply point S1, and
the amount 300 from supply point S3. There was no supply from s upply point
D2 to demand point D1, therefore x
2,1
= 0.
$ pyomo transport1.py --summ ...