432 Introduction to Computational Models with Python
# Total Time of Project
model.TConstraint = Constraint(expr=
model.x[6] - model.x[1] <= 28)
The following listing shows the results of running the model with the Py-
omo modeler. The total cost of reducing the time interval for completion of
the project is $58 .50. Note that the completion time of activities A
1,2
, A
3,6
,
A
3,4
, and A
4,5
, were not reduced. However, the completion time of activity
A
5,6
was reduced by 2 days.
[ 0.00] Setting up Pyomo environment
[ 0.00] Applying Pyomo preprocessing actions
Reducing Time of Project
[ 0.00] Creating model
[ 0.01] Applying solver
[ 0.05] Processing results
Number of solutions: 1
Solution Information
Gap: 0.0
Status: feasible
Function Value: 58.5
Solver results file ...