The growing demand for electricity, coupled with increased efficiency requirements, creates new opportunities for the development of demand-side management systems. Here we describe an approach for load allocation among different classes of device. We adopt the concept of strategic choice to determine the optimal strategy for a given situation. Electricity resources are allocated based on demand, priority, fairness, the available electrical resources, and the budget, so that even when the unit price is high (i.e., the available resources are restricted), higher-priority devices continue to operate without interruption. When the price falls, resources are distributed to satisfy the requirements of a larger number of devices. We include ESSs (energy storage systems) in the algorithm to reserve energy during low-price times for use during high-price times. The algorithm described here can be used to allocate resources among heterogeneous devices, and has potential not only to reduce peak demand but also to increase the overall efficiency of the system.