Open anujdave23 opened 3 years ago
Can you post this as code?
Can you post this as code?
using ModelingToolkit,QuadGK
@variables t x(t) v(t) h(t)
@parameters p , g
D = Differential(t)
loss = quadgk(u,0,p)
eqs = [
D(h) ~ v
D(v) ~ -g + u
]
sys = ControlSystem(loss,eqs,t,[h,v],[u],[p,g])
dt = 0.1
tspan = (0.0,1.0)
sys = runge_kutta_discretize(sys,dt,tspan)
u0 = rand(112) # guess for the state values
prob = OptimizationProblem(sys,u0,[0.1],grad=true)
u
isn't defined. The loss is supposed to be the integrand, so no need to write the integral.
so if i initiate u(t) as an variable and in loss function only u , will that be fine?
u
isn't defined. The loss is supposed to be the integrand, so no need to write the integral.
Use the test as an example: https://github.com/SciML/ModelingToolkit.jl/blob/master/test/controlsystem.jl. We're probably still a few months away from having a full blown tutorial there though.
Use the test as an example: https://github.com/SciML/ModelingToolkit.jl/blob/master/test/controlsystem.jl. We're probably still a few months away from having a full blown tutorial there though.
Actually I am a Master Student and this is my embedded seminar topic, so i need to develop a simple optimal control system using controlsystem and i can't copy and paste your code. So i tried to develop a system but i am not getting what the error is
I'm saying right now the best documentation is the test, so use the test as an example of what works.
Okay thanks for your information, i also have a doubt about equality_constarints and inequality_contraints in optimizationsystem of MoodelingToolkit . Is it possible to apply the condition if yes how? Can you please guide me through this?
That's not available yet. ControlSystem is pretty unfinished right now and I don't expect it to be completed for another couple months.
That's not available yet. ControlSystem is pretty unfinished right now and I don't expect it to be completed for another couple months.
not in controlsystem. I am asking if its possible in "optimizationsystem".Because in the fields this contraints are mentioned
I'm not sure OptimizationSystem will do it all, but you can directly modify the OptimizationProblem.
Hello fellas, I am trying to develop one simple example of controlsystem for the optimal control of any system but getting some error. I tried Moon Lander problem.But i didnt understand the error . Please to code that i have developed and give me some feedback to run it successfully