control-toolbox/OptimalControl.jl

Update basic examples no unicode

Closed this issue · 4 comments

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

@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 ?

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).

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