Whether to Charge or Discharge an Electric Vehicle? An Optimal Approach in Polynomial Time | IEEE Conference Publication | IEEE Xplore