User API
Main functions users will use to create and run simulations, monads, samplings, and trials.
Public API
Base.run — Method
run(args...; force_recompile::Bool=false, prune_options::PruneOptions=PruneOptions(), kwargs...)Run a simulation, monad, sampling, or trial with the same signatures available to createTrial.
PhysiCellModelManager.createTrial — Function
createTrial([method=GridVariation()], inputs::InputFolders, avs::Vector{<:AbstractVariation}=AbstractVariation[];
n_replicates::Integer=1, use_previous::Bool=true)Return an object of type <:AbstractTrial (simulation, monad, sampling, trial) with the given input folders and elementary variations.
Uses the avs and n_replicates to determine whether to create a simulation, monad, or sampling. Despite its name, trials cannot yet be created by this function. If n_replicates is 0, and each variation has a single value, a simulation will be created.
By default, the method is GridVariation(), which creates a grid of variations from the vector avs. Other methods are: LHSVariation, SobolVariation, and RBDVariation.
Alternate forms (all work with the optional method argument in the first position): Only supplying a single AbstractVariation:
createTrial(inputs::InputFolders, av::AbstractVariation; n_replicates::Integer=1, use_previous::Bool=true)Using a reference simulation or monad:
createTrial(reference::AbstractMonad, avs::Vector{<:AbstractVariation}=AbstractVariation[]; n_replicates::Integer=1,
use_previous::Bool=true)createTrial(reference::AbstractMonad, av::AbstractVariation; n_replicates::Integer=1, use_previous::Bool=true)Using a PCMMOutput holding a simulation or monad:
createTrial(output_ref::PCMMOutput{<:AbstractMonad}, avs::Vector{<:AbstractVariation}=AbstractVariation[];
n_replicates::Integer=1, use_previous::Bool=true)Examples
inputs = InputFolders(config_folder, custom_code_folder)
dv_max_time = DiscreteVariation(configPath("max_time"), 1440)
dv_apoptosis = DiscreteVariation(configPath(cell_type, "apoptosis", "rate"), [1e-6, 1e-5])
simulation = createTrial(inputs, dv_max_time)
monad = createTrial(inputs, dv_max_time; n_replicates=2)
sampling = createTrial(monad, dv_apoptosis; n_replicates=2) # uses the max time defined for monad
out = run(simulation) # run the simulation and return type `PCMMOutput{Simulation}`
new_sampling = createTrial(out, dv_apoptosis; n_replicates=2) # same as sampling abovePrivate API
PhysiCellModelManager._createTrial — Method
_createTrial(args...; kwargs...)Internal function to create a trial with the given input folders and elementary variations. Users should use createTrial instead.
Arguments
method::AddVariationMethod: The method to use for creating the trial. Default isGridVariation().inputs::InputFolders: The input folders for the simulation.reference_variation_id::VariationID: The variation ID of the reference simulation or monad.avs::Vector{<:AbstractVariation}: A vector of variations to add to the reference simulation or monad.n_replicates::Integer: The number of replicates to create. Default is 1.use_previous::Bool: Whether to use previous simulations.