-
Notifications
You must be signed in to change notification settings - Fork 3
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
WIP - Onepass #132
WIP - Onepass #132
Conversation
src/onepass.jl
Outdated
:( $e2 ≥ $e1, $label ) => p_constraint!(p, ocp, e1 , e2, nothing, label; log) | ||
# lagrange cost | ||
:( ∫($e1) → min ) => p_lagrange!(p, ocp, e1, :min; log) | ||
:( $e1 * ∫($e2) → min ) => p_lagrange!(p, ocp, :( $e1 * $e2 ), :min; log) |
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.
@ocots convenient but: this kind of expression only makes sense if e1
does not contain references to state or control (variable allowed, though). Otherwise we would allow something like
x(t) * ∫(u(t)) → min # nonsense
as equivalent to
∫(x(t) * u(t)) → min # ... becomes meaningful
etc.
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.
@ocots I am taking care of the changes suggested in the review above before merging.
:( $e1 * ∫($e2) → min ) => p_lagrange!(p, ocp, :( $e1 * $e2 ), :min; log) Forbid Do we accept
|
Add the use of square brackets: x = [y, z] ∈ R², state Done! |
I have added left multiplication and right division. |
And restructured the tests for onepass. |
J'ai fait quelques ajouts dans la définition de l'ocp en abstrait. J'espère ne pas avoir cassé les cohérences. En gros, on peut donner des labels directement aux variables, états et contrôles. Ces labels sont utilisés pour l'affichage de la solution. J'ai aussi ajouté la possibilité d'écrire un Lagrange (Bolza aussi):