The above discussed equilibrium-based systems optimise simplified models. It is a general, system engineering approach to extend these models toward the difficulties of reality for the calculations. We did the same when discussing the processes, noting that processes are usually affected by irreversible, loss-making elements.
At first, applying a linear approximation, these are added to or subtracted from the values of the model; their effect can be deterministic or—quite often—stochastic. Thus, handling the problems require careful analysis and special competence.