Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to stay longer in case of low SOC #110

Open
t-ober opened this issue Oct 11, 2022 · 1 comment
Open

Possibility to stay longer in case of low SOC #110

t-ober opened this issue Oct 11, 2022 · 1 comment

Comments

@t-ober
Copy link
Contributor

t-ober commented Oct 11, 2022

Previously we implemented a possibility to stay longer in case of low SOC.
This changes the trip times which we don't want for longer trip sequences as this can lead to unexpected result.
We might add this if needed later on.

  /* Check if SoC is < 10% at start of trip -> if yes, and EV could charge at its destination, do not depart */
  else if (
    socAtStartOfTrip < SOC_OF_10_PERCENT
    && ev.destinationPoi.nearestChargingStations.nonEmpty
  ) {
    // logger.info(
    s"${ev.getId} has SoC < 10% at planned departure, but EV could charged here. It stays until it can charge..."
    // )
    doNotDepartAndStayLongerAtDestination(
      ev,
      currentTime,
      chargingStations,
      tripProbabilities.firstDepartureOfDay,
      tripProbabilities.lastTripOfDay,
      tripProbabilities.parkingTime
    )
  }
@t-ober
Copy link
Contributor Author

t-ober commented Oct 11, 2022

Removed test:

    "not simulate a new trip and keep charging when SoC < 10 % and charging is available" in {
      TripSimulation.simulateNextTrip(
        givenSimulationStart,
        evLowSoC,
        poisWithSizes,
        chargingHubTownIsPresent = true,
        chargingHubHighwayIsPresent = true,
        chargingStations,
        ioUtils,
        tripProbabilities,
        maxDistance
      ) match {
        case ElectricVehicle(
              simulationStart,
              uuid,
              id,
              evType,
              homePoi,
              workPoi,
              storedEnergy,
              destinationPoi,
              destinationPoiType,
              parkingTimeStart,
              departureTime,
              chargingAtHomePossible,
              chosenChargingStation,
              chargingAtSimona,
              finalDestinationPoi,
              finalDestinationPoiType,
              remainingDistanceAfterChargingHub,
              chargingPricesMemory
            ) =>
          simulationStart shouldBe givenSimulationStart
          uuid shouldBe ev1.getUuid
          id shouldBe "car_1"
          evType shouldBe givenModel
          homePoi shouldBe givenHomePoi
          workPoi shouldBe givenWorkPoi
          storedEnergy shouldBe zero
          chargingAtSimona shouldBe false
          destinationPoi shouldBe supermarket
          parkingTimeStart shouldBe simulationStart.plusMinutes(1)
          departureTime shouldBe simulationStart.plusHours(1).plusMinutes(1)
          chargingAtHomePossible shouldBe true
          chosenChargingStation shouldBe None
          finalDestinationPoi shouldBe None
          remainingDistanceAfterChargingHub shouldBe None
          chargingPricesMemory shouldBe mutable.Queue[Double]()
      }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant