[SCIP] SCIP and Ipopt

Vincent Mirian vince.mirian at gmail.com
Tue Feb 20 03:40:49 CET 2018


Hi Benny.

Thank you for your response. Currently, I am using the LP format with SCIP.

I create a problem (attached). In the problem I defined a
variable AssignC4BLK0 and AssignC10BLK1 as binaries. However, the output
assigns a non-binary to these variables. Is there something that I am doing
incorrectly? Or is this natural behavior from SCIP?

Regards.

On Wed, Feb 14, 2018 at 1:55 AM, Benjamin Müller <benjamin.mueller at zib.de>
wrote:

> Hi Vincent,
>
> you did two mistakes:
>
> 1. <y#0> should have a coefficient of 1 in the objective.
>
> 2. You declared your quadratic constraint to be linear and there were also
> some semantic problems.
>
> Your model should actually look like:
>
> STATISTICS
>   Problem name     : test.cip
>   Variables        : 5 (0 binary, 5 integer, 0 implicit integer, 0
> continuous)
>   Constraints      : 0 initial, 5 maximal
> OBJECTIVE
>   Sense            : minimize
> VARIABLES
>   [integer] <c#0b#0>: obj=0, original bounds=[0,1]
>   [integer] <c#1b#0>: obj=0, original bounds=[0,1]
>   [integer] <c#0b#1>: obj=0, original bounds=[0,1]
>   [integer] <c#1b#1>: obj=0, original bounds=[0,1]
>   [integer] <y#0>: obj=1, global bounds=[0,4], local bounds=[0,4]
> CONSTRAINTS
>   [linear] <pack_1>: <c#0b#0>[I] +<c#0b#1>[I] == 1;
>   [linear] <pack_2>: <c#1b#0>[I] +<c#1b#1>[I] == 1;
>   [linear] <cap_0>: <c#0b#0>[I] +<c#1b#0>[I] <= 1;
>   [linear] <cap_1>: <c#0b#1>[I] +<c#1b#1>[I] <= 1;
>   [quadratic] <obj_0>: -<c#0b#1>[C] <c#1b#1>[C] -<c#0b#0>[I] <c#1b#0>[I]
> -<y#0>[C] == -4;
> END
>
> Please read your instance with SCIP display the problem in order to see
> how SCIP parsed it.
>
>         ./bin/scip -c "read test.cip display problem"
>
> Anyway, I think that you might want to use a modelling language instead of
> dealing with our .cip format. You could, e.g., use ZIMPL, AMPL, GAMS, ...
>
> Best,
> Benny
>
> PS: Please don't include the Ipopt mailing any more. Your problems are not
> related to Ipopt.
>
>
>
> On 02/14/2018 07:01 AM, Vincent Mirian wrote:
>
>> Hi all.
>>
>> Thanks for the reply Benny.
>>
>> I created the following input file to the framework.
>> STATISTICS
>>    Problem name     : test.cip
>>    Variables        : 5 (0 binary, 5 integer, 0 implicit integer, 0
>> continuous)
>>    Constraints      : 0 initial, 5 maximal
>> OBJECTIVE
>>    Sense            : minimize
>> VARIABLES
>>    [integer] <c#0b#0>: obj=0, original bounds=[0,1]
>>    [integer] <c#1b#0>: obj=0, original bounds=[0,1]
>>    [integer] <c#0b#1>: obj=0, original bounds=[0,1]
>>    [integer] <c#1b#1>: obj=0, original bounds=[0,1]
>>    [integer] <y#0>: obj=0, global bounds=[0,4], local bounds=[0,4]
>> CONSTRAINTS
>>    [linear] <pack_1>: <c#0b#0>[I] +<c#0b#1>[I] == 1;
>>    [linear] <pack_2>: <c#1b#0>[I] +<c#1b#1>[I] == 1;
>>    [linear] <cap_0>: <c#0b#0>[I] +<c#1b#0>[I] <= 1;
>>    [linear] <cap_1>: <c#0b#1>[I] +<c#1b#1>[I] <= 1;
>>    [linear] <obj_0>: -<c#0b#1>[I]*<c#1b#1>[I]*1
>> -<c#0b#0>[I]*<c#1b#0>[I]*1 +4 -<y#0> == 0;
>> END
>>
>> The results should assign y#0 to 4. However, I get the following output
>> (snippet of output to reduce length):
>>
>> presolving (1 rounds: 1 fast, 1 medium, 1 exhaustive):
>>   5 deleted vars, 5 deleted constraints, 0 added constraints, 1 tightened
>> bounds, 0 added holes, 0 changed sides, 0 changed coefficients
>>   0 implications, 0 cliques
>> presolved problem has 0 variables (0 bin, 0 int, 0 impl, 0 cont) and 0
>> constraints
>> transformed objective value is always integral (scale: 1)
>> Presolving Time: 0.00
>>
>> objective value:                                    0
>> c#0b#0                                              1 (obj:0)
>> c#1b#1                                              1 (obj:0)
>>
>> The assignment of c#0b#0 and c#1b#1 are valid solutions. I am confused on
>> the reason that the objective value is 0. I am assume that the objective
>> value is y#0, since it is the only variable not stated. The value of y#0
>> should be 4.
>>
>> Some guidance would be appreciated. Note that I searched the SCIP mailing
>> list archive but I did not find any references for the input format and
>> description of the output.
>>
>> Any help would be appreciated. Thank you.
>>
>>
>>
>> On Tue, Feb 13, 2018 at 11:38 PM, Benjamin Müller <
>> benjamin.mueller at zib.de <mailto:benjamin.mueller at zib.de>> wrote:
>>
>>     Hi Vincent,
>>
>>     I would recommend using JSCIPOpt, which is our SCIP-Java interface
>>     that can be found here:
>>
>>     https://github.com/SCIP-Interfaces/JSCIPOpt
>>     <https://github.com/SCIP-Interfaces/JSCIPOpt>
>>
>>     All relevant steps for building the interface are listed in the
>>     INSTALL.md, but basically, you will need to download the latest SCIP
>>     Optimization Suite and compile it with Ipopt. You might want to have
>>     a look at the JSCIPOpt/examples/Quadratic, which shows how to model
>>     a problem with simple quadratic constraints.
>>
>>     Please note that SCIP can't handle a nonlinear objective function.
>>     For this reason, you need to add an auxiliary variable z and then
>>     model your problem as
>>
>>          min z
>>          z >= sum_{ij} X_{ij} Y_{ij}
>>          ...
>>
>>     Best,
>>     Benny
>>
>>     On 02/13/2018 07:05 PM, Vincent Mirian wrote:
>>
>>         HI all.
>>
>>         I am new to the SCIP community.
>>
>>         I am looking for a non-linear solver to solve:
>>         - an objective function similar to 0 <= sum over i and j of X_ij
>>         * Y_ij * Constant < max
>>         - with constraints similar tosum(X_ij) = 1 and sum(Y_ij) = 1
>>         (forcing the values of X_ij and Y_ij to zero or one). A solution
>>         would be sufficient (it can be local or global optimal).
>>
>>         I would need to interface the solver with Java. I found Google
>>         Optimization Tools (OR-Tools) to interface SCIP with java. Note
>>         that this work is for academic research.
>>
>>         - Would SCIP or Ipopt be suitable for my task? Would anyone have
>>         experience integrating SCIP or Ipopt into Java?
>>         - I'm using a machine with ubuntu 64-bit. Are there any issues
>>         with installing these tools in this machine environment?
>>         - What is the manner to describe the constraints and objective
>>         function using these tools?
>>
>>         Thank you.
>>         --         Vincent Mirian
>>
>>
>>         _______________________________________________
>>         Scip mailing list
>>         Scip at zib.de <mailto:Scip at zib.de>
>>         https://listserv.zib.de/mailman/listinfo/scip
>>         <https://listserv.zib.de/mailman/listinfo/scip>
>>
>>
>>     --     ______________________________
>>     Benjamin Müller
>>     Zuse Institute Berlin
>>     Takustr. 7, 14195 Berlin
>>     benjamin.mueller at zib.de <mailto:benjamin.mueller at zib.de>
>>     +49 30 841 85-195 <tel:%2B49%2030%20841%2085-195>
>>
>>
>>
>>
>> --
>> Vincent Mirian
>>
>
> --
> ______________________________
> Benjamin Müller
> Zuse Institute Berlin
> Takustr. 7, 14195 Berlin
> benjamin.mueller at zib.de
> +49 30 841 85-195
>



-- 
Vincent Mirian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20180219/763dc430/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Output
Type: application/octet-stream
Size: 849 bytes
Desc: not available
URL: <http://listserv.zib.de/pipermail/scip/attachments/20180219/763dc430/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SCIPConstraint.lp
Type: application/octet-stream
Size: 4136 bytes
Desc: not available
URL: <http://listserv.zib.de/pipermail/scip/attachments/20180219/763dc430/attachment-0001.obj>


More information about the Scip mailing list