Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.7.0 #82

Closed
joseph-gergaud opened this issue May 22, 2023 · 7 comments
Closed

Release 0.7.0 #82

joseph-gergaud opened this issue May 22, 2023 · 7 comments
Assignees

Comments

@joseph-gergaud
Copy link
Member

joseph-gergaud commented May 22, 2023

  1. In OptimalControlSolution type, there is not the value of the variable v ;

  2. The plot of the solution of the problem

n=1
m=1
t0=0
tf=1
x0=[0]
xf=[0]
ocp = Model()
state!(ocp, n)
control!(ocp, m)
time!(ocp, [t0, tf])
constraint!(ocp, :initial, x0, :initial_constraint)
#constraint!(ocp, :final, xf, :final_constraint)
constraint!(ocp, :control, -1, 1, :control_constraint)
dynamics!(ocp, (x, u) ->  -x[1] + u[1])
#objective!(ocp, :lagrange, (x, u) -> u[1]*u[1])
objective!(ocp, :mayer, (x0,xf) -> xf)
sol = solve(ocp, grid_size=20, print_level=5)
p1 = plot(sol)

the plot of the control and of the costate is not good (value of -1)

  1. It will be better that CTBase as before five function with only vectors as argument. When we'll code the direct shooting method, we'll have to treat the different case scalar, or vector as for de Direct method ...
@ocots
Copy link
Member

ocots commented May 22, 2023

  1. Ok. I will make the update.
  2. Did you take a look at sol.control and sol.costate?
  3. I guess it is more efficient to give directly a scalar instead of adding some tests inside the functions. It shouldn't be difficult to treat this inside the solvers. If I want to write something efficient for instance for the dynamics, I should write 48 methods instead of the 7. Besides, I should know the dimensions of x, u and v at the creation of the function which is not necessarily what we want.

Remark. You should write x0 = 0 and -x+u in the dynamics.

@ocots
Copy link
Member

ocots commented May 22, 2023

I have added the field variable: https://github.com/control-toolbox/CTBase.jl/releases/tag/v0.7.1

@jbcaillau
Copy link
Member

@joseph-gergaud I don't get what you mean point 3, but apparently @ocots does! Anyway, call me (phone) this Tuesday if you want to discuss this.

@jbcaillau
Copy link
Member

@ocots issue resolved?

@ocots
Copy link
Member

ocots commented Jun 2, 2023

Not yet, but no answer from @joseph-gergaud

@jbcaillau
Copy link
Member

jbcaillau commented May 22, 2024

@joseph-gergaud please check whether the problem still exists

  1. Did you take a look at sol.control and sol.costate?

@ocots
Copy link
Member

ocots commented Jun 10, 2024

Problem solved by #149

@ocots ocots closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants