LBNL-UCB-STI / beam

The Framework for Modeling Behavior, Energy, Autonomy, and Mobility in Transportation Systems
https://transportation.lbl.gov/beam
Other
145 stars 57 forks source link

Generating two Skims with different spatial resolutions #3847

Closed haitamlaarabi closed 6 months ago

haitamlaarabi commented 6 months ago

The reason is that in PILATES some models may be operating on different spatial resolutions. For example ActivitySim in SFBay is at TAZ level but FRISM is a CBG level. In here we are mapping TAZ to CBG and then producing two skims: one for ActivitySkim and another for FRISM.


This change is Reviewable

zneedell commented 6 months ago

src/main/scala/beam/utils/geospatial/GeoReader.scala line 66 at r1 (raw file):


  def main(args: Array[String]): Unit = {
    readFeatures("/Users/haitamlaarabi/Workspace/Data/Scenarios/sfbay/input/sfbay_cbgs.geojson")

Probably want to generalize this or remove it

zneedell commented 6 months ago

production/sfbay line 1 at r1 (raw file):

Subproject commit baa870bc1acf646efbfbdef74243166af45f3e63

Is there any way to get these changes out of the PR?

zneedell commented 6 months ago

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


  def getOriginAndDestination(currentAct: Activity, maybeNextAct: Option[Activity]): (String, String) = {
    val tazMap = beamScenario.tazTreeMap

I'm probably misunderstanding this, but isn't this pointing to the actual TAZ geometries rather than the smaller CBG geometries? Wouldn't we want to do the initial mapping to the smaller geometries and then aggregate them up to TAZs when outputting the skims?

zneedell commented 6 months ago

src/main/scala/beam/router/skim/ActivitySimSkimmer.scala line 254 at r1 (raw file):

      }

      val filePathWithMapped = if (excerptOfMappedData.nonEmpty) filePath.lastIndexOf(".") match {

Any chance we could keep it so that the mapped (e.g. TAZ) skims have the same file name for backwards compatibility, and change the name of the bg skims? Although I get that it's tricky because when we turn the mapping off the assumption is that the original (pre-mapped) skims are now TAZ rather than BG

haitamlaarabi commented 6 months ago

Test!

haitamlaarabi commented 6 months ago

test now!

haitamlaarabi commented 6 months ago

test now!

haitamlaarabi commented 6 months ago

test!

haitamlaarabi commented 6 months ago

test!

nikolayilyin commented 6 months ago

test now!

haitamlaarabi commented 6 months ago

test!

haitamlaarabi commented 6 months ago

Test now!

haitamlaarabi commented 6 months ago

test!

haitamlaarabi commented 6 months ago

test!

nikolayilyin commented 6 months ago

test!

nikolayilyin commented 6 months ago

test now!