File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
gis/agents_and_networks/src/model Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 1
1
import uuid
2
2
from functools import partial
3
+ from pathlib import Path
3
4
4
5
import geopandas as gpd
5
6
import mesa
13
14
from ..space .campus import Campus
14
15
from ..space .road_network import CampusWalkway
15
16
17
+ script_directory = Path (__file__ ).resolve ().parent
18
+
16
19
17
20
def get_time (model ) -> pd .Timedelta :
18
21
return pd .Timedelta (days = model .day , hours = model .hour , minutes = model .minute )
@@ -59,14 +62,14 @@ class AgentsAndNetworks(mesa.Model):
59
62
60
63
def __init__ (
61
64
self ,
62
- campus : str ,
63
- data_crs : str ,
64
- buildings_file : str ,
65
- walkway_file : str ,
66
- lakes_file : str ,
67
- rivers_file : str ,
68
- driveway_file : str ,
69
- num_commuters ,
65
+ campus = "ub" ,
66
+ data_crs = "epsg:4326" ,
67
+ buildings_file = script_directory / "../../data/ub/UB_bld.zip" ,
68
+ walkway_file = script_directory / "../../data/ub/UB_walkway_line.zip" ,
69
+ lakes_file = script_directory / "../../data/ub/hydrop.zip" ,
70
+ rivers_file = script_directory / "../../data/ub/hydrol.zip" ,
71
+ driveway_file = script_directory / "../../data/data/ub/UB_Rds.zip" ,
72
+ num_commuters = 50 ,
70
73
commuter_min_friends = 5 ,
71
74
commuter_max_friends = 10 ,
72
75
commuter_happiness_increase = 0.5 ,
You can’t perform that action at this time.
0 commit comments