X = repmat([45000;7;2500],1,N).*opti.variable(3,N+1) # variables d'état
pos = X[0,:] # position
speed = X[1,:] # vitesse
energy = X[2,:] # energie
f = 15*opti.variable(1,N) # force
T = opti.variable() # temps final de la course
I took the wording in the Matlab example but it doesn't work with Python. What is the right wording for Python? pos is 42195 max, speed is 7 max, energy is 2500 max and f is 15 max.
I have the message :
X = repmat([45000;7;2500],1,N).*opti.variable(3,N+1) # variables d'état
^
SyntaxError: invalid syntax
I tried the following code for trying catch the evolution of the T variable :
opti.solver("ipopt", {"expand":True}, {"max_iter":5000})
sol = opti.solve() # lancement du solver
plt.figure(1)
opti.callback(lambda i: plt.plot(opti.debug.value(T)))
plt.show()
But no graph, nothing.
Do you have ideas ?
Thanks by advance.
Rémy