Assigment with noise solution in MIP solver

29 views
Skip to first unread message

and...@gmail.com

unread,
Jan 16, 2022, 9:34:32 PM1/16/22
to or-tools-discuss
HI,
I am trying to solve GAP (Assignment problem) using MIP (also SAT solver is giving the same problem) and I am getting different solutions, although there is one with minimal cost.

This is the problem data, with 1 worker and 6 tasks, excluding the 2 "impossible" tasks with 'NA', there is 3 with same cost 10003 and one with the least cost 10002.

 [10002, 10003, 10003, 'NA', 'NA', 10003]   (1 worker versus 6 tasks)

The expected solution is obvious 10002, but the solver sometimes gives 10003 as well if you run it many times. 



To solve it the matrix is extended with "artificial workers" using the maxCost of previous matrix. Only the original workers are considered in the solution. The impossible task/variables has upper bound zero and effective zero cost in the objective.

tasks :  |                      0                       1                       2                       3                       4                       5 |
 worker       0 :  [               10002,00                10003,00                10003,00                     NaN                     NaN                10003,00 ],
 fake worker  1 :  [               10003,00                10003,00                10003,00                10003,00                10003,00                10003,00 ],
 fake worker  2 :  [               10003,00                10003,00                10003,00                10003,00                10003,00                10003,00 ],
 fake worker  3 :  [               10003,00                10003,00                10003,00                10003,00                10003,00                10003,00 ],
 fake worker  4 :  [               10003,00                10003,00                10003,00                10003,00                10003,00                10003,00 ],
 fake worker  5 :  [               10003,00                10003,00                10003,00                10003,00                10003,00                10003,00 ],
]



The expected solution is obvious 10002, but the solver sometimes gives 10003 if you run it many times. My unit test  sometimes go ok sometimes not. Anyone has any idea of what is going on? 


I have tried to check the condition number of the matrix, but the library does not calculates it...
System.out.println(" conditionNumber: "+solver.computeExactConditionNumber());
gives
 conditionNumber: 0.0
E0116 22:05:23.159661 22652 linear_solver.cc:1907] ComputeExactConditionNumber not implemented for SCIP_MIXED_INTEGER_PROGRAMMING

I also tried to insert some random noise in the matrix but it just make 10003 mre probable to arise in the solution

what else can I do to make it stable and reach 10002 solution?

Best regards

Andre
Reply all
Reply to author
Forward
0 new messages