<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi John<br>
<br>
Thank you very much for your help. <br>
<br>
Before you replied, I figured that it would make way more sense to
fix the l_xx_xx rather than the u's so I changed my solini.txt
file<br>
accordingly. It only contains these variables now. Once these are
set, the remaining problem in Sample.lp is entirely an lp<br>
as the SOS2 constraints are satisfied.<br>
<br>
Now about feasibility, this is interesting. Solini.txt has been
generated using the problem in SampleIni.lp. This problem<br>
is just a subset in terms of constraints and variables of the
original problem Sample.lp with a different objective function.<br>
The added variables/constraints should not create infeasibility
(it is a flow problem almost entirely independent) so I suspect <br>
sensitivity to exact values is the issue. If the issue repeats
with l_xx_xx being fixed, then you are right, I should probably
try to bypass the file.<br>
<br>
So Sample.lp is the same file as before. SampleIni.lp is the file
that has been used to generate solini.txt.<br>
<br>
Alexis<br>
<br>
On 2015-05-31 10:00 AM, <a class="moz-txt-link-abbreviated" href="mailto:cbc-request@list.coin-or.org">cbc-request@list.coin-or.org</a> wrote:<br>
</div>
<blockquote
cite="mid:mailman.1.1433088001.21939.cbc@list.coin-or.org"
type="cite">
<pre wrap="">Send Cbc mailing list submissions to
        <a class="moz-txt-link-abbreviated" href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a>
To subscribe or unsubscribe via the World Wide Web, visit
        <a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
or, via email, send a message with subject or body 'help' to
        <a class="moz-txt-link-abbreviated" href="mailto:cbc-request@list.coin-or.org">cbc-request@list.coin-or.org</a>
You can reach the person managing the list at
        <a class="moz-txt-link-abbreviated" href="mailto:cbc-owner@list.coin-or.org">cbc-owner@list.coin-or.org</a>
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Cbc digest..."
Today's Topics:
1. Re: Cbc Digest, Vol 95, Issue 7 (John Forrest)
----------------------------------------------------------------------
Message: 1
Date: Sun, 31 May 2015 15:36:46 +0100
From: John Forrest <a class="moz-txt-link-rfc2396E" href="mailto:john.forrest@fastercoin.com"><john.forrest@fastercoin.com></a>
To: <a class="moz-txt-link-abbreviated" href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a>
Subject: Re: [Cbc] Cbc Digest, Vol 95, Issue 7
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:556B1C7E.7050801@fastercoin.com"><556B1C7E.7050801@fastercoin.com></a>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"
Alexis,
It was just good luck that it worked.
The partial solution in solini.txt does not seem to be a valid
solution. If I fix those variables the problem is infeasible (the same
is true if I just fix a's or u's). It looks as if the problem is very
sensitive to exacat values and that printed values were not good enough.
The code as-is fixes other variables to zero, finds problem is
infeasible and then says - OK lets free up all non-integer variables to
see if that works i.e. free all variables. It then gets root solution -
which in this case is valid.
I have modified code (on a compile time option) so that it will fix all
variables in solini.txt and then do a mini branch and bound - that
should work if solini.txt had a valid solution.
Your best bet is to code your own version - fix some to known value and
do branch and bound on easier problem stopping at first solution and
then passing that in without loss of accuracy. It looks as if fixing
l_xx_xx to zero is much more forgiving that fixing u. Have you got
something I could test on?
John
On 27/05/15 19:14, Alexis wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi John,
I managed to implement something and it seems to work (?).
Here is what I have done is somewhat pseudocode:
OsiClpSolverInterface mySolver;
Set Variables, Constraints and SOS2 Constraints in mySolver (see
Sample.lp file for the output)
CbcModel myModel(mySolver);
const char * argv2[] = { "cbc", "-directory", mydirectory,
"-mipStart", "solini.txt", "-solve", "-quit" }; where solini.txt is a
valid (partial) initial solution
CbcMain1(7, argv2, myModel);
I am saying it seems to work because the function
computeCompleteSolution(...) in CbcMipStartIO.cpp is successfully
called (returns 0) and the following code
is called (in CbcSolver.cpp)
int status = computeCompleteSolution( babModel_,
colNames, mipStart, &x[0], obj );
if (!status) {
babModel_->setBestSolution( &x[0],
static_cast<int>(x.size()), obj, false );
babModel_->setSolutionCount(1);
}
Now a few words about the problem. Here is a typical SOS2 constraints
(see Sample.lp file)
SOS2CONS1: S2:: l_1_1:1 l_1_2:2 l_1_3:3 l_1_4:4 l_1_5:5 l_1_6:6
l_1_7:7 l_1_8:8 l_1_9:9 l_1_10:10 l_1_11:11 l_1_12:12 l_1_13:13
l_1_14:14 l_1_15:15 l_1_16:16 l_1_17:17 l_1_18:18 l_1_19:19 l_1_20:20
l_1_21:21 l_1_22:22 l_1_23:23 l_1_24:24 l_1_25:25 l_1_26:26 l_1_27:27
l_1_28:28 l_1_29:29 l_1_30:30 l_1_31:31 l_1_32:32 l_1_33:33 l_1_34:34
together with
COVER_1: l_1_1 + l_1_2 + l_1_3 + l_1_4 + l_1_5 + l_1_6 + l_1_7 +
l_1_8 + l_1_9 + l_1_10
+ l_1_11 + l_1_12 + l_1_13 + l_1_14 + l_1_15 + l_1_16 + l_1_17 +
l_1_18 + l_1_19 + l_1_20
+ l_1_21 + l_1_22 + l_1_23 + l_1_24 + l_1_25 + l_1_26 + l_1_27 +
l_1_28 + l_1_29 + l_1_30
+ l_1_31 + l_1_32 + l_1_33 + l_1_34 = 1
and
INTER_1: - u_1 -10.44566 l_1_1 -9.82066 l_1_2 -9.19566 l_1_3 -8.57066
l_1_4 -7.94566 l_1_5 -7.32066 l_1_6 -6.69566 l_1_7 -6.07066 l_1_8
-5.44566 l_1_9
-4.82066 l_1_10 -4.19566 l_1_11 -3.57066 l_1_12 -2.94566 l_1_13
-2.32066 l_1_14 -2.25232 l_1_15 -1.69566 l_1_16 -1.07066 l_1_17
-0.61982 l_1_18 -0.44566 l_1_19
+ 0.17934 l_1_20 + 0.26541 l_1_21 + 0.80434 l_1_22 + 1.42934 l_1_23 +
2.05434 l_1_24 + 2.67934 l_1_25 + 3.30434 l_1_26 + 3.92934 l_1_27 +
4.55434 l_1_28 + 5.17934 l_1_29
+ 5.80434 l_1_30 + 6.42934 l_1_31 + 7.05434 l_1_32 + 7.67934 l_1_33 +
8.30434 l_1_34 = 0
In "solini.txt", the value for u_1 is given so that sets the l_1_i
variables.
Am I on the right track? I am still not sure 100% about what mipStart
does. Is it just calculating and setting up a feasible solution (and
an upper bound) for the B&B?
Thanks again, I will keep you posted about my investigations.
Alexis
On 2015-05-20 7:27 AM, <a class="moz-txt-link-abbreviated" href="mailto:cbc-request@list.coin-or.org">cbc-request@list.coin-or.org</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Send Cbc mailing list submissions to
        <a class="moz-txt-link-abbreviated" href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a>
To subscribe or unsubscribe via the World Wide Web, visit
        <a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
or, via email, send a message with subject or body 'help' to
        <a class="moz-txt-link-abbreviated" href="mailto:cbc-request@list.coin-or.org">cbc-request@list.coin-or.org</a>
You can reach the person managing the list at
        <a class="moz-txt-link-abbreviated" href="mailto:cbc-owner@list.coin-or.org">cbc-owner@list.coin-or.org</a>
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Cbc digest..."
Today's Topics:
1. Re: Cbc Digest, Vol 95, Issue 6 (Alexis)
2. Re: Cbc Digest, Vol 95, Issue 6 (John Forrest)
3. Re: Cbc Digest, Vol 95, Issue 6 (Haroldo Gambini Santos)
----------------------------------------------------------------------
Message: 1
Date: Tue, 19 May 2015 12:56:16 -0600
From: Alexis<a class="moz-txt-link-rfc2396E" href="mailto:aguigue@softree.com"><aguigue@softree.com></a>
<a class="moz-txt-link-abbreviated" href="mailto:To:cbc@list.coin-or.org">To:cbc@list.coin-or.org</a>
Subject: Re: [Cbc] Cbc Digest, Vol 95, Issue 6
Message-ID:<a class="moz-txt-link-rfc2396E" href="mailto:555B8750.3010300@softree.com"><555B8750.3010300@softree.com></a>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"
Thanks John
I have done preliminary testing of mipStart using standalone cbc. It
looks promising.
However, our real problems have a bunch of SOS2 constraints. I checked
but it does not
seems that cbc v2.9.0 can import/read such files yet, am I correct? The
other
thing I was wondering is that whether mipStart would work with SOS2
constraints?
Say we have a lp problem with binary variables and some SOS2
constraints, would
mipStart work by, again, just providing the values of the binary
variables, and
leaving the variables in the SOS2 constraints to be decided?
Also, is there some doc/pub about Haroldo implementation/method?
Thanks in advance
Alexis
On 2015-05-13 10:00 AM,<a class="moz-txt-link-abbreviated" href="mailto:cbc-request@list.coin-or.org">cbc-request@list.coin-or.org</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Send Cbc mailing list submissions to
        <a class="moz-txt-link-abbreviated" href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a>
To subscribe or unsubscribe via the World Wide Web, visit
        <a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
