ModelingToolkit.jl
ModelingToolkit.jl copied to clipboard
switch parse_costs! and parse_constraints
It seems like they are currently backward
@AayushSabharwal better test this?
I'm confused, because we have a test for this and it passes both before and after the swap on CI, but fails after swapping locally.
@ctessum how did you run into this? Are you using MTK.get_gui_metadata?
I don't have a specific case of it failing, I was just looking through the code and it seemed wrong.
I see. So the functions are identical, and because they were passed the correct arrays it worked. i.e. in the @costs case, it called parse_constraints! but passed it the costs array. Constructing the system thus worked fine, it's just that in the Model struct the values are backward.