<br><font size=2 face="sans-serif">That's right: SmiScnModel::readSmps()
will not read all bounds formats correctly. SmiScnModel seems to
be working fine, though.</font>
<br>
<br><font size=2 face="sans-serif">So its better to use the "direct
interface pattern". I have uploaded the nice Bug example using
this pattern into Coin/Examples/Stoch/stoch.cpp. </font>
<br>
<br><font size=2 face="sans-serif">Thanks Francois!</font>
<br><font size=2 face="sans-serif"><br>
Alan King</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Francois Margot <fmargot@andrew.cmu.edu></b>
</font>
<br><font size=1 face="sans-serif">Sent by: coin-smi-bounces@list.coin-or.org</font>
<p><font size=1 face="sans-serif">05/20/2005 12:00 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">coin-smi@list.coin-or.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[Coin-SMI] Changing right hand side
of inequalities</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt><br>
I am trying to change the right hand side of inequalities in the .stoch
file. <br>
When working with equalities, everything works as expected, but with <br>
inequalities, instead of changing the rhs, the code creates a ranged <br>
constraint. I list below the three input files creating the problem.<br>
<br>
The code we use is basically the following:<br>
<br>
smi.readSmps(bug);<br>
OsiClpSolverInterface *clp = new OsiClpSolverInterface();<br>
smi.setOsiSolverHandle(*clp);<br>
OsiSolverInterface *osiStoch =smi.loadOsiSolverData();<br>
osiStoch->writeMps("bug");<br>
<br>
Using the following files:<br>
<br>
----------------------------------------------------------<br>
bug.core file:<br>
<br>
NAME BUG<br>
ROWS<br>
N obj<br>
G C0<br>
G C1<br>
G C2<br>
G C3<br>
COLUMNS<br>
x01 obj 1<br>
x01 C3 1<br>
x01 C1 1<br>
x01 C0 1<br>
x02 obj 1<br>
x02 C2 1<br>
x02 C1 1<br>
x02 C0 1<br>
x03 obj 1<br>
x03 C3 1<br>
x03 C2 1<br>
x03 C0 1<br>
x04 obj 0.5<br>
x04 C3 1<br>
x04 C1 1<br>
x05 obj 0.5<br>
x05 C2 1<br>
x05 C1 1<br>
x06 obj 0.5<br>
x06 C3 1<br>
x06 C2 1<br>
RHS<br>
RHS C0 0<br>
RHS C1 1<br>
RHS C2 1<br>
RHS C3 1<br>
ENDATA<br>
----------------------------------------------------------<br>
bug.stoch file:<br>
<br>
NAME BUG<br>
SCENARIOS DISCRETE
REPLACE<br>
SC SCEN01 ROOT 0.500
STG02<br>
RHS C1
1.000<br>
RHS C2
1.000<br>
RHS C3
0.000<br>
SC SCEN02 ROOT 0.500
STG02<br>
RHS C1
0.000<br>
RHS C2
1.000<br>
RHS C3
0.000 <br>
ENDATA<br>
<br>
-----------------------------------------------------------<br>
bug.time:<br>
<br>
TIME BUG<br>
PERIODS LP<br>
x01 C0
STG01<br>
x04 C1
STG02 <br>
ENDATA <br>
-----------------------------------------------------------<br>
<br>
bug.mps file obtained:<br>
<br>
<br>
NAME BLANK <br>
ROWS<br>
N OBJROW<br>
G R0000000<br>
E R0000001<br>
E R0000002<br>
L R0000003<br>
L R0000004<br>
E R0000005<br>
L R0000006<br>
COLUMNS<br>
C0000000 OBJROW 1.
R0000000 1.<br>
C0000000 R0000001 1.
R0000003 1.<br>
C0000000 R0000004 1.
R0000006 1.<br>
C0000001 OBJROW 1.
R0000000 1.<br>
C0000001 R0000001 1.
R0000002 1.<br>
C0000001 R0000004 1.
R0000005 1.<br>
C0000002 OBJROW 1.
R0000000 1.<br>
C0000002 R0000002 1.
R0000003 1.<br>
C0000002 R0000005 1.
R0000006 1.<br>
C0000003 OBJROW 0.25
R0000001 1.<br>
C0000003 R0000003 1.<br>
C0000004 OBJROW 0.25
R0000001 1.<br>
C0000004 R0000002 1.<br>
C0000005 OBJROW 0.25
R0000002 1.<br>
C0000005 R0000003 1.<br>
C0000006 OBJROW 0.25
R0000004 1.<br>
C0000006 R0000006 1.<br>
C0000007 OBJROW 0.25
R0000004 1.<br>
C0000007 R0000005 1.<br>
C0000008 OBJROW 0.25
R0000005 1.<br>
C0000008 R0000006 1. <br>
RHS<br>
RHS R0000001 1.
R0000002 1.<br>
RHS R0000005 1. <br>
RANGES<br>
RANGE R0000003 -1.
R0000004 -1.<br>
RANGE R0000006 -1. <br>
ENDATA<br>
------------------------------------------------------------------<br>
<br>
Note that R0000001, R0000002, and R0000005 become equalities (instead of
>= 1)<br>
and R0000003, R0000004, and R0000006 become ranged constraints <br>
(instead of >= 0).<br>
<br>
If the proper way to change the rhs of inequalities is something else,
<br>
I would appreciate a simple example.<br>
<br>
Francois<br>
_______________________________________________<br>
Coin-SMI mailing list<br>
Coin-SMI@list.coin-or.org<br>
http://list.coin-or.org/mailman/listinfo/coin-smi<br>
</tt></font>
<br>