Solving Product-Mix Markets And Learning Agents’ Preferences