Update basic examples no unicode
Closed this issue · 4 comments
ocots commented
We could add the problems without any unicode for the basic examples.
ocots commented
@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 commented
jbcaillau commented
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₁
, neitherx1
norx[1]
- we would never write sth like
derivate(x)
orintegral
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 commented
Ok but we can add a word to tell that it is possible with a link to the abstract syntax.