1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! The `continue_strategy` module defines the `ContinueStrategy` trait and its associated types.
//!
//! This trait allows for custom logic to determine whether the simulation should continue
//! after each micro-step, providing a flexible way to implement termination conditions
//! or error handling.
pub use *;
pub use *;
pub use *;
use crateActiveExecutorContext;
use crateUncheckedActiveExecutor;
use crateModel;
/// The result type for simulation continuation strategies.
///
/// On success (`Ok`), it returns an `ActiveExecutorContext` to proceed to the
/// next simulation step. On failure (`Err`), it returns the current context
/// along with a strategy-specific error, allowing the simulation to terminate
/// gracefully or be debugged.
pub type ContinuousStrategyResult<E, M, Err> =
;
/// A trait for defining strategies that decide whether to continue simulation
/// execution after each micro-step.
///
/// By implementing this trait, you can flexibly customize simulation termination
/// conditions, such as:
/// - Limiting the total number of micro-steps.
/// - Aborting execution when specific criteria are met.
/// - Enforcing continuous execution regardless of state.