Originally posted by: SystemAdmin
[thiago.serra said:]
Well, I've realized that it is not possible to do this [b]directly[/b], since scripting languagens (including OPL Script) are not strongly-typed (and are not meant to be, anyway). So, before the for loop of my code above, I had to make the environment understand that Inventory.startingInventory is a vector. I did so with the following workaround:
Inventory.startingInventory = Opl.startingInventory;
Since there is a copy of the old inventory vector in the old model, I can create a new source for Inventory, "copy" the vector type from the old model and then put on it the new values with the very same for loop.
Since I've not found this anywhere, I hope this post might help other users.
#DecisionOptimization#OPLusingCPLEXOptimizer