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

Issue on page /notebooks/06.04-Soft-Landing-Apollo-11-on-the-Moon.html #44

Open
alex-kling opened this issue Jan 8, 2024 · 3 comments

Comments

@alex-kling
Copy link

First , let me say thank you for your work with Pyomo, amazing software!

In the Soft landing example : 6.4.3. Version 2: Rescaled model, the boundary conditions are provided for the altitude (h_initial = 100000.0 m) and the orbital velocity (v_initial = 1520 m/s)

m.h[0].fix(h_initial)  
m.v[0].fix(-v_initial)

I noticed that for the normalized formulation above, v(tau)=v(t)*T (T=final time) so the initial velocity provided is not scaled appropriately. That result in a velocity profile:

vsim = np.array([m.v[t]()/m.T() for t in m.t])

that does not match the 1520 m/s boundary conditions at t=0.

I suggest updating the example. (Also, is there an obvious work-around to specify boundary condition for the derivatives in a normalized setting?).

Best,

@alex-kling
Copy link
Author

Actually, (answering my own question), something along the lines of :

m.h[0].fix(h_initial) 
m.v_tf = pye.Constraint(m.t, rule=lambda m, t: pye.Constraint.Skip if t != m.t.first() else m.v[t] == v_initial*m.T)

for the initial conditions produces a solution.

@adowling2
Copy link
Collaborator

@alex-kling Thank you. In case you did not know, @jckantor passed away during the summer. I plan on maintaining this cookbook here: https://github.com/ndcbe/ND-Pyomo-Cookbook

If you want to open a pull request, I'd love to have you as a contributor.

@Vondoe79
Copy link

Vondoe79 commented Jan 19, 2024 via email

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