Java Api - change set entries in ModelInstance via Modifier or else

Hi,

still working on the Java API. A question: I want to use the Modelinstance with Gamsmodifiers. All straightforward with Parameters. However, I would like to add/remove set entries via the modifier which seems not to be possible. Is there a way to do this via SyncDB operations or is this just out of the scope for the Instance? I manage to add a set and records to the SyncDB but the added records are not considered in the solution…

sample code:
gamsModelInst.SyncDB().addSet(“curPlots”, 1);
gamsModelInst.instantiate(“Fruchtfolge using MIP maximizing v_obje”, new GAMSModifier(gamsGrossmarginParameter),new GAMSModifier(plotDataPara));
gamsModelInst.SyncDB().getSet(“curPlots”).addRecord(“plot3”);
gamsModelInst.solve();


regards

Anybody an Idea about modifiying sets in a ModelInstance? Is it possible?

No, this is not possible. GAMSModelinstance only works with a fixed model rim. Sets change the model rim. The solution to this is to initiate the GAMSModelinstance with the full set of a possible subsets and use 0 (actually EPS) in the equation aalgebra (via some modifiable parameter) when you don’t what the variable in the actual scenario.

-Michael