Comments (8)
Working on it :)
from bioptim.
Is it possible to add this information somewhere that realtime plots may affect speed of about 15%?
from bioptim.
Make sure the communication between the processors are using UDP and not TCP, which could slow things down otherwise
from bioptim.
It does slow down IPOPT. I tested with maximize_predicted_height_CoM, results are as follow:
- Test for t = 5, ns = 200
With plots : 19.38321542739868 s
Without plots : 18.32109808921814 s - Test for t = 50, ns = 200
With plots : 342.2361035346985 s
Without plots : 307.77546977996826 s
I think the problem is at recv : "[recv] Bloque jusqu'à ce que quelque chose soit reçu." https://docs.python.org/fr/3/library/multiprocessing.html
Possible avenues for solution:
- Treat arg[0] as a socket data flow with recvfrom (class socket) which is the UDP version of recv. https://pythontic.com/socketserver/threadingudpserver/introduction
- Use multiprocessing.sharedctypes to access shared memory (bypass recv). https://docs.python.org/fr/3/library/multiprocessing.html
from bioptim.
I implemented the shared memory option. It still slows down Ipopt :(
Results for 30 trials of maximized_predicted_height_CoM:
with plots : 20.52554191748301 +- 1.12808514596442
without plots : 17.647579884529115 +- 0.39544275397521056
from bioptim.
So it is the same order of magnitude? Could you redo the one which was taking 5 minutes? If it gives the same thing, then I think we can leave it as is (since we will never do faster than shared memory)
from bioptim.
maximized_predicted_height_CoM, ns = 200, t = 50:
with graphs results : 323.4463245312373 +- 18.840376615154913
without graphs results : 282.86038216749824 +- 5.873278186064388
from bioptim.
It seems that shared memory or send/recv are equivalent. Since the one already implemented works, I think we will keep it. Thanks for answering this Issue!
GJ :)
from bioptim.
Related Issues (20)
- Invalid dimension when warmstart
- Pinocchio Casadi can be interfaced with bioptim.
- Speed & RAM issues HOT 2
- custom_plotting example error HOT 4
- Generalize stochastic optimal control do every type of dynamics
- Create free floating base torque driven dynamics
- Plot errors in multi-phase HOT 8
- Custom parameter bound issue when using multiple phases HOT 3
- Need ObjectiveFcn.MAYER.TRACK_CONTACT_FORCES HOT 4
- test_soft_contacts.py doesn't pass since biorbd 1.10.1 HOT 1
- show_online_optim not building graphs HOT 1
- Could we store the commit hash in sol? HOT 4
- Acados tests are failing on Linux CI.
- pyQt examples - error with Content search
- Save and load extension possibility before deleting it HOT 2
- Testing solution outputs to manually display graphs of pendulum HOT 3
- Can't plot graphs when using mapping? HOT 2
- Problem while plotting with multiphase and one node per phase HOT 7
- Add the possibility to integrate the dynamics in extra_dynamics
- LINEAR_CONTINUOUS control is not continuous across phases
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bioptim.