Smart constraint formula example
- Last UpdatedFeb 28, 2025
- 3 minute read
This example briefly explains the principle of the Smart Constraint.

Figure: Balance prior to enforcing any Smart Constraint
In the above flowsheet, if you run data reconciliation without any Smart Constraint, there are two mass balance constraints.
-
Mass balance constraint on the NO1 node:
Stream(FL1;RecMassFlowrate)-Stream(FL2;RecMassFlowrate)-
Stream(FL3;RecMassFlowrate)-Stream(FL4;RecMassFlowrate) = 0
-
Mass balance constraint on the NO2 node:
Stream(FL2;RecMassFlowrate)-Stream(FL5;RecMassFlowrate)-
Stream(FL6;RecMassFlowrate) = 0
The reconciled value of each stream is adjusted to meet these mass balance constraints.
Let's assume that you add an additional constraint such as: the reconciled value of FL2 stream should be equal to the half of the reconciled value of FL1 stream.
Formula for the new SC1 Smart Constraint:
Stream(FL1;RecMassFlowrate)-2*Stream(FL2;RecMassFlowrate) = 0
When you run data reconciliation with the additional constraint, the reconciled value of each stream is adjusted to meet two mass balance constraints and one additional constraint.

Figure: Balance with Smart Constraint satisfied
The solvability of the FL2 stream is changed from R (Redundant) to RC (Redundant with Linear Constraint).

Figure: Solvability is changed to RC
Change FL2 to be an unmeasured stream and run data reconciliation again.
The solvability of FL2 stream is now SC (Solvable with Linear Constraint).
If you run data reconciliation without the additional constraint, the solvability of FL2 stream is S (Solvable) and the reconciled value of FL2 stream is simply a calculated value, derived from other streams. With the additional constraint, the FL2 stream is reconciled rather than simply calculated, because it is an input variable to the constraint.

Figure: Effect of making FL2 an unmeasured stream
If you change the FL2 stream to be a constant stream (with tolerance = 0), the solvability of the FL2 stream becomes CR (Constant Redundant). The reconciled value of the FL2 stream is not affected by the additional constraint since it is fixed, not variable.
However, the reconciled value of the FL1 stream is adjusted to meet the additional constraint and the solvability of the FL1 stream becomes RC (Redundant with Linear Constraint).
Figure: Effect of making FL2 a constant stream
If you then change the FL1 stream to be a constant stream (with tolerance = 0) as well as the FL2 stream, the additional constraint cannot be balanced and only mass balance constraints are met. You can check this by viewing the reconciled balance of the Smart Constraint which will be colored red on the flowsheet due to its imbalance.
If you set the FL2 stream to be out of service, the reconciled value of the FL2 stream is forced to zero and the reconciled value of the FL1 stream is still constant. The Smart Constraint is not balanced since the FL1 stream cannot be adjusted.

Figure: Effect of making FL1 constant and FL2 out of service
If you change the FL1 stream so that it is no longer constant (its tolerance <> 0), the reconciled value of the FL1 stream is zero to meet the additional constraint and its solvability becomes RC (Redundant with Linear Constraint) to let you know it is reconciled to meet the additional constraint.

Figure: Effect of making FL1 no longer constant, but leaving FL2 as out of service