Hi, I am using Pulse Python bindings for simulations. I am trying to simulate patients who have VAP in their lungs. However, I need data in time steps of 1 hour. Is there any way possible to get that data faster? Because if I try to get data like regular simulations, Pulse is giving data every 0.02 seconds, which does not really matter that much for my use case.
Please tell is there any way to get data in larger steps, without simulating for smaller steps?
You can change the frequency that you extract data from the simulation, but the Pulse simulations require a timestep that aligns with the nyquist frequency of the cardiovascular cycle. We have done some early testing of using a larger timestamp and we were able to double the timestep to 0.04 s and still achieve valid results. But currently the models cannot simulate a full hour at a time in a single timestep.
Is there a way to directly proceed to 1 hour after the simulation starts, or speed up the solving part? Because if I want to obtain a larger set of data, such as for 12 hours or 24 hours, I cannot do it. If I provide input as seconds to Advance_time_s, it takes forever to complete.
It does take about 10min real time to simulate 1 hour of simulation.
As Rachel said, it is possible to double the time step from 0.02 to 0.04, which should bring it down to around half an hour to simulate an hour, but at the cost of reduced data fidelity.
But simulating 12 to 24 hours of a patient would still take quite a while.
What we do to generate large sets of data is to create many scenarios and use the PulseScenarioExec to run those scenarios in parallel on a machine with 40+ processor cores.
We also utilize saving and reusing states. We simulate a patient up to a point where treatment can change and save a Pulse state. Then we can create several scenario files starting at that point and each doing something different, so we only need to simulate the common physiology once.
We generally create datasets of thousands of patients, each simulating 2 to 3 hours of physiology data using this method. We also pull data out of the simulated csv files into a context specific structure to perform training/analysis with so we don’t need to regenerate the physiology data.