|
|
@ -33,13 +33,14 @@ pub fn trajectory_generator(net: &Box<dyn network::Network>, n_trajectories: u64 |
|
|
|
}).collect()); |
|
|
|
}).collect()); |
|
|
|
time.push(t.clone()); |
|
|
|
time.push(t.clone()); |
|
|
|
while t < t_end { |
|
|
|
while t < t_end { |
|
|
|
next_transitions.iter_mut().enumerate().map(|(idx, val)| { |
|
|
|
for (idx, val) in next_transitions.iter_mut().enumerate(){ |
|
|
|
if let None = val { |
|
|
|
if let None = val { |
|
|
|
*val = Some(net.get_node(idx) |
|
|
|
*val = Some(net.get_node(idx) |
|
|
|
.get_random_residence_time(net.get_node(idx).state_to_index(¤t_state[idx]),
|
|
|
|
.get_random_residence_time(net.get_node(idx).state_to_index(¤t_state[idx]),
|
|
|
|
net.get_param_index_network(idx, ¤t_state)).unwrap() + t); |
|
|
|
net.get_param_index_network(idx, ¤t_state)).unwrap() + t); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
let next_node_transition = next_transitions |
|
|
|
let next_node_transition = next_transitions |
|
|
|
.iter() |
|
|
|
.iter() |
|
|
|
.enumerate() |
|
|
|
.enumerate() |
|
|
|