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
addVar is ambiguous in highspy with highs.py #1679
Comments
Good call. There are a few options:
I don't mind any option. For backwards compatibility, I think (3) is best. However, if people are adding variables directly via the base class, it's not going to interact well if they're also trying to use the new highspy modelling features. In this case, options (1 or 2) is best so that the user explicitly knows what they're doing. |
Alternatively, we could rename the base class method |
Thanks. I liked (2) for a moment, until I realised that - if I understand correctly - the call to Unfortunately, I can see people "maturing" from the simple modelling language by going to the base class calls to get additional functionality, so it's good if they can work side-by-side. |
... but this is tempting. There already is
I've never been totally happy with this since, as you say, |
Removing We just have to make sure that |
I totally agree that advanced users will likely want to access Also, there is a bit more ambiguity here, since they can currently call |
highspy contains
addVar
, but so doeshighs.py
. It would appear that the method inhighs.py
is called, but this returns a variable, whereasaddVar
in highspy returns a HighsStatus (as in C++).So, even if this precedence perpetuates,
addVar
in highspy cannot be calledSuggest changing all occurrences of "var" in
highs.py
to "variable" - and, since this is a full-length word, change all occurrences of "constr" to "constraint"The text was updated successfully, but these errors were encountered: