Optimal real time pricing in an agent-based retail market using a comprehensive demand response model