Skip to content

Commit 638e93c

Browse files
committed
Stop re-exporting stuff from synthpop in sim
1 parent f171ddc commit 638e93c

66 files changed

Lines changed: 110 additions & 88 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ rand = "0.8.3"
2121
rand_xorshift = "0.3.0"
2222
serde = "1.0.123"
2323
sim = { path = "../sim" }
24+
synthpop = { path = "../synthpop" }
2425
structopt = "0.3.23"
2526
tokio = { version = "1.1.1", features = ["full"] }

cli/src/augment_scenario.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rand_xorshift::XorShiftRng;
55
use abstutil::{prettyprint_usize, Timer};
66
use geom::{Distance, Duration, FindClosest};
77
use map_model::{AmenityType, BuildingID, Map};
8-
use sim::{IndividTrip, Scenario, TripEndpoint, TripMode, TripPurpose};
8+
use synthpop::{IndividTrip, Scenario, TripEndpoint, TripMode, TripPurpose};
99

1010
pub fn run(
1111
input_scenario: String,

cli/src/import_grid2demand.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ use serde::Deserialize;
44
use abstutil::{prettyprint_usize, Timer};
55
use geom::{Duration, LonLat, Time};
66
use map_model::Map;
7-
use sim::{ExternalPerson, ExternalTrip, ExternalTripEndpoint, Scenario, TripMode, TripPurpose};
7+
use synthpop::{
8+
ExternalPerson, ExternalTrip, ExternalTripEndpoint, Scenario, TripMode, TripPurpose,
9+
};
810

911
pub fn run(csv_path: String, map: String) -> Result<()> {
1012
let mut timer = Timer::new("import grid2demand");

cli/src/import_scenario.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use serde::Deserialize;
22

33
use abstutil::{prettyprint_usize, Timer};
44
use map_model::Map;
5-
use sim::{ExternalPerson, Scenario};
5+
use synthpop::{ExternalPerson, Scenario};
66

77
pub fn run(input: String, map: String, skip_problems: bool) {
88
let mut timer = Timer::new("import traffic demand data");

cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ fn dump_json(path: String) {
321321
return;
322322
}
323323
if let Ok(scenario) =
324-
abstio::maybe_read_binary::<sim::Scenario>(path.clone(), &mut Timer::throwaway())
324+
abstio::maybe_read_binary::<synthpop::Scenario>(path.clone(), &mut Timer::throwaway())
325325
{
326326
println!("{}", abstutil::to_json(&scenario));
327327
return;

game/src/app.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ use map_gui::tools::CameraState;
1616
use map_gui::ID;
1717
use map_model::AreaType;
1818
use map_model::{BufferType, IntersectionID, LaneType, Map, Traversable};
19-
use sim::{AgentID, Analytics, Scenario, Sim, SimCallback, SimFlags, VehicleType};
19+
use sim::{AgentID, Analytics, Sim, SimCallback, SimFlags, VehicleType};
20+
use synthpop::Scenario;
2021
use widgetry::mapspace::ToggleZoomed;
2122
use widgetry::{Cached, Canvas, EventCtx, GfxCtx, Prerender, SharedAppState, State};
2223

game/src/challenges/prebake.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ use abstio::MapName;
44
use abstutil::{prettyprint_usize, Timer};
55
use geom::{Duration, Time};
66
use map_model::Map;
7-
use sim::{AlertHandler, Scenario, ScenarioGenerator, Sim, SimFlags, SimOptions};
7+
use sim::{AlertHandler, ScenarioGenerator, Sim, SimFlags, SimOptions};
8+
use synthpop::Scenario;
89

910
use crate::sandbox::TutorialState;
1011

game/src/debug/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ use map_model::{
1313
osm, ControlTrafficSignal, IntersectionID, PathConstraints, Perimeter, Position, RoadID,
1414
NORMAL_LANE_THICKNESS,
1515
};
16-
use sim::{Sim, TripEndpoint};
16+
use sim::Sim;
17+
use synthpop::TripEndpoint;
1718
use widgetry::{
1819
lctrl, Cached, Choice, Color, DrawBaselayer, Drawable, EventCtx, GeomBatch, GfxCtx,
1920
HorizontalAlignment, Key, Line, Outcome, Panel, State, Text, Toggle, UpdateType,

game/src/debug/routes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use map_model::{
99
DirectedRoadID, Direction, PathRequest, PathfinderCaching, RoadID, RoutingParams, Traversable,
1010
NORMAL_LANE_THICKNESS,
1111
};
12-
use sim::{TripEndpoint, TripMode};
12+
use synthpop::{TripEndpoint, TripMode};
1313
use widgetry::mapspace::ToggleZoomed;
1414
use widgetry::{
1515
Color, Drawable, EventCtx, GeomBatch, GfxCtx, HorizontalAlignment, Key, Line, Outcome, Panel,

0 commit comments

Comments
 (0)