|
Post solution report writing computations |
Top Previous Next |
|
Often modelers employ post solution report writing calculations. These calculations can involve retrieving and manipulating a lot of data then multiplying it by the optimal variable levels
Y=SUM((A,B,C,D,E,F,G), (DAT(A)+IT(B,C)+Y(D,E)+W(F,G))*X.L(A,B,C,D,E,F,G))
Such calculations will virtually always perform better if the modeler enters a conditional that only causes the data retrieval and calculations to start if the solution variable value is nonzero
Y=SUM((A,B,C,D,E,F,G)$X.L(A,B,C,D,E,F,G), (DAT(A)+IT(B,C)+Y(D,E)+W(F,G))*X.L(A,B,C,D,E,F,G));.
This can be a huge time saver. It relies on the fact that in general few variables will be nonzero in a programming model compared to the number of variables present. In general, speed can often be helped by using tuples, subsets or conditionals to reduce attention in report writing calculations only to terms associated with nonzero decision variable values. |