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

Error when applying relational order to categorical parameters #15

Open
MLopez-Ibanez opened this issue Feb 19, 2022 · 0 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@MLopez-Ibanez
Copy link
Owner

Using relational order operators to compare categorical values should not be allowed. For example, a parameter like:

a "" c (0, 5, 10, 20)

and a condition like a > 10 will return TRUE when a is 5, because a is actually "5" so the comparison is lexicographic.
We reading the condition, we should check if both a categorical parameter and a relation parameter appear in the condition, if so, we need some way to check that the relation operator is applied to the categorial parameter. We should not error for this:

a "" c (0, 5, 10, 20)
b "" i (0, 10)
c "" r (0,1) | a != 5 && b < 4

This applies also to expressions in forbidden.txt

(this was bug 2 in BUGS)

@MLopez-Ibanez MLopez-Ibanez added enhancement New feature or request help wanted Extra attention is needed labels Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant