A Dynamic Multisector Model with Endogenous Formation of Capacities and Equilibrium Prices: An Application to the Swedish Economy