Topology-aware vehicle-to-grid energy trading for active distribution systems