<br><font size=2 face="sans-serif">Hi Leo</font>
<br>
<br><font size=2 face="sans-serif">Your note raises a number of very good
issues. &nbsp;I'm not sure I have all the answers here, but let me have
a go.</font>
<br>
<br><font size=2 face="sans-serif">The key issue I'm concerned about here
is data management. &nbsp;Parsing incoming scenario data into matrix blocks,
and then copying the result into data regions managed by the tree object
involves a lot of overhead. &nbsp;It seems better to put the incoming data
directly into the solver, and keep track of it using the extra information
provided by labels.</font>
<br>
<br><font size=2 face="sans-serif">It could be implemented by deriving
a class from OsiSolverInterface with new methods like:</font>
<br><font size=2 face="sans-serif">OsiStochSolverInterface::loadScenario(
scenarioID, LPData)</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; rowOffsetByLabel
= getRowOffsetByLabel(scenarioID);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; colOffsetByLabel
= getColOffsetByLabel(scenarioID);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; addColsWithLabelOffsets(LPData,colOffsetByLabel);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; addRowsWithLabelOffsets(LPData,rowOffsetByLabel);</font>
<br><font size=2 face="sans-serif">}</font>
<br><font size=2 face="sans-serif">OsiStochSolverInterface::getScenarioPrimalSolution(scenarioID)</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; labels
= getColLabels(scenarioID);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; return
extractColSolutionByLabels(labels);</font>
<br><font size=2 face="sans-serif">}</font>
<br>
<br><font size=2 face="sans-serif">There is a reasonable data/method encapsulation
emerging here. &nbsp;The methods addXXXWithLabelOffsets() and extractXXXByLabels()
naturally belong to a class that could be used for things other than stochastic
--- eg for modeling languages to interface with solvers that can take advantage
of model substructures. &nbsp;The &quot;labeled&quot; methods may in fact
be useful enough to include in the base OsiSolverInterface class, and implementations
may find themselves rewarded by devoting some effort to making such methods
efficient and useful.</font>
<br>
<br><font size=2 face="sans-serif">Finally, many stochastic processes have
a quite compact description that can be managed independent of a scenario
tree, and there are solution procedures that never have to form a scenario
tree. &nbsp;In fact, given the curse of dimensionality, one would like
to avoid having to form a scenario tree at all...</font>
<br>
<br><font size=2 face="sans-serif">Anyway, these are my thoughts at the
moment. &nbsp;Still many details to be worked out.</font>
<br>
<br><font size=2 face="sans-serif">Best,</font>
<br><font size=2 face="sans-serif">Alan</font>
<br>
<br><font size=2 face="sans-serif"><br>
Alan King<br>
http://www.research.ibm.com/people/k/kingaj/<br>
Mathematical Sciences Department<br>
IBM Thomas J. Watson Research Center<br>
(914) 945-1236, 8-862-1236</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Leonardo B Lopes &lt;leo@iems.northwestern.edu&gt;</b></font>
<br><font size=1 face="sans-serif">Sent by: coin-discuss-admin@www-124.southbury.usf.ibm.com</font>
<p><font size=1 face="sans-serif">02/25/2003 07:20 PM</font>
<br><font size=1 face="sans-serif">Please respond to coin-discuss</font>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To:
&nbsp; &nbsp; &nbsp; &nbsp;coin-discuss@www-124.southbury.usf.ibm.com</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc:
&nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject:
&nbsp; &nbsp; &nbsp; &nbsp;Re: [Coin-discuss] OsiStochSolverInterface
-- initial objective and outline</font></table>
<br>
<br>
<br><font size=2><tt>I think I have a different alternative we might want
to look at. But <br>
first let me make sure that I understand your proposal correctly. Say we
<br>
have the following scenario tree (if you cant see it correctly change to
<br>
fixed-width fonts):<br>
<br>
A--------A---------A<br>
 &nbsp;\ &nbsp; &nbsp; &nbsp; &nbsp;\<br>
 &nbsp; \ &nbsp; &nbsp; &nbsp; &nbsp;--------B<br>
 &nbsp; &nbsp;\<br>
 &nbsp; &nbsp; -----C---------C<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--------D<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;------E<br>
<br>
Are you proposing then that we name things buy[A,1] (1 is the stage) and
<br>
then have methods which would return, for example, all the variables <br>
containing the string &quot;A,1&quot;?<br>
<br>
How about having a Scenario Tree defined in the class Hierarchy <br>
somewhere? This tree would contain essentially an LP at every node, as
<br>
well as a reference to some previous stage LP and a matrix (a Technology
<br>
matrix in SP-speak) connecting this previous stage LP to the current LP.
<br>
Possibly, the matrices themselves might have a composition mechanism by
<br>
which one matrix can be produced from another similar one, similarly to
<br>
the SMPS specification. The composition mechanism is useful even outside
<br>
SLP.<br>
<br>
The main result of this design would be to move all the &quot;A,1&quot;
labels <br>
from the variables themselves to the node containing them.<br>
<br>
Coments?<br>
<br>
Alan King wrote:<br>
&gt; <br>
&gt; Hello folks<br>
&gt; <br>
&gt; Want to share a couple thoughts on the stochastic project and get
your <br>
&gt; permission to begin entering code into COIN.<br>
&gt; <br>
&gt; Our first objective will be to write a simple set of interfaces that
<br>
&gt; allow users to input scenario data, solve, and extract solution data
&quot;by <br>
&gt; scenario&quot;. &nbsp;We'll derive an OsiStochSolverInterface base
class from <br>
&gt; OsiSolverInterface, and then provide an implementation or two (OSLSE
and <br>
&gt; CLP). &nbsp;<br>
&gt; <br>
&gt; Unless there are strenuous objections, it seems to make sense to proceed
<br>
&gt; as follows:<br>
&gt; 1) introduce row/column labels into the base OsiSolverInterface <br>
&gt; (defaults to string returning NULL) and develop a bunch of sort/extract
<br>
&gt; by label utilities.<br>
&gt; 2) base the stochastic information management in OsiStochSolverInterface
<br>
&gt; on the label utilities (in stochastic programming the labels correspond
<br>
&gt; to nodes of the scenario tree).<br>
&gt; <br>
&gt; How do I get write permission?<br>
&gt; <br>
&gt; Best,<br>
&gt; Alan<br>
&gt; <br>
&gt; Alan King<br>
&gt; http://www.research.ibm.com/people/k/kingaj/<br>
&gt; Mathematical Sciences Department<br>
&gt; IBM Thomas J. Watson Research Center<br>
&gt; (914) 945-1236, 8-862-1236<br>
<br>
-- <br>
=======================================================================<br>
Leonardo B. Lopes &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;leo@iems.nwu.edu<br>
Ph.D. Candidate &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; (847)491-8470<br>
IEMS - Northwestern University &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
http://www.iems.nwu.edu/~leo<br>
<br>
_______________________________________________<br>
Coin-discuss mailing list<br>
Coin-discuss@www-124.ibm.com<br>
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss<br>
</tt></font>
<br>