Exemplo n.º 1
0
PlanPrep::PlanPrep (void) : Data_Service (), Select_Service ()
{
	Program ("PlanPrep");
	Version (9);
	Title ("Travel Plan Processing Utility");

	System_File_Type required_files [] = {
		PLAN, END_FILE
	};
	System_File_Type optional_files [] = {
		SELECTION, NEW_PLAN, END_FILE
	};
	int data_service_keys [] = {
		TRIP_SORT_TYPE, PLAN_SORT_TYPE, 0
	};
	int select_service_keys [] = {
		SELECT_HOUSEHOLDS, SELECT_MODES, SELECT_PURPOSES, SELECT_START_TIMES, SELECT_END_TIMES, 
		SELECT_ORIGINS, SELECT_DESTINATIONS, SELECT_TRAVELER_TYPES, SELECT_LINKS, SELECT_NODES, 
		SELECT_SUBAREA_POLYGON, SELECTION_PERCENTAGE, DELETION_FILE, DELETION_FORMAT, 
		DELETE_HOUSEHOLDS, DELETE_MODES, DELETE_TRAVELER_TYPES, 0
	};
	Control_Key keys [] = { //--- code, key, level, status, type, default, range, help ----
		{ MERGE_PLAN_FILE, "MERGE_PLAN_FILE", LEVEL0, OPT_KEY, IN_KEY, "", PARTITION_RANGE, NO_HELP },
		{ MERGE_PLAN_FORMAT, "MERGE_PLAN_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ MAXIMUM_SORT_SIZE, "MAXIMUM_SORT_SIZE", LEVEL0, OPT_KEY, INT_KEY, "0", "0, >=100000 trips", NO_HELP },
		END_CONTROL
	};
	const char *reports [] = {
		//"FIRST_REPORT",
		//"SECOND_REPORT",
		""
	};
	Required_System_Files (required_files);
	Optional_System_Files (optional_files);
	Data_Service_Keys (data_service_keys);
	Select_Service_Keys (select_service_keys);

	Key_List (keys);
	Report_List (reports);
	Enable_Partitions (true);

#ifdef BOOST_THREADS
	Enable_Threads (true);
#endif
#ifdef MPI_EXE
	Enable_MPI (true);
#endif
	plan_processing = 0;

	sort_size = 0;
	select_flag = merge_flag = combine_flag = output_flag = new_plan_flag = false;

	System_Read_False (PLAN);
	System_Data_Reserve (PLAN, 0);
}
Exemplo n.º 2
0
TPPlusNet::TPPlusNet (void) : Network_Service ()
{
	Program ("TPPlusNet");
	Version ("4.0.4");
	Title ("TPPlus Network Conversion");

	Network_File required_network [] = {
		NEW_NODE, NEW_LINK, END_NETWORK
	};

	Network_File optional_network [] = {
		NEW_DIRECTORY, NEW_SHAPE, END_NETWORK
	};

	char *keys [] = {
		TPPLUS_LINK_FILE,
		TPPLUS_LINK_FORMAT,
		TPPLUS_NODE_FILE,
		TPPLUS_NODE_FORMAT,
		TPPLUS_SPDCAP_FILE,
		TPPLUS_SPDCAP_FORMAT,
		CONVERT_MPH_TO_MPS,
		FACILITY_INDEX_FIELD,
		AREA_TYPE_INDEX_FIELD,
		CONVERSION_SCRIPT,
		EXTERNAL_ZONE_NUMBER,
		NEW_LINK_DETAIL_FILE,
		NULL
	};

	char *reports [] = {
		"CONVERSION_SCRIPT",
		"CONVERSION_STACK",
		NULL
	};

	Required_Network_Files (required_network);
	Optional_Network_Files (optional_network);

	Key_List (keys);
	Report_List (reports);

	AB_Key_Flag (true);

	proj_service.Add_Keys ();

	ext_zone = fac_fld = at_fld = 0;
	convert_flag = spdcap_flag = link_shape_flag = node_shape_flag = units_flag = detail_flag = false;

	link_array = (Link_Array *) new Link_Name_Array ();
}
Exemplo n.º 3
0
ExportPlans::ExportPlans (void) : Data_Service (), Select_Service ()
{
	Program ("ExportPlans");
	Version (7);
	Title ("Export Plan Data in Various Formats");

	System_File_Type required_files [] = {
		PLAN, END_FILE
	};
	System_File_Type optional_files [] = {
		LINK, NODE, LOCATION, VEHICLE_TYPE, VEHICLE, END_FILE
	};
	int data_service_keys [] = {
		SUMMARY_TIME_RANGES, SUMMARY_TIME_INCREMENT, 0
	};
	int select_service_keys [] = {
		SELECT_MODES, SELECT_NODES, SELECT_SUBAREA_POLYGON, SELECT_VEHICLE_TYPES, 0
	};
	Control_Key exportplans_keys [] = { //--- code, key, level, status, type, default, range, help ----
		{ NEW_VISSIM_XML_FILE, "NEW_VISSIM_XML_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP  },
		{ LOCATION_ZONE_MAP_FILE, "LOCATION_ZONE_MAP_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP  },
		{ SUBZONE_WEIGHT_FILE, "SUBZONE_WEIGHT_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP  },
		{ NEW_ZONE_LOCATION_FILE, "NEW_ZONE_LOCATION_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP  },
		END_CONTROL
	};
	const char *reports [] = {
		""
	};
	Required_System_Files (required_files);
	Optional_System_Files (optional_files);
	Data_Service_Keys (data_service_keys);
	Select_Service_Keys (select_service_keys);

	Key_List (exportplans_keys);
	Report_List (reports);
	
	Enable_Partitions (true);
	Location_XY_Flag (true);

	vissim_flag = select_flag = map_flag = zone_loc_flag = subzone_flag = false;

	System_Read_False (PLAN);
	System_Data_Reserve (PLAN, 0);
}
Exemplo n.º 4
0
Router::Router (void) : Converge_Service ()
{
	Program ("Router");
	Version (89);
	Title ("Network Path Building");

	System_File_Type optional_files [] = {
		TRIP, PLAN, SIGN, SIGNAL, TIMING_PLAN, PHASING_PLAN, DETECTOR, NEW_TURN_DELAY, NEW_RIDERSHIP, END_FILE
	};
	Control_Key keys [] = { //--- code, key, level, status, type, help ----
		{ UPDATE_PLAN_RECORDS, "UPDATE_PLAN_RECORDS", LEVEL0, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		{ REROUTE_FROM_TIME_POINT, "REROUTE_FROM_TIME_POINT", LEVEL0, OPT_KEY, TIME_KEY, "0:00", "", NO_HELP },
		END_CONTROL
	};
	Optional_System_Files (optional_files);

	Converge_Service_Keys ();
	Key_List (keys);
	Report_List (reports);

	reroute_time = 0;
}
Exemplo n.º 5
0
ProblemSelect::ProblemSelect (void) : Data_Service (), Select_Service ()
{
	Program ("ProblemSelect");
	Version (0);
	Title ("Travel Problem Selection Utility");

	System_File_Type required_files [] = {
		NODE, LINK, LOCATION, PROBLEM, NEW_SELECTION, END_FILE
	};
	System_File_Type optional_files [] = {
		SELECTION, END_FILE
	};
	int select_service_keys [] = {
		SELECT_HOUSEHOLDS, SELECT_MODES, SELECT_PURPOSES, SELECT_START_TIMES, SELECT_END_TIMES, 
		SELECT_ORIGINS, SELECT_DESTINATIONS, SELECT_TRAVELER_TYPES, SELECT_FACILITY_TYPES, 
		SELECT_ORIGIN_ZONES, SELECT_DESTINATION_ZONES, SELECT_PROBLEM_TYPES, 
		SELECTION_PERCENTAGE, MAXIMUM_PERCENT_SELECTED, 0
	};
	Control_Key keys [] = { //--- code, key, level, status, type, default, range, help ----
		//{ SELECT_TIME_RATIOS, "SELECT_TIME_RATIOS", LEVEL0, OPT_KEY, FLOAT_KEY, "0.0", "0.0, >1.0", NO_HELP },
		END_CONTROL
	};
	const char *reports [] = {
		//"FIRST_REPORT",
		//"SECOND_REPORT",
		""
	};
	Required_System_Files (required_files);
	Optional_System_Files (optional_files);
	Select_Service_Keys (select_service_keys);

	Key_List (keys);
	Report_List (reports);
	Enable_Partitions (true);

	max_problem = num_problem = 0;
}
Exemplo n.º 6
0
LocationData::LocationData (void) : Data_Service ()
{
	Program ("LocationData");
	Version (3);
	Title ("Activity Location Data Processor");

	System_File_Type required_files [] = {
		NODE, LINK, LOCATION, NEW_LOCATION, END_FILE
	};
	System_File_Type optional_files [] = {
		SHAPE, ZONE, ACCESS_LINK, TRANSIT_STOP, TRANSIT_ROUTE, TRANSIT_SCHEDULE, END_FILE
	};
	int file_service_keys [] = {
		NOTES_AND_NAME_FIELDS, 0
	};
	Control_Key locationdata_keys [] = { //--- code, key, level, status, type, default, range, help ----
		{ COPY_EXISTING_FIELDS, "COPY_EXISTING_FIELDS", LEVEL0, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		{ NEW_WALK_ACCESS_FIELD, "NEW_WALK_ACCESS_FIELD", LEVEL0, OPT_KEY, TEXT_KEY, "", "", NO_HELP },
		{ MAX_WALK_DISTANCE, "MAX_WALK_DISTANCE", LEVEL0, OPT_KEY, INT_KEY, "1000 meters", "10..3000 meters", NO_HELP },
		{ WALK_ACCESS_TIME_RANGE, "WALK_ACCESS_TIME_RANGE", LEVEL0, OPT_KEY, TEXT_KEY, "", "", NO_HELP },
		{ NEW_USE_FLAG_FIELD, "NEW_USE_FLAG_FIELD", LEVEL1, OPT_KEY, TEXT_KEY, "", "", NO_HELP },
		{ LINK_USE_FLAG_TYPES, "LINK_USE_FLAG_TYPES", LEVEL1, OPT_KEY, TEXT_KEY, "", "", NO_HELP },
		{ SUBZONE_ZONE_FACTOR_FILE, "SUBZONE_ZONE_FACTOR_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_SUBZONE_FIELD, "NEW_SUBZONE_FIELD", LEVEL1, OPT_KEY, TEXT_KEY, "", "NAME, INTEGER, 10", NO_HELP },
		{ MAX_SUBZONE_DISTANCE, "MAX_SUBZONE_DISTANCE", LEVEL1, OPT_KEY, INT_KEY, "1000 meters", "0, 10..10000 meters", NO_HELP },
		{ SUBZONE_DATA_FILE, "SUBZONE_DATA_FILE", LEVEL1, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ SUBZONE_DATA_FORMAT, "SUBZONE_DATA_FORMAT", LEVEL1, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP  },
		{ SUBZONE_DATA_FIELD, "SUBZONE_DATA_FIELD", LEVEL1, OPT_KEY, TEXT_KEY, "", "", NO_HELP },
		{ SUBZONE_ZONE_FIELD, "SUBZONE_ZONE_FIELD", LEVEL1, OPT_KEY, TEXT_KEY, "", "", NO_HELP },
		{ NEW_LOCATION_FIELD, "NEW_LOCATION_FIELD", LEVEL1, OPT_KEY, TEXT_KEY, "", "NAME, INTEGER, 10", NO_HELP },
		{ CONVERSION_SCRIPT, "CONVERSION_SCRIPT", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ DATA_FILE, "DATA_FILE", LEVEL1, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ DATA_FORMAT, "DATA_FORMAT", LEVEL1, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP  },
		{ DATA_JOIN_FIELD, "DATA_JOIN_FIELD", LEVEL1, OPT_KEY, TEXT_KEY, "", "", NO_HELP },
		{ LOCATION_JOIN_FIELD, "LOCATION_JOIN_FIELD", LEVEL1, OPT_KEY, TEXT_KEY, "", "", NO_HELP },
		{ BOUNDARY_POLYGON_FILE, "BOUNDARY_POLYGON_FILE", LEVEL1, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_ZONE_LOCATION_MAP_FILE, "NEW_ZONE_LOCATION_MAP_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ MINIMUM_ZONE_LOCATIONS, "MINIMUM_ZONE_LOCATIONS", LEVEL0, OPT_KEY, INT_KEY, "4", "2..20", NO_HELP },
		{ ZONE_BOUNDARY_FILE, "ZONE_BOUNDARY_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ ZONE_FIELD_NAME, "ZONE_FIELD_NAME", LEVEL0, OPT_KEY, TEXT_KEY, "", "", NO_HELP },
		{ ZONE_UPDATE_RANGE, "ZONE_UPDATE_RANGE", LEVEL0, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP },
		END_CONTROL
	};
	const char *reports [] = {
		"CONVERSION_SCRIPT",
		"CONVERSION_STACK",
		"CHECK_ZONE_COVERAGE",
		""
	};
	Required_System_Files (required_files);
	Optional_System_Files (optional_files);
	File_Service_Keys (file_service_keys);

	Key_List (locationdata_keys);
	Report_List (reports);
	Location_XY_Flag (true);

	projection.Add_Keys ();

	copy_flag = false;
	walk_access_flag = walk_time_flag = false;
	walk_access_field = 0;
	walk_distance = 1000;

	num_data_files = 0;
	data_flag = false;

	zone_file_flag = subzone_map_flag = subzone_flag = false;
	num_subzone = 0;
	script_flag = zone_file_flag = range_flag = false;

	use_flag = false;

	boundary_flag = coverage_flag = zone_loc_flag = false;
	zone_field = 0;
	min_locations = 4;

	num_polygons = 0;
	polygon_flag = false;
}
Exemplo n.º 7
0
PlanCompare::PlanCompare (void) : Data_Service (), Select_Service ()
{
	Program ("PlanCompare");
	Version (3);
	Title ("Travel Plan Comparison Utility");

	System_File_Type required_files [] = {
		PLAN, END_FILE
	};
	System_File_Type optional_files [] = {
		SELECTION, NEW_SELECTION, NEW_PLAN, END_FILE
	};
	int data_service_keys [] = {
		DAILY_WRAP_FLAG, SUMMARY_TIME_RANGES, SUMMARY_TIME_INCREMENT, PERIOD_CONTROL_POINT, 0
	};
	int select_service_keys [] = {
		SELECT_HOUSEHOLDS, SELECT_MODES, SELECT_PURPOSES, SELECT_START_TIMES, SELECT_END_TIMES, 
		SELECT_ORIGINS, SELECT_DESTINATIONS, SELECT_VEHICLE_TYPES, SELECT_TRAVELER_TYPES, 
		SELECT_LINKS, SELECT_NODES, SELECT_SUBAREAS, SELECTION_POLYGON, 
		PERCENT_TIME_DIFFERENCE, MINIMUM_TIME_DIFFERENCE, MAXIMUM_TIME_DIFFERENCE, 
		PERCENT_COST_DIFFERENCE, MINIMUM_COST_DIFFERENCE, MAXIMUM_COST_DIFFERENCE, 
		PERCENT_PATH_DIFFERENCE, MINIMUM_PATH_DIFFERENCE, MAXIMUM_PATH_DIFFERENCE, 
		SELECTION_PERCENTAGE, MAXIMUM_PERCENT_SELECTED, 
		DELETION_FILE, DELETION_FORMAT, DELETE_HOUSEHOLDS, DELETE_MODES, DELETE_TRAVELER_TYPES, 0
	};
	Control_Key keys [] = { //--- code, key, level, status, type, default, range, help ----
		{ COMPARE_PLAN_FILE, "COMPARE_PLAN_FILE", LEVEL0, REQ_KEY, IN_KEY, "", PARTITION_RANGE, NO_HELP },
		{ COMPARE_PLAN_FORMAT, "COMPARE_PLAN_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ COMPARE_GENERALIZED_COSTS, "COMPARE_GENERALIZED_COSTS", LEVEL0, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		{ SELECTION_METHOD, "SELECTION_METHOD", LEVEL0, OPT_KEY, TEXT_KEY, "RANDOM", SELECT_METHOD_RANGE, NO_HELP },
		{ MERGE_PLAN_FILES, "MERGE_PLAN_FILES", LEVEL0, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		{ TIME_DISTRIBUTION_MINIMUM, "TIME_DISTRIBUTION_MINIMUM", LEVEL0, OPT_KEY, TIME_KEY, "-60 minutes", "-360..0", NO_HELP },
		{ TIME_DISTRIBUTION_COUNT, "TIME_DISTRIBUTION_COUNT", LEVEL0, OPT_KEY, INT_KEY, "151", "50..500", NO_HELP },
		{ TIME_DISTRIBUTION_INCREMENT, "TIME_DISTRIBUTION_INCREMENT", LEVEL0, OPT_KEY, TIME_KEY, "1 minute", "1..60 minutes", NO_HELP },
		{ COST_DISTRIBUTION_MINIMUM, "COST_DISTRIBUTION_MINIMUM", LEVEL0, OPT_KEY, INT_KEY, "-360 impedance", "-360..0 impedance", NO_HELP },
		{ COST_DISTRIBUTION_COUNT, "COST_DISTRIBUTION_COUNT", LEVEL0, OPT_KEY, INT_KEY, "151", "50..500", NO_HELP },
		{ COST_DISTRIBUTION_INCREMENT, "COST_DISTRIBUTION_INCREMENT", LEVEL0, OPT_KEY, INT_KEY, "5 impedance", "1..500", NO_HELP },
		{ NEW_TIME_DISTRIBUTION_FILE, "NEW_TIME_DISTRIBUTION_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_COST_DISTRIBUTION_FILE, "NEW_COST_DISTRIBUTION_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_TRIP_TIME_GAP_FILE, "NEW_TRIP_TIME_GAP_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_TRIP_COST_GAP_FILE, "NEW_TRIP_COST_GAP_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_TRIP_MATCH_FILE, "NEW_TRIP_MATCH_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", PARTITION_RANGE, NO_HELP },
		{ NEW_TRIP_MATCH_FORMAT, "NEW_TRIP_MATCH_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		END_CONTROL
	};
	const char *reports [] = {
		"TOTAL_TIME_DISTRIBUTION",
		"PERIOD_TIME_DISTRIBUTIONS",
		"TOTAL_TIME_SUMMARY",
		"PERIOD_TIME_SUMMARY",
		"TOTAL_COST_DISTRIBUTION",
		"PERIOD_COST_DISTRIBUTIONS",
		"TOTAL_COST_SUMMARY",
		"PERIOD_COST_SUMMARY",
		"TRIP_TIME_GAP_REPORT",
		"TRIP_COST_GAP_REPORT",
		""
	};
	Required_System_Files (required_files);
	Optional_System_Files (optional_files);
	Data_Service_Keys (data_service_keys);
	Select_Service_Keys (select_service_keys);

	Key_List (keys);
	Report_List (reports);
	Enable_Partitions (true);

#ifdef THREADS
	Enable_Threads (true);
#endif
#ifdef MPI_EXE
	Enable_MPI (true);
#endif

	select_flag = cost_flag = time_sum_flag = cost_sum_flag = time_gap_flag = cost_gap_flag = merge_flag = false;
	select_parts = time_sort = match_flag = false;
	method = RANDOM_METHOD;
	num_trips = num_select = 0;

	cost_diff.Cost_Flag (true);
	cost_gap.Cost_Flag (true);

	System_Read_False (PLAN);
	System_Data_Reserve (PLAN, 0);
}
Exemplo n.º 8
0
Router::Router (void) : Demand_Service (), Problem_Service ()
{
	Program ("Router");
	Version ("4.0.71");
	Title ("Network Path Builder");

	Network_File required_network [] = {
		NODE, LINK, LANE_CONNECTIVITY, PARKING, ACTIVITY_LOCATION, PROCESS_LINK, END_NETWORK
	};
	Network_File optional_network [] = {
		DIRECTORY, LANE_USE, TOLL, TURN_PROHIBITION, 
		TRANSIT_STOP, TRANSIT_FARE, TRANSIT_ROUTE, TRANSIT_SCHEDULE, 
		END_NETWORK
	};
	Demand_File optional_demand [] = {
		HOUSEHOLD, TRIP, ACTIVITY, LINK_DELAY, VEHICLE, VEHICLE_TYPE, END_DEMAND
	};

	char *keys [] = {
		HOUSEHOLD_LIST,
		HOUSEHOLD_RECORD_FILE,
		PARKING_PENALTY_FILE,
		TRANSIT_PENALTY_FILE,
		TIME_OF_DAY_FORMAT,
		PLAN_FILE,
		PLAN_FORMAT,
		NEW_PLAN_FILE,
		NEW_PLAN_FORMAT,
		NODE_LIST_PATHS,
		ROUTE_SELECTED_MODES,
		ROUTE_SELECTED_PURPOSES,
		ROUTE_WITH_SPECIFIED_MODE,
		ROUTE_FROM_SPECIFIED_LOCATIONS,
		ROUTE_TO_SPECIFIED_LOCATIONS,
		ROUTE_AT_SPECIFIED_TIMES,
		ROUTE_BY_TIME_INCREMENT,
		UPDATE_PLAN_RECORDS,
		PRINT_UPDATE_WARNINGS,
		IGNORE_VEHICLE_ID,
		LIMIT_PARKING_ACCESS,
		WALK_PATH_DETAILS,
		ADJUST_ACTIVITY_SCHEDULE,
		IGNORE_ACTIVITY_DURATIONS,
		IGNORE_TIME_CONSTRAINTS,
		END_TIME_CONSTRAINT,
		IGNORE_ROUTING_PROBLEMS,
		INTERPOLATE_LINK_DELAYS,
		PERCENT_RANDOM_IMPEDANCE,
		RANDOM_NUMBER_SEED,
		HOUSEHOLD_TYPE_SCRIPT,
		WALK_SPEED,
		BICYCLE_SPEED,
		WALK_TIME_VALUE,
		BICYCLE_TIME_VALUE,
		FIRST_WAIT_VALUE,
		TRANSFER_WAIT_VALUE,
		VEHICLE_TIME_VALUE,
		DISTANCE_VALUE,
		COST_VALUE,
		LEFT_TURN_PENALTY,
		RIGHT_TURN_PENALTY,
		U_TURN_PENALTY,
		TRANSFER_PENALTY,
		STOP_WAITING_PENALTY,
		STATION_WAITING_PENALTY,
		BUS_BIAS_FACTOR,
		BUS_BIAS_CONSTANT,
		RAIL_BIAS_FACTOR,
		RAIL_BIAS_CONSTANT,
		MAX_WALK_DISTANCE,
		MAX_BICYCLE_DISTANCE,
		MAX_WAIT_TIME,
		MIN_WAIT_TIME,
		MAX_NUMBER_OF_TRANSFERS,
		MAX_NUMBER_OF_PATHS,
		MAX_PARK_RIDE_PERCENTAGE,
		MAX_KISS_RIDE_PERCENTAGE,
		KISS_RIDE_TIME_FACTOR,
		KISS_RIDE_STOP_TYPES,
		MAX_KISS_RIDE_DROPOFF_WALK,
		MAX_LEGS_PER_PATH,
		ADD_WAIT_TO_TRANSIT_LEG,
		FARE_CLASS_DISTRIBUTION,
		PARKING_HOURS_BY_PURPOSE,
		LOCAL_ACCESS_DISTANCE,
		LOCAL_FACILITY_TYPE,
		MAX_CIRCUITY_RATIO,
		MIN_CIRCUITY_DISTANCE,
		MAX_CIRCUITY_DISTANCE,
		MAX_LINK_DELAY_ERRORS,
		LINK_DELAY_UPDATE_RATE,
		LINK_DELAY_VOL_FACTOR,
		LINK_DELAY_START_TIME,
		LINK_DELAY_END_TIME,
		EQUATION_PARAMETERS_x,
		NEW_PROBLEM_FILE,
		NEW_PROBLEM_FORMAT,
		MAX_ROUTING_PROBLEMS,
		ARCVIEW_PROBLEM_DUMP,
		PROBLEM_DUMP_TYPE,
		PERCENT_PROBLEMS_DUMPED,
		NEW_PATH_ATTRIBUTE_FILE,
		NULL
	};

	char *reports [] = {
		"HOUSEHOLD_TYPE_SCRIPT",
		"HOUSEHOLD_TYPE_STACK",
		"FARE_DATA_REPORT",
		NULL
	};
	Required_Network_Files (required_network);
	Optional_Network_Files (optional_network);
	Optional_Demand_Files (optional_demand);

	Key_List (keys);
	Report_List (reports);
	Enable_Partitions (true);

	Check_Data (true);
	Renumber (true);
	Max_Problems (100000);

	nhh_list = nhh_proc = nrecord = nprocess = ntrips = num_trips = update_rate = nupdates = 0;
	random_imped = max_tod = new_mode = nmagic = ntransit = nroute = tot_trips = 0;
	last_traveler = last_trip = last_time = last_xfer = last_wait = last_acc = 0;
	nlegs = nlegs_transit = nlegs_auto = 0;
	vol_factor = 1;

	limit_access = node_flag = true;
	purpose_flag = ignore_veh_flag = reset_veh_flag = stop_imp_flag = skim_flag = warn_flag = false;
	walk_net = bike_net = drive_net = loc_net = transit_net = fare_flag = wait_leg_flag = false;
	hhlist_flag = hhold_flag = hhrec_flag = trip_flag = ignore_time = update_flag = tod_flag = false;
	random_flag = walk_flag = bike_flag = walk_detail = walk_active = local_flag = false;
	save_plans = problem_flag = ignore_errors = delay_flag = zero_flag = old_plan_flag = false;
	mode_flag = park_ride_flag = distance_flag = wait_flag = toll_flag = turn_flag = false;
	time_flag = dist_flag = length_flag = wait_time_flag = use_flag = dump_flag = veh_flag = false;
	activity_flag = select_od = select_org = select_des = select_time = park_imp_flag = false;
	rail_bias_flag = bus_bias_flag = park_hours_flag = fare_class_flag = sel_dump_flag = false;
	attribute_flag = interpolate_flag = adjust_flag = duration_flag = false;

	first_ptr = last_ptr = NULL;

	walk_speed = 1.0;
	bike_speed = 4.0;

	value_walk = 20;
	value_bike = 15;
	value_wait = 20;
	value_xfer = 20;
	value_time = 10;
	value_distance = 0;
	value_cost = 0;

	value_roll = 3;		//---- 1/8 resolution ----
	value_round = (1 << (value_roll-1));

	offset_roll = 11;	//---- 1/2048 resolution ----
	offset_round = (1 << (offset_roll-1));
	
	time_period = 900;		//---- 15 minutes ----

	max_walk = 2000;
	max_bike = 10000;
	max_wait = 60;
	min_wait = 0;
	max_transfers = 3;
	max_paths = 4;
	max_parkride = 50;
	max_kissride = 35;
	kissride_factor = 250;
	kissride_walk = 100;
	rail_bias = 100;
	rail_constant = 0;
	bus_bias = 100;
	bus_constant = 0;
	park_hours = 0;

	xfer_imped = 0;
	stop_imped = 0;
	station_imped = 0;
	left_imped = 0;
	right_imped = 0;
	uturn_imped = 0;
	traveler_class = CASH;

	local_type = EXTERNAL;
	local_distance = 2000;

	end_time = 0;			//---- 0 minutes ----
	leg_check = 1000;
	min_distance = 2000;
	max_distance = 20000;
	max_ratio = 0;

	dump_type = 0;
	percent_dump = Round (100);
		
	memset (&attribute_data, '\0', sizeof (attribute_data));

	default_vehicle.ID (1);
	default_vehicle.Type (CAR);
	default_vehicle.Sub_Type (0);
	default_vehicle.Passengers (0);
	default_vehicle.Household (1);
	default_vehicle.Location (1);
}
Exemplo n.º 9
0
PlanCompare::PlanCompare (void) : Demand_Service ()
{
	Program ("PlanCompare");
	Version ("4.0.50");
	Title ("Compare Two Plan Files");

	Network_File optional_network [] = {
		DIRECTORY, ACTIVITY_LOCATION, END_NETWORK
	};
	char *keys [] = {
		INPUT_PLAN_FILE,
		INPUT_PLAN_FORMAT,
		INPUT_TRIP_FILE,
		COMPARE_PLAN_FILE,
		COMPARE_PLAN_FORMAT,
		COMPARE_LOCATION_FILE,
		COMPARE_TRIP_FILE,
		OUTPUT_PLAN_FILE,
		OUTPUT_PLAN_FORMAT,
		NODE_LIST_PATHS,
		HOUSEHOLD_LIST,
		SELECT_TRAVELERS,
		SELECT_TRIP_MODES,
		IGNORE_LOCATION_DIFFERENCES,
		INDEX_BY_COMPARE_LOCATION,
		ONLY_COMPARE_DRIVE_LEGS,
		COMPARE_GENERALIZED_COSTS,
		PERCENT_TIME_DIFFERENCE,
		MINIMUM_TIME_DIFFERENCE,
		MAXIMUM_TIME_DIFFERENCE,
		PERCENT_PATH_DIFFERENCE,
		MINIMUM_PATH_DIFFERENCE,
		MAXIMUM_PATH_DIFFERENCE,
		SELECTION_PERCENTAGE,
		MAXIMUM_PERCENT_SELECTED,
		SELECT_BY_PERCENT_DIFFERENCE,
		SELECT_BY_RELATIVE_GAP,
		SELECT_TIME_PERIODS,
		RANDOM_NUMBER_SEED,
		TIME_OF_DAY_FORMAT,
		SUMMARY_TIME_PERIODS,
		SUMMARY_TIME_INCREMENT,
		PERIOD_CONTROL_POINT,
		HIGHEST_MATCH_DIFFERENCE,
		LOWEST_MATCH_DIFFERENCE,
		NEW_DISTRIBUTION_FILE,
		NEW_COST_DISTRIBUTION_FILE,
		NEW_MODE_DISTRIBUTION_FILE,
		NEW_MODE_DISTRIBUTION_DATA_FILE,
		NEW_DIFFERENCE_FILE,
		NEW_START_DIFFERENCE_FILE,
		NEW_END_DIFFERENCE_FILE,
		NEW_TRIP_TIME_FILE,
		NEW_TRAVELER_MATCH_FILE,
		NEW_INCOMPLETE_TRIP_FILE,
		NEW_PERIOD_DIFFERENCE_FILE,
		NULL
	};

	char *reports [] = {
		"PERCENT_PATH_CHANGE",
		"PERCENT_TRAVEL_TIME_CHANGE",
		"PERCENT_GENERALIZED_COST_CHANGE",
		"DUMP_PATH_CHANGES_GREATER_THAN_*",
		"DUMP_TRAVEL_TIME_CHANGES_GREATER_THAN_*",
		"DUMP_COST_CHANGES_GREATER_THAN_*", 
		"TOTAL_DIFFERENCE_DISTRIBUTION",
		"TIME_DIFFERENCE_DISTRIBUTIONS",
		"TIME_PERIOD_SUMMARY",
		"GENERALIZED_COST_DISTRIBUTION",
		"COST_DIFFERENCE_DISTRIBUTIONS",
		"COST_PERIOD_SUMMARY",
		"TRIP_GAP_REPORT",
		NULL
	};
	
	Optional_Network_Files (optional_network);

	Key_List (keys);
	Report_List (reports);
	Enable_Partitions (true);

	num_matched = num_complete = num_drive = num_compared = num_equal = in_only = compare_only = num_bad = period_point = 0;

	output_flag = select_flag = diff_flag = hhlist_flag = distrib_flag = time_flag = false;
	path_diff_flag = diff_file_flag = period_flag = trip_flag = ignore_flag = drive_flag = false;
	cost_flag = cost_data_flag = cost_distrib_flag = gap_flag = traveler_flag = gap_data_flag = false;
	start_flag = end_flag = loc_flag = match_out_flag = incomplete_flag = compare_loc_flag = false;
	mode_flag = mode_file_flag = drive_access_flag = mode_data_flag = period_diff_flag = false;

	select_trips.Initialize (sizeof (Select_Trips), 2);
	travel_diff.Initialize (sizeof (Travel_Diff), 3);
	start_diff.Initialize (sizeof (Location_Diff), 2);
	end_diff.Initialize (sizeof (Location_Diff), 2);
	period_diff.Initialize (sizeof (Period_Diff), 10);

	nsel = nout = 0;
	tot_select = 0.0;
	tot_diff = 0.0;
	abs_diff = 0.0;
	tot_base = 0.0;
	sig_diff = 0.0;
	sig_tot = 0.0;
	min_diff = 0;
	max_diff = 0;

	max_time = 60;
	min_time = 1;

	min_path = 0;
	max_path = 100000;

	path_diff = 0.0;
	percent = 100.0;
	max_percent = 100.0;
	percent_diff = 10.0;
	high_diff = MAX_INTEGER;
	low_diff = -MAX_INTEGER;

	time_diff.Report_Numbers (TOTAL_DISTRIB, TTIME_DISTRIB, PERIOD_SUM);
	cost_diff.Report_Numbers (TCOST_DISTRIB, COST_DISTRIB, COST_SUM);
	cost_diff.Generalized_Cost (true);

	change_text [PATH_CHANGE] = "Path";
	change_text [TIME_CHANGE] = "Travel Time";
	change_text [COST_CHANGE] = "Generalized Cost";
}
Exemplo n.º 10
0
LineSum::LineSum (void) : Execution_Service ()
{
	Program ("LineSum");
	Version (17);
	Title ("Transit Ridership Summary");

	Control_Key keys [] = { //--- code, key, level, status, type, default, range, help ----
		{ PEAK_RIDERSHIP_FILE, "PEAK_RIDERSHIP_FILE", LEVEL1, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ PEAK_RIDERSHIP_FORMAT, "PEAK_RIDERSHIP_FORMAT", LEVEL1, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ OFFPEAK_RIDERSHIP_FILE, "OFFPEAK_RIDERSHIP_FILE", LEVEL1, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ OFFPEAK_RIDERSHIP_FORMAT, "OFFPEAK_RIDERSHIP_FORMAT", LEVEL1, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ NEW_PEAK_RIDERSHIP_FILE, "NEW_PEAK_RIDERSHIP_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_PEAK_RIDERSHIP_FORMAT, "NEW_PEAK_RIDERSHIP_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ NEW_OFFPEAK_RIDERSHIP_FILE, "NEW_OFFPEAK_RIDERSHIP_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_OFFPEAK_RIDERSHIP_FORMAT, "NEW_OFFPEAK_RIDERSHIP_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ NEW_TOTAL_RIDERSHIP_FILE, "NEW_TOTAL_RIDERSHIP_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_TOTAL_RIDERSHIP_FORMAT, "NEW_TOTAL_RIDERSHIP_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ STOP_NAME_FILE, "STOP_NAME_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ STOP_NAME_FORMAT, "STOP_NAME_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ LINE_REPORT_TITLE, "LINE_REPORT_TITLE", LEVEL1, OPT_KEY, TEXT_KEY, "Line Report", "Report Title", NO_HELP },
		{ LINE_REPORT_LINES, "LINE_REPORT_LINES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", NAME_RANGE, NO_HELP }, 
		{ LINE_REPORT_MODES, "LINE_REPORT_MODES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP }, 
		{ LINE_REPORT_ALL_NODES, "LINE_REPORT_ALL_NODES", LEVEL1, OPT_KEY, BOOL_KEY, "False", BOOL_RANGE, NO_HELP },
		{ LINK_REPORT_TITLE, "LINK_REPORT_TITLE", LEVEL1, OPT_KEY, TEXT_KEY, "Link Report", "Report Title", NO_HELP },
		{ LINK_REPORT_LINKS, "LINK_REPORT_LINKS", LEVEL1, OPT_KEY, LIST_KEY, "", "e.g., 100-200, 300-400-500", NO_HELP }, 
		{ LINK_REPORT_MODES, "LINK_REPORT_MODES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP }, 
		{ LINK_REPORT_LINES, "LINK_REPORT_LINES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", NAME_RANGE, NO_HELP }, 
		{ LINK_REPORT_ONEWAY, "LINK_REPORT_ONEWAY", LEVEL1, OPT_KEY, BOOL_KEY, "False", BOOL_RANGE, NO_HELP }, 
		{ ON_OFF_REPORT_TITLE, "ON_OFF_REPORT_TITLE", LEVEL1, OPT_KEY, TEXT_KEY, "Boarding Report", "Report Title", NO_HELP },
		{ ON_OFF_REPORT_STOPS, "ON_OFF_REPORT_STOPS", LEVEL1, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP }, 
		{ ON_OFF_REPORT_MODES, "ON_OFF_REPORT_MODES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP }, 
		{ ON_OFF_REPORT_DETAILS, "ON_OFF_REPORT_DETAILS", LEVEL1, OPT_KEY, BOOL_KEY, "False", "TRUE/FALSE/MODE, YES/NO/MODE, 1/0/2, T/F/M, Y/N/M", NO_HELP }, 
		{ NEW_ON_OFF_REPORT_FILE, "NEW_ON_OFF_REPORT_FILE", LEVEL1, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_ON_OFF_REPORT_FORMAT, "NEW_ON_OFF_REPORT_FORMAT", LEVEL1, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ ACCESS_REPORT_TITLE, "ACCESS_REPORT_TITLE", LEVEL1, OPT_KEY, TEXT_KEY, "Access Report", "Report Title", NO_HELP },
		{ ACCESS_REPORT_STOPS, "ACCESS_REPORT_STOPS", LEVEL1, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP }, 
		{ ACCESS_REPORT_MODES, "ACCESS_REPORT_MODES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP }, 
		{ ACCESS_REPORT_DETAILS, "ACCESS_REPORT_DETAILS", LEVEL1, OPT_KEY, BOOL_KEY, "False", "TRUE/FALSE/MODE, YES/NO/MODE, 1/0/2, T/F/M, Y/N/M", NO_HELP }, 
		{ NEW_ACCESS_REPORT_FILE, "NEW_ACCESS_REPORT_FILE", LEVEL1, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_ACCESS_REPORT_FORMAT, "NEW_ACCESS_REPORT_FORMAT", LEVEL1, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ STOP_REPORT_TITLE, "STOP_REPORT_TITLE", LEVEL1, OPT_KEY, TEXT_KEY, "Stop Report", "Report Title", NO_HELP },
		{ STOP_REPORT_STOPS, "STOP_REPORT_STOPS", LEVEL1, OPT_KEY, LIST_KEY, "", RANGE_RANGE, NO_HELP }, 
		{ STOP_REPORT_MODES, "STOP_REPORT_MODES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP }, 
		{ STOP_REPORT_LINES, "STOP_REPORT_LINES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", NAME_RANGE, NO_HELP }, 
		{ STOP_REPORT_TRANSFERS, "STOP_REPORT_TRANSFERS", LEVEL1, OPT_KEY, LIST_KEY, "NONE", RANGE_RANGE, NO_HELP }, 
		{ TOTAL_REPORT_TITLE, "TOTAL_REPORT_TITLE", LEVEL1, OPT_KEY, TEXT_KEY, "Total Report", "Report Title", NO_HELP },
		{ TOTAL_REPORT_LINES, "TOTAL_REPORT_LINES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", "e.g., LINE1, LINE2, LINE1..LINE10", NO_HELP }, 
		{ TOTAL_REPORT_MODES, "TOTAL_REPORT_MODES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP }, 
		{ NEW_TOTAL_REPORT_FILE, "NEW_TOTAL_REPORT_FILE", LEVEL1, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_TOTAL_REPORT_FORMAT, "NEW_TOTAL_REPORT_FORMAT", LEVEL1, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ NEW_LINK_RIDER_FILE, "NEW_LINK_RIDER_FILE", LEVEL1, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_LINK_RIDER_FORMAT, "NEW_LINK_RIDER_FORMAT", LEVEL1, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ LINK_RIDER_MODES, "LINK_RIDER_MODES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP }, 
		{ LINK_RIDER_LINES, "LINK_RIDER_LINES", LEVEL1, OPT_KEY, LIST_KEY, "ALL", NAME_RANGE, NO_HELP }, 
		{ LINK_RIDER_PEAK_HOURS, "LINK_RIDER_PEAK_HOURS", LEVEL1, OPT_KEY, TIME_KEY, "6.0 hours", "1.0..10.0 hours", NO_HELP }, 
		{ LINK_RIDER_PEAK_FACTOR, "LINK_RIDER_PEAK_FACTOR", LEVEL1, OPT_KEY, FLOAT_KEY, "1.0", "1.0..1.5", NO_HELP }, 
		{ LINK_RIDER_PEAK_CAPACITY, "LINK_RIDER_PEAK_CAPACITY", LEVEL1, OPT_KEY, FLOAT_KEY, "1.0", "1.0..1000.0", NO_HELP }, 
		{ LINK_RIDER_OFFPEAK_HOURS, "LINK_RIDER_OFFPEAK_HOURS", LEVEL1, OPT_KEY, TIME_KEY, "10.0 hours", "1.0..20.0 hours", NO_HELP }, 
		{ LINK_RIDER_XY_FILE, "LINK_RIDER_XY_FILE", LEVEL1, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ LINK_RIDER_XY_FORMAT, "LINK_RIDER_XY_FORMAT", LEVEL1, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ LINK_RIDER_SIDE_OFFSET, "LINK_RIDER_SIDE_OFFSET", LEVEL1, OPT_KEY, FLOAT_KEY, "0.0 feet", "0.0..1000 feet", NO_HELP },
		{ LINK_SHAPE_FILE, "LINK_SHAPE_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ LINK_SHAPE_ANODE, "LINK_SHAPE_ANODE", LEVEL0, OPT_KEY, TEXT_KEY, "ANODE", "", NO_HELP },
		{ LINK_SHAPE_BNODE, "LINK_SHAPE_BNODE", LEVEL0, OPT_KEY, TEXT_KEY, "BNODE", "", NO_HELP },
		{ SERVICE_FILE, "SERVICE_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ SERVICE_FORMAT, "SERVICE_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ SERVICE_LINE_FIELD, "SERVICE_LINE_FIELD", LEVEL0, OPT_KEY, TEXT_KEY, "LINE", "", NO_HELP },
		{ SERVICE_PEAK_FIELD, "SERVICE_PEAK_FIELD", LEVEL0, OPT_KEY, TEXT_KEY, "PEAK", "", NO_HELP },
		{ SERVICE_OFFPEAK_FIELD, "SERVICE_OFFPEAK_FIELD", LEVEL0, OPT_KEY, TEXT_KEY, "OFFPEAK", "", NO_HELP },
		{ BASE_ROUTE_FILE, "BASE_ROUTE_FILE", LEVEL1, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ BASE_ROUTE_FORMAT, "BASE_ROUTE_FORMAT", LEVEL1, OPT_KEY, TEXT_KEY, "DBASE", FORMAT_RANGE, FORMAT_HELP },
		{ ALTERNATIVE_ROUTE_FILE, "ALTERNATIVE_ROUTE_FILE", LEVEL1, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ ALTERNATIVE_ROUTE_FORMAT, "ALTERNATIVE_ROUTE_FORMAT", LEVEL1, OPT_KEY, TEXT_KEY, "DBASE", FORMAT_RANGE, FORMAT_HELP },
		END_CONTROL
	};
	const char *reports [] = {
		"LINE_REPORT",
		"LINK_REPORT",
		"ON_OFF_REPORT",
		"ACCESS_REPORT",
		"STOP_REPORT",
		"TOTAL_REPORT",
		"DIFFERENCE_REPORT",
		""
	};
	Key_List (keys);
	Report_List (reports);

	projection.Add_Keys ();

	on_off_flag = access_flag = station_flag = shape_flag = service_flag = false;
	anode_field = bnode_field = line_fld = peak_fld = offpeak_fld = -1;
	report_code = 0;

	Page_Size (172, 65);

	int ignore_keys [] = {
		TIME_OF_DAY_FORMAT, MODEL_START_TIME, MODEL_END_TIME, MODEL_TIME_INCREMENT, UNITS_OF_MEASURE, 
		RANDOM_NUMBER_SEED,	MAX_WARNING_MESSAGES, MAX_WARNING_EXIT_FLAG, MAX_PROBLEM_COUNT, NUMBER_OF_THREADS, 0
	};
	Ignore_Keys (ignore_keys);
}
Exemplo n.º 11
0
PlanSum::PlanSum (void) : Demand_Service ()
{
	Program ("PlanSum");
	Version ("4.0.59");
	Title ("Summarize Plan File Demand");

	Network_File optional_network [] = {
		DIRECTORY, LINK, NODE, LANE_USE, PARKING, ACTIVITY_LOCATION, PROCESS_LINK,
		LANE_CONNECTIVITY, TRANSIT_STOP, TRANSIT_ROUTE, TRANSIT_SCHEDULE, 
		TRANSIT_DRIVER, END_NETWORK
	};
	Demand_File optional_demand [] = {
		LINK_DELAY, VEHICLE_TYPE, NEW_LINK_DELAY, NEW_RIDERSHIP, END_DEMAND
	};

	char *keys [] = {
		PLAN_FILE,
		PLAN_FORMAT,
		NODE_LIST_PATHS,
		HOUSEHOLD_LIST,
		HOUSEHOLD_PERSON_COUNT,
		SUMMARY_TIME_PERIODS,
		SUMMARY_TIME_INCREMENT,
		NEW_PLAN_FILE,
		NEW_LINK_VOLUME_FILE,
		NEW_LINK_VOLUME_FORMAT,
		KEEP_INPUT_TRAVEL_TIMES,
		EQUATION_PARAMETERS_x,
		LINK_EQUIVALENCE_FILE,
		NEW_TRIP_TIME_FILE,
		NEW_ZONE_SKIM_FILE,
		NEW_ZONE_SKIM_FORMAT,
		SKIM_MODE_SELECTION,
		SKIM_TOTAL_TIME,
		SKIM_TRIP_LENGTH,
		SKIM_TIME_CONTROL_POINT,
		NEAREST_NEIGHBOR_FACTOR,
		NEW_TRIP_TABLE_FILE,
		NEW_TRIP_TABLE_FORMAT,
		TRIP_MODE_SELECTION,
		ZONE_EQUIVALENCE_FILE,
		NEW_TURN_MOVEMENT_FILE,
		NEW_TURN_MOVEMENT_FORMAT,
		TURN_NODE_RANGE,
		STOP_EQUIVALENCE_FILE,
		OUTPUT_ALL_TRANSIT_STOPS,
		NULL
	};
	char *reports [] = {
		"TOP_100_V/C_RATIOS",
		"ALL_V/C_RATIOS_GREATER_THAN_*",
		"LINK_GROUP_V/C_RATIOS_*",
		"PRINT_LINK_EQUIVALENCIES",
		"PRINT_ZONE_EQUIVALENCIES",
		"PRINT_STOP_EQUIVALENCIES",
		"TRANSIT_RIDERSHIP_SUMMARY",
		"TRANSIT_STOP_SUMMARY",
		"TRANSIT_TRANSFER_SUMMARY",
		"TRANSIT_TRANSFER_DETAILS",
		"TRANSIT_STOP_GROUP_SUMMARY",
		"TRANSIT_PASSENGER_SUMMARY",
		"TRANSIT_LINK_GROUP_SUMMARY",
		"TRIP_TIME_REPORT",
		"TRAVEL_SUMMARY_REPORT",
		NULL
	};

	Optional_Network_Files (optional_network);
	Optional_Demand_Files (optional_demand);

	Key_List (keys);
	Report_List (reports);
	Enable_Partitions (true);

	AB_Key_Flag  (true);

	volume_flag = time_flag = skim_flag = trip_flag = zone_flag = transit_flag = passenger_flag = false;
	delay_in = delay_out = turn_flag = turn_delay = hhlist_flag = travel_flag = update_flag = false;
	time_skim_flag = xfer_flag = xfer_detail = neighbor_flag = length_flag = count_flag = stops_flag = false;
	type_flag = vc_flag = true;

	layer = 1;

	increment = 900;
	num_inc = 96;
	cap_factor = 0.25;
	neighbor_factor = 0.5;
	skim_point = 2;

	movement_data = NULL;
	node_range = NULL;
	boardings = NULL;

	max_rail = 0;
	xfer_label [0] = '\0';

	stop_array = (Stop_Array *) new Transfer_Array ();
}
Exemplo n.º 12
0
TripPrep::TripPrep (void) : Demand_Service ()
{
	Program ("TripPrep");
	Version ("4.0.10");
	Title ("Prepare Trip and Activity Files");

	Network_File optional_network [] = {
		DIRECTORY, ACTIVITY_LOCATION, PROCESS_LINK, END_NETWORK
	};
	Demand_File optional_demand [] = {
		TRIP, ACTIVITY, VEHICLE, NEW_TRIP, NEW_ACTIVITY, NEW_VEHICLE, END_DEMAND
	};

	char *keys [] = {
		HOUSEHOLD_LIST,
		MERGE_TRIP_FILE,
		MERGE_TRIP_FORMAT,
		MERGE_ACTIVITY_FILE,
		MERGE_ACTIVITY_FORMAT,
		MERGE_VEHICLE_FILE,
		MERGE_VEHICLE_FORMAT,
		TIME_OF_DAY_FORMAT,
		SELECT_HOUSEHOLDS,
		SELECT_TIME_PERIODS,
		SELECT_TRIP_MODES,
		SELECT_TRIP_PURPOSES,
		SELECT_ORIGIN_ZONES,
		SELECT_DESTINATION_ZONES,
		SELECT_ORIGIN_POLYGON,
		SELECT_DESTINATION_POLYGON,
		SELECT_PROBABILITY_FILE,
		SELECT_PROBABILITY_FORMAT,
		ZONE_EQUIVALENCE_FILE,
		TIME_PERIOD_EQUIVALENCE,
		SELECTION_PERCENTAGE,
		RANDOM_NUMBER_SEED,
		START_TIME_SHIFT,
		DATA_PROCESSING_SCRIPT,
		OUTPUT_ALL_RECORDS,
		CREATE_INDEPENDENT_TRIPS,
		NEW_HOUSEHOLD_LIST,
		STARTING_HOUSEHOLD_ID,
		STARTING_VEHICLE_ID,
		ZONE_TARGET_FILE,
		TARGET_HOUSEHOLD_RANGE,
		MOVE_ORIGIN_FILE,
		MOVE_DESTINATION_FILE,
		CONVERT_ACTIVITIES_TO_TRIPS,
		NULL
	};
	char *reports [] = {
		"PRINT_ZONE_EQUIVALENCIES",
		"TIME_PERIOD_EQUIVALENCE",
		"DATA_PROCESSING_SCRIPT",
		"DATA_PROCESSING_STACK",
		NULL
	};

	Optional_Network_Files (optional_network);
	Optional_Demand_Files (optional_demand);

	Key_List (keys);
	Report_List (reports);
	Enable_Partitions (true);

	trip_flag = activity_flag = purpose_flag = prob_flag = shift_flag = false;
	hhlist_flag = output_flag = vehicle_flag = all_flag = false;
	split_flag = zone_equiv_flag = synod_flag = script_flag = false;	
	select_org_flag = select_des_flag = org_zone_flag = des_zone_flag = false;
	location_flag = factor_flag = create_flag = newhh_flag = convert_flag = false;
	merge_trip_flag = merge_act_flag = merge_veh_flag = move_org_flag = move_des_flag = false;

	nzone = 0;
	first_veh = veh_count = NULL;
	next_veh = NULL;
	synod = NULL;
	org_target = des_target = org_total = des_total = NULL;
	probability = 1.0;
	shift_size = 0;

	total_in = total_out = total_used = total_hhold = 0;

	hhold_id = veh_id = 1;

	move_org_map.Initialize (2 * sizeof (int), 10);
	move_des_map.Initialize (2 * sizeof (int), 10);
	move_veh_map.Initialize (2 * sizeof (int), 10);
}
Exemplo n.º 13
0
Validate::Validate (void) : Data_Service ()
{
	Program ("Validate");
	Version (17);
	Title ("Compare Volumes to Counts");

	System_File_Type required_files [] = {
		NODE, LINK, END_FILE
	};
	System_File_Type optional_files [] = {
		ZONE, SHAPE, POCKET, CONNECTION, ACCESS_LINK, LOCATION, PARKING, LANE_USE, 
		SIGN, SIGNAL, TIMING_PLAN, PHASING_PLAN, DETECTOR, 
		TRANSIT_STOP, TRANSIT_ROUTE, TRANSIT_SCHEDULE, TRANSIT_DRIVER, VEHICLE_TYPE,
		TURN_PENALTY, PERFORMANCE, TURN_DELAY, RIDERSHIP, END_FILE
	};
	int file_service_keys [] = {
		NOTES_AND_NAME_FIELDS, SAVE_LANE_USE_FLOWS, LINK_EQUIVALENCE_FILE, ZONE_EQUIVALENCE_FILE, 
		STOP_EQUIVALENCE_FILE, LINE_EQUIVALENCE_FILE, 0
	};
	int data_service_keys [] = {
		DAILY_WRAP_FLAG, SUMMARY_TIME_RANGES, SUMMARY_TIME_INCREMENT, LINK_BEARING_WARNINGS, 0
	};
	Control_Key validate_keys [] = { //--- code, key, level, status, type, default, range, help ----
		{ INPUT_VOLUME_FILE, "INPUT_VOLUME_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ TRAFFIC_COUNT_FILE, "TRAFFIC_COUNT_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ TURN_VOLUME_FILE, "TURN_VOLUME_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ TURN_COUNT_FILE, "TURN_COUNT_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ LINE_GROUP_COUNT_FILE, "LINK_GROUP_COUNT_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP},
		{ STOP_GROUP_COUNT_FILE, "STOP_GROUP_COUNT_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_VOLUME_FILE, "NEW_VOLUME_FILE", LEVEL0, OPT_KEY,  OUT_KEY, "", FILE_RANGE, NO_HELP},
		{ NEW_VOLUME_COUNT_FILE, "NEW_VOLUME_COUNT_FILE", LEVEL0, OPT_KEY,  OUT_KEY, "", FILE_RANGE, NO_HELP},
		{ ANALYSIS_METHOD, "ANALYSIS_METHOD", LEVEL0, OPT_KEY, TEXT_KEY, "VOLUME", "VOLUME, VMT, VKT", NO_HELP },
		{ ENTRY_DATA_FLAG, "ENTRY_DATA_FLAG", LEVEL0, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		{ ADJUSTMENT_FACTOR, "ADJUSTMENT_FACTOR", LEVEL0, OPT_KEY, FLOAT_KEY, "1.0", "0.05..10.0", NO_HELP },
		{ FACILITY_TYPE_LABELS, "FACILITY_TYPE_LABELS", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP},
		{ AREA_TYPE_LABELS, "AREA_TYPE_LABELS", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ CHECK_NETWORK_FLAG, "CHECK_NETWORK_FLAG", LEVEL0, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		{ NEW_PROBLEM_NODE_FILE, "NEW_PROBLEM_NODE_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_PROBLEM_LINK_FILE, "NEW_PROBLEM_LINK_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_PROBLEM_COORDINATE_FILE, "NEW_PROBLEM_COORDINATE_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		END_CONTROL
	};
	const char *reports [] = {
		"VOLUME_LEVEL_SUMMARY",
		"FACILITY_TYPE_SUMMARY",
		"AREA_TYPE_SUMMARY",
		"ZONE_GROUP_SUMMARY",
		"ZONE_AT_FT_SUMMARY",
		"LINK_GROUP_SUMMARY",
		"LINK_GROUP_DETAILS",
		"TURN_MOVEMENT_SUMMARY",
		"TURN_LEVEL_OF_SERVICE",
		"ZONE_EQUIVALENCE",
		"LINK_EQUIVALENCE",
		"LINE_GROUP_SUMMARY",
		"STOP_GROUP_SUMMARY",
		"BOARDING_GROUP_SUMMARY",
		"ALIGHTING_GROUP_SUMMARY",
		"LINE_EQUIVALENCE",
		"STOP_EQUIVALENCE",
		""
	};
	Required_System_Files (required_files);
	Optional_System_Files (optional_files);
	File_Service_Keys (file_service_keys);
	Data_Service_Keys (data_service_keys);
	
	Sum_Flow_Flag (true);
	Key_List (validate_keys);
	Report_List (reports);

	Page_Size (120, 47);

	problem_node_flag = problem_link_flag = problem_coord_flag = cnt_dir_flag = false;
	delay_flag = link_flag = turn_flag = output_flag = zone_flag = method = entry_flag = false;
	line_flag = stop_flag = vc_flag = check_net_flag = false;
	factor = 1.0;
	hours = 1.0;

	compass.Set_Points (8);
	
	System_Read_False (PERFORMANCE);

	stats_format = "\n%25.25s %7d%10.0lf%10.0lf%9.0lf %7.1lf %7.0lf %6.1lf %7.0lf %6.1lf %6.3lf%6.2lf%6.2lf";
}
Exemplo n.º 14
0
ConvertTours::ConvertTours (void) : Demand_Service ()
{
	Program ("ConvertTours");
	Version ("4.0.15");
	Title ("Tour Data Conversion Utility");

	Network_File required_network [] = {
		ACTIVITY_LOCATION, PROCESS_LINK, END_NETWORK
	};

	Network_File optional_network [] = {
		DIRECTORY, LINK, ZONE, END_NETWORK
	};

	Demand_File required_demand [] = {
		NEW_TRIP, NEW_HOUSEHOLD, NEW_POPULATION, NEW_VEHICLE, END_DEMAND
	};

	Demand_File optional_demand [] = {
		TRIP, HOUSEHOLD, POPULATION, VEHICLE, VEHICLE_TYPE, END_DEMAND
	};

	char *keys [] = {
		TOUR_DATA_FILE,
		TOUR_DATA_FORMAT,
		TOUR_HOUSEHOLD_FIELD,
		TOUR_PERSON_FIELD,
		TOUR_NUMBER_FIELD,
		TOUR_PURPOSE_FIELD,
		TOUR_MODE_FIELD,
		TOUR_ORIGIN_FIELD,
		TOUR_DESTINATION_FIELD,
		TOUR_STOP_OUT_FIELD,
		TOUR_STOP_IN_FIELD,
		TOUR_START_FIELD,
		TOUR_RETURN_FIELD,
		TOUR_GROUP_FIELD,
		TOUR_GROUP_SCRIPT,
		HOUSEHOLD_LIST,
		STARTING_HOUSEHOLD_ID,
		STARTING_VEHICLE_ID,
		TIME_OF_DAY_FORMAT,
		ADDITIONAL_TRAVEL_TIME,
		ZONE_LOCATION_MAP_FILE,
		RANDOM_NUMBER_SEED,
		ZONE_EQUIVALENCE_FILE,
		TRAVEL_TIME_FILE,
		NEW_DIURNAL_FILE,
		TRIP_TIME_FILE_x,
		TRIP_TIME_FORMAT_x,
		TRIP_TIME_FIELD_x,
		TIME_PERIOD_RANGE_x,
		TIME_CONTROL_POINT_x,
		ORIGIN_WEIGHT_FIELD_x,
		DESTINATION_WEIGHT_FIELD_x,
		DISTANCE_WEIGHT_FLAG_x,
		STOP_WEIGHT_FIELD_x,
		TRIP_PURPOSE_CODE_x,
		TRAVEL_MODE_CODE_x,
		TRIP_STOP_DURATION_x,
		AVERAGE_TRAVEL_SPEED_x,
		VEHICLE_TYPE_x,
		VEHICLE_SUBTYPE_x,
		TRIP_SCALING_FACTOR_x,
		TRIP_ADJUSTMENT_FACTORS_x,
		TRIP_ADJUSTMENT_FORMAT_x,
		TIME_PERIOD_EQUIVALENCE_x,
		NULL
	};
	char *reports [] = {
		"TOUR_GROUP_SCRIPT",
		"TOUR_GROUP_STACK",
		"PRINT_ZONE_EQUIVALENCIES",
		"TIME_PERIOD_EQUIVALENCE",
		NULL
	};

	Required_Network_Files (required_network);
	Optional_Network_Files (optional_network);
	Required_Demand_Files (required_demand);
	Optional_Demand_Files (optional_demand);

	Key_List (keys);
	Report_List (reports);

	equiv_flag = skim_flag = zone_flag = script_flag = diurnal_flag = zone_loc_flag = hhlist_flag = false;

	num_zone = 0;
	additional_time = 600;
	num_trip = tot_trips = tot_errors = nhhold = nperson = 0;
	tot_add = tot_del = 0.0;
	skim_ptr = NULL;

	trip_copy = hhold_copy = pop_copy = veh_copy = 0;
	max_hh_in = max_veh_in = max_hhlist = 0;

	location_array = (Location_Array *) new Convert_Location_Array ();
}
Exemplo n.º 15
0
NetPrep::NetPrep (void) : Data_Service ()
{
	Program ("NetPrep");
	Version (20);
	Title ("Network Preparation Utility");

	System_File_Type optional_files [] = {
		LINK, NODE, ZONE, SHAPE, ROUTE_NODES, NEW_NODE, NEW_LINK, NEW_ZONE, NEW_SHAPE, NEW_ROUTE_NODES, END_FILE
	};
	int file_service_keys [] = {
		NOTES_AND_NAME_FIELDS, TRANSIT_TIME_PERIODS, 0
	};
	int data_service_keys [] = {
		UPDATE_LINK_BEARINGS, LINK_BEARING_WARNINGS, ROUTE_MODE_MAP, MODE_VEH_TYPE_MAP, 0
	};
	Control_Key netprep_keys [] = { //--- code, key, level, status, type, default, range, help ----
		{ INPUT_LINK_FILE, "INPUT_LINK_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ INPUT_LINK_FORMAT, "INPUT_LINK_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ INPUT_NODE_FILE, "INPUT_NODE_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ INPUT_NODE_FORMAT, "INPUT_NODE_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ INPUT_NODE_SCRIPT, "INPUT_NODE_SCRIPT", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ INPUT_ZONE_FILE, "INPUT_ZONE_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ INPUT_ZONE_FORMAT, "INPUT_ZONE_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ INPUT_ZONE_SCRIPT, "INPUT_ZONE_SCRIPT", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ INPUT_SPDCAP_FILE, "INPUT_SPDCAP_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ INPUT_SPDCAP_FORMAT, "INPUT_SPDCAP_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "FIXED_COLUMN", FORMAT_RANGE, FORMAT_HELP },
		{ INPUT_UNITS_OF_MEASURE, "INPUT_UNITS_OF_MEASURE", LEVEL0, OPT_KEY, TEXT_KEY, "ENGLISH", "METRIC, ENGLISH", NO_HELP },
		{ FACILITY_INDEX_FIELD, "FACILITY_INDEX_FIELD", LEVEL0, OPT_KEY, TEXT_KEY, "", "", NO_HELP },
		{ AREA_TYPE_INDEX_FIELD, "AREA_TYPE_INDEX_FIELD", LEVEL0, OPT_KEY, TEXT_KEY, "", "", NO_HELP },
		{ CONVERSION_SCRIPT, "CONVERSION_SCRIPT", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ INTERNAL_ZONE_RANGE, "INTERNAL_ZONE_RANGE", LEVEL0, OPT_KEY, LIST_KEY, "0", "0..10000", NO_HELP },
		{ KEEP_ZONE_CONNECTORS_AS_LOCALS, "KEEP_ZONE_CONNECTORS_AS_LOCALS", LEVEL0, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		{ FIRST_NODE_NUMBER, "FIRST_NODE_NUMBER", LEVEL0, OPT_KEY, INT_KEY, "1", "1..1000000000", NO_HELP },
		{ FIRST_LINK_NUMBER, "FIRST_LINK_NUMBER", LEVEL0, OPT_KEY, INT_KEY, "1", "1..1000000000", NO_HELP },
		{ SPEED_FACTOR_BY_FACILITY, "SPEED_FACTOR_BY_FACILITY", LEVEL0, OPT_KEY, LIST_KEY, "1.0", "1.0..2.0", NO_HELP },
		{ SPEED_ROUNDING_INCREMENT, "SPEED_ROUNDING_INCREMENT", LEVEL0, OPT_KEY, FLOAT_KEY, "0.0 mph", "0.0..20.0 mph", NO_HELP },
		{ COORDINATE_RESOLUTION, "COORDINATE_RESOLUTION", LEVEL0, OPT_KEY, FLOAT_KEY, "3.0 feet", "0..100 feet", NO_HELP },
		{ MAXIMUM_LENGTH_TO_XY_RATIO, "MAXIMUM_LENGTH_TO_XY_RATIO", LEVEL0, OPT_KEY, FLOAT_KEY, "0.0", "0.0, 1.0..3.0", NO_HELP },
		{ MAXIMUM_SHAPE_ANGLE, "MAXIMUM_SHAPE_ANGLE", LEVEL0, OPT_KEY, INT_KEY, "90 degrees", "10..160 degrees", NO_HELP },
		{ MINIMUM_SHAPE_LENGTH, "MINIMUM_SHAPE_LENGTH", LEVEL0, OPT_KEY, INT_KEY, "30 feet", "0..600 feet", NO_HELP },
		{ DROP_DEAD_END_LINKS, "DROP_DEAD_END_LINKS", LEVEL0, OPT_KEY, INT_KEY, "0 feet", "0..6000 feet", NO_HELP },
		{ DROP_SHORT_LINKS, "DROP_SHORT_LINKS", LEVEL0, OPT_KEY, FLOAT_KEY, "0 feet", "0..600 feet", NO_HELP },
		{ SPLIT_LARGE_LOOPS, "SPLIT_LARGE_LOOPS", LEVEL0, OPT_KEY, INT_KEY, "0 feet", "0, 100..12000 feet", NO_HELP },
		{ SPLIT_DUPLICATE_AB_LINKS, "SPLIT_DUPLICATE_AB_LINKS", LEVEL0, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		{ CORRECT_LINK_SHAPES, "CORRECT_LINK_SHAPES", LEVEL0, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		{ COLLAPSE_SHAPE_NODES, "COLLAPSE_SHAPE_NODES", LEVEL0, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		{ COLLAPSE_DIVIDED_ARTERIALS, "COLLAPSE_DIVIDED_ARTERIALS", LEVEL0, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		{ LOCAL_THRU_SEGMENT_LENGTHS, "LOCAL_THRU_SEGMENT_LENGTHS", LEVEL1, OPT_KEY, LIST_KEY, "0 feet", "0, 1500..30000 feet", NO_HELP },
		{ LOCAL_SELECTION_SPACING, "LOCAL_SELECTION_SPACING", LEVEL1, OPT_KEY, LIST_KEY, "0 feet", "0, 150..30000 feet", NO_HELP },
		{ KEEP_NODE_RANGE, "KEEP_NODE_RANGE", LEVEL0, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP },
		{ KEEP_LINK_RANGE, "KEEP_LINK_RANGE", LEVEL0, OPT_KEY, LIST_KEY, "ALL", RANGE_RANGE, NO_HELP },
		{ KEEP_NODE_FILE, "KEEP_NODE_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP},
		{ KEEP_LINK_FILE, "KEEP_LINK_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ DELETE_NODE_RANGE, "DELETE_NODE_RANGE", LEVEL0, OPT_KEY, LIST_KEY, "NONE", RANGE_RANGE, NO_HELP },
		{ DELETE_LINK_RANGE, "DELETE_LINK_RANGE", LEVEL0, OPT_KEY, LIST_KEY, "NONE", RANGE_RANGE, NO_HELP },
		{ DELETE_NODE_FILE, "DELETE_NODE_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ DELETE_LINK_FILE, "DELETE_LINK_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_LINK_USE_FILE, "NEW_LINK_USE_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_LINK_USE_FORMAT, "NEW_LINK_USE_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ NEW_APPROACH_LINK_FILE, "NEW_APPROACH_LINK_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_APPROACH_LINK_FORMAT, "NEW_APPROACH_LINK_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ NEW_LINK_NODE_LIST_FILE, "NEW_LINK_NODE_LIST_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ COLLAPSE_ROUTE_DATA, "COLLAPSE_ROUTE_DATA", LEVEL0, OPT_KEY, BOOL_KEY, "TRUE", BOOL_RANGE, NO_HELP },
		{ FIRST_ROUTE_NUMBER, "FIRST_ROUTE_NUMBER", LEVEL0, OPT_KEY, INT_KEY, "1", "1..100000", NO_HELP },
		{ INPUT_ROUTE_FORMAT, "INPUT_ROUTE_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TPPLUS", "TPPLUS, CUBE", NO_HELP },
		{ INPUT_ROUTE_FILE, "INPUT_ROUTE_FILE", LEVEL1, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ ROUTE_PERIOD_MAP, "ROUTE_PERIOD_MAP", LEVEL1, OPT_KEY, LIST_KEY, "1", "0..24", NO_HELP },
		{ ROUTE_PERIOD_FACTOR, "ROUTE_PERIOD_FACTOR", LEVEL1, OPT_KEY, LIST_KEY, "1.0", "0.0..10.0", NO_HELP },
		{ ROUTE_VEHICLE_TYPE, "ROUTE_VEHICLE_TYPE", LEVEL1, OPT_KEY, INT_KEY, "0", ">=0", NO_HELP },
		{ FLIP_ROUTE_FLAG, "FLIP_ROUTE_FLAG", LEVEL1, OPT_KEY, BOOL_KEY, "FALSE", BOOL_RANGE, NO_HELP },
		END_CONTROL
	};
	const char *reports [] = {
		"CONVERSION_SCRIPT",
		"CONVERSION_STACK",
		"CHECK_INTERSECTIONS",
		"INTERSECTION_TYPES",
		"ROUTES_ON_ONEWAY_LINKS",
		""
	};
	Optional_System_Files (optional_files);
	File_Service_Keys (file_service_keys);
	Data_Service_Keys (data_service_keys);

	Key_List (netprep_keys);
	Report_List (reports);
	AB_Map_Flag (true);

	proj_service.Add_Keys ();

	new_link = new_node = 1;
	fac_fld = at_fld = -1;
	drop_length = split_length = num_loops = max_angle = min_length = next_loop = num_ratio = 0;
	convert_flag = spdcap_flag = link_flag = node_flag = zone_flag = route_flag = new_zone_flag = connector_flag = false;
	link_shape_flag = node_shape_flag = zone_shape_flag = int_zone_flag = centroid_flag = expand_flag= false;
	units_flag = keep_node_flag = keep_link_flag = drop_node_flag = drop_link_flag = shape_flag = correct_flag = false;
	length_flag = split_flag = split_ab_flag = collapse_flag = drop_flag = loop_flag = spacing_flag = false;
	divided_flag = segment_flag = speed_flag = link_use_flag = approach_flag = link_node_flag = offset_flag = time_flag = false;
	node_script_flag = zone_script_flag = oneway_link_flag = false;
	collapse_routes = true;
	length_ratio = 0.0;

	straight_diff = compass.Num_Points () * 9 / 360;		//---- 9 degrees ----
	thru_diff = 2 * straight_diff;							//---- +/- 18 degrees ----
	cross_min = thru_diff;
	cross_max = 180 - cross_min;
	forward_diff = compass.Num_Points () * 90 / 360;
	spd_inc = num_periods = num_match = 0;
	route_format = TPPLUS;
}
Exemplo n.º 16
0
Emissions::Emissions (void) : Demand_Service ()
{
	Program ("Emissions");
	Version ("4.0.16");
	Title ("Apply Vehicle Emissions Rates");

	Network_File optional_network [] = {
		DIRECTORY, LINK, NODE, ZONE, ACTIVITY_LOCATION, END_NETWORK
	};
	Demand_File optional_demand [] = {
		VEHICLE, END_DEMAND
	};

	char *keys [] = {
		SPEED_BIN_FILE,
		SPEED_BIN_FORMAT,
		SPEED_BIN_FACTOR,
		SPEED_BIN_FILE_x,
		SPEED_BIN_FORMAT_x,
		SPEED_BIN_FACTOR_x,

		TRAVELER_FILE,
		TRAVELER_FORMAT,

		VOLUME_SPEED_FILE,
		VOLUME_SPEED_FORMAT,
		VOLUME_SPEED_FACTOR,
		VOLSPD_LENGTH_FIELD,
		VOLSPD_LENGTH_UNITS,
		VOLSPD_FACILITY_FIELD,
		VOLSPD_RAMP_FACILITY,
		VOLSPD_AREATYPE_FIELD,
		VOLSPD_PERIOD_FIELD,
		VOLSPD_PERIOD_UNITS,
		VOLSPD_SPEED_FIELD,
		VOLSPD_SPEED_UNITS,
		VOLSPD_VOLUME_FIELD_x,
		USE_SIMPLE_INTERPOLATION,

		EMISSION_RATE_FILE,
		EMISSION_RATE_FORMAT,
		RATE_YEAR_FIELD,
		RATE_MONTH_FIELD,
		RATE_PERIOD_FIELD,
		RATE_REGION_FIELD,
		RATE_AREA_TYPE_FIELD,
		RATE_FACILITY_FIELD,
		RATE_ROAD_TYPE_FIELD,
		RATE_VEHICLE_FIELD,
		RATE_POLLUTANT_FIELD,
		RATE_SPEED_BIN_FIELD,
		EMISSION_RATE_FIELD,
		EMISSION_RATE_UNITS,
		EMISSION_RATE_POLLUTANT,

		EMISSION_RATE_FILE_x,
		EMISSION_RATE_FORMAT_x,
		RATE_YEAR_FIELD_x,
		RATE_MONTH_FIELD_x,
		RATE_PERIOD_FIELD_x,
		RATE_REGION_FIELD_x,
		RATE_AREA_TYPE_FIELD_x,
		RATE_FACILITY_FIELD_x,
		RATE_ROAD_TYPE_FIELD_x,
		RATE_VEHICLE_FIELD_x,
		RATE_POLLUTANT_FIELD_x,
		RATE_SPEED_BIN_FIELD_x,
		EMISSION_RATE_FIELD_x,
		EMISSION_RATE_UNITS_x,
		EMISSION_RATE_POLLUTANT_x,

		YEAR_NUMBER_x,
		MONTH_NUMBER_x,
		PERIOD_NUMBER_x,
		REGION_NUMBER_x,
		AREA_TYPE_NUMBER_x,
		FACILITY_NUMBER_x,
		ROAD_TYPE_NUMBER_x,
		VEHICLE_NUMBER_x,
		SPEED_BIN_NUMBER_x,
		POLLUTANT_NUMBER_x,
		POLLUTANT_UNITS_x,
		HPMS_NUMBER_x,

		SUMMARY_YEARS,
		SUMMARY_MONTHS,
		SUMMARY_TIME_PERIODS,
		SUMMARY_TIME_INCREMENT,
		WEEKEND_TRAVEL_FACTOR,

		SELECT_ZONE_RANGE,
		SELECT_SUBAREA_POLYGON,

		LINK_EQUIVALENCE_FILE,
		ZONE_EQUIVALENCE_FILE,
		REGION_EQUIVALENCE_FILE,

		AREA_TYPE_LABELS,
		FACILITY_TYPE_LABELS,
		VEHICLE_TYPE_LABELS,
		ROAD_TYPE_LABELS,

		AREA_TYPE_MAP,
		FACILITY_TYPE_MAP,
		VEHICLE_TYPE_MAP,
		ROAD_TYPE_MAP,
		HPMS_TYPE_MAP,

		NEW_EMISSION_RATE_FILE,
		NEW_EMISSION_RATE_FORMAT,
		NEW_EMISSION_SUMMARY_FILE,
		NEW_EMISSION_SUMMARY_FORMAT,

		NEW_SPEED_SUMMARY_FILE,
		NEW_SPEED_SUMMARY_FORMAT,
		NEW_MOVES_HPMS_VMT_FILE,
		NEW_MOVES_HPMS_VMT_FORMAT,
		NEW_MOVES_RAMP_FRACTION_FILE,
		NEW_MOVES_RAMP_FRACTION_FORMAT,
		NEW_MOVES_SPEED_HOUR_FILE,
		NEW_MOVES_SPEED_HOUR_FORMAT,
		NEW_MOVES_VMT_HOUR_FILE,
		NEW_MOVES_VMT_HOUR_FORMAT,
		NEW_MOVES_VMT_ROAD_FILE,
		NEW_MOVES_VMT_ROAD_FORMAT,

		NEW_MOVES_LINK_SUMMARY_FILE,
		NEW_MOVES_LINK_SUMMARY_FORMAT,
		NEW_MOVES_LINK_VEHICLE_FILE,
		NEW_MOVES_LINK_VEHICLE_FORMAT,
		NEW_MOVES_LINK_SPEED_FILE,
		NEW_MOVES_LINK_SPEED_FORMAT,
		USE_AVERAGE_SEGMENT_SPEEDS,
		NEW_MOVES_LINK_OPERATIONS_FILE,
		NEW_MOVES_LINK_OPERATIONS_FORMAT,

		SMOOTH_TO_MOVES_SPEED_BINS,
		SMOOTH_GROUP_SIZE,
		SMOOTH_SPEED_INCREMENT,
		PERCENT_MOVED_FORWARD,
		PERCENT_MOVED_BACKWARD,
		NUMBER_OF_ITERATIONS,

		NEW_SMOOTH_SAMPLE_FILE,
		NEW_SMOOTH_SAMPLE_FORMAT,
		PERCENT_SAMPLE_SIZE,
		RANDOM_NUMBER_SEED,

		NEW_TRAVELER_FILE,
		NEW_TRAVELER_FORMAT,

		REPORT_TRAVEL_UNITS,
		REPORT_EMISSIONS_UNITS,
		NULL
	};
	char *reports [] = {
		"EMISSIONS_BY_AREA_TYPE",
		"EMISSIONS_BY_FACILITY_TYPE",
		"EMISSIONS_BY_VEHICLE_TYPE",
		"EMISSIONS_BY_ROAD_TYPE",
		"EMISSIONS_BY_AREA_AND_FACILITY",
		"EMISSIONS_BY_AREA_AND_VEHICLE",
		"EMISSIONS_BY_FACILITY_AND_VEHICLE",
		"EMISSIONS_BY_ROAD_AND_VEHICLE",
		"EMISSIONS_SUMMARY_REPORT",
		"PRINT_LINK_EQUIVALENCIES",
		"PRINT_ZONE_EQUIVALENCIES",
		"PRINT_REGION_EQUIVALENCIES",
		NULL
	};

	Optional_Network_Files (optional_network);
	Optional_Demand_Files (optional_demand);

	Key_List (keys);
	Report_List (reports);
	
	Page_Size (120, 47);
	
	num_pollutants = box_length = cell_size = num_bins = max_bin = num_sample = 0;
	zone_flag = location_flag = link_flag = link_eq_flag = output_flag = input_flag = false;
	link_sum_flag = link_veh_flag = link_spd_flag = link_ops_flag = speed_flag = false;
	traveler_flag = new_traveler_flag = interpolate_flag = false;
	veh_map_flag = fac_map_flag = at_map_flag = road_map_flag = sample_flag = false;
	year_flag = month_flag = at_equiv_flag = reg_equiv_flag = new_rate_flag = false;
	select_flag = subarea_flag = rate_flag = vol_spd_flag = ramp_flag = hpms_flag = false;
	spd_flag = vmt_flag = road_flag = moves_bin_flag = smooth_flag = scan_flag = bin_sum_flag = false;

	length_field = facility_field = areatype_field = period_field = speed_field = 0;
	length_units = period_units = speed_units = num_vol_fld = emission_units = 0;
	travel_units = 1;
	volume_field = NULL;

	ramp_facility = 9;
	niter = 3;
	naverage = 3;
	forward = 20.0;
	backward = 20.0;
	bin_size = 1.0;
	weekend_factor = 1.0;
	volume_factor = 1.0;
	sample_size = 0.05;

	memset (facility_map, '\0', sizeof (facility_map));

	area_type.Initialize (sizeof (Label_Type), 10);
	facility_type.Initialize (sizeof (Label_Type), 10);
	vehicle_type.Initialize (sizeof (Label_Type), 10);
	road_type.Initialize (sizeof (Label_Type), 10);
}
Exemplo n.º 17
0
SubareaPlans::SubareaPlans (void) : Demand_Service ()
{
	Program ("SubareaPlans");
	Version ("4.0.33");
	Title ("Subarea Plan and Vehicle Files");

	Network_File required_network [] = {
		NODE, LINK, ACTIVITY_LOCATION, PARKING, PROCESS_LINK, END_NETWORK
	};
	Network_File optional_network [] = {
		DIRECTORY, LANE_CONNECTIVITY, NEW_DIRECTORY, 
		NEW_ACTIVITY_LOCATION, NEW_PARKING, NEW_PROCESS_LINK, 
		TRANSIT_STOP, TRANSIT_ROUTE, TRANSIT_SCHEDULE, TRANSIT_DRIVER,
		NEW_TRANSIT_STOP, NEW_TRANSIT_ROUTE, NEW_TRANSIT_SCHEDULE, NEW_TRANSIT_DRIVER,
		END_NETWORK
	};
	Demand_File required_demand [] = {
		VEHICLE, NEW_VEHICLE, END_DEMAND
	};
	Demand_File optional_demand [] = {
		LINK_DELAY, NEW_BOUNDARY_SPEED, END_DEMAND
	};

	char *keys [] = {
		PLAN_FILE,
		PLAN_FORMAT,
		NODE_LIST_PATHS,
		SUBAREA_BOUNDARY_POLYGON,
		EXTERNAL_OFFSET_LENGTH,
		NEW_PLAN_FILE,
		NEW_PLAN_FORMAT,
		NEW_HOUSEHOLD_LIST,
		RETIME_EARLY_ARRIVALS,
		ZONE_EQUIVALENCE_FILE,
		TIME_PERIOD_EQUIVALENCE,
		SELECT_TIME_PERIODS,
		NULL
	};
	char *reports [] = {
		"TRIP_SUMMARY_REPORT",
		"PRINT_ZONE_EQUIVALENCIES",
		"TIME_PERIOD_EQUIVALENCE",
		NULL
	};

	Required_Network_Files (required_network);
	Optional_Network_Files (optional_network);
	Required_Demand_Files (required_demand);
	Optional_Demand_Files (optional_demand);

	Key_List (keys);
	Report_List (reports);
	Enable_Partitions (true);

	AB_Key_Flag  (true);

	trips = NULL;

	type_flag = true;
	transit_flag = output_flag = range_flag = false;
	delay_flag = location_flag = parking_flag = access_flag = extend_flag = early_flag = false;
	trip_flag = zone_flag = time_flag = turn_flag = hhlist_flag = boundary_flag = false;
	nlink = nshort = nlocation = nparking = naccess = num_adjust = total_adjust = 0;
	max_location = max_parking = max_access = max_vehicle = max_zone = 0;
	num_in_in = num_out_in = num_in_out = num_out_out = 0;
	leg_in_in = leg_out_in = leg_in_out = leg_out_out = 0;

	max_stop = max_route = 0;
	new_stop = new_route = 0;
	nstop = nroute = nschedule = ndriver = 0;
	current_traveler = current_trip = current_leg = boarding_stop = last_location = last_time = 0;

	external_offset = Round (15);		//---- 15 meters ----

	boundary.Data_Size (sizeof (Boundary));

	Compress_Vehicles (false);
}