File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,6 +173,33 @@ getbounds
173173ModelingToolkit.VariableBounds
174174```
175175
176+ ## Nominal Value
177+
178+ A nominal value represents the characteristic magnitude of a variable. This is useful
179+ for scaling constraints in optimal control problems, preventing ill-conditioning when
180+ variables have vastly different magnitudes. The default nominal value is ` 1.0 ` .
181+
182+ ``` @repl metadata
183+ @variables x [nominal_value = 1000.0];
184+ hasnominalvalue(x)
185+ getnominalvalue(x)
186+ ```
187+
188+ Nominal values can also be specified for array variables:
189+
190+ ``` @repl metadata
191+ @variables x[1:3] [nominal_value = [100.0, 200.0, 300.0]];
192+ getnominalvalue(x)
193+ getnominalvalue(x[1])
194+ ```
195+
196+ ``` @docs
197+ hasnominalvalue
198+ getnominalvalue
199+ setnominalvalue
200+ ModelingToolkit.VariableNominalValue
201+ ```
202+
176203## Guess
177204
178205Specify an initial guess for variables of a ` System ` . This is used when building the
You can’t perform that action at this time.
0 commit comments