Market equilibrium via a primal--dual algorithm for a convex program | Synapse