1

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!

1
  • 1
    We can't see the problem if you don't provide any code! Commented Dec 16, 2020 at 7:36

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.