modelon.impact.client.experiment_definition package

Subpackages

Submodules

modelon.impact.client.experiment_definition.asserts module

assert_valid_args(model=None, fmu=None, custom_function=None, solver_options=None, simulation_options=None, compiler_options=None, runtime_options=None)
Return type:

None

assert_valid_case_modifiers(cases_modifiers)
Return type:

None

assert_valid_extensions(experiment_extensions)
Return type:

None

validate_initialize_from(entity)
Return type:

None

modelon.impact.client.experiment_definition.expansion module

class FullFactorial

Bases: ExpansionAlgorithm

Full-factorial expansion class. Creates experiment with all possible combinations of the input modifiers expressions. Supported Operator expressions are: Range and Choices. The size of an experiment with FullFactorial expansion is the product of the modifier operator length. This number can grow very rapidly if using a lot of modifiers.

Example:

from modelon.impact.client import FullFactorial, Range

model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")

experiment_definition = model.new_experiment_definition(custom_function)
.with_modifiers({'inertia1.J': Range(0.1, 0.9, 2)})
.with_expansion(FullFactorial())

OR

# Full-factorial is the default and does not need to be specified explicitly.
experiment_definition = model.new_experiment_definition(custom_function)
.with_modifiers({'inertia1.J': Range(0.1, 0.9, 2)})
get_parameters_as_dict()

Returns parameters as a dictionary

Return type:

Optional[Dict[str, Any]]

class LatinHypercube(samples, seed=None)

Bases: ExpansionAlgorithm

LatinHypercube expansion class. Produces <samples> cases, picks a random value from each modifier expression for each case. The resulting cases are orthogonal, i.e., the values of a given modifier expression do not repeat. The exception are singular modifiers, e.g., experiment_definition.with_modifiers({‘PI.k’: 10}), these result in the same value for all cases. Singular modifiers do not affect the result (with respect to the seed) in the resulting experiment.

Parameters:
  • samples (int) – Positive integer; number of cases the experiment will produce.

  • seed (int) – Using the same seed will result in the same output for an experiment with the same modifiers. If not set or None: picks a random seed. Must be a non-negative integer. Default: None.

Example:

from modelon.impact.client import LatinHypercube, Beta, Normal

model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")
experiment_definition = model.new_experiment_definition(
    custom_function).with_modifiers({'inertia1.J': Beta(0.1, 0.9),
    'inertia2.J': Normal(0.1, 0.5)}).with_expansion(LatinHypercube(5,1))
get_parameters_as_dict()

Returns parameters as a dictionary

Return type:

Optional[Dict[str, Any]]

samples: int
seed: Optional[int] = None
class Sobol(samples)

Bases: ExpansionAlgorithm

Expansion method based on the Sobol sequence. The Sobol sequence is a minimal discrepancy quasi-random sampling methods and suitable for achieving a good coverage of the design space. Singular Modifiers, e.g., experiment_definition.with_modifiers({‘PI.k’: 10}), do not affect the result in the resulting experiment.

Parameters:

samples (int) – Positive integer; number of cases the Experiment will produce. Expansions where the number of samples is a power of 2 yield additional balances properties.

Example:

from modelon.impact.client import Sobol, Beta, Normal

model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")
experiment_definition = model.new_experiment_definition(
    custom_function).with_modifiers({'inertia1.J': Beta(0.1, 0.9),
    'inertia2.J': Normal(0.1, 0.5)}).with_expansion(Sobol(5))
get_parameters_as_dict()

Returns parameters as a dictionary

Return type:

Optional[Dict[str, Any]]

samples: int

modelon.impact.client.experiment_definition.extension module

class SimpleExperimentExtension(parameter_modifiers=None, solver_options=None, simulation_options=None, simulation_log_level=None, initialize_from=None)

Bases: BaseExperimentExtension

A simple experiment extension class for defining experiment extensions.

Parameters:
  • parameter_modifiers (Optional[Dict[str, Any]]) – The custom function parameters passes as a dictionary. By default, the parameter_modifier is set to None, which means the options set in the experiment definition will be used.

  • solver_options (Optional[Dict[str, Any]]) – A solver options class instance of SolverOptions or a dictionary object containing the solver options. By default, the options is set to None, which means an empty dictionary is passed in the experiment extension.

  • simulation_options (Optional[Dict[str, Any]]) – A simulation options class instance of SimulationOptions or a dictionary object containing the simulation options. By default, the options is set to None, which means an empty dictionary is passed in the experiment extension.

  • simulation_log_level (Optional[str]) – Simulation log level for this experiment. Default: ‘WARNING’.

  • initialize_from (Union[Case, Experiment, None]) – Optional entity to initialize from. An instance of Case or Experiment. Default: None

