You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Engine.front tracks all processes next updates, with a dict that has the next update times and the updates that will be applied: {'time': 14.0, 'update': {update-to-be-applied}}. The process's next update time is determined by the global time plus the timestep given by its Process.calculate_timestep().
Having interrupts would allow other processes to change a given process's next update time to be earlier. This might be necessary if, for example, an event such as chromosome replication needs to reset transcription at a given time. If the interrupt time is before the previously-determined next update time, the transcription process would need to be rerun from its previous initial state, and would return a new update dict: {'time': 13.0, 'update': {new}}.
To add this feature requires that we save the initial state provided for the process, so it could be re-run from that state at a shorter interval. Something like: {'time': 14.0, 'update': {update-to-be-applied}, 'state': {saved-view}}. It would also require the interrupt times to be received and handled by Engine.run_for.
The text was updated successfully, but these errors were encountered:
Would a saved "view" of the state be enough? Currently the views we give to processes aren't copies. If we used a similar view here, any changes to the state would also affect the saved view. To prevent this, I think we'd need to deepcopy the view
Agree -- a "view" would not be enough, it would need to be a deepcopy. This would clearly add overhead, so maybe it should be optional? Processes can opt in for interruption, in which case the deepcopy of the view is applied.
Currently
Engine.front
tracks all processes next updates, with a dict that has the next update times and the updates that will be applied:{'time': 14.0, 'update': {update-to-be-applied}}
. The process's next update time is determined by the global time plus the timestep given by itsProcess.calculate_timestep()
.Having interrupts would allow other processes to change a given process's next update time to be earlier. This might be necessary if, for example, an event such as chromosome replication needs to reset transcription at a given time. If the interrupt time is before the previously-determined next update time, the transcription process would need to be rerun from its previous initial state, and would return a new update dict:
{'time': 13.0, 'update': {new}}
.To add this feature requires that we save the initial state provided for the process, so it could be re-run from that state at a shorter interval. Something like:
{'time': 14.0, 'update': {update-to-be-applied}, 'state': {saved-view}}
. It would also require the interrupt times to be received and handled byEngine.run_for
.The text was updated successfully, but these errors were encountered: