Thursday, July 24, 2008

Modeling question

>Among the constraints in the formulation my team have worked on,
>some of them have special properties like:
>Here a[i] are nonnegative parameters, so RHSs are non-decreasing.
>Besides these constraints, we deal with tons of constraints, so we are not looking
>for any algorithm or method, but looking for smart conversion of these constraints.
>My question is "Are they any ways to formulate this more intellingently or effectively
>to reduce computational effort?

parameter b(i);
alias (i,j);
b(i) = sum(j$(ord(j)<=ord(i)), a(j));

variable y(i);

ydef(i).. y(i) =e= y(i-1) + x(i);
y.lo(i) = b(i);

This requires more variables but many fewer nonzeroes, so likely more efficient (sparser).