Example:

fmu = model.compile().wait()
simulation_options = custom_function.get_simulation_options()
.with_values(ncp=500)
solver_options = {'atol':1e-8}
simulate_def = fmu.new_experiment_definition(
    custom_function,
    solver_options=solver_options,
    simulation_options=simulation_options
).with_modifiers({'inertia1.J': 2})
simulate_ext = SimpleExperimentExtension(
{'start_time': 0.0, 'final_time': 4.0},
solver_options,
simulation_options.with_values(ncp=600)
).with_modifiers({'PI.k': 40})
simulate_def = simulate_def.with_extensions(simulate_ext)
simulate_def.to_dict()
property case_label: str | None

Returns the case label if any set.

property initialize_from: Case | Experiment | None

Returns the case or experiment the experiment extension was initialized from.

property modifiers: Dict[str, Any]

Returns the variable modifiers dict.

property simulation_log_level: str | None

Returns the simulation log level, if set.

property simulation_options: Dict[str, Any]

Returns the simulation options as a dict.

property solver_options: Dict[str, Any]

Returns the solver options as a dict.

to_dict()

Returns the experiment extensions as a dictionary.

Return type:

Dict[str, Any]

Returns:

A dictionary containing the experiment extensions.

Example:

fmu = model.compile().wait()
simulation_options = custom_function.get_simulation_options()
    .with_values(ncp=500)
solver_options = {'atol':1e-8}
simulate_ext = SimpleExperimentExtension(
{'start_time': 0.0, 'final_time': 4.0},
solver_options,
simulation_options,
).with_modifiers({'PI.k': 40})
simulate_ext.to_dict()
with_case_label(case_label)

Sets the case label for an experiment extension.

Parameters:

case_label (str) – A case label string.

Return type:

SimpleExperimentExtension

Example:

simulation_options = custom_function.get_simulation_options()
.with_values(ncp=500)
solver_options = {'atol':1e-8}
simulate_ext = SimpleExperimentExtension().with_case_label(
'Cruise condition')
simulate_ext = SimpleExperimentExtension(
{'start_time': 0.0, 'final_time': 4.0},
solver_options,
simulation_options
).with_case_label('Cruise condition')
with_initialize_from(entity=None)

Sets the experiment or case to initialize from for an experiment extension.

Parameters:

entity (Union[Case, Experiment, None]) – An instance of Case or Experiment classes.

Return type:

SimpleExperimentExtension

Example:

experiment = workspace.get_experiment(experiment_id)
simulate_ext = SimpleExperimentExtension()
simulate_ext.with_initialize_from(experiment)

experiment = workspace.get_experiment(experiment_id)
case = experiment.get_case('case_1')
simulate_ext = SimpleExperimentExtension()
simulate_ext.with_initialize_from(case)
with_modifiers(modifiers=None, **modifiers_kwargs)

Sets the modifiers variables for an experiment extension.

Parameters:

modifiers (Optional[Dict[str, Any]]) – A dictionary of variable modifiers.

Return type:

SimpleExperimentExtension

Example:

simulation_options = custom_function.get_simulation_options()
.with_values(ncp=500)
solver_options = {'atol':1e-8}
simulate_ext = SimpleExperimentExtension().with_modifiers({'PI.k': 40})
simulate_ext = SimpleExperimentExtension(
{'start_time': 0.0, 'final_time': 4.0},
solver_options,
simulation_options
).with_modifiers({'PI.k': 40})

modelon.impact.client.experiment_definition.fmu_based module

class SimpleFMUExperimentDefinition(fmu, custom_function, solver_options=None, simulation_options=None, simulation_log_level='WARNING', initialize_from=None)

Bases: BaseExperimentDefinition

A simple experiment definition class for defining experiments.

