>> Do you have any suggestion(s) to overcome this issue?
>
> You may replace the statement
>
> var R {o in OMEGA} = r[0] + sum{k in 1..n-1} 2*r[k]*cos(k*o);
>
> which is incorrect in MathProg, with the following ones:
>
> var R {o in OMEGA};
> s.t. foo{o in OMEGA}: R[o] = r[0] + sum{k in 1..n-1} 2*r[k]*cos(k*o);In addition to this, it is a good idea to replace cos(k*o) with something like: if abs(cos(k*o)) < 1e-9 then 0 else cos(k*o) otherwise you will get lots of small values that will mess the scaling of the model. In the example you posted, this leads to a result that is off by a few orders of magnitude. Best Regards, Chris Matrakidis _______________________________________________ Bug-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-glpk
