-
Notifications
You must be signed in to change notification settings - Fork 10
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
Index refactor #26
Index refactor #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 minor comments.
LGTM
problem.g = {}; | ||
problem.lbg = []; | ||
problem.ubg = []; | ||
problem.ind_g_clock_state = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked out of curiosity, ind_g_clock_state
seems to never be used.
Can be removed later of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a short description for add_variable (e.g., what are possible values for type)
would be useful, even though it is almost apparent what needs to be done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make create_nlp_nosnoc shorter, I suggest to make some small stupid functions, e.g.,
create_empty_problem for initializing the problem struct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we often use (which was my initial mistake) cells for stacking functions and variables, g = {problem.g{:}, g}, and do vertcat(g(:)) at the end. we could immediately just do
problem.g = [problem.g, g], right @FreyJo ?
Right, it should be possible to just do |
Personally, I would not put comments in such a self explaining function, which is anyway just a helper function for developers, and not part of the front-end. |
Refactoring index definitions.
Very work in progress.