[Couenne] Couenne support

Pietro Belotti petr.7b6 at gmail.com
Fri Aug 7 09:53:59 EDT 2015


Hi Vincent,

this is what happens when I give a suggestion before trying it
myself... You did exactly as I suggested, but unfortunately that skips
an operation that not only would have Couenne branch on those
undesired variables, but also would check for the feasibility of some
nonlinear expressions involving these variables. As you report, this
result in an infeasible solution.

A correct way to do what you ask is instead to set the right priority.
In Couenne, as in Cbc, a variable is not branched on if there is
another branchable one with lower priority (branch occurs on variables
with low priority first). Therefore it should be only a matter of
setting the priority of all variables with index above 8 to a value
that is greater than both the value for continuous and integer
variables. A quick change would be, for any of the cases below the
code you changed, to do as follows:

objects [nobj++] ->setPriority (
  (var -> Index () > 8) ? (max(intObjPriority, contObjPriority) + 1) :
  (var -> isInteger ()) ? intObjPriority : contObjPriority);

but it has to be copied to the three cases. I'm sure you'll find a
more elegant way to do this.

Let me know if this works, and apologies for my wrong first suggestion.

Regards,
Pietro



On Wed, Aug 5, 2015 at 9:17 PM, Vincent Goulet
<vincent.goulet.4 at ulaval.ca> wrote:
> Hi,
>
> Thanks to Pietro for help on my first question. By trying to put it into practice, I encountered unexpected behavior from the solver.
>
> My original problem is that I want the solver to only branch on a few variables and not on others. As suggested by Pietro, I looked around line 396 in BonCouenneSetup.cpp. I found there is a for-loop there over all variables. I tried to include only variables with indexes below 9, by breaking the loop if [var -> Index ()] returned a value higher than 8. One thing I tried is change line 391 from:
>
> 391>    if (var -> Multiplicity () <= 0)
> 392>      continue;
>
> to:
>
> 391>    if (var -> Multiplicity () <= 0) || (var -> Index () > 8)
> 392>      continue;
>
> My rough understanding is that this should force the solver to branch only on the first 9 variables, and that the rest of the algorithm should stay unchanged.
>
> After compiling this and trying to solve my model. I observe it does branch only on variables with indexes lower than 8, but it doesn't respect the constraints anymore. It's not completely offtrack, but it's definitely wrong, as some constraints stay respected but others don't.
>
> I don't understand the code well enough to understand why this simple change affects the way the solver respects the constraints. Perhaps you can see why this is and what I'm doing wrong?
>
> Regards,
>
> Vincent Goulet
> Université Laval
> NI: 910076204
>
> ________________________________________
> De : Pietro Belotti <petr.7b6 at gmail.com>
> Envoyé : 29 juillet 2015 18:15
> À : Vincent Goulet
> Cc : couenne at list.coin-or.org
> Objet : Re: Couenne support
>
> Hi Vincent,
>
> you can do this by selecting the CouenneVarObjects that are inserted
> in the branch-and-bound model. This is done after line 396 of
> BonCouenneSetup.cpp. You'll have to add conditions for those variables
> that need to be included in branching. I'm afraid there is no solution
> involving modeling languages only.
>
> Hope this helps. I'm CC'ing the Couenne mailing list, and I would ask
> you to post all your questions about Couenne to that email address
> from now on.
>
> Regards,
> Pietro
>
> On Wed, Jul 29, 2015 at 10:22 PM, Vincent Goulet
> <vincent.goulet.4 at ulaval.ca> wrote:
>> Hi!
>>
>>
>> I'm looking for help on the matter of Couenne branching options. I can't
>> seem to find any helpful resource, and I was wondering if you could tell me
>> where to look or whom to ask.
>>
>>
>> My question is simple and as follows: I want to tell Couenne to branch only
>> on certain variables and not on others. Can this be done? How?
>>
>>
>> Thank you,
>>
>>
>> Regards,
>>
>>
>> Vincent Goulet
>> Université Laval
>> NI: 910076204
>
> _______________________________________________
> Couenne mailing list
> Couenne at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/couenne



More information about the Couenne mailing list