Index
Micromechanical modeling of granular materials.
__all__
module-attribute
__all__ = [
"backends",
"config",
"Experiment",
"get_include",
"Line",
"Model",
"register_model",
"SVExporter",
"tr",
"trs",
"visualize_calibration",
"__version__",
"__semver__",
]
Experiment
Bases: HashableBaseModelIO
An experiment.
caches
class-attribute
caches: Dict[str, LRUCache] = {
"getitem": cachetools.LRUCache(maxsize=128),
"__getitem__": cachetools.LRUCache(maxsize=128),
}
caches for the getitem and getitem methods
lines
class-attribute
instance-attribute
lines: Dict[str, Line] = {}
list of lines in the experiment
notes
class-attribute
instance-attribute
custom notes for the experiment, only for labelling purposes and not used in the calculation
options
class-attribute
instance-attribute
options for the micromechanical-specific model, used in :meth:micromechanical.Model.setCalculationOptions to
set the calculation options for the model
phases
class-attribute
instance-attribute
phases: Dict[str, LoadPhaseIO] = {}
load phases of the experiment
__contains__
Return whether a line exists.
| PARAMETER | DESCRIPTION |
|---|---|
item
|
Names of the x-axis and y-axis of the line.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the line exists, False otherwise. |
__getitem__
Return the x-axis and y-axis data of a line.
| PARAMETER | DESCRIPTION |
|---|---|
item
|
Names of the x-axis and y-axis of the line.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tuple[ndarray, ndarray]
|
The x-axis and y-axis data of the line. |
addConfinementPhase
addConfinementPhase(eps1: float, steps: int) -> LoadPhaseIO
Add a confinement load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhaseIO
|
The load phase. |
addConstantStressRatioPhase
addConstantStressRatioPhase(
sig3_min: float, sig3_max: float, eta: float, steps: int, axis: int = 1
) -> LoadPhaseIO
Add a constant stress ratio load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
sig3_min
|
Minimum value of minimum principal stress.
TYPE:
|
sig3_max
|
Maximum value of minimum principal stress.
TYPE:
|
eta
|
Constant stress ratio.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addDrainedTriaxialPhase
addDrainedTriaxialPhase(
sigc: float, eps1: float, steps: int, axis: int = 1
) -> LoadPhaseIO
Add a drained triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
sigc
|
Confined stress.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhaseIO
|
The load phase. |
addIsotropicPhase
addIsotropicPhase(sigc: float, steps: int) -> LoadPhaseIO
Add an isotropic load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
sigc
|
Confined stress.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhaseIO
|
The load phase. |
addLoadPhase
addLoadPhase(name: str, phase: LoadPhaseIO | LoadPhase) -> LoadPhaseIO
Add a load phase.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Name of the load phase.
TYPE:
|
phase
|
The load phase, if not an instance of
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhaseIO
|
The load phase. |
addTrueTriaxialPhase
addTrueTriaxialPhase(
sig3: float,
b: float,
eps1: float,
steps: int,
axis1: int = 1,
axis2: int = 2,
) -> LoadPhaseIO
Add a true triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
sig3
|
Minimum principal stress.
TYPE:
|
b
|
Intermediate stress ratio.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
steps
|
Number of steps.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addTrueTriaxialWithConstantShearPhase
addTrueTriaxialWithConstantShearPhase(
p: float, b: float, steps: int, axis1: int = 1, axis2: int = 2
) -> LoadPhaseIO
Add a true triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
p
|
Mean stress.
TYPE:
|
b
|
Lode parameter.
TYPE:
|
steps
|
Number of steps.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addUndrainedTriaxialPhase
addUndrainedTriaxialPhase(
eps1: float, steps: int, axis: int = 1, no_epsv: bool = False
) -> LoadPhaseIO
Add an undrained triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhaseIO
|
The load phase. |
addUndrainedTriaxialWithoutShearPhase
addUndrainedTriaxialWithoutShearPhase(
eps1: float, steps: int, axis: int = 1, no_epsv: bool = False
) -> LoadPhaseIO
Add an undrained triaxial load phase without controlling the shear strain.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhaseIO
|
The load phase. |
addUndrainedTrueTriaxialPhase
addUndrainedTrueTriaxialPhase(
eps1: float,
b: float,
steps: int,
axis1: int = 1,
axis2: int = 2,
no_epsv: bool = True,
) -> LoadPhaseIO
Add an undrained true triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
b
|
Intermediate stress ratio.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
no_epsv
|
Whether to control the intermediate principal stress without generating volumetric strain, this is useful when the material fabric is non-coaxial with the principal stress, by default True
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhaseIO
|
The load phase. |
addUndrainedTrueTriaxialWithAxialStrainPhase
addUndrainedTrueTriaxialWithAxialStrainPhase(
epsa: float,
b: float,
steps: int,
axis1: int = 1,
axis2: int = 2,
no_epsv: bool = True,
) -> LoadPhaseIO
Add an undrained true triaxial load phase with axial strain control.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
epsa
|
Axial strain.
TYPE:
|
b
|
Intermediate stress ratio.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
no_epsv
|
Whether to control the intermediate principal stress without generating volumetric strain, this is useful when the material fabric is non-coaxial with the principal stress, by default True
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhaseIO
|
The load phase. |
check
Check whether the experiment is valid.
| PARAMETER | DESCRIPTION |
|---|---|
raise_
|
Whether to raise an error if the experiment is invalid, by default True
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool | None
|
True if the experiment is valid, False if the experiment is invalid, None if the experiment is not checked. |
get
get(
x: str,
y: str | None = None,
*,
deep: bool = False,
idx: int | Iterable[int] | slice = None
) -> Tuple[ndarray, ndarray] | ndarray
Return the x-axis and y-axis data of a line.
| PARAMETER | DESCRIPTION |
|---|---|
x
|
Name of the x-axis of the line.
TYPE:
|
y
|
Name of the y-axis of the line. If None, only the x-axis data will be returned.
TYPE:
|
deep
|
Search for the line deeply in the experiment, by default False to avoid RecursionError.
TYPE:
|
idx
|
Index of the data to be returned, by default None to return all data.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tuple[ndarray, ndarray] | ndarray
|
The x-axis and y-axis data of the line, or only the x-axis data if y is None. |
getitem
Return the x-axis and y-axis data of a line, only for exactly matching lines or expressions that can be evaluated to the x-axis and y-axis names.
| PARAMETER | DESCRIPTION |
|---|---|
item
|
Names of the x-axis and y-axis of the line.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tuple[ndarray, ndarray]
|
The x-axis and y-axis data of the line. |
Line
Bases: HashableBaseModelIO
A line for an experiment.
x
instance-attribute
x-axis name of the line, used in :meth:micromechanical.python.micromechanical.core.StateVariables.get to get
the x-axis data
y
instance-attribute
y-axis name of the line, used in :meth:micromechanical.python.micromechanical.core.StateVariables.get to get
the y-axis data
Model
Bases: VisualizationModel
A micromechanical model manager.
Notes
The main calculation of the micromechanical model is done in the model attribute, which is an instance of the
pure Python/numba/C++ micromechanical model, depending on the backend. Setting the following environment
variables to change the backend:
MICROMECHANICAL_BACKEND=cpp: use the C++ backendMICROMECHANICAL_BACKEND=python;NUMBA_DISABLE_JIT=1: use the pure Python backendMICROMECHANICAL_BACKEND=python;NUMBA_DISABLE_JIT=0: use the numba backend
For the cpp and numba backends, the environment variable MICROMECHANICAL_PRECISION can be set to
single or double to change the precision, the default is double
Examples:
Create the micromechanical model object:
Set up the loading phases:
>>> model.addIsotropicPhase(sigc=-100, steps=100)
>>> model.addDrainedTriaxialPhase(sigc=-100, eps1=-0.3, steps=100)
Set up the plastic method for the local contact law:
Set up integration points:
>>> model.setIntegrationParameters(npv=1e9, radius=0.65e-3)
>>> model.setAnisotropicParameters(type="chang1990-ext", evolution="wan2004", chi=0)
Set up material parameters:
Evaluate the model:
sv is a micromechanical.SVExporter object, which can be used to get the state variables, plot the results,
and export the results to a file.
>>> sv.to_csv("data.csv")
Saving state variables to DataFrame
>>> p, q, epsa, epsv = sv.get("-p"), sv.q, 100 * sv["epsa"], sv["100 * epsv"] # the tensile stress is positive
>>> model.plot("-p", "q", data=sv) # if data is omitted, model.run() will be called
<Figure size ... with 1 Axes>
__init__
__init__(
*model_types: Union[
MicromechanicalBase,
type,
str | PathLike,
AvailableModels,
AvailableMicromechanicalModels,
AvailableContactModels,
],
args: tuple = (),
kwargs: dict = None,
no_stop: bool = False,
backend: Literal["python", "cpp"] = backend,
**options
)
Constructor for the micromechanical model manager base class.
| PARAMETER | DESCRIPTION |
|---|---|
model_types
|
The micromechanical model to use. If no positional arguments are provided, the model will not be initialized. If one positional argument is provided, it should be:
If two positional arguments are provided, they should be:
In C++ backend, the micromechanical model type and contact law type can be a string of the file path to the compiled shared library. For example, the following usages are valid:
TYPE:
|
args
|
The positional arguments for the micromechanical model if the supplied model is a class.
TYPE:
|
kwargs
|
The keyword arguments for the micromechanical model if the supplied model is a class.
TYPE:
|
no_stop
|
Whether to stop the calculation when an error occurs.
TYPE:
|
backend
|
The backend to use, default is the configured backend.
TYPE:
|
options
|
The calculation options for the micromechanical model, the contact law, or the material.
DEFAULT:
|
SVExporter
Bases: UserList
State variables exporter to handle a list of state variables. The constructor of the SVExporter class accepts
a list of StateVariable objects:
>>> from micromechanical.python.constitutive.statevariable import StateVariable
>>> sv0, sv1 = StateVariable(37), StateVariable(37)
>>> sv0.phase, sv1.phase = 0, 1
>>> exporter = SVExporter([sv0] * 60 + [sv1] * 40)
There are three ways to get state variables:
-
Get the state variables by name, e.g.
exporter.sigimplemented bySVExporter.__getattr__method. the state variables will be cached. This method will collect a specific state variable from all the state variables in the list, and return a numpy array with the first dimension being the step index. The returned array can be a 1D array, a 2D array or a 3D array, depending on the shape of the state variable. -
Get the state variables by name or expression of the name or name with column index, e.g.,
exporter["sig"], implemented bySVExporter.__getitem__. -
Get the state variables by the above name with filters, implemented by the
SVExporter.getmethod. This method is used to determine the state variables to get in visualization methods such asVisualizationModel.plotand x/y axis of the experimentLine.The following filters are supported:
phase: load phase indexstep: step indexidx: integration point index, only valid for contact state variablescol: column index, only valid for vector state variables
You can use the filters by the keyword arguments.
Note
The above filters are applied with the following steps:
- If
phaseis specified, the state variables will be filtered by the phase index first. - An array of the indices of the steps corresponding to the phase will be generated by the
SVExporter.indexOfmethod. - An array of the state variable will be generated by the
SVExporter.__getitem__method, and then filtered by the indices of the steps. - If the array is a 3D array, it will be filtered by the step index, integration point index and column index
in each dimension, i.e.,
array[step, idx, col]. - If the array is a 2D array, depending on the name of the state variable, it will be filtered by the step
index and integration point index if the state variable is a contact state variable
(i.e.,
array[step, idx]), or filtered by the step index and column index otherwise (i.e.,array[step, col]) . - If the array is a 1D array, it will be filtered by the step index, i.e.,
array[step].
Note
Property fabric tensors can be obtained by the name F_{prop} where {prop} is the property name.
You can also export the state variables to a pandas DataFrame by the
SVExporter.toDataFrame method.
>>> df = exporter.toDataFrame(includes=["sig", "eps"])
Saving state variables to DataFrame
>>> df.head()
eps1 eps2 eps3 eps4 eps5 eps6 sig1 sig2 sig3 sig4 sig5 sig6
...
Then it is possible to export the DataFrame to any file format supported by pandas, e.g., csv, excel, etc.
FN11
instance-attribute
Fabric tensor of contact normal force component FN11, shape (steps,)
FN12
instance-attribute
Fabric tensor of contact normal force component FN12, shape (steps,)
FN13
instance-attribute
Fabric tensor of contact normal force component FN13, shape (steps,)
FN22
instance-attribute
Fabric tensor of contact normal force component FN22, shape (steps,)
FN23
instance-attribute
Fabric tensor of contact normal force component FN23, shape (steps,)
FN33
instance-attribute
Fabric tensor of contact normal force component FN33, shape (steps,)
FT11
instance-attribute
Fabric tensor of contact shear force component FT11, shape (steps,)
FT12
instance-attribute
Fabric tensor of contact shear force component FT12, shape (steps,)
FT13
instance-attribute
Fabric tensor of contact shear force component FT13, shape (steps,)
FT22
instance-attribute
Fabric tensor of contact shear force component FT22, shape (steps,)
FT23
instance-attribute
Fabric tensor of contact shear force component FT23, shape (steps,)
FT33
instance-attribute
Fabric tensor of contact shear force component FT33, shape (steps,)
an
instance-attribute
Degree of fabric anisotropy for the contact normal force, shape (steps,)
at
instance-attribute
Degree of fabric anisotropy for the contact shear force, shape (steps,)
disp
instance-attribute
Displacement for every integration point, shape (steps, size, 3)
dispp
instance-attribute
Plastic displacement for every integration point, shape (steps, size, 3)
dups
cached
property
Plastic shear displacement increment at the first direction, shape (steps, size)
dupt
cached
property
Plastic shear displacement increment at the second direction, shape (steps, size)
dus
cached
property
Shear displacement increment at the first direction, shape (steps, size)
dut
cached
property
Shear displacement increment at the second direction, shape (steps, size)
epspq
cached
property
Plastic strain exclude strain after the first phase, shape (steps,)
epspqa
cached
property
Axial plastic strain exclude strain after the first phase, shape (steps,)
epspqd
cached
property
General plastic shear strain exclude strain after the first phase, shape (steps,)
epspqv
cached
property
Volumetric plastic strain exclude strain after the first phase, shape (steps,)
epsqa
cached
property
Axial strain exclude strain after the first phase, shape (steps,)
epsqd
cached
property
General shear strain exclude strain after the first phase, shape (steps,)
epsqv
cached
property
Volumetric strain exclude strain after the first phase, shape (steps,)
fs
instance-attribute
Shear force at the first direction for every integration point, shape (steps, size)
ft
instance-attribute
Shear force at the second direction for every integration point, shape (steps, size)
p0
instance-attribute
Size of the yield surface for the SaniSand model, shape (steps, size)
un
instance-attribute
Normal displacement for every integration point, shape (steps, size)
upn
instance-attribute
Plastic normal displacement for every integration point, shape (steps, size)
upr
instance-attribute
Plastic shear displacement for every integration point, shape (steps, size)
ups
instance-attribute
Plastic shear displacement at the first direction for every integration point, shape (steps, size)
upt
instance-attribute
Plastic shear displacement at the second direction for every integration point, shape (steps, size)
ur
instance-attribute
Shear displacement for every integration point, shape (steps, size)
us
instance-attribute
Shear displacement at the first direction for every integration point, shape (steps, size)
ut
instance-attribute
Shear displacement at the second direction for every integration point, shape (steps, size)
__getattr__
cached
Get state variables
| PARAMETER | DESCRIPTION |
|---|---|
name
|
A string specifies name of the state variable. It can end with a column number (1, 2, 3, 4, 5, 6) to specify the column of the state variable when it is a vector.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
array
|
An array of the state variable
TYPE:
|
__getitem__
cached
Get state variables
| PARAMETER | DESCRIPTION |
|---|---|
item
|
A string specifies name or an expression of the state variable parsed by
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
array
|
An array of the state variable, the shape of the array depends on the type of the state variable and the arguments specified in the name and index:
TYPE:
|
__hash__
Get the hash of the state variables exporter, which is the hash of the data and phase attributes.
abaqusStateVariableNames
classmethod
abaqusStateVariableNames(
contact_type: str | None = None, size: int = 37, reverse: bool = False
) -> dict[str, str]
The state variable names for the Abaqus subroutine, a dictionary of ("SDV{i}", name) pairs. If reverse
is True, the dictionary is reversed to {name: "SDV{i}"} pairs.
fromAbaqusStateVariables
classmethod
fromAbaqusStateVariables(
data: Union[Iterable, str, PathLike],
contact_type: str | None = None,
*,
size: int = 37,
phase_column: str = "Step"
) -> "SVExporter"
Create state variables exporter by a data file exported from an Abaqus output database, data is a pandas
DataFrame or a csv file with columns of names like SDV{i}. A column with name Step is required to
specify the load phase or any other column name specified by phase_column, if the column is not available,
the phase will be set to 0.
get
get(
var: str,
*,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
idx: int | slice | Iterable[int] = slice(None),
col: int | slice | Iterable[int] = slice(None),
smooth_variables: list[str] | None = None
) -> Union[ndarray, float]
Get state variables
| PARAMETER | DESCRIPTION |
|---|---|
var
|
A string specifies name or an expression of the state variable parsed by
TYPE:
|
phase
|
An integer or a slice indicates index of the phase.
TYPE:
|
step
|
An integer or a slice indicates index of the step, noted that the step index is the relative step index
to the phase if
TYPE:
|
idx
|
An integer or a slice indicates index of the integration point for contact variables.
TYPE:
|
col
|
An integer or a slice indicates index of the column for variables with multiple columns, this argument
will be ignored if the variable has only one column or the column index is already specified in
TYPE:
|
smooth_variables
|
A list of state variable names to be smoothed, by default None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
array
|
An array or a float of the state variable
TYPE:
|
indexOf
Get the indices of the corresponding steps belonging to a phase or phases
isContactVariable
Check if a state variable is a contact variable
toDataFrame
toDataFrame(
includes: Iterable[str] | None = None,
excludes: Iterable[str] = (),
*,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
idx: int | slice | Iterable[int] = slice(None),
col: int | slice | Iterable[int] = slice(None),
set_columns: bool = False
)
Convert state variables to a pandas DataFrame
| PARAMETER | DESCRIPTION |
|---|---|
includes
|
An iterable of state variable names to be included, by default None, which means only stress and strain state variables will be included.
TYPE:
|
excludes
|
An iterable of state variable names to be excluded, by default (), which means no state variable will be excluded.
TYPE:
|
phase
|
Filters for the state variables, see :meth:
TYPE:
|
step
|
Filters for the state variables, see :meth:
TYPE:
|
idx
|
Filters for the state variables, see :meth:
TYPE:
|
col
|
Filters for the state variables, see :meth:
TYPE:
|
set_columns
|
Set the column names of the DataFrame, by default False.
TYPE:
|
to_csv
to_csv(
filename: PathLike | str,
includes: Iterable[str] | None = None,
excludes: Iterable[str] = (),
*,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
idx: int | slice | Iterable[int] = slice(None),
col: int | slice | Iterable[int] = slice(None),
set_columns: bool = False,
**kwargs
)
Save state variables to a csv file
| PARAMETER | DESCRIPTION |
|---|---|
filename
|
The filename to save the state variables.
TYPE:
|
includes
|
Arguments for :meth:
TYPE:
|
excludes
|
Arguments for :meth:
TYPE:
|
phase
|
Arguments for :meth:
TYPE:
|
step
|
Arguments for :meth:
TYPE:
|
idx
|
Arguments for :meth:
TYPE:
|
col
|
Arguments for :meth:
TYPE:
|
set_columns
|
Set the column names of the DataFrame, by default True.
TYPE:
|
kwargs
|
Other arguments for :meth:
DEFAULT:
|
get_include
Return the directory containing the C/C++ header files.
| PARAMETER | DESCRIPTION |
|---|---|
includes
|
Additional include directories to add, separated by
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
include_dir
|
The directory containing the C header files
TYPE:
|
register_model
register_model(
model_name: str,
model_class: type,
*,
type: Literal[
"elastoplastic", "micromechanical", "micromechanical_contact"
] = "elastoplastic"
)
Register a model to the library.
| PARAMETER | DESCRIPTION |
|---|---|
model_name
|
The name of the model to add. This should be a unique identifier for the model type.
TYPE:
|
model_class
|
The class of the model to add.
TYPE:
|
type
|
The type of the model to add. This should be one of "elastoplastic", "micromechanical", or "micromechanical_contact". Default is "elastoplastic".
TYPE:
|
visualize_calibration
visualize_calibration(
model_type: Union[
str | PathLike,
AvailableModels,
AvailableMicromechanicalModels,
AvailableContactModels,
],
calibration_file: str | PathLike,
*,
options: dict[str, ...] | None = None,
parameters: dict[str, float] | None = None,
check_fitness: bool = True,
experiments: dict | None = None,
experiment_file: str | PathLike | None = None,
experiment_filter: dict | None = None,
plot_method: Literal[
"plot",
"plotof",
"plotExperiments",
"plotSimulations",
"plotComparisons",
] = "plotComparisons",
plot_args: tuple | None = None,
**plot_kwargs: Unpack[PlotOfOptions]
)
Visualize the results of a calibration.
| PARAMETER | DESCRIPTION |
|---|---|
model_type
|
Model type to use for visualization.
TYPE:
|
calibration_file
|
Path to the calibration file.
TYPE:
|
options
|
Additional options to set for the model. These will override any options set in the calibration file.
TYPE:
|
parameters
|
Additional parameters to set for the model. These will override any parameters set in the calibration file.
TYPE:
|
check_fitness
|
Whether to check the fitness of the calibration before visualizing. If True, a warning will be raised if the calculated fitness does not match the fitness reported in the calibration file. Default is True.
TYPE:
|
experiments
|
Additional experiments to include in the visualization. The keys should be the experiment names, and the values should be Experiment objects. If None, only the experiments included in the calibration file will be used
TYPE:
|
experiment_file
|
Path to a file containing additional experiments to include in the visualization. The file should be in a format
that can be read by the
TYPE:
|
experiment_filter
|
Experiment filter to filter the experiments to include in the visualization. Keyword arguments to pass to the
TYPE:
|
plot_method
|
Method to use for plotting the results. Should be one of "plot", "plotof", "plotExperiments", "plotSimulations", or "plotComparisons". Default is "plotComparisons".
TYPE:
|
plot_args
|
Positional arguments to pass to the plotting method. If None, all x-y pairs from the experiments will be used.
TYPE:
|
plot_kwargs
|
Keyword arguments to pass to the plotting method.
TYPE:
|