Skip to content

Global.gaml

Loïc SADOU edited this page Sep 29, 2020 · 2 revisions

Global.gaml is the main project file, this is where all the simulation is settup.

  • Attributes

    • seed (float): giving a value to the random seed allows the simulation to always have the same ending, useful for test purpose.
    • gas_price (float):
    • subscription_price (float):
    • percentage_of_drivers (float):
    • number_of_users (float):
    • number_of_users_per_hour (map<list<int>,int>):
    • ratio_cycleway (float):
    • air_pollution (float):
    • bus_capacity (float):
    • activity_cumulative_stat (map<string, int>):
    • mode_cumulative_stat (map<string, int>):
    • bus_freq (float):
    • the_logger (logger): This is the logger that will store all the information about the simulation.
    • the_event_manager (EventManager): This is the event manager that will manage all the events in the simulation.
    • shp_roads (file): shapefile containing all the roads informations.
    • shape (geometry): redefining the world shape using the road network shape.
    • optimizer_type (string): define the shortest path algorithm to use during the simulation.
    • memerize_shortest_path (bool): if true all the computed shortest path will be stored.
    • the_outside (Outside):
    • first_activity_h (list<int>):
    • is_fast_step (bool): if true the step is very fast to skip empty hours.
    • work_buildings (list<Building>): stores all the buildings where individuals can do the work activity. This attribute is used in the population generation.
    • home_buildings (list<Building>): stores all the buildings where individuals can do the stay_at_home activity. This attribute is used in the population generation.
    • shop_buildings (list<Building>): stores all the buildings where individuals can do the shopping activity. This attribute is used in the population generation.
    • school_buildings (list<Building>): stores all the buildings where individuals can do the study and manage_kid activities. This attribute is used in the population generation.
    • leisure_buildings (list<Building>): stores all the buildings where individuals can do the leisure activity. This attribute is used in the population generation.
  • Reflex

    • void end_simulation (void): end the simulation when current_date = end_date.
    • void manage_step (void): adjusts the step value to skip empty hours.
    • void print_time (void): print day time in the console.
  • Action

    • void global_init (void): this is where all the simulation parts are initialized. This action creates roads, crossroads, buildings, it create a logger and an event manager. This is also where the public transports informations are imported using import GTFS.gaml tool and the individuals generation using stochastic population generation.gaml.
    • EventListener getEventTarget (int event_index): return the signal target presents at event_index in events_map.
    • void write_message (string mess): write mess in the console.
    • string getEventType (int event_index): return the signal message presents at event_index in events_map.
    • Building get_living_place (int it_bd, map<int,Building> bds):
    • Building get_working_place (int it_bd, map<int,Building> bds):
    • void update_weather (void):
    • void update_number_of_users_per_hour (void):
    • list<Individual> manage_list_int (string val):
    • list<file> define_shapefiles (string file_name):
    • list<string> gather_dataset_names (string datasets_folder_path):
    • string with_path_termination (string p):
  • Experiment

Clone this wiki locally