简体   繁体   中英

Slight difference in objective function of linear programming makes program extremely slow

I am using Google's OR Tool SCIP (Solving Constraint Integer Programs) solver to solve a Mixed integer programming problem using Python. The problem is a variant of the standard scheduling problem, where there are constraints limiting that each worker works maximum once per day and that every shift is covered by only one worker. The problem is modeled as follows:

混合整数规划模型

Where n represents the worker, d the day and i the specific shift in a given day. The problem comes when I change the objective function that I want to minimize from

快速目标函数

To:

慢目标函数

In the first case an optimal solution is found within 5 seconds. In the second case, after 20 minutes running, the optimal solution was still not reached. Any ideas to why this happens? How can I change the objective function without impacting performance this much?

Here is a sample of the values taken by the variables tier and acceptance used in the objective function. 目标函数的层级和验收示例数据

You should ask the SCIP team.

Have you tried using the SAT backend with 8 threads ?

The only thing that I can spot from reading your post is that the objective function is no longer pure integer after adding the acceptance. If you know that your objective is always integer that helps during the solve since you can also round up all your dual bounds. This might be critical for your problem class.

Maybe you could also post a SCIP log (preferable with statistics) of the two runs?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM