Optimization analyses of two heat exchanger networks show that if the optimization objective of the heat exchanger network can be expressed as an explicit function of all the independent variables, its derivatives with respect to each variable can offer the optimal solution. If there is no explicit function, optimization problem can be solved by using the Lagrange multiplier method, which combines the optimization objective and the constraints. However, heat exchanger networks with many heat exchangers have a large number of variables and constraint equations in the Lagrange function, which slows the optimization solution. A crank mechanism is used as an example to indicate that the Lagrange multiplier method can be simplified in a generalized coordinate instead of Cartesian coordinates. Inspired by the use of generalized coordinates in multi-body systems, the entransy balance equation for the heat exchanger network is introduced here as a new constraint to replace the conventional constraints of heat transfer and energy conservation equations for the optimization of a loop-connected heat exchanger network. As a result, the number of variables and constraints in the Lagrange multiplier function is reduced and the solution is simplified. In this sense, the entransy balance equation can be termed as the generalized constraint. Finally, the reason for the simplification function of the entransy dissipation-based generalized constraint is explored.