Navigation

  • index
  • modules |
  • next |
  • previous |
  • SigmaMu 1.0-b1 documentation »
  • API documentation »
  • Process modelling »
  • Handler classes related to parameters

Handler classes related to parameters¶

ParameterHandler¶

class simu.core.model.parameter.ParameterHandler¶

This class, being instantiated as the simu.Model.parameters attribute, allows to define and access process parameters.

During simu.Model.interface(), the model defines parameters with and without pre-defined values.

Within the with block, the parent module connects parameters by providing external symbols. Here, the unit of measurement must be compatible to the parameters’ definition.

During simu.Model.define() checks that all required symbols (the ones without default values) are connected. It keeps track of the non-connected and static parameters, as they will need to be used as arguments for the overall model function.

__init__(static_id: str)¶
define(
name: str,
value: float | None = None,
unit: str | None = 'dimless',
) → None¶

Define a parameter from within the simu.Model.interface() method.

static(
name: str,
value: float,
unit: str | None = 'dimless',
) → SymbolQuantity¶

Define a static parameter over all instances of the associated model.

get_static(name: str) → SymbolQuantity¶

Return a static parameter of given name

static_names() → Iterable[str]¶

An iterator over all names of defined static parameters

create_proxy() → ParameterProxy¶

Create a proxy object for configuration in hierarchy context

ParameterProxy¶

class simu.core.model.parameter.ParameterProxy¶

This class is instantiated by the parent’s ParameterHandler to configure the parameter connections from the parent context.

__init__(
handler: ParameterHandler,
params: MutableMapping[str, Quantity],
values: MutableMapping[str, Quantity],
)¶
set_name(name: str)¶

Set the name of the model for better error diagnostics

provide(**kwargs: Quantity) → None¶

Connect a parameter from parent context to child parameter.

update(name: str, value: float, unit: str) → None¶

Provide new default value for child parameter

property free: Mapping[str, Quantity]¶

Symbols representing the symbols of the parameters that have not been provided. These must be used to create an overall function, when parameter values are provided from the outside.

property values: Mapping[str, Quantity]¶

Symbols representing the values of the parameters that have not been provided. These must be used to call the overall function.

finalise() → None¶

Make sure there are values for all non-provided parameters with no value. Remove values of provided parameters

Table of Contents

Contents:

  • Introduction
  • Getting started
  • Tutorial
  • API documentation
    • Thermodynamic Modelling
    • Process modelling
    • Numerical solvers
    • Utilities
    • Predefined models
  • Frequently asked questions
  • Release notes
  • License
  • Literature

Quick search

Navigation

  • index
  • modules |
  • next |
  • previous |
  • SigmaMu 1.0-b1 documentation »
  • API documentation »
  • Process modelling »
  • Handler classes related to parameters
© Copyright 2021-2025, Volker Siepmann. Created using Sphinx 9.1.0.