Parameters:
  • fmu (ModelExecutable) – The FMU to be executed for this experiment.

  • custom_function (CustomFunction) – The custom function to use for this experiment.

  • solver_options (Union[SolverOptions, Dict[str, Any], None]) – The solver options to use for this experiment. By default, the options is set to None, which means the default options for the custom_function input is used.

  • simulation_options (Union[SimulationOptions, Dict[str, Any], None]) – The simulation_options to use for this experiment. By default, the options is set to None, which means the default options for the custom_function input is used.

  • simulation_log_level (str) – Simulation log level for this experiment. Default is ‘WARNING’.

  • initialize_from (Union[Case, Experiment, ExternalResult, None]) – Optional entity to initialize from. An instance of Case or Experiment or ExternalResult. Default: None

Example:

fmu = model.compile().wait()
simulation_options = custom_function.get_simulation_options()
.with_values(ncp=500)
solver_options = {'atol':1e-8}
simulate_def = fmu.new_experiment_definition(custom_function,
solver_options, simulation_options)
simulate_def.to_dict()
property custom_function: CustomFunction

Returns the custom function class.

property extensions: List[SimpleExperimentExtension]

Returns the list of experiment extensions.

property fmu: ModelExecutable

Returns the ModelExecutable class.

property initialize_from: Case | Experiment | ExternalResult | None

Returns the case, experiment or result the experiment definition was initialized from.

property modifiers: Dict[str, Any]

Returns the variable modifiers dict.

property simulation_log_level: str

Returns the simulation log level.

property simulation_options: Dict[str, Any]

Returns the simulation options as a dict.

property solver_options: Dict[str, Any]

Returns the solver options as a dict.

to_dict()

Returns the experiment definition as a dictionary.

Return type:

Dict[str, Any]

Returns:

A dictionary containing the experiment definition.

Example:

fmu = model.compile().wait()
simulation_options = custom_function.get_simulation_options()
    .with_values(ncp=500)
solver_options = {'atol':1e-8}
simulate_def = fmu.new_experiment_definition(custom_function,
solver_options, simulation_options)
simulate_def.to_dict()
validate()

Validates the modifiers appended to the experiment definition.

Return type:

None

with_cases(cases_modifiers)

Sets up an experiment with multiple cases with different variable modifiers.

Parameters:

cases_modifiers (List[Dict[str, Any]]) – A list of variable modifier dictionaries. Multiple dictionaries with variable modifiers could to added to create multiple cases.

Return type:

SimpleFMUExperimentDefinition

Example:

fmu = model.compile().wait()
experiment_definition = fmu.new_experiment_definition(
    custom_function).with_cases([{'PI.k': 20}, {'PI.k': 30}])
with_extensions(experiment_extensions)

Sets up an experiment with multiple experiment extensions.

Parameters:

experiment_extensions (List[SimpleExperimentExtension]) – “A list of experiment extension objects. Extension object must an instance of SimpleExperimentExtension class.

Return type:

SimpleFMUExperimentDefinition

Example:

fmu = model.compile().wait()
experiment_definition = fmu.new_experiment_definition(custom_function).
with_extensions(
    [
        SimpleExperimentExtension().with_modifiers({'PI.k': 20}),
        SimpleExperimentExtension().with_modifiers({'PI.k': 30}),
    ]
)

experiment_definition = fmu.new_experiment_definition(custom_function).
with_extensions(
    [
        SimpleExperimentExtension(
            parameter_modifiers={'start_time': 0.0, 'final_time': 2.0}
        ).with_modifiers({'PI.k': 20})
    ]
)
with_initialize_from(entity=None)

Sets the experiment or case to initialize from for an experiment.

Parameters:

entity (Union[Case, Experiment, ExternalResult, None]) – An instance of Case or Experiment or ExternalResult.”

Return type:

SimpleFMUExperimentDefinition

Example:

experiment = workspace.get_experiment(experiment_id)
fmu = model.compile().wait()
experiment_definition = fmu.new_experiment_definition(custom_function).
experiment_definition.with_initialize_from(experiment)

experiment = workspace.get_experiment(experiment_id)
case = experiment.get_case('case_1')
fmu = model.compile().wait()
experiment_definition = fmu.new_experiment_definition(custom_function).
experiment_definition.with_initialize_from(case)

result = workspace.upload_result('A.mat').wait()
fmu = model.compile().wait()
experiment_definition = fmu.new_experiment_definition(custom_function).
experiment_definition.with_initialize_from(result)
with_modifiers(modifiers=None, **modifiers_kwargs)

Sets the modifiers parameters for an experiment.

Parameters:

modifiers (Optional[Dict[str, Any]]) – A dictionary of variable modifiers.

Return type:

SimpleFMUExperimentDefinition

Example:

from modelon.impact.client import Range, Choices

fmu = model.compile().wait()
experiment_definition = fmu.new_experiment_definition(
    custom_function).with_modifiers({'inertia1.J': Choices(0.1, 0.9),
    'inertia2.J': Range(0.1, 0.5, 3)})

modelon.impact.client.experiment_definition.model_based module

class SimpleModelicaExperimentDefinition(model, custom_function, *, compiler_options=None, fmi_target='me', fmi_version='2.0', platform='auto', compiler_log_level='warning', runtime_options=None, solver_options=None, simulation_options=None, simulation_log_level='WARNING', initialize_from=None)

Bases: BaseExperimentDefinition

A simple experiment definition class for defining experiments.

Parameters:
  • model (Model) – The Model class object.

  • custom_function (CustomFunction) – bThe custom function to use for this experiment.

  • compiler_options (Union[CompilerOptions, Dict[str, Any], None]) – bThe compiler options to use for this experiment. By default the options is set to None, which means the default options for the custom_function input is used.

  • fmi_target (str) – Compiler target. Possible values are ‘me’ and ‘cs’. Default: ‘me’.

  • fmi_version (str) – The FMI version. Valid options are ‘1.0’ and ‘2.0’. Default: ‘2.0’.

  • platform (str) –

    Platform for FMU binary.The OS running the Impact server must match the environment that runs the compiled FMU. This is necessary as the binaries packaged with the FMU are based on the platform generating the FMU. For example, if the Impact server is running Linux the binary in the downloaded FMU is compiled for Linux. The downloaded FMU can then not be simulated on Windows. Default: ‘auto’. Supported options are:-

    • ‘auto’: platform is selected automatically

    • ’linux64’: generate a 32 bit FMU

    • ’win64’: generate a 64 bit FMU

  • compiler_log_level (str) – The logging for the compiler. Possible values are “error”, “warning”, “info”, “verbose” and “debug”. Default: ‘warning’.

  • runtime_options (Union[RuntimeOptions, Dict[str, Any], None]) – The runtime options to use for this experiment. By default the options is set to None, which means the default options for the custom_function input is used.

  • solver_options (Union[SolverOptions, Dict[str, Any], None]) – The solver options to use for this experiment. By default the options is set to None, which means the default options for the custom_function input is used.

  • simulation_options (Union[SimulationOptions, Dict[str, Any], None]) – The simulation options to use for this experiment. By default the options is set to None, which means the default options for the custom_function input is used.

  • simulation_log_level (str) – Simulation log level for this experiment. Default: ‘WARNING’.

  • initialize_from (Union[Case, Experiment, ExternalResult, None]) – Optional entity to initialize from. An instance of Case or Experiment or ExternalResult. Default: None

Example:

model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")
simulation_options = custom_function.get_simulation_options()
.with_values(ncp=500)
solver_options = {'atol':1e-8}
simulate_def = model.new_experiment_definition(
    custom_function,
    solver_options=solver_options,
    simulation_options=simulation_options
)
simulate_def.to_dict()
property compiler_log_level: str

Returns the compiler log level.

property compiler_options: Dict[str, Any]

Returns the compiler options as a dict.

property custom_function: CustomFunction

Returns the custom function class.

property expansion: ExpansionAlgorithm

Returns the expansion algorithm class.

property extensions: List[SimpleExperimentExtension]

Returns the list of experiment extensions.

property fmi_target: str

Returns the FMI target.

property fmi_version: str

Returns the FMI version.

property initialize_from: Case | Experiment | ExternalResult | None

Returns the case, experiment or result the experiment definition was initialized from.

property model: Model

Returns the Model class.

property modifiers: Dict[str, Any]

Returns the variable modifiers dict.

property platform: str

Returns the platform to compile FMU for.

property runtime_options: Dict[str, Any]

Returns the runtime options as a dict.

property simulation_log_level: str

Returns the simulation log level.

property simulation_options: Dict[str, Any]

Returns the simulation options as a dict.

property solver_options: Dict[str, Any]

Returns the solver options as a dict.

to_dict()

Returns the experiment definition as a dictionary.

Return type:

Dict[str, Any]

Returns:

A dictionary containing the experiment definition.

Example:

model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")
simulation_options = custom_function.get_simulation_options()
    .with_values(ncp=500)
solver_options = {'atol':1e-8}
simulate_def = model.new_experiment_definition(
    custom_function,
    solver_options=solver_options,
    simulation_options=simulation_options
)
simulate_def.to_dict()
validate()

Validates the modifiers appended to the experiment definition.

Return type:

None

with_cases(cases_modifiers)

Sets up an experiment with multiple cases with different variable modifiers.

Parameters:

cases_modifiers (List[Dict[str, Any]]) – A list of variable modifier dictionaries. Multiple dictionaries with variable modifiers could to added to create multiple cases.

Return type:

SimpleModelicaExperimentDefinition

Example:

model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")
experiment_definition = model.new_experiment_definition(
    custom_function).with_cases([{'PI.k': 20}, {'PI.k': 30}])
with_expansion(expansion=None)

Sets the expansion algorithm for an experiment.

Parameters:

expansion (Optional[ExpansionAlgorithm]) – An expansion algorithm. Available algorithms are LatinHypercube, Sobol and FullFactorial. Default: FullFactorial.

Return type:

SimpleModelicaExperimentDefinition

Example:

from modelon.impact.client import Sobol, Beta, Normal

model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")
experiment_definition = model.new_experiment_definition(
    custom_function).with_modifiers({'inertia1.J': Beta(0.1, 0.9),
    'inertia2.J': Normal(0.1, 0.5)}).with_expansion(Sobol(5))
with_extensions(experiment_extensions)

Sets up an experiment with multiple experiment extensions.

Parameters:

experiment_extensions (List[SimpleExperimentExtension]) – A list of experiment extension objects. Extension object must an instance of SimpleExperimentExtension class.

Return type:

SimpleModelicaExperimentDefinition

Example:

model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")
experiment_definition = model.new_experiment_definition(custom_function).
with_extensions(
    [
        SimpleExperimentExtension().with_modifiers({'PI.k': 20}),
        SimpleExperimentExtension().with_modifiers({'PI.k': 30}),
    ]
)

experiment_definition = fmu.new_experiment_definition(custom_function).
with_extensions(
    [
        SimpleExperimentExtension(
            parameter_modifiers={'start_time': 0.0, 'final_time': 2.0}
        ).with_modifiers({'PI.k': 20})
    ]
)
with_initialize_from(entity=None)

Sets the experiment or case to initialize from for an experiment.

Parameters:

entity (Union[Case, Experiment, ExternalResult, None]) – An instance of Case or Experiment or ExternalResult.

Return type:

SimpleModelicaExperimentDefinition

Example:

experiment = workspace.get_experiment(experiment_id)
experiment_definition = model.new_experiment_definition(custom_function)
experiment_definition.with_initialize_from(experiment)

experiment = workspace.get_experiment(experiment_id)
case = experiment.get_case('case_1')
experiment_definition = model.new_experiment_definition(custom_function)
experiment_definition.with_initialize_from(case)

result = workspace.upload_result('A.mat').wait()
experiment_definition = model.new_experiment_definition(custom_function)
experiment_definition.with_initialize_from(result)
with_modifiers(modifiers=None)

Sets the modifiers parameters for an experiment.

Parameters:

modifiers (Optional[Dict[str, Any]]) – A dictionary of variable modifiers. Could be used if modifiers keys conflict with python identifiers or keywords. Default: None.

Return type:

SimpleModelicaExperimentDefinition

Example:

from modelon.impact.client import Range, Choices

model = workspace.get_model("Modelica.Blocks.Examples.PID_Controller")
experiment_definition = model.new_experiment_definition(
    custom_function).with_modifiers({'inertia1.J': Choices(0.1, 0.9),
    'inertia2.J': Range(0.1, 0.5, 3)})

modelon.impact.client.experiment_definition.operators module

This module contains operators for parametrizing batch runs.

class Beta(alpha, beta)

Bases: Operator

Beta distribution class for parametrizing batch runs. For mathematical background, see e.g., https://en.wikipedia.org/wiki/Beta_distribution.

