How to manage complex equilibria when studying a mecanism? Consider a complex multistep reaction mechanism with several intermediates. There are multiple possible pathways as well as equilibria in solution. One wants to study the reaction mechanism using computational chemistry.

It is easy to calculate the $\Delta G$ and $\Delta G^\ddagger$ of individual reactions, but how do you take in consideration all the possible equilibria?

For example, consider an aldol reaction in presence of water (taken from Wikipedia):



Acetone can be either as a ketone, a protonated ketone, an enol or an enolate. This means that there are 16 possible pairs (although only 4 which make sense). These will yield different intermediates, which can dehydrate in different ways (ex. by protonation of the hydroxyde first or not, through a ketone or an enol or an enolate...)

In this case, many possibilities could be eliminated as too high in energy just by general knowledge of chemistry, but if you don't know enough about the system, how do you tackle this problem? How do you handle all the equilibria possible?
If you know what the final equilibrium products are or may be, and you know how much mass you start with, either as elements or molecules, you can calculate the Gibbs energy of the products as a function of (unknown) concentrations (assuming constant temperature and pressure) and then minimize the Gibbs energy with respect to those concentrations. You have to constrain the solution to conserve all of the elements that you began with, and constrain it to have all concentrations be non-negative.