Forum Discussion
FICO
8 years agoCommunity Manager
Question about dynamic arrays
I am creating a package. In this package, I need to first load a file: -> package test declarations: ! Raw variables to read the standard format for rate file RATE_I_SEGMENTS: set of string R...
FICO
8 years agoCommunity Manager
Once a set has been used as index set for an array it is no longer possible to delete it or even to remove elements from this set - but if the set has not been finalized you can keep adding elements to it.
If your code requires the exact index set contents of one of your arrays you probably need to create a separate set, eg
NewSet:= union (s in RATE_I_SEGMENTS, d in RATE_STARTDATEs, e in RATE_ENDDATEs | exists (RATE_I_ARRAY(s,d,e)) {s}
For the enumeration of the current contents of the dynamic arrays, make sure to always employ the 'exists' test.
Another note, unrelated to your question: any declarations in a package of entities or subroutines that are meant to be accessible from other parts of your program (that is, from outside of the package) need to be explicitly marked as public'.
Related Content
Related Content
Dynamic array type in Xpress Python interface
Hello, I query is there any functionality or method in Xpress Python Interface that can be used to resemble the dynamic array type (e.g., "dynamic array(set of range) of mpvar/linctr)") available in...7 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum4 unread comments4 unread0Views0likes4Comments