void ArcRider::Execute (void) { //---- read the network ---- Data_Service::Execute (); //---- write the line demands ---- if (line_flag) { Write_Route (); } //---- write the line groups ---- if (sum_flag) { Write_Sum (); } //---- allocate transit memory ---- if (rider_flag || on_off_flag) { Setup_Riders (); Sum_Riders (); } //---- write ridership shapes ---- if (rider_flag) { Write_Riders (); } //---- write transit stops file ---- if (on_off_flag) { if (demand_flag) Write_Stops (); if (group_flag) Write_Group (); } //---- write run capacity file ---- if (cap_flag) { Write_Capacity (); } Write (1); if (line_flag) Write (1, "Number of Line Demand Shape Records = ") << num_line; if (sum_flag) Write (1, "Number of Line Group Shape Records = ") << num_sum; if (rider_flag) Write (1, "Number of Ridership Shape Records = ") << num_rider; if (demand_flag) Write (1, "Number of Stop Demand Shape Records = ") << num_stop; if (group_flag) Write (1, "Number of Stop Group Shape Records = ") << num_group; if (cap_flag) Write (1, "Number of Run Capacity Shape Records = ") << num_cap; Exit_Stat (DONE); }
void PlanSum::Execute (void) { int nfile, i, j, num; //---- read the network ---- Demand_Service::Execute (); //---- prepare data ---- Data_Preparation (); //---- read the household list ---- if (hhlist_flag) { Read_HHList (); } //---- read the household person count ---- if (count_flag) { Read_Count (); } //---- read the plan file ---- for (nfile=0; ; nfile++) { if (!plan_file.Open (nfile)) break; if (update_flag) { if (!new_plan_file.Open (nfile)) { Error ("Opening %s", new_plan_file.File_Type ()); } } //---- process the plan files ---- Read_Plans (); } if (nfile == 0) { File_Error ("No Plan Files were Found", plan_file.Filename ()); } //---- write summary statistics ---- Break_Check (6); Write (2, "Number of Plan Files = %d", nfile); Write (1, "Number of Input Plans = %d", plan_file.Num_Plans ()); Write (1, "Number of Input Records = %d", plan_file.Num_Records ()); Write (1, "Number of Input Travelers = %d", plan_file.Num_Travelers ()); Write (1, "Number of Input Trips = %d", plan_file.Num_Trips ()); if (update_flag) { Break_Check (5); Write (2, "Number of Output Plans = %d", new_plan_file.Num_Plans ()); Write (1, "Number of Output Records = %d", new_plan_file.Num_Records ()); Write (1, "Number of Output Travelers = %d", new_plan_file.Num_Travelers ()); Write (1, "Number of Output Trips = %d", new_plan_file.Num_Trips ()); } Write (1); //---- write the volume file ---- if (volume_flag) { Write_Volume (); } //---- write the trip time file ---- if (time_flag) { Diurnal_Distribution (); } //---- write the link delay file ---- if (delay_out) { Link_Delay (); } //---- transit ridership output ---- if (transit_flag) { if (Demand_File_Flag (NEW_RIDERSHIP)) { Write_Riders (); } } //---- write the skim file ---- if (skim_flag) { if (time_skim_flag) { if (length_flag) { Write_Time_Length (); } else { Write_Time (); } } else { Write_Skim (); } } //---- write the trip table ---- if (trip_flag) { Write_Trips (); } //---- write the turn movements ---- if (turn_flag) { Write_Turns (); } //---- print reports ---- Show_Message ("Writing Performance Reports"); for (i=First_Report (); i != 0; i=Next_Report ()) { switch (i) { case TOP_100: //---- Top 100 V/C Ratio Report ---- Top_100_Report (); break; case VC_RATIO: //---- All V/C Ratios Greater Than x.xx --- VC_Ratio (Report_Data ()); break; case LINK_GROUP: //---- Link Group Report ----- Link_Group (Report_Data ()); break; case SUM_RIDERS: //---- Transit Ridership Report ---- Transit_Report (); break; case SUM_STOPS: //---- Transit Stop Report ---- Stop_Report (); break; case SUM_TRANSFERS: //---- Transit Transfer Report ---- Transfer_Report (0); break; case XFER_DETAILS: //---- Transit Transfer Details ---- num = time_periods.Num_Ranges () * 2 + 1; for (j=1; j < num; j++) { Transfer_Report (j); } break; case STOP_GROUP: //---- Transit Stop Group Report ---- Stop_Group_Report (); break; case SUM_PASSENGERS: //---- Transit Passenger Summary ---- Passenger_Report (); break; case RIDER_GROUP: //---- Transit Link Group Summary ---- Rider_Group (); break; case TRIP_TIME: //---- Trip Time Report ---- Trip_Time (); break; case SUM_TRAVEL: //---- Travel Summary Report ---- Travel_Report (); break; default: break; } } Exit_Stat (DONE); }
void ArcPlan::Execute (void) { int nfile; //---- read the network ---- Demand_Service::Execute (); //---- allocate bandwidth memory ---- if (width_flag) { int ndir = dir_data.Num_Records () + 1; width_data = new int [ndir]; if (width_data == NULL) { Error ("Insufficient Memory for Bandwidth Data"); } memset (width_data, '\0', ndir * sizeof (int)); } //---- allocate contour memory ---- if (time_flag || distance_flag) { int ndir = dir_data.Num_Records () + 1; link_flag = new bool [ndir]; if (link_flag == NULL) { Error ("Insufficient Memory for Contour Data"); } memset (link_flag, '\0', ndir * sizeof (bool)); } //---- allocate transit memory ---- if (rider_flag || on_off_flag) { Setup_Riders (); } //---- allocate parking memory ---- if (parking_flag) { int nlots = parking_offset.Num_Records () + 1; parking_out = new int [nlots]; parking_in = new int [nlots]; if (parking_out == NULL || parking_in == NULL) { Error ("Insufficient Memory for Parking Demand Data"); } memset (parking_out, '\0', nlots * sizeof (int)); memset (parking_in, '\0', nlots * sizeof (int)); } //---- read the household list ---- if (hhlist_flag) { Read_HHList (); } //---- read the problem file ---- if (problem_flag) { Read_Problem (); } //---- read the plan file ---- for (nfile=0; ; nfile++) { if (!plan_file.Open (nfile)) break; //---- process the plan files ---- Read_Plan (); } if (nfile == 0) { File_Error ("No Plan Files were Found", plan_file.Filename ()); } if (plan_flag) { arcview_plan.Close (); } if (time_flag) { arcview_time.Close (); } if (distance_flag) { arcview_distance.Close (); } if (access_flag) { arcview_access.Close (); } //---- write bandwidth shapes ---- if (width_flag) { Write_Bandwidth (); } //---- write ridership shapes ---- if (rider_flag) { Write_Riders (); } //---- write transit stops file ---- if (on_off_flag) { if (demand_flag) Write_Stops (); if (group_flag) Write_Group (); } //---- write parking lots file ---- if (parking_flag) { Write_Parking (); } //---- write summary statistics ---- Break_Check (9); Write (2, "Number of Plan Files = %d", nfile); Write (1, "Number of Input Plans = %d", plan_file.Num_Plans ()); Write (1, "Number of Input Records = %d", plan_file.Num_Records ()); Write (1, "Number of Input Travelers = %d", plan_file.Num_Travelers ()); Write (1, "Number of Input Trips = %d", plan_file.Num_Trips ()); Write (1); if (plan_flag) Write (1, "Number of ArcView Plan Shape Records = %d", num_out); if (problem_flag) Write (1, "Number of ArcView Problem Shape Records = %d", num_problem); if (width_flag) Write (1, "Number of ArcView Bandwidth Shape Records = %d", num_width); if (time_flag) Write (1, "Number of ArcView Time Contour Shape Records = %d", num_time); if (distance_flag) Write (1, "Number of ArcView Distance Contour Shape Records = %d", num_distance); if (access_flag) Write (1, "Number of ArcView Accessibility Shape Records = %d", num_access); if (rider_flag) Write (1, "Number of ArcView Ridership Shape Records = %d", num_rider); if (demand_flag) Write (1, "Number of ArcView Stop Demand Shape Records = %d", num_stop); if (group_flag) Write (1, "Number of ArcView Stop Group Shape Records = %d", num_group); if (parking_flag) Write (1, "Number of ArcView Parking Demand Shape Records = %d", num_parking); Exit_Stat (DONE); }