Ask Your Question

Use of ‘constraint_generation’ in MixedIntegerLinearProgram

asked 2014-01-15 02:51:10 -0500

I would like to solve an LP problem using row generation (aka constraint generation), where I wish to be able to choose how the constraints are generated (this will be done using SAT, or WPMaxSAT through a binary MIP).

Now, in MixedIntegerLinearProgram, there is a boolean option constraint_generation. I do not find an explanation of its use and therefore whether it can be used for my stated purpose. So, can I, and if so, how?

Information found, but which did not make th option clear to me:

From the documentation:

constraint_generation – whether to require the returned solver to support constraint generation (excludes Coin). False by default.

From the source code documentation:

  • constraint_generation (boolean) -- whether the solver returned is to be used for constraint/variable generation. As the interface with Coin does not support constraint/variable generation, setting constraint_generation to False ensures that the backend to Coin is not returned when solver = None. This is set to False by default.

(N.B.: Shouldn't that be: “backend to Coin is not returned” -> “Coin backend may be returned”?)

edit retag flag offensive close merge delete


The second text-as-link is mangled by the askbot system (was fine in preview); problem with ‘#’?

Erik Quaeghebeur gravatar imageErik Quaeghebeur ( 2014-01-15 02:53:32 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2014-01-15 05:37:16 -0500

Nathann gravatar image


Well I don't see what it unclear here : "coin" does not support constraint generation. It just doesn't work, the solver does not like it. You cannot solve a LP, add a constraint, and solve it again.

So, because coin does not support constraint generation, there is a flag that lets you say "I want to use constraint generation, so only give me solvers that support it". If you set this to True, then Coin will never be returned, given that it does not support constraint generation.


What is wrong with that ?

edit flag offensive delete link more


By the way if you can PLEASE write to sage-support and not here. When you answer a message no email is sent, and I have no way to know :-/

Nathann gravatar imageNathann ( 2014-01-15 05:37:54 -0500 )edit

@Nathann - this question wasn't specifically to you, and is certainly appropriate for this forum. I agree that it's unfortunate that there isn't an automatic way to send certain tags to people... or is there? I just use an RSS feed and that works fine. That said, if you and the poster have many such exchanges, sage-support is probably more appropriate, true.

kcrisman gravatar imagekcrisman ( 2014-01-15 06:42:17 -0500 )edit

@Nathann - Thanks, this answer clarifies things for me. I still think the source code documentation is formulated incorrectly, but I will take that issue and follow-up questions to sage-support.

Erik Quaeghebeur gravatar imageErik Quaeghebeur ( 2014-01-15 21:38:48 -0500 )edit

@kcrisman Well I meant that his *answers to my answer* would trigger no email. I didn't mean that I should receive an alert everytime somebody says "LP" on AskSage. I just noticed several times that I answered a question there, somebody asked another one and it got forgotten for months :-/

Nathann gravatar imageNathann ( 2014-01-16 02:21:04 -0500 )edit

@Erik well I don't see how but anyway an unclear doc is as much a bug as anything else. Let's chat about it and fix it on a trac ticket !

Nathann gravatar imageNathann ( 2014-01-16 02:22:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-01-15 02:51:10 -0500

Seen: 169 times

Last updated: Jan 15 '14