From 1efad3963c184344f60ec83a4ff3aeb43648734f Mon Sep 17 00:00:00 2001 From: Heric Farias Date: Wed, 12 Jul 2023 15:28:48 -0300 Subject: [PATCH] Adds fix to issue #3746. PersonAgentTripCostTest is flaky at this stage meaning there are other sources for cost discrepancy. --- src/main/scala/beam/agentsim/agents/PersonAgent.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/beam/agentsim/agents/PersonAgent.scala b/src/main/scala/beam/agentsim/agents/PersonAgent.scala index 5139b18b8d0..cc6a0b8da9b 100755 --- a/src/main/scala/beam/agentsim/agents/PersonAgent.scala +++ b/src/main/scala/beam/agentsim/agents/PersonAgent.scala @@ -957,22 +957,22 @@ class PersonAgent( _, _, _, - _, currentCost, _, _, + _, enrouteData ) ) => val (trip, cost) = if (enrouteData.isInEnrouteState) { log.debug("ReadyToChooseParking, enroute trip: {}", currentTrip.toString()) // if enroute, keep the original trip and cost - (currentTrip, currentCost.toDouble) + (currentTrip, currentCost) } else { log.debug("ReadyToChooseParking, trip: {}", restOfCurrentTrip.toString()) // "head" of the current trip is travelled, and returning rest of the trip // adding the cost of the "head" of the trip to the current cost - (restOfCurrentTrip, currentCost.toDouble + headOfCurrentTrip.cost) + (restOfCurrentTrip, currentCost + headOfCurrentTrip.cost) } goto(ChoosingParkingSpot) using data.copy(