Demand Response (DR) is a mechanism in which electricity consumers alter their demand in response to power grid's supply and economic conditions. DR programs have the potential to improve resource efficiency, sustainability, grid reliability and economic viability by providing tighter alignment between demand and supply. However, implementing DR program is a non-trivial task as it requires good knowledge of electricity consumption preferences, economic models and contextual factors. Developing such knowledge through real world studies can be expensive and be time consuming. As a result, utility companies have been finding it complicated to analyze potential viability and return on investments of DR programs for various 'what-if' scenarios. To address this problem, we present DRSim - a cyber-physical simulator that allows utility companies to study demand side participation aspects of communities with various practical scenarios. DRSim is based on the principles of agent-oriented modeling of users' behavior and context. It is able to model the emergent behavior of a community based on real data traces that contain partial information about the environment. DRSim is a highly extensible framework to accommodate new data sources, new analytical functionalities and evolve its modeling power. Feasibility experiments show the modeling and analysis potential of DRSim in practical settings. © 2013 IEEE.