I solve timeseries NLPs of 6 million variables in GAMS using the IPOPTH solver. The same model base is used for various objective analyses. The model is discretized at a 1 hr interval over a 24 hour duration. There exist some optional temporal constraints that link between subsequent timepoints. However, there are analyses in which the temporal constraints are not needed, which results in independent per-timepoint models that are parallelizable. See a crude example below,
where a(t), x_min(t), x_max(t), y_min(t) and y_max(t) are timeseries input parameters. I want to solve such model using the GUSS Grid environment by defining the timepoints as parallel scenarios. This gussgrid.gms (https://www.gams.com/latest/gamslib_ml/libhtml/gamslib_gussgrid.html) serves as my reference while setting up the solve configuration. I realize that I’m not able to parallelize my model because the set of scenarios, in this case timepoint t, constitutes the index in equations, constraints and parameters that form the model. Is there a way to handle this kind of modelling situation to take advantage of GUSS Grid environment without significantly changing the model structure?
GUSS and the Grid Facility are two independent things that are used in combination in the gussgrid example you shared.
In your case, it seems that the grid facility could be useful but given the model setup as you describe it, using GUSS will not be straightforward at all.
So I suggest that you focus on “grid only” examples like trnsgrid or tgridmix.
Thanks for replying. My rough idea to form the loop is as follows,
loop(t,
Solve Model using NLP minimizing z_obj;
);
However, GAMS does not permit any controlling set inside the body of the loop since the scenario t constitutes the construct of my model. Seems like the only way to go for me is to drop time index t from the model variables, equations and parameters.
The alias definitely works but I’m still solving the entire timepoints in each loop. In a toy problem shown below, I’m expecting to solve only t1 in the first loop, and only t2 in the second loop.