Mixed-integer algorithm for optimal dispatch of integrated PV-storage systems