Skip to content
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

Update basic examples no unicode #298

Closed
ocots opened this issue Aug 14, 2024 · 4 comments · Fixed by #300
Closed

Update basic examples no unicode #298

ocots opened this issue Aug 14, 2024 · 4 comments · Fixed by #300
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ocots
Copy link
Member

ocots commented Aug 14, 2024

We could add the problems without any unicode for the basic examples.

@ocots ocots added the documentation Improvements or additions to documentation label Aug 14, 2024
@ocots
Copy link
Member Author

ocots commented Aug 14, 2024

@jbcaillau Je pensais que l'on pouvait remplacer par in. Il semblerait que cela ne marche pas :

julia> ocp = @def begin
           t in [0, 1], time
           x in R^2, state
           u in R, control
           x(0) == [ -1, 0 ]
           x(1) == [ 0, 0 ]
           derivative(x)(t) == [ x2(t), u(t) ]
           integral( 0.5u(t)^2 ) => min
       end
ERROR: ParsingError: 
Line 1: (t in [0, 1], time)
unknown syntax

C'est => ou -> pour la minimisation, cf. control-toolbox/CTBase.jl#246 ?

@ocots
Copy link
Member Author

ocots commented Aug 14, 2024

Voir control-toolbox/CTBase.jl#251.

@jbcaillau
Copy link
Member

We could add the problems without any unicode for the basic examples.

I prefer not to. As close to the math as possible:

  • we use x₁, neither x1 nor x[1]
  • we would never write sth like derivate(x) or integral

Our basic example must be as simple as striking as possible: "write math as usual, we take care of the computation".

It is good to have nonunicode alternatives, and it is documented in the doc (all but in which is natural in Julia).

@ocots
Copy link
Member Author

ocots commented Aug 15, 2024

Ok but we can add a word to tell that it is possible with a link to the abstract syntax.

@jbcaillau jbcaillau linked a pull request Aug 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants