On Coordinating Electricity Markets: Smart Power Schedulingfor Demand Side Management and Economic Dispatch