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

Fixes the tick and trigger issue on SingleModeSpec test #3676

Merged
merged 2 commits into from
Nov 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/test/scala/beam/utils/SimRunnerForTest.scala
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package beam.utils

import java.io.File

import akka.actor.ActorSystem
import beam.agentsim.agents.modalbehaviors.ModeChoiceCalculator
import beam.agentsim.events.eventbuilder.{ComplexEventBuilder, EventBuilderActor}
import beam.api.{BeamCustomizationAPI, DefaultAPIImplementation}
import beam.sim.config.{BeamConfig, BeamConfigHolder, MatSimBeamConfigBuilder}
import beam.sim.{BeamHelper, BeamScenario, BeamServices, BeamServicesImpl, RunBeam}
import beam.sim._
import com.google.inject.Injector
import org.matsim.core.api.experimental.events.EventsManager
import org.matsim.core.config.Config
Expand All @@ -17,6 +14,8 @@ import org.matsim.core.events.EventsManagerImpl
import org.matsim.core.scenario.MutableScenario
import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, Suite}

import java.io.File

trait SimRunnerForTest extends BeamHelper with BeforeAndAfterAll with BeforeAndAfterEach { this: Suite =>
def config: com.typesafe.config.Config
def basePath: String = new File("").getAbsolutePath
Expand All @@ -43,6 +42,7 @@ trait SimRunnerForTest extends BeamHelper with BeforeAndAfterAll with BeforeAndA
List.empty[ComplexEventBuilder]
)
)
beamScenario.privateVehicles.foreach(_._2.resetState())
}

override protected def beforeAll(): Unit = {
Expand Down