On Tue, 2014-04-08 at 18:46 +0100, Tiago Costa wrote:
> Hi,
> 
> I'm trying to apply the following restriction:
> 
> subject to calc2 {m in M} :
>      fee[m] = sqrt(1000 + (100 + (sum {n in N} (n mod 47))) * (sum {l in 
> L} prod[l,m]));
> 
> However since prod[l,m] is a var, I get "argument for sqrt has invalid 
> type".
> 
> I've read in the documentation that you can only calculate the sqrt of 
> constants/params/etc so is there a workaround to calculate the sqrt of a 
> var?
> 
> Thanks
> --
> Tiago Costa
> 

Only linear constraints are allowed while sqrt makes the constraint
non-linear. However, using sqrt *below* the solve statement, i.e. when
all the variables have been computed, is allowed.



_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to