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

Use vehicles.csv input in UrbanSim scenarios #3791

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

zneedell
Copy link
Collaborator

@zneedell zneedell commented Sep 27, 2023

Previously the scenario's PrivateVehicles attribute was being overwritten during scenarioAdjustment when we're using an urbansim scenario (as is the case during pilates). Here's a trial fix, with a hack to hopefully not break anything when freight is turned on


This change is Reviewable

Copy link
Collaborator

@haitamlaarabi haitamlaarabi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: 0 of 11 files reviewed, 3 unresolved discussions (waiting on @zneedell)


src/main/scala/beam/agentsim/agents/Population.scala line 109 at r1 (raw file):

            VehicleInfo(
              vehicleId = "",
              vehicleTypeId = vehId.toString,

Is this supposed to be vehicleTypeId or vehicleId?


src/main/scala/beam/sim/BeamHelper.scala line 325 at r1 (raw file):

    val (privateVehicleMap, privateVehicleSoc) = beamConfig.beam.exchange.scenario.source.toLowerCase match {
      // when reading an urbansim scenario, we read in the vehicles again in ScenarioAdjustment, so there's no need to
      // bother reading it in now. For now we still do read in freight vehicles, although it's probably cleaner to move

@dimaopen @nikolayilyin can you actually address this, if possible?


src/main/scala/beam/utils/scenario/UrbanSimScenarioLoader.scala line 60 at r1 (raw file):

  def loadScenario(): (Scenario, Boolean) = {
    // This is a hack for now. When initially building the scenario we skip reading personal vehicles but do read

@dimaopen @nikolayilyin and this

@zneedell
Copy link
Collaborator Author

src/main/scala/beam/agentsim/agents/Population.scala line 109 at r1 (raw file):

Previously, haitamlaarabi (Haitam Laarabi) wrote…

Is this supposed to be vehicleTypeId or vehicleId?

Ah good catch, thanks!

@zneedell zneedell marked this pull request as ready for review March 21, 2024 20:13
@zneedell
Copy link
Collaborator Author

Test now!

@zneedell zneedell marked this pull request as draft March 21, 2024 23:22
@zneedell
Copy link
Collaborator Author

Test now!

@nikolayilyin
Copy link
Collaborator

test now!

1 similar comment
@nikolayilyin
Copy link
Collaborator

test now!

@zneedell zneedell marked this pull request as ready for review April 16, 2024 22:45
@zneedell
Copy link
Collaborator Author

Test now!

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

Successfully merging this pull request may close these issues.

None yet

4 participants