or, via email, send a message with subject or body 'help' to
        <a class="moz-txt-link-abbreviated" href="mailto:cbc-request@list.coin-or.org">cbc-request@list.coin-or.org</a>
You can reach the person managing the list at
        <a class="moz-txt-link-abbreviated" href="mailto:cbc-owner@list.coin-or.org">cbc-owner@list.coin-or.org</a>
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Cbc digest..."
Today's Topics:
1. Re: Cbc Digest, Vol 95, Issue 5 (Alexis)
2. Re: Cbc Digest, Vol 95, Issue 5 (John Forrest)
----------------------------------------------------------------------
Message: 1
Date: Tue, 12 May 2015 11:09:58 -0600
From: Alexis<a class="moz-txt-link-rfc2396E" href="mailto:aguigue@softree.com"><aguigue@softree.com></a>
<a class="moz-txt-link-abbreviated" href="mailto:To:cbc@list.coin-or.org">To:cbc@list.coin-or.org</a>
Subject: Re: [Cbc] Cbc Digest, Vol 95, Issue 5
Message-ID:<a class="moz-txt-link-rfc2396E" href="mailto:555233E6.8030501@softree.com"><555233E6.8030501@softree.com></a>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"
Thanks John.
I am actually using the API. I found this example
<a class="moz-txt-link-freetext" href="https://projects.coin-or.org/Cbc/browser/trunk/Cbc/examples/hotstart.cpp">https://projects.coin-or.org/Cbc/browser/trunk/Cbc/examples/hotstart.cpp</a>
I will try it. Is the example you were referring to?
On 2015-05-12 10:00 AM,<a class="moz-txt-link-abbreviated" href="mailto:cbc-request@list.coin-or.org">cbc-request@list.coin-or.org</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Send Cbc mailing list submissions to
        <a class="moz-txt-link-abbreviated" href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a>
To subscribe or unsubscribe via the World Wide Web, visit
        <a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
or, via email, send a message with subject or body 'help' to
        <a class="moz-txt-link-abbreviated" href="mailto:cbc-request@list.coin-or.org">cbc-request@list.coin-or.org</a>
You can reach the person managing the list at
        <a class="moz-txt-link-abbreviated" href="mailto:cbc-owner@list.coin-or.org">cbc-owner@list.coin-or.org</a>
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Cbc digest..."
Today's Topics:
1. Hot Start for MIP (Alexis)
2. Re: Hot Start for MIP (John Forrest)
----------------------------------------------------------------------
Message: 1
Date: Mon, 11 May 2015 11:07:35 -0600
From: Alexis<a class="moz-txt-link-rfc2396E" href="mailto:aguigue@softree.com"><aguigue@softree.com></a>
<a class="moz-txt-link-abbreviated" href="mailto:To:cbc@list.coin-or.org">To:cbc@list.coin-or.org</a>
Subject: [Cbc] Hot Start for MIP
Message-ID:<a class="moz-txt-link-rfc2396E" href="mailto:5550E1D7.8030902@softree.com"><5550E1D7.8030902@softree.com></a>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
I have got a large MIP to solve for which I would like to implement a
hot start strategy.
My understanding is that I should use the function
CbcModel::setHotstartSolution(const double *solution, const int
*priorities=NULL),
where solution assumes the same ''order'' of variables as defined for
the model itself. I am not so sure to understand the meaning of
the pointer priorities though. The hotstart solution I intend to give is
an actual feasible solution to the MIP.
Am I on the right track?
Thanks in advance for the help
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap="">
--
Alexis Guigue, E.I.T., B.Eng., M.A.Sc., Ph.D.
Software Engineer/Research Engineer
<a class="moz-txt-link-abbreviated" href="mailto:aguigue@softree.com">aguigue@softree.com</a>
604-519-6222, ext. 3
Softree Technical Systems Inc. <a class="moz-txt-link-rfc2396E" href="http://www.softree.com"><http://www.softree.com></a>
Engineering an Easier Way
Softree News & Updates <a class="moz-txt-link-rfc2396E" href="http://http://eepurl.com/XJT-z"><http://http://eepurl.com/XJT-z></a>
_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
</blockquote>
<pre wrap="">
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <a class="moz-txt-link-rfc2396E" href="http://list.coin-or.org/pipermail/cbc/attachments/20150531/890bd549/attachment-0001.html"><http://list.coin-or.org/pipermail/cbc/attachments/20150531/890bd549/attachment-0001.html></a>
------------------------------
_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
End of Cbc Digest, Vol 95, Issue 11
***********************************
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
Alexis Guigue, E.I.T., B.Eng., M.A.Sc., Ph.D. <br>
Software Engineer/Research Engineer <br>
<a href="aguigue@softree.com">aguigue@softree.com</a> <br>
604-519-6222, ext. 3 <br>
<br>
<a href="http://www.softree.com">Softree Technical Systems Inc.</a>
<br>
Engineering an Easier Way <br>
<br>
<a href="http://http://eepurl.com/XJT-z">Softree News &
Updates</a> <br>
</div>
</body>
</html>