[Top][All Lists]

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

Re: [Help-glpk] Conditional Multi-Iteration Statement

From: mohammed alrudaini
Subject: Re: [Help-glpk] Conditional Multi-Iteration Statement
Date: Fri, 25 Nov 2016 01:51:37 +0200

Thank you (^_^), it worked.

On Fri, Nov 25, 2016 at 12:49 AM, Heinrich Schuchardt <address@hidden> wrote:
How about

n (1 - sum(x)) >= sum(y)


Am 24.11.16, 23:43, mohammed alrudaini <address@hidden> schrieb:

Dear all,


I am a newbie in GLPK Modeling, and I got I solver statements like this:


1-      s.t. a{i in 1..n}: Sum{j in 1..n} x[i,j] <=1; #0 or 1

2-      s.t. b{i in 1..n}: Sum{j in 1..n} y[i,j] <=n;#0 to n


these works fine, but I want to add a third stament restricting the sum of y[i,j] to be zero only if the sum of x[i,j] is one

something like that

1-      s.t. c{i in 1..n}: if Sum{j in 1..n} x[i,j] ==1 then Sum{j in 1..n} y[i,j] ==0 ;#sum y[] is 0 if sum x[] is one

can anyone helps me here?


_______________________________________________ Help-glpk mailing list address@hidden

Mohammed Al-Rudaini
Email: address@hidden
Mobile: +962-789320222
Irbid, Jordan.

reply via email to

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