Determining firms' utility functions and competitive roles from data on market shares using Lotka-Volterra models