Skip to content

Commit

Permalink
reduced frames for annimation from 500 to 100
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter230655 committed Sep 18, 2024
1 parent d6e5f6d commit 5f36d71
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions examples-gallery/plot_pendulum_swing_up_fixed_duration.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,14 @@
time_symbol=t)

# %%
# Use a random positive initial guess. This will be used for a better initial
# guess, stored in pendulum_swing_up_fixed_duration.solution.npy
# Use a random positive initial guess.
initial_guess = np.random.randn(prob.num_free)

# %%
# Find the optimal solution.
initial_guess = np.load('pendulum_swing_up_fixed_duration.solution.npy')
solution, info = prob.solve(initial_guess)

# %%
# The solution will be saved like this:
# ```np.save('pendulum_swing_up_fixed_duration.solution.npy', solution)```
print(info['status_msg'])
print(info['obj_val'])

Expand Down

0 comments on commit 5f36d71

Please sign in to comment.