
404 Introduction to Computational Models with Python
+5.0*x[3,1] + 7.0*x[3,2] + 10.0*x[3,3] + 6.0*x[3,4], \
"Assignment cost"
# Job Constraints
model += x[1,1] + x[2,1] + x[3,1] + x[4,1] -y[1] >= 1,"Job 1"
model += x[1,2] + x[2,2] + x[3,2] + x[4,2] -y[2] >= 1,"Job 2"
model += x[1,3] + x[2,3] + x[3,3] + x[4,3] -y[3] >= 1,"Job 3"
model += x[1,4] + x[2,4] + x[3,4] + x[4,4] -y[4] >= 1,"Job 4"
# Machine Constraints
model += x[1,1] + x[1,2] + x[1,3] + x[1,4] -y[5] >= 1, "Machine 1"
model += x[2,1] + x[2,2] + x[2,3] + x[2,4] -y[6] >= 1, "Machine 2"
model += x[3,1] + x[3,2] + x[3,3] + x[3,4] -y[7] >= 1, "Machine 3"
model += x[4,1] + x[4,2] + x[4,3] + x[4,4] -y[8] ...