pub struct SimulationSupervisor<MVC, Dom, Cel, Cont = (), Obs = ()>where
Cel: Serialize + for<'a> Deserialize<'a>,
Dom: Serialize + for<'a> Deserialize<'a>,
Cont: Serialize + for<'a> Deserialize<'a>,{
pub storage: StorageBuilder<true>,
pub config: SimulationConfig,
/* private fields */
}
Available on crate feature
cpu_os_threads
only.Expand description
§Supervisor controlling simulation execution
Fields§
§storage: StorageBuilder<true>
Defines in which format and if results should be saved. See StorageBuilder.
config: SimulationConfig
Overall parameters of the simulation. See SimulationConfig.
Implementations§
Source§impl<Pos, For, Inf, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Cel, Ind, Vox, Dom, Cont, Obs> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>where
Dom: Domain<Cel, Ind, Vox> + Clone + 'static,
Ind: Index + 'static,
Pos: Serialize + for<'a> Deserialize<'a> + PositionBound + 'static + Debug,
For: Serialize + for<'a> Deserialize<'a> + ForceBound + 'static,
Vel: Serialize + for<'a> Deserialize<'a> + VelocityBound + 'static,
ConcVecExtracellular: Serialize + for<'a> Deserialize<'a>,
ConcBoundaryExtracellular: Serialize + for<'a> Deserialize<'a>,
ConcVecIntracellular: Serialize + for<'a> Deserialize<'a> + Zero,
Vox: Voxel<Ind, Pos, Vel, For> + Clone + 'static,
Cel: Agent<Pos, Vel, For, Inf> + 'static,
VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: Clone,
Cont: Serialize + for<'a> Deserialize<'a>,
impl<Pos, For, Inf, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Cel, Ind, Vox, Dom, Cont, Obs> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>where
Dom: Domain<Cel, Ind, Vox> + Clone + 'static,
Ind: Index + 'static,
Pos: Serialize + for<'a> Deserialize<'a> + PositionBound + 'static + Debug,
For: Serialize + for<'a> Deserialize<'a> + ForceBound + 'static,
Vel: Serialize + for<'a> Deserialize<'a> + VelocityBound + 'static,
ConcVecExtracellular: Serialize + for<'a> Deserialize<'a>,
ConcBoundaryExtracellular: Serialize + for<'a> Deserialize<'a>,
ConcVecIntracellular: Serialize + for<'a> Deserialize<'a> + Zero,
Vox: Voxel<Ind, Pos, Vel, For> + Clone + 'static,
Cel: Agent<Pos, Vel, For, Inf> + 'static,
VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: Clone,
Cont: Serialize + for<'a> Deserialize<'a>,
Sourcepub fn initialize_from_setup(
setup: SimulationSetup<Dom, Cel, Cont>,
) -> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>where
Cel: Sized,
pub fn initialize_from_setup(
setup: SimulationSetup<Dom, Cel, Cont>,
) -> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>where
Cel: Sized,
Construct a new SimulationSupervisor from a given SimulationSetup.
Sourcepub fn initialize_with_strategies(
setup: SimulationSetup<Dom, Cel, Cont>,
strategies: Strategies<'_, Vox>,
) -> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>where
Cel: Sized,
pub fn initialize_with_strategies(
setup: SimulationSetup<Dom, Cel, Cont>,
strategies: Strategies<'_, Vox>,
) -> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>where
Cel: Sized,
Construct a new SimulationSupervisor from a given SimulationSetup with Strategies.
Source§impl<Pos, Vel, For, Inf, Cel, Ind, Vox, Dom, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Cont, Obs> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>where
Dom: 'static + Serialize + for<'a> Deserialize<'a>,
Pos: 'static + Serialize + for<'a> Deserialize<'a>,
For: 'static + Serialize + for<'a> Deserialize<'a>,
Inf: 'static,
Vel: 'static + Serialize + for<'a> Deserialize<'a>,
ConcVecExtracellular: 'static + Serialize + for<'a> Deserialize<'a>,
ConcBoundaryExtracellular: 'static + Serialize + for<'a> Deserialize<'a>,
ConcVecIntracellular: 'static + Serialize + for<'a> Deserialize<'a>,
Cel: 'static + Serialize + for<'a> Deserialize<'a>,
Ind: 'static + Serialize + for<'a> Deserialize<'a>,
Vox: 'static + Serialize + for<'a> Deserialize<'a>,
Cont: 'static + Serialize + for<'a> Deserialize<'a> + Send + Sync,
Obs: 'static + Send + Sync,
impl<Pos, Vel, For, Inf, Cel, Ind, Vox, Dom, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Cont, Obs> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>where
Dom: 'static + Serialize + for<'a> Deserialize<'a>,
Pos: 'static + Serialize + for<'a> Deserialize<'a>,
For: 'static + Serialize + for<'a> Deserialize<'a>,
Inf: 'static,
Vel: 'static + Serialize + for<'a> Deserialize<'a>,
ConcVecExtracellular: 'static + Serialize + for<'a> Deserialize<'a>,
ConcBoundaryExtracellular: 'static + Serialize + for<'a> Deserialize<'a>,
ConcVecIntracellular: 'static + Serialize + for<'a> Deserialize<'a>,
Cel: 'static + Serialize + for<'a> Deserialize<'a>,
Ind: 'static + Serialize + for<'a> Deserialize<'a>,
Vox: 'static + Serialize + for<'a> Deserialize<'a>,
Cont: 'static + Serialize + for<'a> Deserialize<'a> + Send + Sync,
Obs: 'static + Send + Sync,
Sourcepub fn run_full_sim<ConcGradientExtracellular, ConcTotalExtracellular>(
&mut self,
) -> Result<SimulationResult<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel>, SimulationError>where
Dom: Domain<Cel, Ind, Vox>,
Pos: PositionBound,
For: ForceBound,
Inf: InteractionInformation,
Vel: VelocityBound,
ConcVecExtracellular: Concentration,
ConcTotalExtracellular: Concentration,
ConcBoundaryExtracellular: Send + Sync + 'static,
ConcVecIntracellular: Send + Sync + Concentration + Mul<f64, Output = ConcVecIntracellular> + Add<ConcVecIntracellular, Output = ConcVecIntracellular> + AddAssign<ConcVecIntracellular>,
Ind: Index,
Vox: Voxel<Ind, Pos, Vel, For> + ExtracellularMechanics<Ind, Pos, ConcVecExtracellular, ConcGradientExtracellular, ConcTotalExtracellular, ConcBoundaryExtracellular> + Volume,
Cel: Agent<Pos, Vel, For, Inf> + CellularReactions<ConcVecIntracellular, ConcVecExtracellular> + InteractionExtracellularGradient<Cel, ConcGradientExtracellular> + Volume,
VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: Clone,
AuxiliaryCellPropertyStorage<Pos, Vel, For, ConcVecIntracellular>: Clone,
Cont: Controller<Cel, Obs>,
pub fn run_full_sim<ConcGradientExtracellular, ConcTotalExtracellular>(
&mut self,
) -> Result<SimulationResult<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel>, SimulationError>where
Dom: Domain<Cel, Ind, Vox>,
Pos: PositionBound,
For: ForceBound,
Inf: InteractionInformation,
Vel: VelocityBound,
ConcVecExtracellular: Concentration,
ConcTotalExtracellular: Concentration,
ConcBoundaryExtracellular: Send + Sync + 'static,
ConcVecIntracellular: Send + Sync + Concentration + Mul<f64, Output = ConcVecIntracellular> + Add<ConcVecIntracellular, Output = ConcVecIntracellular> + AddAssign<ConcVecIntracellular>,
Ind: Index,
Vox: Voxel<Ind, Pos, Vel, For> + ExtracellularMechanics<Ind, Pos, ConcVecExtracellular, ConcGradientExtracellular, ConcTotalExtracellular, ConcBoundaryExtracellular> + Volume,
Cel: Agent<Pos, Vel, For, Inf> + CellularReactions<ConcVecIntracellular, ConcVecExtracellular> + InteractionExtracellularGradient<Cel, ConcGradientExtracellular> + Volume,
VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: Clone,
AuxiliaryCellPropertyStorage<Pos, Vel, For, ConcVecIntracellular>: Clone,
Cont: Controller<Cel, Obs>,
Runs a full simulation and returns a SimulationResult after having completed
Sourcepub fn save_current_setup(
&mut self,
iteration: u64,
) -> Result<(), SimulationError>
pub fn save_current_setup( &mut self, iteration: u64, ) -> Result<(), SimulationError>
Saves the current SimulationSetup via the internal StorageManager
Auto Trait Implementations§
impl<MVC, Dom, Cel, Cont, Obs> Freeze for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>where
Dom: Freeze,
impl<MVC, Dom, Cel, Cont = (), Obs = ()> !RefUnwindSafe for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>
impl<MVC, Dom, Cel, Cont, Obs> Send for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>
impl<MVC, Dom, Cel, Cont, Obs> Sync for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>
impl<MVC, Dom, Cel, Cont, Obs> Unpin for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>
impl<MVC, Dom, Cel, Cont = (), Obs = ()> !UnwindSafe for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more