Multi-objective environments
回答済みHello,
I want to add a time limit on one of the my objectives but ı couldn't and didNt understant why it doesn't work. Here what I did: I want to add the limit to my objective with index 3. Thank you.
m.ModelSense = GRB.MINIMIZE
m.setObjectiveN(maxtotal - mintotal, index=0, priority=4)
m.setObjectiveN(maxtotalA - mintotalA, index=1, priority=2)
m.setObjectiveN(maxtotalG - mintotalG, index=2, priority=2)
m.setObjectiveN(maxtotalY - mintotalY, index=3, priority=1)
env3 = m.getMultiobjEnv(3)
env3.setParam('TimeLimit', 40)
-
正式なコメント
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 why not try our AI Gurobot?. -
Hi Ahmet,
What makes you think that the [TimeLimit](https://www.gurobi.com/documentation/9.1/refman/timelimit.html) was not set for objective with index 3? Could you post a LOG snippet showing the wrong behavior? Please note that you will not see a LOG message stating that the Timelimit has been set to 40 for the particular objective.
Best regards,
Jaromił0 -
Hello Jaromił,
Thank you for response. I think I figured out where I was mistaken. Objectives with index 1 and 2 have the same priority, which made objective with index 3 become third objective to be solved. and indexing starts with 0. So I should have written in this way, "m.getMultiobjEnv(2)". This approach works to what I observe in my model. In conclusion, objectives with priority 2 act like they have the same index. I guess...
Best regards,
Ahmet
0
投稿コメントは受け付けていません。
コメント
3件のコメント