Skip to content

Constraint modelling error: "check_belongs_to_model(::NonlinearExpression, ::Model)" #317

Answered by pulsipher
Philippe1123 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there and welcome!

You found a bug, thanks for sharing. It will be fixed by #318.

Also, note that your final time problem will not minimize the final time as you currently have it posed. To use the reformulation trick with tf you will need to reformulate the integral as a differential equation that is scaled by tf. Otherwise, as formulated the tf has no effect on the integral and can be trivially set to 1.

On a more minor note, you can and probably should move the variable bound constraints into @variable.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Philippe1123
Comment options

You must be logged in to vote
1 reply
@pulsipher
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants