Ejemplo n.º 1
0
SimSubareas::SimSubareas (void) : Data_Service ()
{
	Program ("SimSubareas");
	Version (4);
	Title ("Generate Geographic Subareas");

	System_File_Type required_files [] = {
		NODE, NEW_NODE, END_FILE
	};
	System_File_Type optional_files [] = {
		END_FILE
	};
	int file_service_keys [] = {
		NOTES_AND_NAME_FIELDS, 0
	};
	Control_Key keys [] = { //--- code, key, level, status, type, default, range, help ----
		{ NUMBER_OF_SUBAREAS, "NUMBER_OF_SUBAREAS", LEVEL0, REQ_KEY, INT_KEY, "8", "1..1000", NO_HELP },
		{ PARTITIONS_PER_SUBAREA, "PARTITIONS_PER_SUBAREA", LEVEL0, OPT_KEY, INT_KEY, "1", "1..1000", NO_HELP },
		{ CENTER_NODE_NUMBER, "CENTER_NODE_NUMBER", LEVEL0, OPT_KEY, INT_KEY, "0", ">=0", NO_HELP },
		{ SUBAREA_BOUNDARY_FILE, "SUBAREA_BOUNDARY_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		END_CONTROL
	};
	Required_System_Files (required_files);
	Optional_System_Files (optional_files);
	File_Service_Keys (file_service_keys);

	Key_List (keys);

	num_subareas = num_parts = center = 0;
	subarea_field = -1;
	boundary_flag = false;
}
Ejemplo n.º 2
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);
}
Ejemplo n.º 3
0
Relocate::Relocate (void) : Data_Service ()
{
	Program ("Relocate");
	Version (0);
	Title ("Update Activity Locations");
	
	System_File_Type required_files [] = {
		NODE, LINK, LOCATION, PARKING, END_FILE
	};
	System_File_Type optional_files [] = {
		SHAPE, ACCESS_LINK, TRIP, VEHICLE, PLAN, NEW_TRIP, NEW_VEHICLE, NEW_PLAN, NEW_SELECTION, END_FILE
	};
	Control_Key keys [] = { //--- code, key, level, status, type, default, range, help ----
		{ OLD_NODE_FILE, "OLD_NODE_FILE", LEVEL0, REQ_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ OLD_NODE_FORMAT, "OLD_NODE_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ OLD_SHAPE_FILE, "OLD_SHAPE_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ OLD_SHAPE_FORMAT, "OLD_SHAPE_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ OLD_LINK_FILE, "OLD_LINK_FILE", LEVEL0, REQ_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ OLD_LINK_FORMAT, "OLD_LINK_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ OLD_LOCATION_FILE, "OLD_LOCATION_FILE", LEVEL0, REQ_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ OLD_LOCATION_FORMAT, "OLD_LOCATION_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ OLD_PARKING_FILE, "OLD_PARKING_FILE", LEVEL0, REQ_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ OLD_PARKING_FORMAT, "OLD_PARKING_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ OLD_ACCESS_FILE, "OLD_ACCESS_FILE", LEVEL0, OPT_KEY, IN_KEY, "", FILE_RANGE, NO_HELP },
		{ OLD_ACCESS_FORMAT, "OLD_ACCESSE_FORMAT", LEVEL0, OPT_KEY, TEXT_KEY, "TAB_DELIMITED", FORMAT_RANGE, FORMAT_HELP },
		{ NEW_LOCATION_MAP_FILE, "NEW_LOCATION_MAP_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		{ NEW_PARKING_MAP_FILE, "NEW_PARKING_MAP_FILE", LEVEL0, OPT_KEY, OUT_KEY, "", FILE_RANGE, NO_HELP },
		END_CONTROL
	};
	Required_System_Files (required_files);
	Optional_System_Files (optional_files);

	Key_List (keys);
	Enable_Partitions (true);
	Location_XY_Flag (true);

	trip_flag = plan_flag = vehicle_flag = select_flag = false;
	loc_map_flag = park_map_flag = shape_flag = access_flag = false;

	System_Read_False (PLAN);
	System_Data_Reserve (PLAN, 0);

	System_Read_False (TRIP);
	System_Data_Reserve (TRIP, 0);

	System_Read_False (VEHICLE);
	System_Data_Reserve (VEHICLE, 0);
}
Ejemplo n.º 4
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);
}
Ejemplo 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;
}
Ejemplo 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;
}
Ejemplo 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);
}
Ejemplo n.º 8
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";
}