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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
use thiserror::Error;
#[derive(Error, Debug)]
pub enum SimulationError {
#[error("An invalid model configuration was encountered during simulation")]
InvalidModelConfiguration,
#[error("A specified model cannot be found in the simulation")]
ModelNotFound,
#[error("A specified model port cannot be found in the simulation")]
PortNotFound,
#[error("A model failed to clone during simulation")]
ModelCloneError,
#[error("An invalid model state was encountered")]
InvalidModelState,
#[error("An invalid state was encountered, with respect to event scheduling")]
EventSchedulingError,
#[error("An invalid inter-model message was encountered")]
InvalidMessage,
#[error("Failed to serialize a simulation model")]
SerializationError,
#[error("A polynomial was configured in a simulation, but the coefficients are empty")]
EmptyPolynomial,
#[error("An internal logic error occured, where prerequisite calculations were not executed")]
PrerequisiteCalcError,
#[error("Failed to convert to a Float value")]
FloatConvError,
#[error(transparent)]
JSONError(#[from] serde_json::error::Error),
#[error(transparent)]
BetaError(#[from] rand_distr::BetaError),
#[error(transparent)]
ExpError(#[from] rand_distr::ExpError),
#[error(transparent)]
GammaError(#[from] rand_distr::GammaError),
#[error(transparent)]
NormalError(#[from] rand_distr::NormalError),
#[error(transparent)]
TriangularError(#[from] rand_distr::TriangularError),
#[error(transparent)]
WeibullError(#[from] rand_distr::WeibullError),
#[error(transparent)]
BernoulliError(#[from] rand_distr::BernoulliError),
#[error(transparent)]
GeoError(#[from] rand_distr::GeoError),
#[error(transparent)]
PoissonError(#[from] rand_distr::PoissonError),
#[error(transparent)]
WeightedError(#[from] rand_distr::WeightedError),
}