Linking discrete choice to continuous demand within the framework of a computable general equilibrium model