Price dynamics and market power in an agent-based power exchange with heterogeneous production costs