ArcConstraintScaler Class#
- class idaes.core.scaling.arc_constraint_scaler.ArcConstraintScaler(**kwargs)[source]#
Scaler object to automatically scale all arc constraints on a Pyomo block (such as a Flowsheet object) using scaling methods from CustomScalerBase.
Config arguments from ScalerBase and CustomScaler base should be set to, for example, make sure that the maximum and minimum scaling thresholds are set appropriately.
- zero_tolerance
Value at which a variable will be considered equal to zero for scaling.
- max_variable_scaling_factor
Maximum value for variable scaling factors.
- min_variable_scaling_factor
Minimum value for variable scaling factors.
- max_constraint_scaling_factor
Maximum value for constraint scaling factors.
- min_constraint_scaling_factor
Minimum value for constraint scaling factors.
- max_expression_scaling_hint
Maximum value for expression scaling hints.
- min_expression_scaling_hint
Minimum value for constraint scaling hints.
- overwrite
Whether to overwrite existing scaling factors.
- scale_arc_constraints_by_nominal_derivative_norm(blk, norm=2, overwrite=False, descend_into=False)[source]#
Iterate over a block to find Arc objects present, then scale the corresponding arc constraints using the norm of the derivative of the constraint.
- Parameters:
blk – Pyomo Block to iterate over to find arc constraints
norm (int) – Type of norm to use for scaling. Must be a positive integer. The default is 2.
overwrite (bool) – Whether to overwrite existing scaling factors. The default is False.
descend_into (bool) – Whether to recursively descend into child blocks to search for arc constraints there to scale. The default is False.
- Returns:
None
- scale_arc_constraints_by_nominal_value(blk, scheme=ConstraintScalingScheme.inverseMaximum, overwrite=False, descend_into=False)[source]#
Iterate over a block to find Arc objects present, then scale the corresponding arc constraints using one of the supported nominal value constraint scaling schemes.
- Parameters:
blk – Pyomo Block to iterate over to find arc constraints
scheme – ConstraintScalingScheme Enum indicating method to apply for determining constraint scaling. The default is inverseMaximum.
overwrite (bool) – Whether to overwrite existing scaling factors. The default is False.
descend_into (bool) – Whether to recursively descend into child blocks to search for arc constraints there to scale. The default is False.
- Returns:
None