Skip to content

Commit

Permalink
additional cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhoerl committed Sep 3, 2024
1 parent 3849b41 commit 8747720
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/vehicles/raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def configure(context):
context.config("data_path")
context.config("vehicles_path")
context.config("vehicles_path", "vehicles")
context.config("vehicles_year", 2021)
context.stage("data.spatial.codes")

Expand Down
2 changes: 1 addition & 1 deletion docs/simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ In the `config.yml`, you must enable the vehicle fleet generation :

```yaml
config:
generate_vehicles_method: fleet_sample
vehicles_method: fleet_sample
```

After doing so, the `vehicles.xml.gz` and `vehicle_types.xml.gz` in the output will not only contain default vehicles and vehicle types, but realistic ones, based on the regional probabilities.
Expand Down
2 changes: 1 addition & 1 deletion synthesis/vehicles/vehicles.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pandas as pd

def configure(context):
method = context.config("generate_vehicles_method", "default")
method = context.config("vehicles_method", "default")

if method == "default":
context.stage("synthesis.vehicles.cars.default", alias = "cars")
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def run_population(tmpdir, hts, update = {}):
assert 149 == len(pd.read_csv("%s/ile_de_france_households.csv" % output_path, usecols = ["household_id"], sep = ";"))

assert 447 * 2 == len(pd.read_csv("%s/ile_de_france_vehicles.csv" % output_path, usecols = ["vehicle_id"], sep = ";"))
if "generate_vehicles_method" in update and update["generate_vehicles_method"] == "fleet_sample":
if "vehicles_method" in update and update["vehicles_method"] == "fleet_sample":
assert 17 + 1 == len(pd.read_csv("%s/ile_de_france_vehicle_types.csv" % output_path, usecols = ["type_id"], sep = ";"))
else:
assert 2 == len(pd.read_csv("%s/ile_de_france_vehicle_types.csv" % output_path, usecols = ["type_id"], sep = ";"))
Expand All @@ -84,7 +84,7 @@ def test_population_with_mode_choice(tmpdir):

def test_population_with_fleet_sample(tmpdir):
run_population(tmpdir, "entd", {
"generate_vehicles_method": "fleet_sample",
"vehicles_method": "fleet_sample",
"vehicles_data_year": 2015
})

Expand Down

0 comments on commit 8747720

Please sign in to comment.