Sequence tool restriction
回答済みHello everyone,
I have this data:
m = gp.Model('model')
jobs, tool = gp.multidict({
('A'): 1,
('B'): 1,
('C'): 2,
('D'): 3,
})
Where A,B,C,D are the jobs and 1,2,3 are the tools used for every a job.
I want to keep job A and B one after the other (sequence: process A after B o viceversa) because they are using same tool. How can I create a restriction for set in a sequence the jobs that have same tool?
Possible solutions:
A-B-C-D
B-A-C-D
D-A-B-C
....
Thanks in advance!
0
-
正式なコメント
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Susana,
For modeling of the job sequence, you could consider introducing an auxiliary variable which represents A-B, i.e., something like \(x_{AB} = x_{A} + x_{B}\) (I am just guessing here). This way you don't have to deal with 2 variable when working with sequences. In the case that B-A is different from A-B, you might have to introduce 2 auxiliary variables for sequence modeling.
Best regards,
Jaromił0
投稿コメントは受け付けていません。
コメント
2件のコメント