<font size=2 face="sans-serif">I am no longer certain I understand what
you are doing. &nbsp;You say &quot;I do not understand what do you mean
integer variables ... I do not declare anywhere ...&quot; Why are you using
Cbc if none of your variables are declared to be integer? &nbsp;If all
the variables are real-valued, you can use an LP solver directly. &nbsp;All
the complexity of Cbc is to deal with variables that are constrained to
have integer values.</font>
<br>
<br><font size=2 face="sans-serif">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 &quot;.mps&quot;.
&nbsp;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.</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">Christos &lt;chtsolak@gmail.com&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">acw@ascent.com</font>
<tr>
<td valign=top><font size=1 color=#5f5f5f face="sans-serif">Cc:</font>
<td><font size=1 face="sans-serif">Allan Wechsler &lt;acw@robson.ascent.com&gt;,
&quot;cbc@list.coin-or.org&quot; &lt;cbc@list.coin-or.org&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">08/10/2012 04:52 PM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">Re: [Cbc] Artificial variables</font></table>
<br>
<hr noshade>
<br>
<br>
<br><font size=3 color=#a00000>A lot of very useful info in one email!
-many explanatory questions arise!<br>
<br>
Look under your sentences.</font><font size=3><br>
<br>
<br>
<br>
On 10/8/2012 23:10, </font><a href=mailto:acw@ascent.com><font size=3 color=blue><u>acw@ascent.com</u></font></a><font size=3>
wrote:</font>
<br><font size=2 face="sans-serif">The problem is certainly infeasibility.
&nbsp;Unboundedness is simply not possible if all the variables have bounds.
&nbsp;Here are some random ideas.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
If you can do it without modifying your code too painfully, you might try
selectively disabling constraints to find an infeasible set.</font><font size=3>
<br>
</font>
<br><font size=3 color=#a00000>Because it is painful, i will try the other
solutions first.</font>
<br><font size=2 face="sans-serif">I assume you have some integer variables.
&nbsp;If so, make sure that their bounds all include at least one integer.
&nbsp;For instance, if X is an integer, but 0.3 &lt;= X &lt;= 0.82, then
the problem is infeasible because there are no integers in that range.</font><font size=3>
<br>
</font>
<br><font size=3 color=#a00000>I do not understand what do you mean &quot;integer
variables&quot; 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.<br>
<br>
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..</font><font size=3><br>
</font>
<br><font size=2 face="sans-serif">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. &nbsp;This might give you a
better idea of the nature of the infeasibility.</font><font size=3> </font>
<br><font size=3 color=#a00000>All variables have positive coefficients
and all have collb=0. I made them -infinity but the defect became bigger</font>
<br><font size=2 face="sans-serif"><br>
Remember that an infeasibility is a distributed issue; you cannot attribute
it to a single bound or constraint. &nbsp;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.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
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.</font><font size=3> <br>
</font>
<br><font size=3 color=#a00000>This would be really useful. How can i use
it through C++? <br>
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.<br>
How can i make it write an .mps file? Do i need time to learn something
like CBC?<br>
<br>
Thank you</font><font size=3><br>
</font>
<br>
<table width=100%>
<tr valign=top>
<td width=9%><font size=1 color=#5f5f5f face="sans-serif">From:</font><font size=3>
</font>
<td width=90%><font size=1 face="sans-serif">Christos </font><a href=mailto:chtsolak@gmail.com><font size=1 color=blue face="sans-serif"><u>&lt;chtsolak@gmail.com&gt;</u></font></a><font size=3>
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font><font size=3>
</font>
<td><a href=mailto:acw@ascent.com><font size=1 color=blue face="sans-serif"><u>acw@ascent.com</u></font></a><font size=3>
</font>
<tr>
<td valign=top><font size=1 color=#5f5f5f face="sans-serif">Cc:</font><font size=3>
</font>
<td><font size=1 face="sans-serif">Allan Wechsler </font><a href=mailto:acw@robson.ascent.com><font size=1 color=blue face="sans-serif"><u>&lt;acw@robson.ascent.com&gt;</u></font></a><font size=1 face="sans-serif">,
</font><a href="mailto:cbc@list.coin-or.org"><font size=1 color=blue face="sans-serif"><u>&quot;cbc@list.coin-or.org&quot;</u></font></a><font size=1 face="sans-serif">
</font><a href="mailto:cbc@list.coin-or.org"><font size=1 color=blue face="sans-serif"><u>&lt;cbc@list.coin-or.org&gt;</u></font></a><font size=3>
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font><font size=3>
</font>
<td><font size=1 face="sans-serif">08/10/2012 03:59 PM</font><font size=3>
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font><font size=3>
</font>
<td><font size=1 face="sans-serif">Re: [Cbc] Artificial variables</font></table>
<br><font size=3><br>
</font>
<hr noshade><font size=3><br>
<br>
<br>
Thank you very much for you time and your valuable help.<br>
<br>
Yes, all the variables are bounded.. Some of them have equal low and upper
bounds. I tried by differing them, but the problem remains...<br>
<br>
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).<br>
<br>
So, i almost agree that the defect is infeasibility.<br>
<br>
Can you suggest any trick to find it while trying to limit the objective?<br>
<br>
Thank you very much.<br>
<br>
<br>
On 10/8/2012 20:06, </font><a href=mailto:acw@ascent.com><font size=3 color=blue><u>acw@ascent.com</u></font></a><font size=3>
wrote: </font><font size=2 face="sans-serif"><br>
The objective is a linear combination of some set of variables. &nbsp;Of
course I don't know what your objective function is, but let's call it
F.</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
Since this is a minimization problem, I propose adding one more constraint
to the problem, F &gt;= -1e6. &nbsp;If unboundedness is the problem, the
modified problem will solve with no trouble.</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
In your first response, you mention variable bounds. &nbsp;Do you have
bounds on all your variables? &nbsp;If you do, then my analysis is probably
wrong and the difficulty is infeasibility rather than unboundedness.</font><font size=3>
</font><font size=2 face="sans-serif"><br>
<br>
It should not be necessary to know any solver internals to figure out what's
wrong.</font><font size=3> <br>
</font>
<table width=100%>
<tr valign=top>
<td width=9%><font size=1 color=#5f5f5f face="sans-serif">From:</font><font size=3>
</font>
<td width=90%><font size=1 face="sans-serif">Christos </font><a href=mailto:chtsolak@gmail.com><font size=1 color=blue face="sans-serif"><u>&lt;chtsolak@gmail.com&gt;</u></font></a><font size=3>
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font><font size=3>
</font>
<td><a href=mailto:acw@ascent.com><font size=1 color=blue face="sans-serif"><u>acw@ascent.com</u></font></a><font size=3>
</font>
<tr>
<td valign=top><font size=1 color=#5f5f5f face="sans-serif">Cc:</font><font size=3>
</font>
<td><a href="mailto:cbc@list.coin-or.org"><font size=1 color=blue face="sans-serif"><u>&quot;cbc@list.coin-or.org&quot;</u></font></a><font size=1 face="sans-serif">
</font><a href="mailto:cbc@list.coin-or.org"><font size=1 color=blue face="sans-serif"><u>&lt;cbc@list.coin-or.org&gt;</u></font></a><font size=1 face="sans-serif">,
Allan Wechsler </font><a href=mailto:acw@robson.ascent.com><font size=1 color=blue face="sans-serif"><u>&lt;acw@robson.ascent.com&gt;</u></font></a><font size=3>
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font><font size=3>
</font>
<td><font size=1 face="sans-serif">08/10/2012 12:37 PM</font><font size=3>
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font><font size=3>
</font>
<td><font size=1 face="sans-serif">Re: [Cbc] Artificial variables</font></table>
<br><font size=3><br>
<br>
</font>
<hr noshade><font size=3><br>
<br>
<br>
I forgot to mention that it is a minimization problem , so i do not know
if there is any point in limiting objective.<br>
<br>
Sorry for the double mail.<br>
<br>
On 10/8/2012 19:24, </font><a href=mailto:acw@ascent.com><font size=3 color=blue><u>acw@ascent.com</u></font></a><font size=3>
wrote: </font><font size=2 face="sans-serif"><br>
No single constraint is responsible for an infeasibility. &nbsp;Consider
a system with one variable, and two constraints, X &gt;= 7 and X &lt;=
4. &nbsp;This system is obviously infeasible, but which of the two constraints
is at fault?</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
In your case I suspect that the problem is unbounded rather than infeasible,
because you have so few constraints and so many variables. &nbsp;Unless
the problem has a very special structure, a problem with fewer constraints
than variables is likely to be unbounded.</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
You can check this by adding a constraint that limits your objective to,
say, 1e6. &nbsp;If the problem now solves, then unboundedness is almost
certainly your difficulty.</font><font size=3> </font>
<table width=100%>
<tr valign=top>
<td width=22%><font size=1 color=#5f5f5f face="sans-serif">From:</font><font size=3>
</font>
<td width=77%><font size=1 face="sans-serif">Christos </font><a href=mailto:chtsolak@gmail.com><font size=1 color=blue face="sans-serif"><u>&lt;chtsolak@gmail.com&gt;</u></font></a><font size=3>
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font><font size=3>
</font>
<td><a href="mailto:cbc@list.coin-or.org"><font size=1 color=blue face="sans-serif"><u>cbc@list.coin-or.org</u></font></a><font size=3>
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font><font size=3>
</font>
<td><font size=1 face="sans-serif">08/10/2012 09:32 AM</font><font size=3>
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font><font size=3>
</font>
<td><font size=1 face="sans-serif">[Cbc] Artificial variables</font></table>
<br><font size=3><br>
<br>
<br>
</font>
<hr noshade><tt><font size=2><br>
<br>
<br>
Hi, i have a model with around 10000 variable and 1500 equations.<br>
<br>
But i get the messages on the photo when i run it:</font></tt><font size=3 color=blue><u><br>
</u></font><a href="http://imageshack.us/photo/my-images/39/dascd.png/"><tt><font size=2 color=blue><u>http://imageshack.us/photo/my-images/39/dascd.png/</u></font></tt></a><tt><font size=2><br>
<br>
Is there any way to use artificial variable or something else in order
<br>
to find the problematic equation?<br>
<br>
Thank you in advance<br>
_______________________________________________<br>
Cbc mailing list</font></tt><font size=3 color=blue><u><br>
</u></font><a href="mailto:Cbc@list.coin-or.org"><tt><font size=2 color=blue><u>Cbc@list.coin-or.org</u></font></tt></a><font size=3 color=blue><u><br>
</u></font><a href="http://list.coin-or.org/mailman/listinfo/cbc"><tt><font size=2 color=blue><u>http://list.coin-or.org/mailman/listinfo/cbc</u></font></tt></a><font size=3><br>
<br>
<br>
</font>
<br>
<br>