Price-maker optimal planning and operation of distributed energy resources