File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 279279```
280280
281281!!! caveat
282- Write either ` u(t)^2 ` or ` (u^2)(t) ` , not ` u^2(t) ` since in Julia the latter is means ` u^(2t) ` . Moreover,
282+ Write either ` u(t)^2 ` or ` (u^2)(t) ` , not ` u^2(t) ` since in Julia the latter means ` u^(2t) ` . Moreover,
283283 in the case of equalities or of one-sided inequalities, the control and / or the state must belong to the * left-hand side* . The following will error:
284284
285285``` @setup main-repl
358358 t ∈ [0 , 1 ], time
359359 x = (q, v) ∈ R², state
360360 u ∈ R, control
361- 0.5 integrate (q (t) + u (t)^ 2 ) → min
361+ 0.5 integral (q (t) + u (t)^ 2 ) → min
362362 ...
363363end
364364```
365365
366366The integration range is implicitly equal to the time range, so the cost above is to be understood as
367367``` math
368- \int_0^1 \left( q(t) + u^2(t) \right) \mathrm{d}t \to \min.
368+ \frac{1}{2} \ int_0^1 \left( q(t) + u^2(t) \right) \mathrm{d}t \to \min.
369369```
370370
371371As for the dynamics, the parser will detect whether the integrand depends or not on time (autonomous / non-autonomous case).
You can’t perform that action at this time.
0 commit comments