<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Sorry for late responding but i didn't
have access to internet.<br>
<br>
-I found the solution to my problems. I had to relax some bounds
as you correctly suggested me, and thank you very much for that.<br>
<br>
-I attach a printscreen of the results. Using the commands "int
integers = solver1.getNumIntegers();" and<br>
"cout << "\nNumber of integers: " << integers;" as
you can see i have no integers...<br>
<br>
I use the command " OsiClpSolverInterface solver1;" so i think i
am not using Cbc, am i right?<br>
<br>
I do not know if there is a simple way to switch via solvers...<br>
<br>
-I created the mps file and i attach it. I do not know how to use
it with other solvers, so in short-term future i will contact you
to help me.<br>
<br>
Any comments would be very useful.<br>
<br>
<br>
PS. Which software do you suggest to open mps files?<br>
<br>
<br>
Thank you very much for your time!<br>
<br>
<br>
<br>
Attachments: <a class="moz-txt-link-freetext" href="https://dl.dropbox.com/u/12237320/DAS%20working.PNG">https://dl.dropbox.com/u/12237320/DAS%20working.PNG</a><br>
<br>
<a class="moz-txt-link-freetext" href="https://dl.dropbox.com/u/12237320/DAS_Model.mps">https://dl.dropbox.com/u/12237320/DAS_Model.mps</a><br>
<br>
<br>
On 17/8/2012 17:30, <a class="moz-txt-link-abbreviated" href="mailto:acw@ascent.com">acw@ascent.com</a> wrote:<br>
</div>
<blockquote
cite="mid:OFECAF4D19.24D96F25-ON85257A5D.004EB6D4-85257A5D.004FCC1F@ascent.com"
type="cite"><font face="sans-serif" size="2">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.</font>
<br>
<br>
<font face="sans-serif" size="2">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.</font>
<br>
<br>
<br>
<table width="100%">
<tbody>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">From:</font>
</td>
<td><font face="sans-serif" size="1">Christos
<a class="moz-txt-link-rfc2396E" href="mailto:chtsolak@gmail.com"><chtsolak@gmail.com></a></font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">To:</font>
</td>
<td><font face="sans-serif" size="1"><a class="moz-txt-link-abbreviated" href="mailto:acw@ascent.com">acw@ascent.com</a></font>
</td>
</tr>
<tr>
<td valign="top"><font color="#5f5f5f" face="sans-serif"
size="1">Cc:</font>
</td>
<td><font face="sans-serif" size="1">Allan Wechsler
<a class="moz-txt-link-rfc2396E" href="mailto:acw@robson.ascent.com"><acw@robson.ascent.com></a>,
<a class="moz-txt-link-rfc2396E" href="mailto:cbc@list.coin-or.org">"cbc@list.coin-or.org"</a> <a class="moz-txt-link-rfc2396E" href="mailto:cbc@list.coin-or.org"><cbc@list.coin-or.org></a></font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">Date:</font>
</td>
<td><font face="sans-serif" size="1">08/10/2012 04:52 PM</font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">Subject:</font>
</td>
<td><font face="sans-serif" size="1">Re: [Cbc] Artificial
variables</font></td>
</tr>
</tbody>
</table>
<br>
<hr noshade="noshade">
<br>
<br>
<br>
<font color="#a00000" size="3">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 moz-do-not-send="true"
href="mailto:acw@ascent.com"><font color="blue" size="3"><u>acw@ascent.com</u></font></a><font
size="3">
wrote:</font>
<br>
<font face="sans-serif" size="2">The problem is certainly
infeasibility.
Unboundedness is simply not possible if all the variables have
bounds.
Here are some random ideas.</font><font size="3"> <br>
</font><font face="sans-serif" size="2"><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 color="#a00000" size="3">Because it is painful, i will try
the other
solutions first.</font>
<br>
<font face="sans-serif" size="2">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.</font><font size="3">
<br>
</font>
<br>
<font color="#a00000" size="3">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.<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 face="sans-serif" size="2">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.</font><font
size="3"> </font>
<br>
<font color="#a00000" size="3">All variables have positive
coefficients
and all have collb=0. I made them -infinity but the defect
became bigger</font>
<br>
<font face="sans-serif" size="2"><br>
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.</font><font size="3"> <br>
</font><font face="sans-serif" size="2"><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 color="#a00000" size="3">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%">
<tbody>
<tr valign="top">
<td width="9%"><font color="#5f5f5f" face="sans-serif"
size="1">From:</font><font size="3">
</font>
</td>
<td width="90%"><font face="sans-serif" size="1">Christos </font><a
moz-do-not-send="true" href="mailto:chtsolak@gmail.com"><font
color="blue" face="sans-serif" size="1"><u><chtsolak@gmail.com></u></font></a><font
size="3">
</font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">To:</font><font
size="3">
</font>
</td>
<td><a moz-do-not-send="true" href="mailto:acw@ascent.com"><font
color="blue" face="sans-serif" size="1"><u>acw@ascent.com</u></font></a><font
size="3">
</font>
</td>
</tr>
<tr>
<td valign="top"><font color="#5f5f5f" face="sans-serif"
size="1">Cc:</font><font size="3">
</font>
</td>
<td><font face="sans-serif" size="1">Allan Wechsler </font><a
moz-do-not-send="true"
href="mailto:acw@robson.ascent.com"><font color="blue"
face="sans-serif" size="1"><u><acw@robson.ascent.com></u></font></a><font
face="sans-serif" size="1">,
</font><a moz-do-not-send="true"
href="mailto:cbc@list.coin-or.org"><font color="blue"
face="sans-serif" size="1"><u>"cbc@list.coin-or.org"</u></font></a><font
face="sans-serif" size="1">
</font><a moz-do-not-send="true"
href="mailto:cbc@list.coin-or.org"><font color="blue"
face="sans-serif" size="1"><u><cbc@list.coin-or.org></u></font></a><font
size="3">
</font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">Date:</font><font
size="3">
</font>
</td>
<td><font face="sans-serif" size="1">08/10/2012 03:59 PM</font><font
size="3">
</font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">Subject:</font><font
size="3">
</font>
</td>
<td><font face="sans-serif" size="1">Re: [Cbc] Artificial
variables</font></td>
</tr>
</tbody>
</table>
<br>
<font size="3"><br>
</font>
<hr noshade="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 moz-do-not-send="true"
href="mailto:acw@ascent.com"><font color="blue" size="3"><u>acw@ascent.com</u></font></a><font
size="3">
wrote: </font><font face="sans-serif" size="2"><br>
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.</font><font size="3"> </font><font face="sans-serif"
size="2"><br>
<br>
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.</font><font
size="3"> </font><font face="sans-serif" size="2"><br>
<br>
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.</font><font size="3">
</font><font face="sans-serif" size="2"><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%">
<tbody>
<tr valign="top">
<td width="9%"><font color="#5f5f5f" face="sans-serif"
size="1">From:</font><font size="3">
</font>
</td>
<td width="90%"><font face="sans-serif" size="1">Christos </font><a
moz-do-not-send="true" href="mailto:chtsolak@gmail.com"><font
color="blue" face="sans-serif" size="1"><u><chtsolak@gmail.com></u></font></a><font
size="3">
</font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">To:</font><font
size="3">
</font>
</td>
<td><a moz-do-not-send="true" href="mailto:acw@ascent.com"><font
color="blue" face="sans-serif" size="1"><u>acw@ascent.com</u></font></a><font
size="3">
</font>
</td>
</tr>
<tr>
<td valign="top"><font color="#5f5f5f" face="sans-serif"
size="1">Cc:</font><font size="3">
</font>
</td>
<td><a moz-do-not-send="true"
href="mailto:cbc@list.coin-or.org"><font color="blue"
face="sans-serif" size="1"><u>"cbc@list.coin-or.org"</u></font></a><font
face="sans-serif" size="1">
</font><a moz-do-not-send="true"
href="mailto:cbc@list.coin-or.org"><font color="blue"
face="sans-serif" size="1"><u><cbc@list.coin-or.org></u></font></a><font
face="sans-serif" size="1">,
Allan Wechsler </font><a moz-do-not-send="true"
href="mailto:acw@robson.ascent.com"><font color="blue"
face="sans-serif" size="1"><u><acw@robson.ascent.com></u></font></a><font
size="3">
</font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">Date:</font><font
size="3">
</font>
</td>
<td><font face="sans-serif" size="1">08/10/2012 12:37 PM</font><font
size="3">
</font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">Subject:</font><font
size="3">
</font>
</td>
<td><font face="sans-serif" size="1">Re: [Cbc] Artificial
variables</font></td>
</tr>
</tbody>
</table>
<br>
<font size="3"><br>
<br>
</font>
<hr noshade="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 moz-do-not-send="true"
href="mailto:acw@ascent.com"><font color="blue" size="3"><u>acw@ascent.com</u></font></a><font
size="3">
wrote: </font><font face="sans-serif" size="2"><br>
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?</font><font size="3"> </font><font
face="sans-serif" size="2"><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.
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 face="sans-serif" size="2"><br>
<br>
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.</font><font size="3"> </font>
<table width="100%">
<tbody>
<tr valign="top">
<td width="22%"><font color="#5f5f5f" face="sans-serif"
size="1">From:</font><font size="3">
</font>
</td>
<td width="77%"><font face="sans-serif" size="1">Christos </font><a
moz-do-not-send="true" href="mailto:chtsolak@gmail.com"><font
color="blue" face="sans-serif" size="1"><u><chtsolak@gmail.com></u></font></a><font
size="3">
</font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">To:</font><font
size="3">
</font>
</td>
<td><a moz-do-not-send="true"
href="mailto:cbc@list.coin-or.org"><font color="blue"
face="sans-serif" size="1"><u>cbc@list.coin-or.org</u></font></a><font
size="3">
</font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">Date:</font><font
size="3">
</font>
</td>
<td><font face="sans-serif" size="1">08/10/2012 09:32 AM</font><font
size="3">
</font>
</td>
</tr>
<tr valign="top">
<td><font color="#5f5f5f" face="sans-serif" size="1">Subject:</font><font
size="3">
</font>
</td>
<td><font face="sans-serif" size="1">[Cbc] Artificial
variables</font></td>
</tr>
</tbody>
</table>
<br>
<font size="3"><br>
<br>
<br>
</font>
<hr noshade="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
color="blue" size="3"><u><br>
</u></font><a moz-do-not-send="true"
href="http://imageshack.us/photo/my-images/39/dascd.png/"><tt><font
color="blue" size="2"><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 color="blue" size="3"><u><br>
</u></font><a moz-do-not-send="true"
href="mailto:Cbc@list.coin-or.org"><tt><font color="blue"
size="2"><u>Cbc@list.coin-or.org</u></font></tt></a><font
color="blue" size="3"><u><br>
</u></font><a moz-do-not-send="true"
href="http://list.coin-or.org/mailman/listinfo/cbc"><tt><font
color="blue" size="2"><u>http://list.coin-or.org/mailman/listinfo/cbc</u></font></tt></a><font
size="3"><br>
<br>
<br>
</font>
<br>
<br>
</blockquote>
<br>
</body>
</html>