I am trying to code a Linear Programming model with Pyomo. I have a question about the if statement. Let objective is minimum the time of all jobs done.
Job1 Job2 Setup
machine1 25 30 30
machine2 40 50 50
machine3 35 59 60
Each machine needs to be set up at least once, if machine 1 and machine 2 both are being used, we need extra 20 mins.
I have read some posts about the big-M method that can solve this problem. But I don't know how to do it when it related to the objective. Thanks!
Let m(i)∈{0,1}
indicating if machine i is used. Then the additional setup time can look like:
both12Time ≥ 20*(m(1) + m(2) - 1)
both12Time ≥ 0
We assume here total time is minimized.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.