[Cbc] Artificial variables

acw at ascent.com acw at ascent.com
Fri Aug 17 10:30:41 EDT 2012


I am no longer certain I understand what you are doing.  You say "I do not 
understand what do you mean integer variables ... I do not declare 
anywhere ..." Why are you using Cbc if none of your variables are declared 
to be integer?  If all the variables are real-valued, you can use an LP 
solver directly.  All the complexity of Cbc is to deal with variables that 
are constrained to have integer values.

After a solver has been loaded with a problem, the method 
OsiSolverInterface.writeMps(const char *filename) will save an MPS file 
whose name is the filename plus the extension ".mps".  Once you have an 
MPS file, many people on this mailing list will be able to help you, 
because they will be able to try their own solvers on your problem.



From:
Christos <chtsolak at gmail.com>
To:
acw at ascent.com
Cc:
Allan Wechsler <acw at robson.ascent.com>, "cbc at list.coin-or.org" 
<cbc at list.coin-or.org>
Date:
08/10/2012 04:52 PM
Subject:
Re: [Cbc] Artificial variables



A lot of very useful info in one email! -many explanatory questions arise!

Look under your sentences.



On 10/8/2012 23:10, acw at ascent.com wrote:
The problem is certainly infeasibility.  Unboundedness is simply not 
possible if all the variables have bounds.  Here are some random ideas. 

If you can do it without modifying your code too painfully, you might try 
selectively disabling constraints to find an infeasible set. 

Because it is painful, i will try the other solutions first.
I assume you have some integer variables.  If so, make sure that their 
bounds all include at least one integer.  For instance, if X is an 
integer, but 0.3 <= X <= 0.82, then the problem is infeasible because 
there are no integers in that range. 

I do not understand what do you mean "integer variables" as soon as i do 
not declare anywhere, i only pass the column and row bounds, the 
objective, the value, index, start matrices, and the number of rows and 
columns.

But there are no such bound in any of the variables. Some have equal 
bounds (0), i do not know if this is a problem. I doesn't seems to be..

Look at your objective, and try removing the lower bounds on some 
variables with positive coefficients, or the upper bounds on some with 
negative coefficients.  This might give you a better idea of the nature of 
the infeasibility. 
All variables have positive coefficients and all have collb=0. I made them 
-infinity but the defect became bigger

Remember that an infeasibility is a distributed issue; you cannot 
attribute it to a single bound or constraint.  The best you can hope for 
is to find a small subset of your bounds and constraints that is still 
infeasible, but is simple enough to understand. 

You might want to try saving the problem as an MPS file (using WriteMps), 
so that you can more easily modify the problem and make your debug cycle 
simpler. 

This would be really useful. How can i use it through C++? 
As i mentioned C++ reads data from excel file, puts them in matrices, 
builds the model (ie the index, value, start, obj...) and calls the 
solver.
How can i make it write an .mps file? Do i need time to learn something 
like CBC?

Thank you


From: 
Christos <chtsolak at gmail.com> 
To: 
acw at ascent.com 
Cc: 
Allan Wechsler <acw at robson.ascent.com>, "cbc at list.coin-or.org" 
<cbc at list.coin-or.org> 
Date: 
08/10/2012 03:59 PM 
Subject: 
Re: [Cbc] Artificial variables




Thank you very much for you time and your valuable help.

Yes, all the variables are bounded.. Some of them have equal low and upper 
bounds. I tried by differing them, but the problem remains...

I would try the option of limiting the objective but the code is too 
complex to add a new constrain in a few hours.. (The model is constructed 
in C++ by reading an excel file).

So, i almost agree that the defect is infeasibility.

Can you suggest any trick to find it while trying to limit the objective?

Thank you very much.


On 10/8/2012 20:06, acw at ascent.com wrote: 
The objective is a linear combination of some set of variables.  Of course 
I don't know what your objective function is, but let's call it F. 

Since this is a minimization problem, I propose adding one more constraint 
to the problem, F >= -1e6.  If unboundedness is the problem, the modified 
problem will solve with no trouble. 

In your first response, you mention variable bounds.  Do you have bounds 
on all your variables?  If you do, then my analysis is probably wrong and 
the difficulty is infeasibility rather than unboundedness. 

It should not be necessary to know any solver internals to figure out 
what's wrong. 

From: 
Christos <chtsolak at gmail.com> 
To: 
acw at ascent.com 
Cc: 
"cbc at list.coin-or.org" <cbc at list.coin-or.org>, Allan Wechsler 
<acw at robson.ascent.com> 
Date: 
08/10/2012 12:37 PM 
Subject: 
Re: [Cbc] Artificial variables





I forgot to mention that it is a minimization problem , so i do not know 
if there is any point in limiting objective.

Sorry for the double mail.

On 10/8/2012 19:24, acw at ascent.com wrote: 
No single constraint is responsible for an infeasibility.  Consider a 
system with one variable, and two constraints, X >= 7 and X <= 4.  This 
system is obviously infeasible, but which of the two constraints is at 
fault? 

In your case I suspect that the problem is unbounded rather than 
infeasible, because you have so few constraints and so many variables. 
Unless the problem has a very special structure, a problem with fewer 
constraints than variables is likely to be unbounded. 

You can check this by adding a constraint that limits your objective to, 
say, 1e6.  If the problem now solves, then unboundedness is almost 
certainly your difficulty. 
From: 
Christos <chtsolak at gmail.com> 
To: 
cbc at list.coin-or.org 
Date: 
08/10/2012 09:32 AM 
Subject: 
[Cbc] Artificial variables






Hi, i have a model with around 10000 variable and 1500 equations.

But i get the messages on the photo when i run it:
http://imageshack.us/photo/my-images/39/dascd.png/

Is there any way to use artificial variable or something else in order 
to find the problematic equation?

Thank you in advance
_______________________________________________
Cbc mailing list
Cbc at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/cbc




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20120817/0a9e3ce7/attachment.html>


More information about the Cbc mailing list