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

Should we support parameter value enumeration #11

Open
spine-o-bot opened this issue Feb 3, 2021 · 0 comments
Open

Should we support parameter value enumeration #11

spine-o-bot opened this issue Feb 3, 2021 · 0 comments
Milestone

Comments

@spine-o-bot
Copy link

In GitLab by @DillonJ on Sep 4, 2018, 09:49

Hi folks,

Proposal

While considering the implementation of archetypes I came upon the possible need for parameters that will define, for example, model options or methods for doing something. So, they can typically take a number of predefined values. E.g. we might have boolean parameters or something like efficiency_method which might be "linear", "affine" or "piecewise" for example.

Implementation options:

  • We could create a new JSON field in parameter definition which can include all allowed values (my preferred option - seems easiest?)
  • We could create a new table which contains allowed values for each parameter

Question: Do we depend on the string value of something - in my example above, do we have in the code: if(mip_method(arch_id)=="affine" ... or do we assign an integer value to each option (like an enum in C)? Surely this would be easy to do with a JSON field.

A step further would be to convert the string values to constants that we can use in Julia using JumpALLOut... so we could write (for example) if(mip_method(arch_id)==affine ...

What do you think @manuelma
Also mentioning @juha_k and @poncelet as not everyone looks at the data issues :-)

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

No branches or pull requests

2 participants