Hello Asma,
did you mean:
var R;
var V1;
var V2, binary;
st. contraint: R = (C1 + C3 * V1) / ( 1 - V2 * C2 );
Then this the problem of cause is not linear. But because V2
is binary you can replace the constraint by
st. contraint: R = V2 * (C1 + C3 * V1) / ( 1 - C2 )
+ (1 - V2) * (C1 + C3 * V1);
Best regards
Xypron
-------- Original-Nachricht --------
> Datum: Wed, 23 Nov 2011 22:22:57 +0100
> Betreff: Re: [Help-glpk] operating following / has invalid
> Hi xypron,
>
> But why do i have this error ?
> What does this error mean?
>
> When i looking for this error on thé internet, they say That error means
> is not possible devide one variable by anorther but it seems not true.
>
> Regards
> Asma
> Le 23 nov. 2011 à 21:46, Xypron <[email protected]> a écrit :
>
> > Hello Asma,
> >
> > R = (C1 + C3 * V1) / 1- (V2 * C2 )
> > is linear in R, V1, V2.
> >
> > The model below is solved by glpsol.
> >
> > Best regards
> >
> > Xypron
> >
> > param C1 := 1;
> > param C2 := 2;
> > param C3 := 3;
> >
> > var R, >= 0;
> > var V1, >= 0;
> > var V2, >= 0;
> >
> > minimize obj : V1 + V2 + R;
> > s.t. c1: R = (C1 + C3 * V1) / 1- (V2 * C2);
> > end;
> >
> >
> >
> > On 23.11.2011 17:10, esma mehiaoui wrote:
> >>
> >> Hello,
> >>
> >> I have this error: operating following / has invalid
> >>
> >> The general form of my constraint it seems to: R = (C1 + C3 * V1) / 1-
> (V2 * C2 )
> >> where C1 , C2 and C3 are constants with C2 and C3 > 0.
> >> R and V1 is an reel variable.
> >> V2 is an binary variable.
> >>
> >> Are there some solution to express this constraint ? (lenearize this
> constraint)
> >> Best regards,
> >> Asma
--
Follow me at http://twitter.com/#!/xypron
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk