help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Error : multiplication of linear forms not allowed


From: Andrew Makhorin
Subject: Re: [Help-glpk] Error : multiplication of linear forms not allowed
Date: Mon, 5 Apr 2010 17:24:53 +0400

> When I try to add this constraint as follows
> s.t. cntr1{i in PROCESSES}: 0 <= p[i] + p[i+1] - 2*z[i] <= 1;
>  I'm getting an error saying "p[6] out of domain
> Model processing error"

> In the data section PROCESSES are defined as
> set PROCESSES := 1 2 3 4 5;

> When specifying the constraint how can I set a p[i+1] a default value
> if i+1 is not in the domain?

s.t. cntr1{i in PROCESSES}:
0 <= p[i] + (if i < n then p[i+1] else ???) - 2*z[i] <= 1;

Replace ??? by a default value.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]