-
Notifications
You must be signed in to change notification settings - Fork 20
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
Reduce time it takes to run the examples #204
Comments
Another way to reduce time is to give better initial guesses. We can even store a solution and give that as a guess. |
How can I store a solution, so it does not get lost when the program is closed? |
You can save any value to a txt file with many different methods. NumPy has builtin ways to do this: https://numpy.org/doc/stable/reference/routines.io.html |
Amazing how this works - and it is two lines of code initially, no additional line in the final simulation. (After your hint, chatGPT told me the lines) I once modeled a drone with propellers, the one that wiggled and it cut down the simulation time from over one minute to 16 sec. - still wiggles, though :-) |
Here is the output from a recent build on the readthedocs system, which is slower than running it locally:
|
If I understand correctly, this is what I tried with the examples that have animations. Should be in the PRs. |
Yes, you are. I'm just logging information here on the broader issue. I will get to all your PRs, but it just takes time. |
I am in NO rush, I have time! Just wanted to make sure I understood right - which you confirmed! NB: now that I know examples-gallery a bit better, I do not think, that my sailboat and my Mississippi steamer contribute much. The Kane part may be interesting - but the opty is standard. |
We can add them all as long as we keep the time down and can always delete them later if we every have to replace one. |
makes emminent sense! |
Here is the current timing from a clean build:
Reducing the time it takes to create animations is an easy adjusted, for example. We can safely skip generating a frame for every time instance by skipping frames with a minor adjustment to the code. Here is an example:
https://github.com/csu-hmc/opty/blob/master/examples-gallery/plot_drone.py#L299-L300
The text was updated successfully, but these errors were encountered: