Skip to content

Generate correct dependencies for ALLOCATE AVAILABLE #135

@ToddFincannon

Description

@ToddFincannon

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.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions