Modeling the allocation of resources to markets based on the restraints of objective functions