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
> [email protected]
> 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.
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk