Skip to content

Handle infeasibility in branch and price - #25

Open
rowtricker wants to merge 6 commits into
coin-or:developmentfrom
rowtricker:handleInfeasibility
Open

Handle infeasibility in branch and price#25
rowtricker wants to merge 6 commits into
coin-or:developmentfrom
rowtricker:handleInfeasibility

Conversation

@rowtricker

Copy link
Copy Markdown

Fixes #22

@rowtricker rowtricker changed the title Handle infeasibility Handle infeasibility in branch and price Nov 26, 2016
Maven test passes when including these changes.
if (hasNewCuts)
continue;
else
status = SolverStatus.OPTIMAL;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the else clause must have brackets { }

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

* @return the {@link SolverStatus} associated to the master problem
*/
public boolean isOptimal()
public SolverStatus getStatus()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will break backward compatibility more than it should. Just leave isOptimal() in and add a new method getStatus()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, will fix this. W\hat about deprecating isOptimal() in this case? This could simplify future maintenance and makes it clear to the user that he can also use the alternative method?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with deprecation. Let me know if you rather not see the method deprecated

@@ -0,0 +1,22 @@
package org.jorlib.frameworks.columngeneration.util;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add the common class header (modified with your name and 2017-2017)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, I hope that this is how you meant it?

*
* @author Rowan Hoogervorst
*/
public enum SolverStatus

@jkinable jkinable Jan 2, 2017

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably think of a more elaborate return object. For instance, in case the solution is UNDECIDED, it would be nice to know what happened, e.g. 'time limit' or 'iteration limit' or something else. The first thing you want to know is the general status, e.g. infeasible/optimal/undecided/.... After that, you probably want to find out what the cause if of that status.

@rowtricker rowtricker Jan 9, 2017

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought of a similar approach but found it difficult to define all possible cases. Namely, it is quite difficult to determine beforehand which possible causes are available for a solution to not be found. Moreover, I had the feeling that such an approach is somewhat orthogonal to the handling of reaching the time limit at the moment, which mostly occurs through means of exceptions.

For this reason, the current separation is mostly through the actual possible states of the solve, where the reaching of a time limit might either lead to status UNDECIDED in case no solution has be found yet or to SOLUTION_AVAILABLE in case a feasible solution has been found.

One possible solution would be to add a constructor for the enums, which receives additional reasons for the status. Alternatively, we might simply extend the number of states, like is done by e.g. CPLEX: http://www.ibm.com/support/knowledgecenter/SSSA5P_12.7.0/ilog.odms.ide.help/refjavaopl/html/ilog/cplex/IloCplex.CplexStatus.html. Cplex actually has both a detailed (IloCplex.CplexStatus) and simple solver status (IloCplex.Status) available.

@jkinable

jkinable commented Jan 2, 2017

Copy link
Copy Markdown
Collaborator

Looks good. Few minor comments.

@rowtricker

Copy link
Copy Markdown
Author

All basic changes implemented. Awaiting your response for the others.

@rowtricker

Copy link
Copy Markdown
Author

Any updates on this one?

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants