johnhagood Posted November 19, 2019 Posted November 19, 2019 (edited) I want to be able to schedule events for the future without having to define a separate timer for each possible time this will happen. Ideally i'd like to be able to index into a vector of timers to start one, so it can be dependent on a state variable. One use of these would be recurring tasks, for instance, while a patient is in post-surgery, they will be administered medicine every r hours. This is dependent on them exiting surgery (it doesn't begin at a specific time), so a rate table doesn't really work, and that would run into a similar problem of having to define different rate tables for each patient type and recurring tasks (potentially hundreds). Any ideas? Edited November 19, 2019 by johnhagood
GFurtado Posted November 21, 2019 Posted November 21, 2019 I believe you can't create of vector of elements. Although, you can create a element reference state vector, which might be helpful. Your best bet would probably be modelling your process logic to trigger events through the Fire step, instead of using a timer. Or maybe adding a timer inside a object model, so every instance of that object has its own timer.
Recommended Posts