[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] A MathProg question
From: |
glpk xypron |
Subject: |
Re: [Help-glpk] A MathProg question |
Date: |
Tue, 13 Nov 2012 15:31:01 +0100 |
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
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-glpk