help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Transport Problem advanced


From: SpaceRider
Subject: Re: [Help-glpk] Transport Problem advanced
Date: Tue, 14 Oct 2008 20:53:27 +0300

Hello!

not bad, but I take this, now.

s.t. h{j in J} : sum{i in I} x[i,j] >= demand[j] * b[j];
s.t. g{j in J} : sum{i in I} x[i,j] <= M * b[j];

in combination with some other s.t. to control the result.

Until now, I haven't found errors.

I will continue to test, with more varibales and with a dynamic interface to
Perl.

Greetings
Andy


xypron wrote:
> 
> Hello Andy!
> 
>>> But I want it is set to 1 if sum{i in I} x[i,j] >= demand[j]
> 
> 
> You might try something like:
> 
> # Big M, use the smallest possible value.
> param M := 1e6;
> # Binary
> var b[j in J] binary;
> 
> s.t. gt_demand{j in J} :
> 
> sum{i in I} x[i,j] - demand[j] - M * b[j] <= 0;
> 
> 
> Best regards
> 
> Xypron
> 
> 
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Transport-Problem-advanced-tp19887773p19975760.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.








reply via email to

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