flower icon indicating copy to clipboard operation
flower copied to clipboard

Add flags to `InMemoryState` for the simulation engine

Open panh99 opened this issue 1 year ago • 0 comments

In simulation mode, InMemoryDriver and vce_api.py must periodically check for new TaskIns/TaskRes in the InMemoryState. Due to performance concerns, we now have State.get_task_res called by InMemoryDriver every 3 seconds and State.get_task_ins called by vce_api.py every 1 second.

@jafermarq and I aimed to increase the efficiency of the simulation engine by minimizing the interval without extensive engineering work. This serves as a temporary solution to accelerate the Flower Next simulation. With the two flags, we can safely reduce the interval to 0.01s or lower. We should revisit this topic in the future to explore a more robust approach.

panh99 avatar Apr 30 '24 14:04 panh99