[Scip] help : expressing absolute in linear constraint

Ambros Gleixner gleixner at zib.de
Tue Jul 15 14:19:25 CEST 2014


Dear Abdelkader Ouali,

the indicator constraint handler handles big-M constraints, but I think 
this is not what you are looking forward since you try to avoid binary 
variables, right?

    | y | >= lhs

is essentially the bound disjunction constraint y >= lhs OR y <= -lhs. 
For this you could use the cons_bounddisjunction, see

    http://scip.zib.de/doc/html/cons__bounddisjunction_8h.php

The right hand side are the two inequalities y <= rhs, -y <= rhs.

Kind regards,
Ambros



Am 15.07.2014 13:57, schrieb Abdelkader Ouali:
> Dear Ambros,
>
> Yes, thank's for the link,
>
> I juste want to know if there is special constraint handler in SCIP that
> do the job,
> as an answer, for my question  :
>
> we want to :   lhs <= |c1x1-c2x2| <= rhs
> that can be expressed as :  y=  |c1x1-c2x2| , lhs <= y <= rhs, y >=0
> and use binary method to transform :  y= |c1x1-c2x2|, by adding binary
> variable b and two constraints :
> 0<= y - (c1x1 - c2x2) <= upperbound * b
> 0<= y - (c2x2 - c1x1) <= upperbound *(1-b)
> lhs <= y <= rhs
> b \in {0,1}
>
> here is LP to check it out : the upper bound is 10000, you can exchange
> the value of u and v, for both cases y = 1
>
> *Minimize*
> * Obj: *
> *Subject to*
> *  c1: + y - v + u >= 0 *
> *  c2: + y - v + u -10000 b <= 0 *
> *  c3: + y - u + v >= 0 *
> *  c4: + y - u + v +10000 b <= 10000*
> *Bounds*
> * 2 <= u <= 2*
> * 3 <= v <= 3*
> * 0 <= b <= 1*
> * y >= 0*
> *General*
> * y*
> *Binary*
> * b*
> *End*
>
> But it is not effecient to me, because i have lot of pair xi and xj to
> consider,
> in the master problem, doing this will kill branch&price
>
> Thank's and regards
>
> ---
> Abdelkader Ouali
>
>
>  > Date: Tue, 15 Jul 2014 11:28:08 +0200
>  > From: gleixner at zib.de
>  > To: scip at zib.de
>  > Subject: Re: [Scip] help : expressing absolute in linear constraint
>  >
>  > Dear Abdelkader Ouali,
>  >
>  > this is a standard reformulation question in mixed-integer linear
>  > programming and what is best depends a bit on your problem. A bit of
>  > googling will help, see, e.g.,
>  >
>  > http://orinanobworld.blogspot.de/2012/07/modeling-absolute-values.html
>  >
>  > Best regards,
>  > ambros
>  >
>  >
>  >
>  > Am 15.07.2014 11:19, schrieb Abdelkader Ouali:
>  > > Dear SCIP users,
>  > >
>  > > Is there a way to express absolute in linear constraint
>  > > like*lhs <= |c1x1 - c2x2| <= rhs*
>  > >
>  > > Kind regards
>  > >
>  > > ---
>  > > Abdelkader Ouali
>  > >
>  > >
>  > > _______________________________________________
>  > > 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

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


More information about the Scip mailing list