Parameters:
  • alpha (float) – ‘alpha’ resp. ‘a’ parameter of beta distribution, requires alpha > 0

  • beta (float) – ‘beta’ resp. ‘b’ parameter of beta distribution, requires beta > 0

Example:

from modelon.impact.client import Beta

fmu = model.compile().wait()
experiment_definition = fmu.new_experiment_definition(
    custom_function).with_modifiers({'inertia1.J': 2,
    'inertia2.J': Beta(0.1, 0.5, 3)})
alpha: float
beta: float
to_dict(name)

Returns a dict representation of the modifier.

Return type:

dict[str, Any]

class Choices(*values, data_type=None)

Bases: Operator

Choices operator class for parametrizing batch runs. Choices defines a list of specified values a Modifier expression can take.

Parameters:

values (Union[bool, int, float, str]) – Variable number of numerical arguments to sweep.

Example:

from modelon.impact.client import Choices

fmu = model.compile().wait()
experiment_definition = fmu.new_experiment_definition(
    custom_function).with_modifiers({'inertia1.J': 2,
    'inertia2.J': Choices(0.1, 0.5)})
to_dict(name)

Returns a dict representation of the modifier.

Return type:

dict[str, Any]

class Normal(mean, variance, start=None, end=None)

Bases: Operator

Normal distribution class for parametrizing batch runs.For mathematical background, see e.g., https://en.wikipedia.org/wiki/Normal_distribution https://en.wikipedia.org/wiki/Truncated_normal_distribution Supports both the standard and truncated Normal distribution. The standard Normal distribution is the default, add additional start & end parameters for truncation.

Parameters:
  • mean (float) – Mean resp. location of the distribution.

  • variance (float) – Variance of the normal distribution. Requires var > 0.

  • start (float) – Lower bound. Default: -inf

  • end (float) – Upper bound, requires end > start. Default: inf

Example:

from modelon.impact.client import Normal

fmu = model.compile().wait()
experiment_definition = fmu.new_experiment_definition(
    custom_function).with_modifiers({'inertia1.J': 2,
    'inertia2.J': Normal(0.1, 0.5)})
end: Optional[float] = None
mean: float
start: Optional[float] = None
to_dict(name)

Returns a dict representation of the modifier.

Return type:

dict[str, Any]

variance: float
class Operator

Bases: Modifier

Base class for an Operator.

to_value()

Returns a single scalar representing the modifier, operators are serialized as strings.

Return type:

str

class Range(start_value, end_value, no_of_steps)

Bases: Operator

Range operator class for parametrizing batch runs. Range(a, b, c) represents c linearly spaced values in the (real) interval [a, b]; b >= a. The functionality is analogous to numpy.linspace.

Parameters:
  • start_value (float) – The start value for the sweep parameter.

  • end_value (float) – The end value for the sweep parameter.

  • no_of_steps (int) – The number of steps to intermediate steps

  • end_value. (to take between start_value and) –

Example:

from modelon.impact.client import Range

fmu = model.compile().wait()
experiment_definition = fmu.new_experiment_definition(
    custom_function).with_modifiers({'inertia1.J': 2,
    'inertia2.J': Range(0.1, 0.5, 3)})
end_value: float
no_of_steps: int
start_value: float
to_dict(name)

Returns a dict representation of the modifier.

Return type:

dict[str, Any]

class Uniform(start, end)

Bases: Operator

Uniform distribution class for parametrizing batch runs.For mathematical background, see e.g., https://en.wikipedia.org/wiki/Continuous_uniform_distribution.

Parameters:
  • start (float) – Starting value of the interval.

  • end (float) – End value of the interval. Requires start <= end.

Example:

from modelon.impact.client import Uniform

fmu = model.compile().wait()
experiment_definition = fmu.new_experiment_definition(
    custom_function).with_modifiers({'inertia1.J': 2,
    'inertia2.J': Uniform(0.1, 0.5)})
end: float
start: float
to_dict(name)

Returns a dict representation of the modifier.

Return type:

dict[str, Any]

modelon.impact.client.experiment_definition.util module

case_to_identifier_dict(case)
Return type:

Dict[str, Any]

custom_function_parameters_to_dict(parameter_values)
Return type:

Any

get_options(default_options, options)
Return type:

Dict[str, Any]

Module contents