You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make this parameter dependent on another parameter. This will overwrite the current value, unit, variance, min and max.
162
162
163
-
:param dependency_expression: The dependency expression to evaluate. This should be a string which can be evaluated by the ASTEval interpreter.
163
+
How to use the dependency map:
164
+
If a parameter c has a dependency expression of 'a + b', where a and b are parameters belonging to the model class,
165
+
then the dependency map needs to have the form {'a': model.a, 'b': model.b}, where model is the model class.
166
+
I.e. the values are the actual objects, whereas the keys are how they are represented in the dependency expression.
167
+
168
+
The dependency map is not needed if the dependency expression uses the unique names of the parameters.
169
+
Unique names in dependency expressions are defined by quotes, e.g. 'Parameter_0' or "Parameter_0" depending on the quotes used for the expression.
170
+
171
+
:param dependency_expression: The dependency expression to evaluate. This should be a string which can be evaluated by a python interpreter.
164
172
:param dependency_map: A dictionary of dependency expression symbol name and dependency object pairs. This is inserted into the asteval interpreter to resolve dependencies.
0 commit comments