Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description of the mechanics of start values for arrays is missing #843

Open
pmai opened this issue Mar 10, 2020 · 2 comments
Open

Description of the mechanics of start values for arrays is missing #843

pmai opened this issue Mar 10, 2020 · 2 comments
Assignees
Milestone

Comments

@pmai
Copy link
Collaborator

@pmai pmai commented Mar 10, 2020

As noted in the discussion of #838, as well as in interaction with outsiders, the documentation of start values currently does not explain how they are to be treated for arrays:

  • Values are in row-major order
  • What to do if the number of values does not match the initial size of the array

The specific case that start values are specified as elements rather than an attribute for string variables should also be mentioned.

@klausschuch

This comment has been minimized.

Copy link
Collaborator

@klausschuch klausschuch commented Mar 11, 2020

The serialization of array values in the start attribute is currently mentioned in section "2.1.7 Getting and Setting Variable Values".

Variables can be scalar or array variables. When getting or setting the values of array variables, the serialization of array variable values used in C-API function calls, as well as in the XML start attributes is defined as row major - i.e. dimension order from left to right for the C-API (e.g. array[dim1][dim2]…​[dimN]), and document order in the XML attributes. For this serialization of array variables the sparsity pattern of the array is not taken into account. All elements of the array, including structural zeros, are serialized.

This does not mention (and must be extended):

  • special handling string array variables
  • error handling or mismatching

I suggest to just reference this section in the description of the start attribute in "2.2.10 Definition of Model Variables (ModelVariables)"

Additionally, we specified in the array FCP that a short notation should be possible.
If only a scalar value is given, the all entries of the array have this value.
This is not mentioned in the specification at all yet.

@andreas-junghanns

This comment has been minimized.

Copy link
Contributor

@andreas-junghanns andreas-junghanns commented Mar 11, 2020

@klausschuch : you seem to have a plan: please prepare a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.