Package core
Class Output
- java.lang.Object
-
- core.Output
-
public class Output extends Object
Methods for requesting outputs. This class provides methods for requesting certain outputs from the simulation. These methods should be called prior to the initialization of the simulation. Most of them share these parameters: prefix ... If you wish to write the output to files, this string will be used as a prefix for all output files in this run. Otherwise, set it to null.
output_folder ... Folder for storing output files. If output should be preserved in memory (for the plot methods), then set to null.
commodity_id ... Commodity id for the requested output.
link_ids ... Collection of link ids for the requested output.
outDt ... Output sampling time in seconds. If the underlying model has a time step (as opposed to an event based model) then outDt should be a multiple of that time step.
-
-
Constructor Summary
Constructors Constructor Description Output()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the outputs.Set<AbstractOutput>
get_data()
Get the set of all output objects.Set<String>
get_file_names()
Get the set of all output file names.void
request_cell_flw(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell flows.void
request_cell_lanechange_in(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell vehicles moving to incside lane group.void
request_cell_lanechange_out(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell vehicles moving to outside lane group.void
request_cell_sum_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell sum of vehicles.void
request_cell_sum_veh_dwn(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell vehicles moving downstream.void
request_cell_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell vehicles.void
request_controller(String prefix, String output_folder, Long controller_id)
Request controller eventsvoid
request_lanegroup_flw(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request lane group flows.void
request_lanegroup_sum_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request lane group sum vehicles over simulation time steps.void
request_lanegroup_sum_veh_dwn(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
void
request_lanegroup_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request lane group vehicles.void
request_lanegroups(String prefix, String output_folder)
Request lane group outputsvoid
request_link_queues(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request vehicles in a mesoscopic queue.void
request_links_flow(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request link flowsvoid
request_links_sum_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request link wsum of vehicles.void
request_links_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request link vehicles.void
request_path_travel_time(String prefix, String output_folder, Long subnetwork_id, Float outDt)
Request the travel times on a given path.void
request_subnetwork_vht(String prefix, String output_folder, Long commodity_id, Long subnetwork_id, Float outDt)
Request VHT for a subnetworkvoid
request_travel_time(String prefix, String output_folder)
Request travel times.void
request_vehicle_class(String prefix, String output_folder)
Request vehicle class.void
request_vehicle_events(String prefix, String output_folder, Long commodity_id)
Request vehicle events.
-
-
-
Method Detail
-
get_data
public Set<AbstractOutput> get_data()
Get the set of all output objects.- Returns:
- Set of output objects
-
get_file_names
public Set<String> get_file_names()
Get the set of all output file names.- Returns:
- Set of all output file names
-
clear
public void clear()
Clear the outputs.
-
request_links_flow
public void request_links_flow(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request link flows- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_links_veh
public void request_links_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request link vehicles.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_links_sum_veh
public void request_links_sum_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request link wsum of vehicles.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_link_queues
public void request_link_queues(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request vehicles in a mesoscopic queue.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_lanegroups
public void request_lanegroups(String prefix, String output_folder)
Request lane group outputs- Parameters:
prefix
- Prefix for the output files.output_folder
- Output folder.
-
request_lanegroup_flw
public void request_lanegroup_flw(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request lane group flows.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_lanegroup_veh
public void request_lanegroup_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request lane group vehicles.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_lanegroup_sum_veh
public void request_lanegroup_sum_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request lane group sum vehicles over simulation time steps. Works only for timestep-based models.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_lanegroup_sum_veh_dwn
public void request_lanegroup_sum_veh_dwn(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
-
request_cell_flw
public void request_cell_flw(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell flows.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_cell_veh
public void request_cell_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell vehicles.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_cell_sum_veh
public void request_cell_sum_veh(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell sum of vehicles. Works only for timestep-based models.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_cell_sum_veh_dwn
public void request_cell_sum_veh_dwn(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell vehicles moving downstream. Works only for timestep-based models.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_cell_lanechange_out
public void request_cell_lanechange_out(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell vehicles moving to outside lane group. Works only for timestep-based models.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_cell_lanechange_in
public void request_cell_lanechange_in(String prefix, String output_folder, Long commodity_id, Collection<Long> link_ids, Float outDt)
Request cell vehicles moving to incside lane group. Works only for timestep-based models.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.link_ids
- Collection of requested link idsoutDt
- Output sampling time in seconds.
-
request_path_travel_time
public void request_path_travel_time(String prefix, String output_folder, Long subnetwork_id, Float outDt)
Request the travel times on a given path.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.subnetwork_id
- Id of the requested subnetwork. null means the entire network.outDt
- Output sampling time in seconds.
-
request_subnetwork_vht
public void request_subnetwork_vht(String prefix, String output_folder, Long commodity_id, Long subnetwork_id, Float outDt)
Request VHT for a subnetwork- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means aggregate over commodities.subnetwork_id
- Id of the requested subnetwork. null means the entire network.outDt
- Output sampling time.
-
request_vehicle_events
public void request_vehicle_events(String prefix, String output_folder, Long commodity_id)
Request vehicle events.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.commodity_id
- Id for the requested vehicle type. null means all commodities.
-
request_vehicle_class
public void request_vehicle_class(String prefix, String output_folder)
Request vehicle class.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.
-
request_travel_time
public void request_travel_time(String prefix, String output_folder)
Request travel times.- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.
-
request_controller
public void request_controller(String prefix, String output_folder, Long controller_id)
Request controller events- Parameters:
prefix
- Prefix for the output files. null means do not write to file.output_folder
- Output folder. null means do not write to file.controller_id
- Controller id. null is all controllers.
-
-