<div dir="ltr">Ok, thank you very much John. I'll give it a shot.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 17, 2014 at 10:01 AM, John Forrest <span dir="ltr"><<a href="mailto:john.forrest@fastercoin.com" target="_blank">john.forrest@fastercoin.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Matthew,<br>
<br>
Seemed simpler just to write an
OsiSolverInterface::differentModel. Lacking energy, I could not
be bothered to check names being same.<br>
<br>
Only in Osi/trunk but you can safely copy OsiSolverInterface.?pp
over to stable as no recent changes.<span class="HOEnZb"><font color="#888888"><br>
<br>
John Forrest</font></span><div><div class="h5"><br>
<br>
On 16/02/14 20:24, Matthew Gidden wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">Hi John, all,
<div><br>
</div>
<div>I've finally got my testing plumbing finished and am
actually trying to compare Models. I'm running into the
problem that </div>
<div>a) there is no member function for OsiSolverInterface to
return access to a CoinModel</div>
<div>b) Models don't actually from CoinModel (e.g.,
ClpSimplex->ClpModel-/>CoinModel)</div>
<div><br>
</div>
<div>I'll do my best to explain my problem and wait for
advice/clarification from the list.</div>
<div>
<br>
</div>
<div>I have a factory method that returns a pointer to an
OsiSolverInterface. I then create an instance of a problem
using the interface, solve it, and interpret the solution. My
goal is to unit test the model creation process. </div>
<div><br>
</div>
<div>In the following example, the interface is named iface,
CoinPackedMatrix (m), and the associated upper/lower bounds
are vectors. Is this the best way to try to compare models?
(FYI -- I assume not, because it results in a seg fault)</div>
<div><br>
</div>
<div>
<blockquote class="gmail_quote"> CoinModel model(nrows,
ncols, &m, &row_lbs[0], &row_ubs[0],<br>
&col_lbs[0], &col_ubs[0],
&obj_coeffs[0]);<br>
ClpSimplex* compare =
dynamic_cast<OsiClpSolverInterface*>(iface)->getModelPtr();<br>
EXPECT_EQ(0,
model.differentModel(*compare->createCoinModel(), true));</blockquote>
<div><br>
</div>
</div>
<div>You can see the entire (long) testing process here: <a href="https://github.com/gidden/cyclus/blob/lpsolver/tests/prog_translator_tests.cc" target="_blank">https://github.com/gidden/cyclus/blob/lpsolver/tests/prog_translator_tests.cc</a></div>
<div><br>
</div>
<div>Thank you very much in advance!</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Feb 13, 2014 at 11:44 AM,
Matthew Gidden <span dir="ltr"><<a href="mailto:gidden@wisc.edu" target="_blank">gidden@wisc.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote">
<div dir="ltr">Awesome, thank you, John.</div>
<div>
<div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
On Thu, Feb 13, 2014 at 11:43 AM, John Forrest <span dir="ltr"><<a href="mailto:john.forrest@fastercoin.com" target="_blank">john.forrest@fastercoin.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote">
<div>
<div>Matthew,<br>
<br>
There is a CoinModel::differentModel which
should do what you want. There is a default
tolerance test for two values being same - if
this isn't good enough then it would be easy
to pass in a tolerance test to one of the
CoinModels.<span><br>
<br>
John Forrest</span>
<div>
<div><br>
On 06/02/14 19:42, Matthew Gidden wrote:<br>
</div>
</div>
</div>
<div>
<div>
<blockquote type="cite">
<div dir="ltr">Great, thanks for your
response, Miles!</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Feb 6,
2014 at 12:27 PM, Miles Lubin <span dir="ltr"><<a href="mailto:miles.lubin@gmail.com" target="_blank">miles.lubin@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote">
<div dir="ltr">Hi Matthew,
<div><br>
</div>
<div>CoinModel can be used to
store an LP/MIP instance, but I
don't believe there are any
comparison methods. You'll
likely have to manually iterate
through the problem data to
compare entry by entry, using
whatever floating-point
comparison tolerance is
appropriate. I would also
suggest building your
infrastructure around a
solver-independent interface
like OSI, because it's always
valuable to be able to compare
the performance of different
solvers. Any academic
publication would be remiss to
only use one open-source MIP
solver when making claims about
time to solve a particular
problem.</div>
<div><br>
</div>
<div>Best,</div>
<div>Miles</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
<div>
<div>On Thu, Feb 6, 2014 at
12:51 PM, Matthew Gidden <span dir="ltr"><<a href="mailto:gidden@wisc.edu" target="_blank">gidden@wisc.edu</a>></span>
wrote:<br>
</div>
</div>
<blockquote class="gmail_quote">
<div>
<div>
<div dir="ltr">Hi all,
<div><br>
</div>
<div>First time caller,
long time listener.
I'm gearing up the
portion of my research
in which I'll be using
and comparing simplex
and branch-and-cut
solvers versus some
naive solvers in our
simulation environment
[1]. We require a
permissive, open
source license (for
compatibility with our
own - BSD 3-clause),
so the COIN suite was
a natural fit.</div>
<div><br>
</div>
<div>To the meat of my
question:</div>
<div>I've written a
high-level API for
myself and other devs
to use to describe an
problem instance in
part of our simulation
framework. I would
like to be able to
unit test it such that
a problem instance it
describes is
equivalent to some
known problem instance
(read in through MPS,
for example). My
initial thought was to
compare configured
CoinModels (i.e.,
builders). Is there an
easy way to compare
them? Is this the best
approach?</div>
<div><br>
</div>
<div>I look forward to
your response, thanks!</div>
<div><br>
</div>
<div>[1] <a href="http://fuelcycle.org/" target="_blank">http://fuelcycle.org/</a><span><br>
<div><br>
</div>
-- <br>
<div dir="ltr">Matthew
Gidden<br>
Ph.D. Candidate,
Nuclear
Engineering
<div> The
University of
Wisconsin --
Madison<br>
Ph. <a href="tel:225.892.3192" value="+12258923192" target="_blank">225.892.3192</a><br>
</div>
</div>
</span></div>
</div>
<br>
</div>
</div>
_______________________________________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/cbc" target="_blank">http://list.coin-or.org/mailman/listinfo/cbc</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
<br>
<br>
<div><br>
</div>
-- <br>
<div dir="ltr">Matthew Gidden<br>
Ph.D. Candidate, Nuclear Engineering
<div>The University of Wisconsin --
Madison<br>
Ph. <a href="tel:225.892.3192" value="+12258923192" target="_blank">225.892.3192</a><br>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Cbc mailing list
<a href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a>
<a href="http://list.coin-or.org/mailman/listinfo/cbc" target="_blank">http://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/cbc" target="_blank">http://list.coin-or.org/mailman/listinfo/cbc</a><br>
<br>
</blockquote>
</div>
<br>
<br>
<div><br>
</div>
-- <br>
<div dir="ltr">Matthew Gidden<br>
Ph.D. Candidate, Nuclear Engineering
<div>The University of Wisconsin -- Madison<br>
Ph. <a href="tel:225.892.3192" value="+12258923192" target="_blank">225.892.3192</a><br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br>
<div><br>
</div>
-- <br>
<div dir="ltr">Matthew Gidden<br>
Ph.D. Candidate, Nuclear Engineering
<div>The University of Wisconsin -- Madison<br>
Ph. <a href="tel:225.892.3192" value="+12258923192" target="_blank">225.892.3192</a><br>
</div>
</div>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Matthew Gidden<br>Ph.D. Candidate, Nuclear Engineering<div>The University of Wisconsin -- Madison<br>Ph. 225.892.3192<br></div></div>
</div>