Having trouble with my first script

68 views
Skip to first unread message

Omkar Mulekar

unread,
Dec 10, 2021, 8:40:17 AM12/10/21
to PSOPT users group
Hello!

I would really appreciate any help I could get with this.  I'm trying to code up a pretty basic point-mass lander formulation.  
  • Cost function: J = integral(sqrt(Fx^2 + Fy^2 + Fz^2))
  • Dynamics:
    • xdoubledot = Fx/m
    • ydoubledot = (Fy/m) - g
    • zdoubledot = Fz/m
    • mdot = -sqrt(Fx^2+Fy^2+Fz^2)/(Isp*g0)
  • Constraints
    • Fx, Fz between -15000 and 15000
    • Fy between 0 and 15000
    • y > 0
  • Initial conditions
    • x = 1000
    • y = 1000
    • z = 1000
    • xdot = 15
    • ydot = 0
    • zdot = 15
    • m = 500
  • Final conditions
    • x=y=z=xdot=ydot=zdot = 0
I tried coding it up using examples and the documentation pdf, but I'm having trouble producing results that make an ounce of sense.  Would it be possible for someone to give my script a look over to see if there is anything glaringly wrong?  I'd appreciate any guidance I could get on this.

Thank you!
user.cxx
Reply all
Reply to author
Forward
0 new messages