[SCIP] SCIP and Ipopt

Vincent Mirian vince.mirian at gmail.com
Wed Feb 21 22:43:31 CET 2018


Thank you for your responses Stefan and Ambros.

I changed the script to:
read SCIPConstraint.lp display problem
set constraints quadratic replacebinaryprod 0
set presolving inttobinary maxrounds 12
set limits solutions 4
set limits time 4194
set limits nodes 4
optimize
display solution
write solution  scriptOutput
quit

I would like to constraint the solver further to produce a solution as
early as possible. I am looking into the heuristics and presolving. Is
there documentation that can guide this process? Or does anyone have any
suggestions?

Thank you.


On Wed, Feb 21, 2018 at 2:25 PM, Ambros Gleixner <gleixner at zib.de> wrote:

> >> Also, I would like to know if it is possible to pause SCIP and
> >> retrieve its
> >> state and, then, continue from the saved state from the
> >> interactive/batch(script) mode. If so, how?
> >
> > No.
>
> Well, I would say you can do that to some extent by setting any parameter
> that limits the effort spent for solving, e.g., limits/nodes,
> limits/solutions, limits/time, ...
>
> For continuing after SCIP stopped, simply increase the limit and type
> optimize again.
>
> Best,
> Ambros
>
>
>
> Am 21.02.2018 um 11:41 schrieb Stefan Vigerske:
>
>> Hi,
>>
>> On 02/21/2018 12:16 AM, Vincent Mirian wrote:
>>
>>> Hi Ambros.
>>>
>>> Thank you for your response. Your explanation was aligned with my
>>> assumption... Thank you for clarifying.
>>>
>>> SCIP searches for an optimal solution. For some MINLP problem, I would
>>> like
>>> SCIP to return a solution (the first solution it may find is
>>> sufficient). I
>>> was reading that IPOPT is integrated within SCIP, however I was unable to
>>> trigger ipopt for these problem. Any help would be appreciated.
>>>
>>
>> There are a few primal heuristics in SCIP that may call out to Ipopt. One
>> that runs rather frequently is the "subNLP" heuristic, but it will not run
>> when there are no continuous variables in the nonlinear part of your
>> problem. Otherwise, you may change its parameters to make it run more often.
>> However, with the information given, it's hard to say why SCIP didn't
>> call Ipopt.
>>
>> For reference, I am using SCIP from interactive/batch(script) mode. I
>>> installed SCIP using the binaries posted on the website.
>>>
>>> Also, I would like to know if it is possible to pause SCIP and retrieve
>>> its
>>> state and, then, continue from the saved state from the
>>> interactive/batch(script) mode. If so, how?
>>>
>>
>> No.
>>
>> Stefan
>>
>>
>>> Thank you in advance.
>>>
>>> On Tue, Feb 20, 2018 at 1:49 AM, Ambros Gleixner <gleixner at zib.de>
>>> wrote:
>>>
>>> Hi Vincent,
>>>>
>>>> SCIP (like virtually all solvers based on floating-point arithmetics)
>>>> uses
>>>> tolerances to check feasibility and integrality.  Anything with a
>>>> fractionality below 1e-9 (parameter numerics/epsilon) is consider
>>>> integral,
>>>> so also the value 0.999999999999998 that you saw in your solution.  You
>>>> can
>>>> use SCIPisIntegral() to check or SCIPround() to round solution values in
>>>> the C API.
>>>>
>>>> Best,
>>>> Ambros
>>>>
>>>>
>>>> Am 20.02.2018 um 03:40 schrieb Vincent Mirian:
>>>>
>>>> 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
>>>>> <mailto: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>
>>>>>          <mailto: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>
>>>>>               <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> <mailto:Scip at zib.de
>>>>>          <mailto:Scip at zib.de>>
>>>>>          https://listserv.zib.de/mailman/listinfo/scip
>>>>>          <https://listserv.zib.de/mailman/listinfo/scip>
>>>>>                   <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>
>>>>>          <mailto:benjamin.mueller at zib.de <mailto:
>>>>> benjamin.mueller at zib.de>>
>>>>>          +49 30 841 85-195 <tel:%2B49%2030%20841%2085-195>
>>>>>          <tel:%2B49%2030%20841%2085-195>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          --         Vincent Mirian
>>>>>
>>>>>
>>>>>      --     ______________________________
>>>>>      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
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Scip mailing list
>>>>> Scip at zib.de
>>>>> https://listserv.zib.de/mailman/listinfo/scip
>>>>>
>>>>>
>>>>> --
>>>> Ambros Gleixner, Research Group Mathematical Optimization Methods at
>>>> Zuse
>>>> Institute Berlin, http://www.zib.de/gleixner
>>>> _______________________________________________
>>>> Scip mailing list
>>>> Scip at zib.de
>>>> https://listserv.zib.de/mailman/listinfo/scip
>>>>
>>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Scip mailing list
>>> Scip at zib.de
>>> https://listserv.zib.de/mailman/listinfo/scip
>>>
>>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> https://listserv.zib.de/mailman/listinfo/scip
>>
>
> --
> Ambros Gleixner, Research Group Mathematical Optimization Methods at Zuse
> Institute Berlin, http://www.zib.de/gleixner
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
>



-- 
Vincent Mirian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20180221/49fd9acd/attachment.html>


More information about the Scip mailing list