Fixed a few more formulation errors, solution still doesn't converge.
Added back the original equilibrium calculation, the replacement did not properly iterate.