Update constraints and stopping condition in callback.

44 views
Skip to first unread message

Minh Vu Duc

unread,
Jan 13, 2017, 8:47:35 PM1/13/17
to Gurobi Optimization

Dear community,

H   16    16                     914.9999998  906.39184  0.94%   968 2992s                          
    16    18  906.40000   15  217  915.00000  906.39184  0.94%   990 2997s -> I want to replace 906.xxx by 907
    20    16  909.00000    1  208  915.00000  906.40000  0.94%   846 3006s
    21    17  909.00000    2  236  915.00000  906.40000  0.94%   830 3014s
    22    18  909.00000    3  210  915.00000  906.40000  0.94%   805 3019s
    23    19  909.00000    4  201  915.00000  906.40000  0.94%   789 3025s
H   24    13                     909.0000000  906.40000  0.29%   756 3030s 


I want to update a  constraint;  for example, "obj >= 906" to "obj>=207" during the execution whenever the lower bound is not an integer. What is your suggestion? I appreciate your advices.

Best,

Lessi.


Michael Winkler

unread,
Jan 14, 2017, 4:10:07 AM1/14/17
to Gurobi Optimization
Could you please post the whole log.

Michael

Minh Vu Duc

unread,
Jan 14, 2017, 11:47:58 AM1/14/17
to Gurobi Optimization

My other question is that there is no status like GBR_FEASIBLE (optimization_status_codes.html )?

So the only way is that I need to query the objective value to check if it has any feasible solution or not?

Thanks,


Vào 19:47:35 UTC-6 Thứ Sáu, ngày 13 tháng 1 năm 2017, Minh Vu Duc đã viết:

Minh Vu Duc

unread,
Jan 15, 2017, 1:15:54 PM1/15/17
to Gurobi Optimization
Dear Michael,

This is the link to an example whole log (a TSP on an acyclic time-space network). Hope it help you find something interesting.

Optimize a model with 2331 rows, 18790 columns and 228331 nonzeros ; and infeasible proved after 6930s.



Vào 03:10:07 UTC-6 Thứ Bảy, ngày 14 tháng 1 năm 2017, Michael Winkler đã viết:

Minh Vu Duc

unread,
Jan 15, 2017, 1:15:56 PM1/15/17
to Gurobi Optimization

I solved this question by using method to get the number of feasible solutions.

Minh. 

Vào 10:47:58 UTC-6 Thứ Bảy, ngày 14 tháng 1 năm 2017, Minh Vu Duc đã viết:

Michael Winkler

unread,
Jan 19, 2017, 12:02:59 AM1/19/17
to Gurobi Optimization
Thanks for posting the log but I noticed that I cannot see if the objective is integral or not.

But to come back to your question, first of all let me say that if your objective is integral this will be detected and used for the optimization process, so there would not be any reason to explicitly add cuts/constraints if the relaxation gives you a non-integral bound. Also (local) lower bound constraints usually screw up the optimization process often leading to worse results.
If your objective function is not easy recognized to be integral you might want to think about adding this extra information to your original model.

Still if you want to add lower bound cuts you can do it via callbacks but again I think it would help a lot.

Best, Michael
Reply all
Reply to author
Forward
0 new messages