Hello Reg,
sum{i in I} w[i]
is a linear function of w[i].
max{i in I} w[i]
is not a linear function of w[i].
GLPK can only solve linear problems.
You can still solve your problem as follows:
var w{i in I};
var obj;
minimize err: obj;
s.t. c{i in I} obj >= w[i];
Best regards
Xypron
-------- Original-Nachricht --------
> Datum: Tue, 13 Nov 2012 05:54:03 -0800 (PST)
> Betreff: [Help-glpk] A MathProg question
>
>
> Why is:
>
> minimize err : sum{i in I} w[i];
>
> acceptable, but:
>
> minimize err : max{i in I} w[i];
>
> is not?
>
> I can get the desired result by following example cf12b.mod, but I'm
> puzzled why glpsol 4.47 emits an error. From reading the manual, I'd expect
> that any of the iterated operators would be linguistically interchangeable w/
> sum.
>
> Thanks,
> Reg
>
>
> _______________________________________________
> Help-glpk mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/help-glpk
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk