[Cbc] Cbc Digest, Vol 122, Issue 7
Bjørn Sigurd Johansen (Spider Solutions AS)
bjorn.sigurd.johansen at spidersolutions.no
Thu Oct 5 01:09:34 EDT 2017
Such as / which do you recommend ?
Will they provide better solutions through “intelligent” mapping to CBC, or “only” a simpler interface?
* Bjorn
From: Cbc [mailto:cbc-bounces at coin-or.org] On Behalf Of Gleb Belov
Sent: torsdag 5. oktober 2017 03:13
To: cbc at coin-or.org
Subject: Re: [Cbc] Cbc Digest, Vol 122, Issue 7
Hi Bjorn,
you can use high-level modeling languages which interface CBC and take care of non-linearities and global constraints.
Gleb
On 4 October 2017 at 20:57, <cbc-request at coin-or.org<mailto:cbc-request at coin-or.org>> wrote:
Send Cbc mailing list submissions to
cbc at list.coin-or.org<mailto:cbc at list.coin-or.org>
To subscribe or unsubscribe via the World Wide Web, visit
https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=mzJGkRorCZhAPHf4MlJyeoRAi8yNupLG9ozyA0Rd30E&m=_AD7u3OUeb40-EliVN64p_sXwLKeFKvM8nWTNNCZmps&s=9nqWEkDUvEKmyVubWMJftRwLb3f8Uot_Z69jNiToikY&e=
or, via email, send a message with subject or body 'help' to
cbc-request at list.coin-or.org<mailto:cbc-request at list.coin-or.org>
You can reach the person managing the list at
cbc-owner at list.coin-or.org<mailto:cbc-owner at list.coin-or.org>
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Cbc digest..."
Today's Topics:
1. Re: Multiplying two binary variables in the objective
function (John Forrest)
2. Re: Multiplying two binary variables in the objective
function (John Forrest)
3. Re: Increase number of digits in solution file
(nicolas.derhy at engie.com<mailto:nicolas.derhy at engie.com>)
----------------------------------------------------------------------
Message: 1
Date: Wed, 4 Oct 2017 09:57:57 +0100
From: John Forrest <john.forrest at fastercoin.com<mailto:john.forrest at fastercoin.com>>
To: cbc at list.coin-or.org<mailto:cbc at list.coin-or.org>
Subject: Re: [Cbc] Multiplying two binary variables in the objective
function
Message-ID: <97638c11-e95d-8cbc-9754-c13e559f35b7 at fastercoin.com<mailto:97638c11-e95d-8cbc-9754-c13e559f35b7 at fastercoin.com>>
Content-Type: text/plain; charset=utf-8; format=flowed
Bjorn,
Probably simplest/best to make into Special Ordered Set of type 1 with 4
variables
B1_0_B2_0, B1_1_B2_0, B1_0_B2_1, B1_1_B2_1
with objective values 0.0, 12.3, 12.3, 151.29
and constraint
B1_0_B2_0+B1_1_B2_0+B1_0_B2_1+B1_1_B2_1 == 1.0
(you could leave out B1_0_B2_0 and make <=, but probably better
branching with ==)
and corresponding changes to coefficients in constraints.
That way you add 2 variables and 1 row which is probably better than
adding 1 variable and 3 rows - and will be better for branching.
Depending on what you are trying to model, you could give weights to
give better branching decisions.
John Forrest
On 02/10/17 07:10, Bj?rn Sigurd Johansen (Spider Solutions AS) wrote:
> Dear CBC list,
>
> Is it possible to multiply two binary variables in the objective function scaled with the same factor?
> E.g.
> MINIMIZE Obj:
> +12.3 B1 * 12.3 B2
> or
> +12.3 B1 * + 12.3 B2
>
> If binary variables are set through some sort of branching algorithm, perhaps it is possible? But if the binary variables are set/estimated through some other mechanism, it might not be possible?
>
> If possible, what is the exact syntax for doing this?
>
> If not possible, I guess the option is to introduce a third binary B3, and set up the following constraints:
> B3 <= B1
> B3 <= B2
> B3 >= B1 + B2 - 1
> And then in the objective function use:
> +12.3 B3
> Correct / best option?
>
>
> Best regards,
> Bjorn
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org<mailto:Cbc at list.coin-or.org>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=js2M0T-3OIMIVDvokcKjokJbk0F8QOCd0mT4FsVFE88&m=hM8BKlgl1z5yzxrZnxtYfw_AEAZDyQOjfvWFs39qJLk&s=DDn3zh-jLSVoNRCQal3m7LVGxVLHAnUxaImDCAH-088&e=
>
>
------------------------------
Message: 2
Date: Wed, 4 Oct 2017 10:01:37 +0100
From: John Forrest <john.forrest at fastercoin.com<mailto:john.forrest at fastercoin.com>>
To: cbc at list.coin-or.org<mailto:cbc at list.coin-or.org>
Subject: Re: [Cbc] Multiplying two binary variables in the objective
function
Message-ID: <086502f6-03b7-ad48-9753-a23ef7381638 at fastercoin.com<mailto:086502f6-03b7-ad48-9753-a23ef7381638 at fastercoin.com>>
Content-Type: text/plain; charset=utf-8; format=flowed
Whoops - ignore this post - I was not thinking.
However this will make sense if it is more complicated.
Special Ordered Sets are very powerful.
John Forrest
On 04/10/17 09:57, John Forrest wrote:
> Bjorn,
>
> Probably simplest/best to make into Special Ordered Set of type 1 with
> 4 variables
>
> B1_0_B2_0, B1_1_B2_0, B1_0_B2_1, B1_1_B2_1
>
> with objective values 0.0, 12.3, 12.3, 151.29
>
> and constraint
> B1_0_B2_0+B1_1_B2_0+B1_0_B2_1+B1_1_B2_1 == 1.0
> (you could leave out B1_0_B2_0 and make <=, but probably better
> branching with ==)
>
> and corresponding changes to coefficients in constraints.
>
> That way you add 2 variables and 1 row which is probably better than
> adding 1 variable and 3 rows - and will be better for branching.
>
> Depending on what you are trying to model, you could give weights to
> give better branching decisions.
>
> John Forrest
> On 02/10/17 07:10, Bj?rn Sigurd Johansen (Spider Solutions AS) wrote:
>> Dear CBC list,
>>
>> Is it possible to multiply two binary variables in the objective
>> function scaled with the same factor?
>> E.g.
>> MINIMIZE Obj:
>> +12.3 B1 * 12.3 B2
>> or
>> +12.3 B1 * + 12.3 B2
>>
>> If binary variables are set through some sort of branching algorithm,
>> perhaps it is possible?? But if the binary variables are
>> set/estimated through some other mechanism, it might not be possible?
>>
>> If possible, what is the exact syntax for doing this?
>>
>> If not possible, I guess the option is to introduce a third binary
>> B3, and set up the following constraints:
>> B3 <= B1
>> B3 <= B2
>> B3 >= B1 + B2 - 1
>> And then in the objective function use:
>> +12.3 B3
>> Correct / best option?
>>
>>
>> Best regards,
>> Bjorn
>>
>> _______________________________________________
>> Cbc mailing list
>> Cbc at list.coin-or.org<mailto:Cbc at list.coin-or.org>
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=js2M0T-3OIMIVDvokcKjokJbk0F8QOCd0mT4FsVFE88&m=hM8BKlgl1z5yzxrZnxtYfw_AEAZDyQOjfvWFs39qJLk&s=DDn3zh-jLSVoNRCQal3m7LVGxVLHAnUxaImDCAH-088&e=
>>
>>
>>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org<mailto:Cbc at list.coin-or.org>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwIGaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=js2M0T-3OIMIVDvokcKjokJbk0F8QOCd0mT4FsVFE88&m=ru7IvQS__wCzcWuZWyT4Z2N1gBq46p_PvS1qpe7c7kE&s=gid7kHY0HNYvNE3hIAYt-AEm7zAZJgX7A1W17kdk7mQ&e=
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20171005/7c7a5f1d/attachment-0001.html>
More information about the Cbc
mailing list