The ALLOCATE AVAILABLE function requires a special second argument that uses the first element of the priority profile to indicate the entire array. This special arrangement avoids giving the full dimension name in the argument, which would then require the dimension name to appear on the LHS. Like Vensim, SDEverywhere references all elements of the priority profile based on the first element. But this results in the first element alone being listed as a reference. For instance, the command:
sde generate --list models/allocate/allocate
includes this among the references for the shipments[region] variable:
_priority_vector[_region,_ptype]
The ptype and pextra elements are constants by convention and so are not needed in the references. However, the ppriority and pwidth elements are needed as references. This happens to not be an issue in our small test model, but puts dependencies out of order in a larger model.
The
ALLOCATE AVAILABLEfunction requires a special second argument that uses the first element of the priority profile to indicate the entire array. This special arrangement avoids giving the full dimension name in the argument, which would then require the dimension name to appear on the LHS. Like Vensim, SDEverywhere references all elements of the priority profile based on the first element. But this results in the first element alone being listed as a reference. For instance, the command:includes this among the references for the
shipments[region]variable:The
ptypeandpextraelements are constants by convention and so are not needed in the references. However, theppriorityandpwidthelements are needed as references. This happens to not be an issue in our small test model, but puts dependencies out of order in a larger model.