[Scip] Elements of a subset

Ambros Gleixner gleixner at zib.de
Tue Sep 27 16:09:16 MEST 2011


Dear Julio,



Dear Julio.

This mailing list mainly focuses on questions about the usage of SCIP.
When it is about your model, then you are the expert and you will be
best suited to analyze it. For your infeasibility, e.g., try to solve
the model with an LP solver - if this is already infeasible, look at the
farkas proof. Or introduce slacks into your model and try to minimize
their sum or maximum. Et cetera. There might be mailing lists focussing
on general modelling questions which you might want to address.

When you have a specific question on how to achieve something with SCIP,
Zimpl, or SoPlex, come back and ask us - we are happy to help!

Best regards,
ambros


Am 27.09.2011 15:22, schrieb Julio Rojas:
> Dear Ambros,
> 
> Yes I have seen and tried the vif keyword. Nonetheless, as you can see in my
> previous email, I have made an example without the need to use "vif"
> clauses. The problem is that the constraints seem to be making the problem
> an unfeasible one. I hope somebody could take a look to the code and point
> to me the problems.
> 
> Again, thanks for your help.
> -------------------------------------------------
> Julio Rojas
> jcredberry at gmail.com
> 
> 
> On Tue, Sep 27, 2011 at 2:52 PM, Ambros Gleixner <gleixner at zib.de> wrote:
> 
>> Dear Julio.
>>
>> The "with" construct needs a boolean expression which is known at
>> "compile" time, i.e., may not contain variables.
>>
>> Have you seen the "vif" keyword which can be used to automatically
>> generate Big-M formulations, Zimpl manual 4.12?
>>
>> ambros
>>
>>
>> Am 27.09.2011 09:53, schrieb Julio Rojas:
>>> Thx Ambros. One question, would this give me all<f,c>  for which
>>> P[f,c]==1? P[f,c] is a decision variable, so the number of constraints
>>> will be constantly changing. I guess this is not possible, is it?
>>>
>>> Regards.
>>> -------------------------------------------------
>>> Julio Rojas
>>> jcredberry at gmail.com
>>>
>>>
>>>
>>> On Mon, Sep 26, 2011 at 8:56 PM, Ambros Gleixner<gleixner at zib.de>
>>  wrote:
>>>> Dear Julio.
>>>>
>>>> First, you need to use the "with" keyword as described in Section 4.7 of
>>>> the Zimpl manual. Something like
>>>>
>>>>    forall<f,c>  in FC with P[f,c]==1 do
>>>>       ax[f]>= max(xf[f]) - min_j(xf[f]);
>>>>
>>>>
>>>> should do.
>>>>
>>>> Second, examples on how to get maximum and minimum values can be found
>>>> on page 10 of the Zimpl manual.
>>>>
>>>> Hope that helps,
>>>> ambros
>>>>
>>>>
>>>>
>>>>
>>>> Am 26.09.2011 17:53, schrieb Julio Rojas:
>>>>> Dear all. Stefan Vigerske helped me with the reformulation of a
>>>>> constraint I had, but latter on I saw that I originally exposed it
>>>>> badly. I had:
>>>>>
>>>>>     ax[f]>= max(xf[f]*P[f,c]) - min(xf[f]*P[f.c])
>>>>>
>>>>> when I reality I need:
>>>>>
>>>>> forall<c>  in C and forall P[f,c]==1:  ax[f]>= max(xf[f]) -
>> min_j(xf[f])
>>>>>
>>>>> How can I write these constraints in ZIMPL? Until now, I have this:
>>>>>
>>>>> set F :={1..4};
>>>>> set C :={1..2};
>>>>> set FC := F*C;
>>>>> param xf[F]:=<1>  1.5,<2>  4,<3>  4.5,<4>  1.5;
>>>>> param yf[F]:=<1>  4,<2>  4,<3>  1.5,<4>  2;
>>>>> param xc[C]:=<1>  3,<2>  3;
>>>>> param yc[C]:=<1>  4,<c>  2;
>>>>> param d[FC] :=
>>>>>    |    1,    2|
>>>>> |1| 1.50, 2.50|
>>>>> |2| 1.00, 2.24|
>>>>> |3| 2.92, 1.58|
>>>>> |4| 2.50, 1.50|;
>>>>> var X[C] binary;
>>>>> var P[FC] binary;
>>>>> minimize bs: sum<c>  in C: X[c];
>>>>> subto maxdist:
>>>>>    forall<f,c>  in FC do d[f,c]*P[f,c]<= 2;
>>>>> subto onlyone:
>>>>>    forall<f>  in F do sum<c>  in C: P[f,c]==1;
>>>>>
>>>>> Thanks.
>>>>>
>>>>> -------------------------------------------------
>>>>> Julio Rojas
>>>>> jcredberry at gmail.com
>>>>> _______________________________________________
>>>>> Scip mailing list
>>>>> Scip at zib.de
>>>>> http://listserv.zib.de/mailman/listinfo/scip
>>>>
>>>> --
>>>> ____________________________________________________________
>>>> Ambros M. Gleixner
>>>> Zuse Institute Berlin - Matheon - Berlin Mathematical School
>>>> http://www.zib.de/gleixner
>>>> _______________________________________________
>>>> Scip mailing list
>>>> Scip at zib.de
>>>> http://listserv.zib.de/mailman/listinfo/scip
>>>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> http://listserv.zib.de/mailman/listinfo/scip
>>
> 

-- 
____________________________________________________________
Ambros M. Gleixner
Zuse Institute Berlin - Matheon - Berlin Mathematical School
http://www.zib.de/gleixner


More information about the Scip mailing list