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

Merged
merged 17 commits into from
Sep 16, 2024
Merged

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!

@zneedell
Copy link
Collaborator Author

Test!

@nikolayilyin
Copy link
Collaborator

test!

@zneedell zneedell marked this pull request as draft July 10, 2024 20:15
@zneedell
Copy link
Collaborator Author

Making this a draft for now because I'm noticing some agents getting caught by the stuckfinder. Will try to figure out why

@nikolayilyin
Copy link
Collaborator

test!

@nikolayilyin
Copy link
Collaborator

test!

@nikolayilyin
Copy link
Collaborator

test!

Copy link
Collaborator

@nikolayilyin nikolayilyin left a comment

Choose a reason for hiding this comment

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

lgtm

@zneedell zneedell marked this pull request as ready for review September 16, 2024 20:49
@zneedell
Copy link
Collaborator Author

Test now!

@zneedell zneedell merged commit 7ae83a4 into develop Sep 16, 2024
1 of 2 checks passed
@zneedell zneedell deleted the zn/load-vehicles-file branch September 16, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants