File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -42,23 +42,24 @@ We will consider 52 time steps as we want to find optimal value functions for on
4242
4343and we consider the following initial position::
4444
45- X0 = [50, 50 ]
45+ X0 = [50]
4646
47+ Note that X0 is a vector.
4748
4849Dynamic
4950^^^^^^^
5051
51- We write the dynamic::
52+ We write the dynamic (which return a vector) ::
5253
5354 function dynamic(t, x, u, xi)
54- return [x[1] + u[1] - xi[1]]
55+ return [x[1] + u[1] - xi[1]]
5556 end
5657
5758
5859Cost
5960^^^^
6061
61- we store evolution of costs :math: `c_t` in an array `COSTS `, and we define the cost function::
62+ we store evolution of costs :math: `c_t` in an array `COSTS `, and we define the cost function (which return a float) ::
6263
6364 function cost_t(t, x, u, w)
6465 return COSTS[t] * u[1]
You can’t perform that action at this time.
0 commit comments