EVALUATING HAZARDOUS ROADSIDE LOCATIONSusing theROADSIDE-HAZARD-SIMULATION-MODELVERSION 9 (1992)byPaul C. de LeurB.Sc., University of Saskatchewan, 1988A thesis submitted in the partial fulfilment ofthe requirements for the degree ofMASTER OF APPLIED SCIENCEinTHE FACULTY of GRADUATE STUDIESDEPARTMENT of CIVIL ENGINEERINGWe accept this thesis as conformingto required standardTHE UNIVERSITY OF BRITISH COLUMBIASeptember 1992© Paul C. de Leur, 1992In presenting this thesis in partial fulfilment of the requirements for an advanced degree atthe University of British Columbia, I agree that the library shall make it freely available forreference and study. I further agree that permission for extensive copying of this thesis forscholarly purposes may be granted by the head of my department or by his or herrepresentatives. It is understood that copying or publication of this thesis for financial gainshall not be allowed without my written permission.Department of Civil EngineeringUniversity of British Columbia2324 Main MallVancouver, British ColumbiaCanada, V6T 1Z4September, 1992iiABSTRACTVehicles that "run-off-the-road" and crash into a hazardous roadside are a significantproblem, accounting for 14.3 percent of all highway accidents in the Province of BritishColumbia. The computer tool developed in this project is designed to help evaluatehazardous roadside locations and evaluate various improvement alternatives proposed toreduce the level of hazard. The hazard level at any location may be reduced by: flatteningthe embankment slope, installing a roadside barrier, removing hazardous objects, or anycombination of the three. The evaluation tool, a computer simulation model, identifies the"best" solution from a set of improvement alternatives simulated for a hazardous location.The computer simulation model is called the Roadside-Hazard-Simulation-Model Version9.0 (RHSM.V9), and was developed after a great deal of effort was devoted to simplymodifying and revising one of the previous versions of the model (RHSM.V5 (1978),RHSM.6-2 (1982), or RHSM.V7 (1986)). The new model was developed using theimportant components of the previous versions and anticipating the additional factorsneeded in the new model. Making the new-version user-friendly and flexible was importantsince previous versions were difficult to use, unforgiving in nature, and consequently rarelyused.There are a number of objectives which RHSM.V9 satisfies. First, the model simulates anerrant vehicle's trajectory upon leaving the roadway. Secondly, the model is capable ofaccurately simulating the hazards that exist in the roadside. Third, the model simulates theiiiroadway conditions, as well as the errant vehicle's characteristics. The fourth objective,which is dependant upon the first three objectives, determines the consequence of thevehicle leaving the roadway and entering a hazardous roadside. Finally, the model does aneconomic evaluation of the improvement alternatives proposed for the location andidentifies the best solution for the hazardous roadside location.The model's performance was illustrated by performing numerous program runs and thenevaluating the results produced by the model. The evaluation included a results comparisonwith previous versions of the model, a results evaluation for various hazardous embankmentslopes and roadside objects, and a sensitivity analysis of the operational parameters andeconomic factors used in the model. Also included in this evaluation were four typicalexamples from "real-life" applications. After preliminary testing of the model, the results,and the trends in the results, appear to be valid.The general conclusion of this thesis is that RHSM.V9 can be used to improve theengineering analysis process in evaluating hazardous roadside locations. The program is auser-friendly computer tool to assist highway safety professionals in making a decisionregarding the implementation of roadside safety improvement alternatives. The finaldecision must be made in conjunction with sound engineering judgement. Further researchand updating may be easily incorporated since the program has been structured such thatas better calibration information becomes available, it can be immediately and easilyincluded in the new model.ivTABLE OF CONTENTS:PageAbstract iiTable of Contents ivList of Figures viList of Tables viiiAcknowledgements xi1.0 Introduction 11.1 Background 11.2 Research Objectives 21.3 Problem Statement 31.4 Solution Strategy 71.5 Scope of the Project 82.0 Literature Review 92.1 Characteristics of Improvement Alternatives 92.2 Warranting Criteria for Hazardous Roadsides 112.2.1 Ministry of Transportation and Highways (MoTH) 112.2.2 Roads and Transportation Association of Canada (TAC) 142.2.3 National Cooperative Highway Research Program (NCHRP) 242.2.4 American Assoc. of State Hwy Transport. Official (AASHTO) 262.3.5 Barrier Warranting Criteria in Six European Countries 312.3 Computer Application and Simulation Models 372.3.1 HVOSM: Highway-Vehicle-Object-Simulation-Model 372.3.2 BARRIER VII 392.3.3 GUARD 392.3.4 ROADSIDE (AASHTO's Cost-Effectiveness Model) 402.3.5 SAFEROAD 412.3.6 ROADSIDE (Expert System) 432.3.7 WARRANT ADVISOR 44VTABLE OF CONTENTS (continued) Page3.0 Roadside Hazard Simulation Model (RHSM): Review and Advancement 453.1 Purpose and Objectives of RHSM 453.2 Evolution of RHSM 453.3 Model Advancement 473.3.1 The Approach 473.3.2 Model Basics and Assumptions 503.4 RHSM.V9 Program Details 533.4.1 Roadside Simulation and Model Parameters 543.4.2 Economic Evaluation of Improvement Alternatives 633.4.3 Vehicle Roadside Interaction Details 693.4.4 Calibration and Defaults 753.4.5 Display and Output Results 803.4.6 Information Storage and Retrieval 833.5 Program Structure 844.0 Evaluation of RHSM.V9: Results and Sensitivity Analysis 854.1 Results Comparison: RHSM.V9 with Previous Versions 854.2 Results Evaluation: Hazardous Roadside Slopes 874.3 Results Evaluation: Hazardous Roadside Objects 924.4 Sensitivity Analysis: Operational Parameters 974.5 Sensitivity Analysis: Economic Factors 1074.6 Model Applications: Typical Example Runs 1204.6.1 Leave Roadside Unprotected Warranted 1204.6.2 Flattening Embankment Slope Warranted 1244.6.3 Roadside Barrier Warranted 1274.6.4 Hazardous Object Removal Warranted 1305.0 Conclusions and Recommendations 1336.0 Future Research 137References and Bibliography 139/145Appendix Index 151viLIST OF FIGURES:PageFigure 1.1 Flow-Chart of Solution Strategy 7Figure 2.1 MoTH: Roadside Barrier Index Warrant 13Figure 2.2 TAC: Clear-Zone Width for Fill and Cut Slopes 21Figure 2.3 TAC: Collision Frequency 22Figure 2.4 TAC: Lateral Displacement Distribution 23Figure 2.5 NCHRP: Barrier Requirements for Embankment Geometry 25Figure 2.6 AASHTO: Comparative Risk Warrants for Embankments 27Figure 2.7 AASHTO: Low-Volume Warrants for Embankments 28Figure 2.8 AASHTO: Cost-Effective Warrants for Freeways and Expressways 28Figure 2.9 Denmark's Roadside Barrier Warrants for Motorways 32Figure 2.10 Denmark's Roadside Barrier Warrants for Highways 33Figure 2.11 Denmark's Roadside Barrier Warrants for Local Roads 33Figure 2.12 Norway's Roadside Barrier Warrants 35Figure 2.13 Belgium's Barrier Warrants for Fill Height 36Figure 2.14 Belgium's Barrier Warrants for Clear-Zones 36Figure 2.15 Flow-Chart of Knowledge-Based System SAFEROAD 42Figure 2.16 Simplified Reasoning Process used in ROADSIDE 43Figure 2.17 Menu Display from WARRANT ADVISOR 44Figure 3.1 EDIT Simulation Data Main Menu Options 55Figure 3.2 Encroachment Speed versus Speed Standard Deviation 58Figure 3.3 Example of Roadside Terrain Description 59Figure 3.4 Example of Roadside Object Designation 62Figure 3.5 RHSM's Benefit-Cost Economic Evaluation 66Figure 3.6 RHSM's Cost-Effectiveness Evaluation 68Figure 3.7 Schematic of Dynamic Vehicle Roll-Over 71Figure 3.8 Schematic of Static Vehicle Roll-Over 72viiLIST OF FIGURES (continued)PageFigure 3.9 Departure Angle Frequencies 77Figure 3.10 Three-Dimensional Graphic Results 81Figure 3.11 Vehicle Trajectory Plots 83Figure 3.12 Flow-Chart of RHSM.V9 84Figure 4.1 Hazardous Roadside: Sensitivity of Operational Parameters 98Figure 4.2 Hazardous Roadside: Sensitivity of Economic Factors 108Figure 4.3 Cost-Effectiveness Graphs 119Figure 4.4 Hazardous Roadside: Leave Roadside Unprotected Warranted 120Figure 4.5 Cost-Effectiveness Graph: Leave Roadside Unprotected Warranted 123Figure 4.6 Hazardous Roadside: Flattening Embankment Slope Warranted 124Figure 4.7 Cost-Effectiveness Graph: Flattening Embankmt Slope Warranted 126Figure 4.8 Hazardous Roadside: Roadside Barrier Warranted 127Figure 4.9 Cost-Effectiveness Graph: Roadside Barrier Warranted 129Figure 4.10 Hazardous Roadside: Roadside Object Removal Warranted 130Figure 4.11 Cost-Effectiveness Graph: Roadside Object Removal Warranted 132viiiLIST OF TABLES: PageTable 2.1 Factors Considered by MoTH Nomograph 12Table 2.2 TAC Severity Index: Non-Traversable Fill Slopes 16Table 2.3 TAC Severity Index: Casualties versus Accident Costs 16Table 2.4 TAC Obstacle Inventory Codes 17Table 2.5 TAC Severity Index: Traversable Fill Slopes 17Table 2.6 TAC Encroachment Rates 18Table 2.7 TAC Horizontal Adjustment Factors for Encroachment Rate 19Table 2.8 TAC Vertical Adjustment Factors for Encroachment Rate 19Table 2.9 NCHRP Warrants for Barrier Placement at Roadside Hazards 25Table 2.10 AASHTO Barrier Warrants for Non-Traversable Hazards 29Table 2.11 AASHTO Clear-Zone Distances 30Table 2.12 Denmark's Clear-Zone Requirements 32Table 2.13 Norway's Clear-Zone Requirements 34Table 3.1 Components Considered in the Development of RHSM.V9 49Table 3.2 Roadside Terrain Description 59Table 3.3 Friction Coefficients for Typical Terrain Surfaces 60Table 3.4 Object Identification Coding System 61Table 3.5 Roadside Object Description 62Table 3.6 RHSM's Cost-Effectiveness Evaluation 68Table 3.7 Roll-Over Speed versus Accident Consequence Probability 73Table 3.8 Power Level Dissipation versus Accident Consequence Probability 74Table 3.9 Operational Parameters: Default Values 76Table 3.10 Vehicle Characteristics: Default Values 78Table 3.11 Encroachment Rate Factors 79Table 4.1 RHSM.V9 versus RHSM.V5.0 86Table 4.2 RHSM.V9 versus RHSM.V6.2 86Table 4.3 RHSM.V9 versus RHSM.V7.0 86ixLIST OF TABLES (continued) Page8889909193949595969699100101102103104105105107109110111112114115116117117118Table 4.4Table 4.5Table 4.6Table 4.7Table 4.8Table 4.9Table 4.10Table 4.11Table 4.12Table 4.13Table 4.14Table 4.15Table 4.16Table 4.17Table 4.18Table 4.19Table 4.20Table 4.21Table 4.22Table 4.23Table 4.24Table 4.25Table 4.26Table 4.27Table 4.28Table 4.29Table 4.30Table 4.31Table 4.32Location Of Hazardous TerrainDegree of Down-Slope TerrainDegree of Up-Slope TerrainLevel of Terrain Friction CoefficientObject TypeDeformable Object Rigidity FactorObject SizeNumber of ObjectsLocation of Objects Parallel to the RoadwayLocation of Objects Perpendicular to the RoadwayMean Vehicle Encroachment SpeedHorizontal CurvatureTime Increment of TrajectoryEncroachment Number and LocationSpeed/Angle IncrementsDegree of BrakingDegree of RestraintDegree of Vehicle Steer-BackVehicle TypeEncroachment RateAccident Severity Consequence ProbabilityMitigation FactorsResults of Mitigation FactorsRoadside Barrier CostsSlope flattening CostsObject Removal CostsVarying Interest Rate (i)Varying Analysis Period (n)Criteria Weighting SchemesLIST OF TABLES (continued) PageTable 4.33 Unprotected Roadside: Accident Consequence Probability 121Table 4.34 Unprotected Roadside: Benefit-Cost Analysis 122Table 4.35 Unprotected Roadside: Cost-Effectiveness Analysis 123Table 4.36 Flattening Slope: Accident Consequence Probability 125Table 4.37 Flattening Slope: Benefit-Cost Analysis 126Table 4.38 Flattening Slope: Cost-Effectiveness Analysis 126Table 4.39 Barrier Warranted: Accident Consequence Probability 128Table 4.40 Barrier Warranted: Benefit-Cost Analysis 129Table 4.41 Barrier Warranted: Cost-Effectiveness Analysis 129Table 4.42 Object Removal: Accident Consequence Probability 131Table 4.42 Object Removal: Benefit-Cost Analysis 131Table 4.42 Object Removal: Cost-Effectiveness Analysis 132xiACKNOWLEDGEMENTSThere are many people I would like to acknowledge who provided support during the courseof this research project. From the University of British Columbia, Dr. Francis Navin, whonot only provided supervision and direction for this thesis, but also provided funding throughhis Natural Science and Engineering Research Operating grant during the early stages ofmy degree. Dr. Gerald Brown for his positive guidance, assistance, and evaluation of thisthesis. Formerly of British Columbia Research, Mr. Paul Roer, P. Eng., for his helpfulinsight and experience with the development of the original simulation model.The staff from the Ministry of Transportation and Highways, Highway Safety Branch, thatI would like to acknowledge include: Mr. Lorne Holowachuk, P. Eng., for providing financialand motivational support for the research project. Dr. Walid Abdelwahab for his directsupervision and beneficial suggestions throughout the development of this research project.Mr. Brad Blaney for his technical expertise and advise at critical stages of the project.Credit must also be given to my classmates from the University of British Columbia. Iwould like to acknowledge and thank my friend, Mr. Norman Stang for his extraordinaryeffort in helping with the programming of the simulation model. I must also acknowledgeand thank Mr. Chris Nutakor, Mr. Tarek Sayed, and Mr. Mohsen Ghazel for theirconstructive suggestions, criticism, and friendship.Finally, I would like to acknowledge and thank my parents, Mary and Francis de Leur fortheir love and support throughout my academic endeavours, Mr. Michael de Leur, mybrother, for his objective criticism and research expertise, and Miss Pam Lacey for herencouragement, understanding, and sacrifice during this research project.Paul C. de Leur11.0 INTRODUCTION1.1 Background"Run-off-the-road" vehicle crashes are a significant problem in the Provence of BritishColumbia. There were 21874 such accidents reported from 1986 to 1991 on BritishColumbia Highways, representing 14.3% of the total number of reported highway accidents.Run-off-the-road accident severity in terms of property damage, level of injury, and fatalityrate, are often worse than for other types of roadway accidents.The total cost of "run-off-the-road" accidents is very high. This total cost includes: propertydamage, effect of injury level on income loss or earning capacity, administrative and medicalcosts such as police, ambulance, and hospital costs, and the societal and intangible costsassociated with fatal accidents. Also, as the severity of an accident increases, the cost of theaccident also increases dramatically. For example, the British Columbia Ministry ofTransportation and Highways (M.o.T.H.), estimates the average cost of a property damageaccident to be $4,000, a non-fatal injury accident to be $15,000, and a fatal accident to be$600,000. The British Columbia government recently announced that the annual cost ofroad accidents was nearly $2 billion dollars, therefore, the cost of "run-off-the-road"accidents is very high due to the high frequency and severe consequences of this type ofaccident. Reducing the cost of highway accidents is another objective of highway officialsand researchers concerned with improving highway safety.21.2 Research ObjectivesThe goal of this study is to develop a convenient computer tool which can be used toevaluate hazardous roadside conditions and evaluate safety improvement alternativesproposed to reduce the level of hazard. The hazard level at a particular location may bereduced by: flattening the embankment slope, installing a roadside barrier, removinghazardous objects, or any combination of the three. The evaluation tool, which is in theform of a computer program, assists highway safety professionals determine which safetyimprovement alternatives are warranted for an identified hazardous location.In order to achieve the goal of this study, a number of objectives are defined below.Objective 1:Objective 4:Objective 5:Based on the previous versions of the Roadside-Hazard-Simulation-Model (RHSM) [1], develop a new model capable of quickly andaccurately assessing the hazard level for various roadside conditions.Validation of RHSM.Analyze the probability of consequence of a vehicle having an off-roadexcursion and then compare the results with the vehicle encounteringthe proposed improvement alternatives for the location under review.Determine the optimum solution for any given location by conductingan economic analysis of roadside improvement alternatives.Generate typical examples to illustrate the usefulness of the programby identifying improvement alternatives which maximize safety benefits,while minimizing the cost to implement the safety improvement alternative.Objective 2:Objective 3:31.3 Problem StatementTo reduce the frequency, severity, and hence the total cost of "run-off-the-road" accidents,one of four improvement alternatives are usually recommended. These include:1. Do-Nothing: Leave the adjacent roadway unprotected. This alternative isrecommended for locations where no improvement alternative will decreaseaccident severity or be employed cost-effectively.2. Flatten the Slope: Modify the terrain of the adjacent roadway, includingflattening the embankment slope or rounding the terrain changes.3. Install a Barrier: Install a roadside barrier. The hazard of installing thebarrier must be less than the hazard associated with an off-road excursion.This will satisfy an equal severity criterion.4. Remove the Hazards: Remove or relocate the hazardous elements that existin this area, including all type of hazardous objects.The decision to implement an improvement alternative is based on the probability of anaccident's occurrence, the probability of the consequence if an accident occurs, and thebenefit-cost ratio analysis and/or cost-effectiveness analysis of implementing theimprovement alternative.In the evaluation of the four improvement alternatives listed above, many factors associatedwith an errant vehicle having an off-road excursion must be considered. These include:1. Road geometry, including the horizontal and vertical alignments and the cross-sectional elements of the roadway.42. Terrain characteristics which includes embankment slope, embankment height, andhazardous features such as utility poles, sign posts, bridge abutments, rock-cuts, orany feature which would cause harm if it were struck by an errant vehicle.3. Vehicle speed and vehicle characteristics.4. The vehicle's encroachment angle and the location of the vehicle departure inrelation to the roadside.5. Traffic conditions and traffic composition, and the variation of these componentsduring a specified time period.6. The use of passenger restraint devices (seat-belts), the degree of effective braking asthe motorists attempt to stop the vehicle, and the ability of the driver to recover orsteer-back from a roadside encroachment.7. Climatic conditions, including driver visibility.8. The vehicle operator's physical ability to operate the vehicle safely such as thevariation in human reflexes, poor eye-sight, driver experience (ie. new driver versusexperienced driver or city driver versus country driver) or intoxication.9. The costs of the accidents expected as a result of the implementation of anyimprovement alternative, and the mitigation costs required to implement the option.The complexity and unquantifiable nature of many of these factors produce difficulty in theprobability of consequence analysis of an errant vehicle leaving the roadway. To facilitatethis difficult analysis, a computer program called Roadside-Hazard-Simulation-Model(RHSM) [1] was developed for Transport Canada by BC Research. The model is based on5real accident data from research studies and the results from full-scale crash testing. Theanalysis estimates the change in vehicle velocity and the abruptness of velocity change ordeceleration when the vehicle experiences an off-road excursion. This quantity may beexpressed in terms of power loss which is defined as the amount of dissipated energy duringa specified time interval, and subsequently, a severity index can be established based on thisrate of power loss. The severity index represents the accident occurrence (in terms of aprobability) and is divided into four categories: no damage (ND), property damage only(PDO), personal injury (INJ), and fatality (FAT). Each category represents a different levelof power loss, with small changes in power loss indicating a minor accident and large powerdissipation indicating a severe accident.Numerous revisions to the RHSM program have occurred over the years, however areasonable, recent working version of the program has not been found. One of the earlierversions of the program, Version 5, appeared to show the most promise for enhancementaccording to a Ministry of Transportation and Highways review. A later version, Version6.2, incorporated various new factors into the program but the results appeared to beunrealistic. The latest version, Version 7, incorporated even more factors into the programand as a result the program became too complicated, and the changes were not validateddue to numerous programming errors. A thorough review of the model was made and itwas determined that a new model had to be developed in order to obtain accurate andtrustworthy results.6Once an accurate and running version of the RHSM computer program was developed, thenext problem was to determine the consequences of an errant vehicle leaving the roadwayfor a variety of roadside configurations, hazards, and conditions. To check the validity ofthe simulation model, the results of a test location are compared to a location where actualaccident data is available. A good correlation between the program results and expectedresults was accepted as validating the simulation model.The economic analysis of the consequences of an errant vehicle leaving the roadway formsthe final component of the new version of RHSM. Once the validation of the simulationmodel is complete and the probability of consequence has been determined, an economicpriority ranking system can be established to evaluate roadside safety improvements. Botha benefit-cost ratio approach and a cost-effectiveness approach has been taken to evaluatethe different improvement alternatives, with the alternative that offers the greatest "return"in terms of safety and cost-effectiveness, chosen as the optimal solution. The main problemin this aspect of the project is to accurately define the costs associated with eachimprovement alternative.The completion of the economic analysis leads to the final problem to be completed: toillustrate the application of the model for "real-life" situations on British Columbia's highwaysystem. The model's effectiveness will be shown by providing an example of how each ofthe four improvement alternatives can be warranted for typical British Columbia highwayconditions.Literature ReviewRelevantTerms CharacterIsles ofImprovement Alternatives Hazardous RoadsideWarranting Criteria Relevant ComputerPrograms - M.o.T.H.- TAC- NCHRP- AASHTO- Others (excludingRHSM) Review and Advancementof Roadside Hazard SimulationModel (RHSM)Purpose andObjectives Evolution Basics andAssumptions ProgramDetails ProgramStructure ObjectsTerrain ApplicationsValidation of the New ModelConclusions andReccomm ndationsEconomicFactorsOperationalParameters71.4 Solution StrategyIn order to successfully achieve the project objectives and to solve the research problems,an effective solution strategy must be adopted. Figure 1.1 below, shows a flow-chartillustrating the solution strategy used for this project.FutureResearchFigure 1.1: Flow Chart of Solution Strategy81.5 Scope of the ProjectThis research project is divided into six parts. This first chapter is an introduction to theproject and gives the purpose, the objectives, the problem, the solution strategy, and thescope of the work. The second chapter is the literature review of the information relatedto roadside improvements, barrier warranting, and off-road hazards as well as other roadsidesafety computer programs. The third chapter details the review and advancement of theRHSM program, providing a discussion of all the components of the model including theeconomic evaluation used in the model. The fourth chapter details the evaluation of thenew model, reviewing the probability of consequence of an errant vehicle having an off-roadexcursion for the various proposed improvement alternatives. This is completed for manytypical hazardous locations. Also included in chapter four is a sensitivity analysis of all thevariables used in the new version of RHSM. The fifth chapter provides a series ofconclusions drawn from this research project and discusses the application of the model foruse to evaluate hazardous locations on British Columbia's highways. Finally, the sixthchapter suggests further research to enhance the work completed in this project.92.0 LITERATURE REVIEWThis chapter provides a detailed description and review of the literature which is relevantto the topic of off-road accidents including: barrier warrants, slope flattening, and theremoval of hazardous objects from the roadside. Research on the need to improvehazardous roadsides began as early as the 1920's, however, it was not until the 1950's thatsignificant research was reported. Although much of this review may appear to dealspecifically with roadside barriers, improvement options such as slope flattening or objectremoval are considered within the barrier warrant review.2.1 Characteristics of Improvement Alternatives for Hazardous RoadsidesSlope ReductionIn many instances the best solution for a hazardous roadside may include the modificationof the embankment slope geometry. This includes either reducing the severity of theembankment slope or the rounding of abrupt changes in roadside terrain slope. The mainhazard to errant vehicles caused by a steep embankment slope is the high probability ofvehicle roll-over. By reducing or rounding the roadside slope, the probability of roll-overreduces. The greater the flattening of the roadside slope or the more gradual the rounding,the less chance there is of roll-over and thus, the less severe the accident consequences.Barrier InstallationThe general requirement for any type of traffic barrier is to make the highway safer byreducing accident severity [2] since barriers often increase the frequency of accidents. The10functions and performance characteristics for a longitudinal barrier include:1. To prevent an errant vehicle from penetrating into a hazardous off-road location.2. Redirect errant vehicles into a direction that is parallel to traffic flow, thusminimizing the danger for following and nearby traffic.3. Minimizing the hazard for the vehicle occupants during impact such that vehicleoccupants and nearby traffic are not endangered by a collision with the barrier.Vehicle or barrier fragments can be hazardous if allowed to enter into the passengercompartment of the vehicle or if fragments are deposited on roadway, they becomea hazard for other traffic not previously involved in the accident [3].4. The barrier should be resistive to impact damage upon collision of an errant vehicle.5. The barrier should be economical to construct, install, and maintain.6. The barrier should be aesthetically pleasing and be visible under any conditions.Hazardous Object Removal Any object which could be encountered by an errant vehicle travelling into a roadside isconsidered a hazard. The degree of hazard is dependant upon the probability of strikingthe hazard and the stiffness of the object. The greater the probability of striking the objectand the greater the stiffness of the object, the greater the hazard to the vehicle's occupants.Some hazardous objects can be made such that they pose little or no hazard to errantvehicles such as breakaway poles and signs. However, many man-made hazardous roadsideobjects cannot be made breakaway, not to mention the natural roadside objects such as treesor rock-outcrops that to be shielded from roadway traffic or removed completely.112.2 Warranting Criteria for Hazardous RoadsidesMuch of the literature related to a hazardous roadside deals specifically with the warrantingcriteria for the installation of longitudinal traffic barriers. The components related toflattening the embankment slope and removing hazardous objects are dealt with directlywithin the barrier warranting criteria. This section reviews the procedures used by fivedifferent agencies in Canada, the United Stated, and parts of Europe.2.2.1 M.o.T.H.: Ministry of Transportation and HighwaysBritish Columbia's Design Standards ManualThe province of British Columbia's Ministry of Transportation and Highways has compileda Design Standards Manual [4] for many aspects of highway design considerations. Includedin the manual is a roadside barrier index warrant, labelled as design manual No. B.2-11,developed in February 1982 and revised in June 1987.The roadside barrier warrant is presented in the form of a nomograph. The range ofvarious factors utilized in the nomograph is presented in Table 2.1, and the nomograph andan example are shown in Figure 2.1. This is the standard currently being used by M.o.T.H.in determining the need for a barrier installation at a hazardous location.To illustrate how the nomograph works consider the following example drawn on Figure 2.1.Given a design speed of 100 kph, an outside curve radius of 380 m, a fill height of 2.4 m,a shoulder width of 3.0 m, a summer average daily traffic of 7000 vpd, and moderate12freezing conditions, the resulting barrier need index from the nomograph is 110. With anf-factor of 0.127 and the effective fill height is 12.0 m the first point on the nomograph isidentified and then followed through each step of the nomograph until a value of 110 isread. According to M.o.T.H standards, barrier is warranted at a index score of 90 or above.Table 2.1 Factors Considered by M.o.T.H NomographFactor I Range and Effect on Barrier Need IndexOutside Curve/Design SpeedThe combination of these factors will produce a lateral friction factor (f) whichidentifies the origin on the nomograph.Effective Heightof Fillrange:effect:below 3.0 meters to more than 21.0 m.as the fill height increases, the barrier need index increases.Shoulder Width range:effect:less than 1.2 m. to 6.1 m.as the shoulder width increases, the barrier need indexdecreases.Summer AverageDaily Trafficrange:effect:from 1000 or less to 9000 or more.as S.A.D.T increases, barrier need index increases.Road Gradient range:effect:from -6% grade to +6% grade.as grade increases, barrier need index decreases.Fill-Slope range:effect:from 4:1 to 1.25:1.as fill-slope steepens, barrier index increases.ClimaticConditionsrange:effect:from significant freezing to no freezingas the climatic conditions become less severe, the barrier needindex decreasesSource: BC Ministry of Transportation and Highways Design Standards Manual (1991)Although the use of the nomograph provides a clear and discrete indication of whether abarrier should be used at a particular location, it lacks detail to gain overwhelmingconfidence in the results. Many more factors should be considered in determining whethera barrier is warranted such as the encroachment rate, accident consequence, and theeconomics of a barrier installation. Another problem is the inability to accuratelymanoeuvre through the nomograph without loosing accuracy.§&g ,-01 Eiegi;tgnif,-Z-§§§2gO2 E SENS1 0O3 0°"-*6 pp.5,;N O V'0 .,e Xt0 0;568 .6 "- A.• 20B2 t (1.50.0 >0=2 E ri 50.15■Igglc1743 OiZZg'17 .63 EEZ,it:=22 00 Eo 0-Jo_2xnu,.....■....,,11111116,inermn b.MU ' 41 piNIWVMIL ffik Iiih, h," G.3 141 11 04411116\s \4141. ;1S 11 .116's: ,..".1 iik?1,d :114111:4110110 1.,4 • V:1 0 111116b.044044111:11116kEla 0 a Ater411611 1 CI\ .111 6. 16knaleffiktffik *11111111t,..N MM it.s.SELIBI'VEMMINiii=mmumveavallps .....1k11111110111111 111 N.-_ NNK.I. % .:werm limmIllNWINAL -4NSROMENSIMOaftrARM2,111 NrA „MIN N\i■SirillininliSIM■Aos'a,_ \A.x.■, I `AXL\111 :a& viii lk , MOMMEMENEWN NRARks 1,;,,IM NMAMIMMII6.01■Eltrkb.. i■ewx .\.‘1,\ N,\MMIIM6111611■Wilt%■:alaii..."RIAMEMilliggitHIMMLILIII'1%71■614W-1111 :milillik miumumns►,IllaNUE% b3h... WIMMIl .•ni 4A1111 isol■1M UM kg NM '-. — IM . .T1V8E82 •' :o :- :a :n !..S80.1.X1 i ONV 80.020i0N1 5INVO -0LU -1:1-;< g E •ZMt g!Exw E 2 C PP..'5 2EZ I '- E . 4 F., . i ' C:'0>-. I :i7,:ilzp-.8E-Rac.f.Sr 5° .gt1:Ew ati: 2 ; 2Dm tz-gli2 2 1Zw .;;;;IiiRitilf21<co -- NO4- §m§ggir"M- gs gmg g r> tg g §1 ,- § F)§ 111 "? MMAft.MR,9-SM28M6gigFainggggs§§. e E g gg §•MR8 '-': 7, °qc 9.1 4Mggs s2s q leR142.2.2 TAC: Transportation Association of Canada.Manual of Geometric Design Standards for Canadian RoadsTAC's (formerly RTAC) Manual of Geometric Design Standards for Canadian Roads (1986Metric Edition) [5] specifies that warrants must satisfy an equal-severity criterion, in that abarrier will only be installed if it is less dangerous than the hazardous feature which thebarrier is intended to shield. TAC has derived warrant procedures for the following generalsituations.1. Steep embankment slopes.2. Hazardous roadside objects.TAC considers the following factors in the development of barrier warrants for the twogeneral situations defined above.1. Clear-Zone Identification.2. Accident Severity Index (SI).3. Encroachment Rates (ER).4. Collision Frequency (CF).5. Alignment Adjustment Factors (AF).TAC's warrant system ranks the installation of barriers in terms of the severity of the hazardand the frequency that the hazard is struck or traversed by an errant vehicle. The twowarrant systems presented include: one for steep embankment slopes and one for hazardousroadside objects.151. TAC's Barrier Warrant: Steep Embankment Slopes (slopes > 3:1)To decide if a barrier on an embankment slope is warranted, the severity index (SI) mustbe determined. The severity index can be obtained from one of three sources:1) Table 2.2: Severity index for non-traversable fill slopes, developed from NCHRP's"Guide for Selecting Locating. and Designing Traffic Barriers [6], used whenembankment heights are greater than 3.0 meters.2) Table 2.3: A severity index which is based on a reliable accident history, either in termsof accident costs or casualties.3) Table 2.4 and Table 2.5: Utilizing obstacle inventory codes and Severity indices alsodeveloped from NCHRP's "Guide for Selecting. Locating. and DesigningTraffic Barriers [7], used when embankment heights are less than 3.0 meters.Once the severity index has been established, the encroachment rate (ER) can be found byutilizing Table 2.6. These values, which are based on accident records, can be adjusted tocorrect for horizontal and vertical roadway alignments. These adjustment factors (AF) areshown in Table 2.7 (horizontal adjustments) and Table 2.8 (vertical adjustments).The warrant index is determined using (SI), (ER), and (AF) and the following expression:WI = (SI) x (ER) x (AF)where: SI = severity index ER = encroachment rate.WI = warrant index. AF = adjustment factors.Table 2.2:Severity Indices: Non-Traversable Fill SlopesSlope SeverityIndex4.0:1 2.63.5:1 3.53.0:1 4.02.5:1 4.52.0:1 5.01.0:1 6.016TAC does not define a value for WI which locates a point to differentiate between whetheror not a barrier is warranted, however, the manual states that the value obtained should becompared and ranked with similar values for other locations and a priority index should bedeveloped based on the demands of the governing agency.Source: TAC, Manual ofGeometric DesignStandards (1986).Table 2.3: Severity Index versus Casualties versus CostsSeverityIndex% PDOAccident% InjuryAccident% FatalAccidentTotal AccidentCost (1985 $)0 100 0 0 1,3901 85 15 0 4,1702 70 30 0 6,9503 55 45 0 9,7204 40 59 1 16,2805 30 65 5 33,2506 20 68 12 61,5707 10 60 30 131,5008 0 40 60 247,0009 0 21 79 318,00010 0 5 95 378,000Source: TAC, Manual of Geometric Design Standards (1986).17Table 2.4: Obstacle Inventory Codes Table 2.5: Severity IndicesIdentificationCodeDescripterCodeFrontSlopeBackSlopeEnd Treatment Code SeverityIndexBeginning Ending14. Ditches 1 6.0:1 6.0:1 0 0 2.22 6.0:1 5.0:1 0 0 2.43 6.0:1 3.5:1 0 0 3.04 5.0:1 6.0:1 0 0 2.35 5.0:1 5.0:1 0 0 2.56 5.0:1 3.5:1 0 0 3.07 4.0:1 6.0:1 0 0 2.68 4.0:1 5.0:1 0 0 3.09 4.0:1 3.5:1 0 0 4.010 3.6:1 6.0:1 0 0 3.511 3.6:1 5.0:1 0 0 3.812 3.6:1 3.5:1 0 0 4.513 3.0:1 6.0:1 0 0 3.614 3.0:1 5.0:1 0 0 4.215 3.0:1 3.5:1 0 0 4.8Notes:Obstacles such as ditches, as shown in the table above, are not of the longitudinal class andhave been given a designated code 0 for each end treatment. For the beginning and endtreatment codes for longitudinal obstacles please refer to the safety treatment of the obstacle.The table shown above represents only a partial listing of the obstacle severity codes and thecorresponding severity indices. For a complete listing of all roadside obstacles identified byTAC, please refer to the manual.Source: TAC, Manual of Geometric Design Standards (1986).18Table 2.6 Encroachment RatesRoad Class ADT DesignSpeed(kph)LaneWidth(m)No. ofLanesShoulderWidth(m)Encroachment Rate(x1000)(events/km/yr)FreewayUrban >100 3.7 4-D 3.0-3.7 031 ADT> 100 3.7 4-D 3.0-3.7 0.20 ADTRural > 100 3.7 6-D 3.0 0.07-0.12 ADT>100 3.7 4-D 3.0 0.20-0.31 ADTArterialUrban <100 3.7 4 3.0 0.32 ADT<100 3.7 2 1.2-3.0 0.45 ADTRural <100 3.4-3.7 2 1.2-3.7 0.45 ADTCollector250-400 <50 3.0 2 0.6 0.63 ADT400-750 <50 3.0 2 0.9 0.45 ADT750-4000 <50 3.0 2 0.9-2.4 0.45 ADT250-400 50-70 3.0 2 0.6 0.63 ADT400-4000 50-70 3.4-3.7 2 0.9-2.4 0.45 ADT250-400 > 70 3.0 2 0.6 0.63 ADT400-4000 > 70 3.4-3.7 2 0.9-2.4 0.45 ADTLocal50-250 30-50 2.7 2 0.6 1.52 ADT250-400 30-50 2.7 2 0.6 0.63 ADT>400 30-50 3.0 2 1.2 0.45 ADT50-400 70-80 3.0 2 0.6 0.63 ADT>400 70-80 3.4 2 1.2 0.45 ADTNote: D = divided Freeway under number of lanesSource: TAC, Manual of Geometric Design Standards (1986).19Table 2.7 Horizontal Adjustment FactorsHorizontal Curvature Description Horizontal AdjustmentFactorTangent or FlatCurve1.00Intermediate Curve(760 m)1.05Inside CurveMinimum or near minimum , or isolatedintermediate curve.1.10Isolated minimum or near minimum curve, or curveswith radii =170 m maximum.1.15Outside CurveMinimum or near minimum , or isolatedintermediate curve.120Isolated minimum or near minimum curve, or curveswith radii= 170 m maximum.1.25Note: Minimum radii curves are those which satisfy the design requirement of speed, maximumsuperelevation, and road surface friction. Intermediate curves are defined as those whoseradius is twice that of the minimum.Source: TAC, Manual of Geometric Design Standards (1986).Table 2.8 Vertical Adjustment FactorDowngrade or Profile Conditions Vertical Adjustment Factor2% or less 1.003% 1.054% or moderate crest vertical curvature in combinationwith horizontal curve.1.105% 1.156% or extreme crest vertical curvature in combinationwith horizontal curve.1.207% or more 1.25Note: A moderate vertical crest satisfies the sight distance criteria for design speed. An extreme crestis one which provides only half the required sight distance.Source: TAC, Manual of Geometric Design Standards (1986).202. TAC Barrier Warrants: Hazardous Roadside ObjectsThe first step in determining a warrant for a barrier used to protect an errant vehicle fromhazardous roadside objects is to determine the clear-zone. The clear-zone required can bedetermined given the fill/cut slope of the roadside embankment and the speed of the errantvehicle. Note that for slopes steeper than 3:1 (horizontal:vertical), the slope becomes thehazard rather than the hazardous feature. A correction factor can be applied to the amountof clear zone required to allow for the affects of horizontal curves. This correction factoris identical to the correction factors discussed for steep embankment slopes and the valuesof the adjustment factors were shown in Table 2.7. Once the clear-zone is determined, aconclusion can be made on whether or not a barrier should be considered for a givenroadway condition, given that the location of the hazardous roadside objects are known. Ifthe hazardous object is within the clear-zone, a barrier installation must be considered. Afigure which illustrates the clear-zone requirement, as recommended by TAC, is shown inFigure 2.2.The severity index (SI) is the next component of the warranting analysis which must bedetermined to evaluate the warrant index. Similar to the previous warrant procedure forsteep embankment slopes, the severity index is obtained utilizing Table 2.4 (ObstacleInventory Codes) and Table 2.5 (Severity Indices), or by using Table 2.3 (Severity Index vsCasualties versus Costs).Barter <65 kph 80 kph 100 kphWarranted1 0 4iiiiA AM 110 kphMIAMIBarriernotWarrant: •2.5:13:1FillSlope 4:1a:b 5:110:1travelled clear zone " lane '' 4 el----.---41BarrierWarranted-■---___E.8 Barrier1 1 If ,.'notWarranted2:1CutSlopea:b10.16:15:13:12.5:1r travelled clear zone210 5 10 15 20 25 30Clear Zone Width (meters)Fill Side Slope0 5 10 15 20 25 30Clear Zone Width (meters)Cut Back SlopeFigures 2.2: Clear Zone Width for Fill and Cut SlopesSource: TAC, Manual of Geometric Design Standards (1986). - ImpactEnvelopew22A collision frequency (CF) is used to determine the warrant index for hazardous roadsideobjects. Since the hazardous objects are often smaller or of limited size and located in anotherwise safe clear-zone, the probability of an encroaching vehicle actually striking theobject is less than 100 percent. Collision frequency is introduced to relate encroachmentrate to the actual number of collisions with the fixed object. Using the encroachment ratediscussed earlier, with appropriate correction factors, and the lateral displacementdistribution shown in Figure 2.4, the following expression can be used to calculate collisionfrequency.J-WE fCf— [ (L-19 .2) xP[flA] +5.14E P[nA+1. 8+ 2 ,7 —1 2 000 2J=1Where: Ef = encroachments/km/yr.L = horizontal length of the roadside obstacle.W = width of roadside obstacle.A = Lateral distance from roadside obstacle to edge of pavement.Y = lateral displacement of the encroaching vehicle from the edge of pavement.J = the number of 1 meter wide obstacle-width increments.P[Y>] = probability of a vehicle's lateral displacement greater than some value.Edge of PavementFigure 2.3: Collision Frequency.Source: TAC, Manual of Geometric Design Standards (1986).2310090F 80E0E 70co 60oi3c 05Lu6-401 30.0ea. 20100 0 2 4 6 8 10 12 14 16 18 20Lateral Travel Distance (meters)Figure 2.4: Lateral Displacement Distribution.Source: TAC, Manual of Geometric Design Standards (1986).Finally, the warrant index (WI) for hazardous roadside features can be found by using thefollowing equation:WI = (SI) x (CF) where: WI = warrant index.SI = severity index.CF = collision frequency.Similar to the previous section on steep embankment slopes, TAC does not define a pointon the warrant index scale which will explicitly state whether a barrier is warranted or it isnot warranted. The value should be compared with others to produce a relative rankingprocedure, and consequently, an installation priority.242.2.3 NCHRP: National Cooperative Highway Research ProgramReport 118: Location, Selection, and Maintenance of Highway Traffic Barriers (1971) 181Report 54: Location, Selection, and Maintenance of Highway Traffic Barriers (1968) [91NCHRP, which is sponsored by the American Association of State Highway TransportationOfficials (AASHTO) and the Transportation Research Board (TRB), identifies two mainfeatures which may warrant a roadside traffic barrier installation. These two main featuresare lateral drop-off, and roadside obstacles. It should be noted that these are similar to thefeatures identified by TAC, although some terminology may be slightly different. This isbecause much of the work completed by TAC is based on this work by AASHTO. Lateraldrop-off is further divided into bridge structures, abrupt embankments, and slopedembankments to identify a variety of roadside conditions. Roadside obstacles are dividedinto non-traversable hazards and fixed objects to allow for a variety of hazardous roadsidefeatures.To avoid repetition with TAC's description of the development of the warrants for trafficbarrier installations, only the figures and tables recommended by NCHRP to determine thevarious barrier warrant situations are presented in this section. Figure 2.5 illustrates thebarrier requirements for various embankment geometry. Table 2.9 identifies numerousroadside hazards that require a barrier installation if the hazard is located within the clear-zone. The similarities with the RTAC method are obvious.250.80.71.5.1Qua 'draft0.6Warranteda)0..2 0.5co 2.0.1i 0.42.5:10.33.0:1 Gum dud'LE 4.0:15.0:1not Warra rted 0.26.0:10.10.00 10 20 30 40 50Embankment Height (feet)Figure 2.5: Barrier Requirements for Embankment GeometrySource: NCHRP, Report 118 (1971).Table 2.9: Warrants for Barrier Placement at Roadside Obstacles and Hazards.Roadside Objects and Hazards within 30 feet of the Roadway Guardrail Required1. Sign Supports b Yes a NoPosts of breakaway design XWood poles with area greater than 50 square inches. X CSign bridge supports XMetal shapes with depth greater than 3.5 inches XConcrete base 6.0 inches or more above ground. X2. Metal Light Poles d X3. Bridge Piers and Underpass Abutments X4. Retaining Wall and Culvert Head-walls X5. Trees with Diameter greater than 6.0 inches X6. Wood poles with area greater than 50 square inches X d7. Non-traversable hazards XBarrier recommended only if obstacles cannot be removed from thirty foot clear zone.Breakaway design should be used exclusively, regardless of the distance from the travelled way.The cross-sectional area of large wood members can be reduced by boring holes or notching the poles.The use of breakaway bases for metal light-poles is good practice, thus reducing the need for barrier placementSource: NCHRP, Report 118 (1971).a8.511Notes: abcd262.2.4 AASHTO: American Association of State Highway and Transportation OfficialsRoadside Design Guide (1989) AASHTO's Roadside Design Guide [10] devotes an entire chapter to roadside barriers.Roadside barrier warrants are divided into two basis categories: embankments and roadsideobjects. AASHTO's Roadside Design Guide is intended to be used only as a guidebook andfurther development of the guidelines is recommended and encouraged for various locations.As with all types of traffic barriers, roadside barriers should only be installed if it reducesthe severity of potential accidents. Historically, roadside barrier warrants have been basedon a subjective analysis of roadside hazards and accident potential. However, much efforthas been made to quantify the subjective elements of analysis, and develop a standardwarranting procedure.Embankment Slopes AASHTO defines the embankment height and the side slope as basic factors in determiningthe need for a barrier. These factors, and the corresponding barrier warrants are showngraphically in Figure 2.6. This figure assumes that the roadside is free of hazardouselements. Also, the figure does not consider the probability of the occurrence of anencroachment or the relative costs involved. This is where modifications to the presentedwarrants are desirable. Two examples of this are shown in Figures 2.7 and 2.8. Figure 2.7accounts for the decreased probability on lower volume roads, and Figure 2.8 considers thecost effectiveness of a barrier for a site specific location.2.0:12.5:13.0:14.0:15.0:16.0:127Travelled Shoulder Fill SectionWay Embankmentb1aHeight/ / 0.7Cif.6 0.6a)aou) 0.5c0t0 0.4CO=LL15 0.3CB0.9_0- 0.2. c.7)a)CCBarrierBarrierWarrannot Wa---rrantedted1.5:10.10.00 10 20 30 40 50 60Fill Section Height (ft)Figure 2.6: Comparative Risk Warrants for EmbankmentsSource: AASHTO, Roadside Design Guide (1989).281.5:12.0:12Slope '5'13.0:13.5:14.0:10 10 20 30 40 50 60 70KeyEmbankmentmoreHazardousGuardrail moreHazardous80• 35112C 30• 20rn'(.7)a) 15C*.)• 011111 I I I I twa.-1MEM1.111E 15' fill heightmulummummajmnomm._42' fillWM".12' fill height20' fill height30' fill heightEmbankment Height (H) (ft.)Figure 2.7: Modified Barrier Warrants for Embankments based on Traffic VolumeSource: AASHTO, Roadside Design Guide (1989).KeyBarrierWarrantedBarrier notWarranted0 2 4 6 8 10 12 14 16 18 20Warrant Length (Hundreds of Feet)Figure 2.8: Modified Embankment Warrant considering a Cost Effectiveness ApproachSource: AASHTO, Roadside Design Guide (1989).29Roadside ObjectsAccording to AASHTO, roadside objects account for 30% of all highway fatalities each yearand therefore, these hazardous obstacles require careful consideration in the roadsidebarrier warrant evaluation. Table 2.10 below defines a number of hazardous roadsideelements that may require shielding and Table 2.11 shows the clear zone required from theedge of the roadway based on design speed, average daily traffic (ADT), and fill/cut slopes.By consulting these two tables the engineer is able to determine if the hazard contributesa significant-enough threat to an errant vehicle (and the passengers in the vehicle) towarrant a roadside barrier.Table 2.10: Barrier Warrants for Non-traversable Object HazardsRoadside Hazard Barrier Warranting Actionbridge piers, abutments shielding generally requiredboulders decision based on nature of hazard and impact likelihoodculverts, pipes, head-walls decision based on size, shape, and location of hazardcut slopes (smooth) shielding generally not requiredcut slopes (rough) decision based on likelihood of impactditches (traverse) shielding required if likelihood of head on impact is highembankment decision based on fill height and sloperetaining walls decision based on smoothness of wall and impact anglesign/luminaire supports shielding generally required for non-breakaway supportstraffic signal supports shield isolated traffic signals within highway clear zonetrees decision based on site specific circumstancesutility poles shielding may be warranted on a case-by-case basisNotes Shielding of a non-traversable or fixed object is warranted when the hazard is in the clear zone.Marginal situations for placement/omission of a barrier, will usually be decided by accident experience.Where feasible, luminaire supports should be breakaway design regardless of distance from roadway.Source: AASHTO, Roadside Design Guide (1989).30Table 2.11: Clear Zone Distances (in feet from the edge of driving lane)DesignSpeedDesignADTFill Slopes Cut Slopes> 6:1 5:1-4:1 < 3:1 < 3:1 4:1-5:1 > 6:140 MPHor Less< 750 7-10 7-10 ** 7-10 7-10 7-10750-1500 10-12 12-14 ** 10-12 10-12 10-121500-6000 12-14 14-16 ** 12-14 12-14 12-14>6000 14-16 16-18 ** 14-16 14-16 14-1645-50MPH< 750 10-12 12-14 ** 8-10 8-10 10-12750-1500 12-14 16-20 ** 10-12 12-14 14-161500-6000 16-18 20-26 ** 12-14 14-16 16-18>6000 18-20 24-28 ** 14-16 18-20 20-2255 MPH <750 12-14 14-18 ** 8-10 10-12 10-12750-1500 16-18 20-24 ** 10-12 14-16 16-181500-6000 20-22 24-30 ** 14-16 16-18 20-22> 6000 22-24 26-32 * ** 16-18 20-22 22-2460 MPH <750 16-18 20-24 ** 12-12 12-14 14-16750-1500 20-24 26-32 * ** 12-14 16-18 20-221500-6000 26-30 32-40 * ** 14-18 18-22 24-26>6000 30-32 * 36-44 * ** 20-22 24-26 26-2865-70MPH<750 18-20 20-26 ** 10-12 14-16 14-16750-1500 24-26 28-36 * ** 12-16 18-20 20-221500-6000 28-32 * 34-42 * ** 16-20 22-24 26-28>6000 30-34 * 38-46 * ** 22-24 26-30 28-30Notes: * Where there is indication of a high probability of an accident occurrence either by detailedstudy or by the accident history, the clear zone should be increased to greater than 30 feet.** Since recovery is less likely on the unshielded, traversable 3:1 slopes, fixed objects shouldnot be present in the vicinity of these slopes.Source: AASHTO, Roadside Design Guide, (1989).312.2.5 Barrier Warrant Criteria used in Six European CountriesTo gain a perspective of the barrier warranting criteria used in Europe, six countries havebeen identified and their corresponding roadside barrier warrant criteria outlined. The sixcountries include France, the Netherlands, Denmark, Austria, Norway, and Belgium. Thisinformation was collected by Cooper [11] in the early 1980's, by questionnaire mailed toeach country. Although this information may seem somewhat dated today, the importantfactor to consider, is that the experience and procedures in these countries is very similarto the experience and procedures used in North America.France:Roadside barriers are required when the fill height exceeds 4.0 meters or whereheavy, un-modifiable obstacles are present in the clear zone. For the rest of thehighway system, there is no systematic program of roadside barrier installation,except where the accident experience dictates.Netherlands:Roadside barriers are not required where there are no un-modifiable hazards within10.0 meters of the travelled way. Roadside barriers may be warranted in the presenceof hazards such as steep embankments, fixed objects, water courses, or overpasses.DenmarkRoadside Barrier warrants are determined based on the fill height in meters and theslope of the embankment. The various warrants for the different roadways areillustrated in Figures 2.9, 2.10, and 2.11. A barrier is also required if a minimum32clear lateral distance (often referred to as the Clear zone) is not present. Thefollowing Table, Table 2.12, shows the values of the minimum clear lateral distancesrequired.Table 2.12: Denmark's Minimum Clear Lateral Distance (Clear Zone)Railway and Water Hazards ObstaclesMotorways 20.0 m Motorways 10.0 mHighways 10.0 m Highways 7.0 mLocal Roads 5.0 m Local Roads 4.0 mSource: BC Research, Highway Safety Barriers (1980).876Slope 5(Horizontal/Vertical) 432100 2 4 6 8 10 12 14 16 18 20Fill Height (meters)Barrier Required I I Barrier Not Required Figure 2.9: Roadside Barrier Warrant for Motorways in DenmarkSource: BC Research, Highway Safety Barriers (1980)._ •NE. ► ► k.44 N N► •• • •• 14hl• • • •‘%111\.N. ► •N■NN Ni■■■■ lqk■■. \Mi■ 1■\.ri■ N&I 'I 11 •N\\ M\MMIIIIINE `L`■`.r-ASNIIN33876Slope 5(Horizontal/Vertical) 432100 2 4 6 8 10 12 14 16 18 20Fill Height (meters)Barrier Required Barrier Not Required Figure 2.10: Roadside Barrier Warrant for Highways in DenmarkSource: BC Research, Highway Safety Barriers (1980).2 4 6 8 10 12 14 16 18 20Fill Height (meters)ES3 Barrier Required Barrier Not Required!- A Barrier Optional876Slope 5(Horizontal/Vertical) 4321Figure 2.11: Roadside Barrier Warrant for Local Roads in DenmarkSource: BC Research, Highway Safety Barriers (1980).34AustriaRoadside barriers are required when the fill height exceeds 3.0 meters, whenembankment slopes are steeper than 2:1, and at the following locations:- retaining wall drop-offs greater than 2.0 meters.- where obstacles are within 4.0 meters of the roadway on level terrain.- obstacles within 8.0 meters of the roadway on terrain steeper than 3:1.- pedestrian walkways- short radius horizontal curves, and the ends of tight spiral curves.- locations susceptible to icing, or strong cross winds.NorwayRoadside barriers are required when the clear lateral distance (clear zone) availableis below the value in the following table (Table 2.13), based on average daily traffic(ADT) and speed limit.Table 2.13: Norway's Clear Lateral Distances (Clear Zones)Average DailyTraffic(ADT)Speed Limits50 kph 60 kph 70-80 kph 90 kph< 300 2.0 m 2.0 m 3.0 m -300-1500 2.0 m 3.0 m 3.0 m -1500-4000 3.0 m 3.0 m 4.0 m -4000-8000 3.0 m 4.0 m 4.0 m -8000-12000 4.0 m 4.0 m 5.0 m 6.0 m12000-25000 4.0 m 5.0 m 5.0 m 6.0 m> 25000 5.0 m 5.0 m 6.0 m 6.0 mNote: 2.0 m can be added to clear zone distances when sharp horizontal curves are involved.Source: BC Research, Highway Safety Barriers (1980).Barrier Atarr ntedBarrierWarra35Norway (continued)Roadside barrier warrants in Norway are also dependant upon the embankmentslope and the fill heights as illustrated in Figure 2.12 below. As well, roadsidebarriers may also be warranted for the following locations:i) rock-cuts iii) hazardous roadside objectsii) water hazards iv) poor accident history/record1:1.5Slope1:2.01:2.51:3.00 2 4 6 8 10 12 14 16 18 20Fill Height (meters)b■ • Must be judged separately as a consequence of speed,ADT, terrain below slope, climatic conditions, etc.Figure 2.12: Norway's Roadside Barrier WarrantsSource: BC Research, Highway Safety Barriers (1980).BelgiumRoadside barrier warrants are determined based on the amount of clear zoneavailable, the speed, the fill height, and the embankment slope. The warrantingcriteria is illustrated in Figure 2.13 and Figure 2.14.364 6 8 10 12 14 16 18 20Fill Height (meters)=I Barrier Required [ l Barrier Not RequiredFillSlope18/416/414/412/410/48/46/44/42/4Fig 2.13 Barrier Warrant for Fill Height in BelgiumSource: BC Research, Highway Safety Barriers (1980)765SafeDistance 4(meters)3210LongObstaclesIsolatedObstacles0 20 40 60 80 100 120Speed (kph)Fig 2.14 Barrier Warrant for Clear Zone in BelgiumSource: BC Research, Highway Safety Barriers (1980)372.4 Computer Applications / ModelsThe development of computer programs to model an errant vehicle's movement and avehicle collision with either a barrier or a roadside hazard have become more common dueto an increase in the availability, speed, and capacity of computers, and because full-scalecrash testing of vehicles is very expensive and time consuming. Computer simulation offersthe engineer an excellent tool in analyzing any combination of roadway, vehicle, and barriercharacteristics. Full-scale crash testing cannot be completely eliminated since the simulationmodel is calibrated using crash test results. As modifications to the roadway, the vehicles,or barriers occur, a re-calibration of the model is required using updated crash-test data.Validation of simulation models is dependant upon the quality of the calibration data.This review describes the computer programs relevant to roadside hazards. The followingprograms were reviewed: HVOSM (Highway-Vehicle-Object-Simulation-Model), BARRIERVII, GUARD, ROADSIDE (AASHTO's Cost-Effectiveness Model), SAFEROAD,ROADSIDE (Expert-System), and WARRANT ADVISOR. Transport Canada's simulationprogram RHSM has been omitted since it is thoroughly discussed in Chapter Three.2.4.1 HVOSM: Highway-Vehicle-Object-Simulation-Model [12]The HVOSM program is perhaps the most widely used model capable of simulating threedimensional motion for various vehicle control inputs and a wide range of terrain conditions.The model was initially developed at Calspan by McHenry and Delays [13] in 1966.38Numerous revisions and updates to the program has maintained the validity of the model.The model has been proven to accurately simulate the following situations:1. Ride and handling motion of vehicles with dependant and/or solid axle suspension.2. Impacts and collisions involving errant vehicles and hazardous roadside objects.3. Effects of terrain, tire-curb contact, and wheel spin dynamics on vehicle response.4. Torque capability of various braking systems [14].HVOSM considers a vehicle as a sprung mass system and is capable of reproducing vehiclemovements with a fair degree of accuracy Limitations to the program include the inabilityto simulate impact forces during a collision, and the inability of describing barriers in detail.Since HVOSM was designed to cover a wide range or variety of roadside and vehicleconditions, it's specific application to roadside barriers is somewhat limited [15].The input data required by HVOSM includes simulation control data, vehicle data, tire data,and the initial conditions. Unfortunately, the barrier details are too simple to be usedstrictly for barrier warranting analysis. The output obtained from HVOSM includes vehicleand barrier deformation, the friction forces between vehicle and barrier, and the barrierenergy conservation and dissipation. The validation of HVOSM with respect to median androadside barriers has been proven. However, because of the simple barrier representation,the results for deformable barriers are less effective than the results for rigid barriers.392.4.2 BARRIER VII [16]The BARRIER VII model was initially developed by Powell [17] in 1973 to simulate vehicleinteraction with various barriers [18]. BARRIER VII is a two-dimensional motionsimulation program based on elastic-plastic theory of material behaviour. The model isdivided into two parts: a highly sophisticated barrier model and a somewhat simplifiedvehicle model. The barrier model is idealized as an assemblage of discrete structuralmembers possessing geometric and material non-linearities [19]. The simplified vehiclemodel is described by a number of inelastic springs, defining contact points which theautomobile may interact with the barrier.The advantage of BARRIER VII over HVOSM is that BARRIER VII concentrates moreon the safety barrier than the vehicle characteristics. The input requirements concentrateon barrier characteristics such as dimensions and material. BARRIER VII's output includesvehicle location, velocity, acceleration, and barrier deflections and forces. BARRIER VIIhas been more extensively validated than any other barrier simulation, thus the program hasbeen used successfully as a design tool in the development of various barrier systems [20].2.4.3 GUARD [21]The simulation model GUARD was initially developed by Bruce and Hahn [22] for theUnited States Federal Highway Administration (FHWA) by the ITT Research Institute in1976. GUARD has a three-dimensional response capability but lacks the ability toaccurately simulate the friction forces developed between vehicle and barrier during impact.40However, GUARD utilizes a non-linear dynamic interaction model for vehicle impacts withlongitudinal barriers. The GUARD simulation model is divided into three modules:1. Guardrail/Barrier simulation.2. Vehicle characteristics and behaviour.3. Dynamic interaction of vehicle components [23].The input requirements of GUARD can vary depending on the type of barrier application.For rigid barriers the required input is considerably reduced compared to that for flexiblebarriers, which require approximately the same input as the BARRIER VII simulationmodel. The output obtained from GUARD produces vehicle displacement, velocity,acceleration, as well as the forces on the barrier in all three dimensions. Validation ofGUARD was conducted in two phases [24]. The vehicle interaction modules were validatedfor rigid barriers using full scale crash tests and HVOSM. Although the results wereacceptable, HVOSM produced a better estimate. For flexible or semi-rigid barriers, whichGUARD was designed to simulate, the model incorporated all three modules above andproduced a good correlation with the results of the full scale test crashes.2.4.4 ROADSIDE (1989) Cost -Effectiveness Model Developed by AASHTO. [25]ROADSIDE evaluates the need for a barrier based on a cost-effectiveness model. A cost-effective selection procedure predicts the total costs associated with specific traffic androadway conditions and selects the optimum design from one or more alternatives [26].41The program requires two sets of input variables. The first set includes basic input datasuch as accident costs, encroachment rates, and encroachment angle. The second setdescribe the roadway, the roadside characteristics, and barrier related costs. The programoutput is in the form of a summary which identifies the expected accident costs and the costof any improvement alternative. From this information, a decision on barrier justificationcan be made. This program is based on accident records from AASHTO's sources.2.4.5 SAFEROAD (1991) [27]Initially developed by P. Rosche [28] in 1991, SAFEROAD is a knowledged-based expertsystem designed to assist the engineer in selecting, locating, and designing traffic barriersfor new construction or retrofit projects. The three main objectives of the program aregiven below.1. To determine several economical barrier designs.2. To determine data which would aid in securing conclusions.3. To determine the basis for conclusions and recommendations.A flow-chart of SAFEROAD is shown in Figure 2.15.Knowledge-based expert systems can be very useful, however, updating, revising, and addingto the knowledge base must be continually undertaken. Otherwise, the faulty and obsoletedata in the knowledge base will not produce valid results.42ADTHazard Types/GeometryOperating SpeedSite GeometryBudget Roadway TypesWeather ConditionsVehicle CharacteristicsPROBLEM AQUISITIONTASK SELECTIONRetrofitNew ConstructionRoadside BarrierMedian BarrierBridge RailCrash CushionVDOMAIN SELECTIONiTrainingConsultationSERVICE SELECTIONCostStrength and SafetyCompatibilityField ExperienceMaintenenceAestheticsICANDIDATE DESIGN GENERATORir SIMULATIONtDESIGN EVALUATORFigure 2.15 Flow-chart of Knowledge-based System SAFEROADSource: Advisory System for Design of Highway Safety Structures, P. Roschke (1991)Once the service is selected, either training or consultation, the application or domain mustbe selected. The four applications include roadside barriers, median barriers, bridge rail,and crash cushions. The task selection identifies either new or retrofit construction. Nextthe problem acquisition phase identifies all the factors relevant in the barrier analysis. Thecandidate design generator considers the factors from the problem acquisition phase anddetermines whether a particular structure is warranted. Once the suitable barrier designsare identified, the design evaluator ranks the designs according to the number of evaluationcriteria. Feasible, evaluated designs are sent to the last module; simulation of crash impacts.432.4.6 ROADSIDE (1991) Expert System for Roadside Safety. [29]Not to be confused with the cost-effectiveness model ROADSIDE discussed earlier, thisROADSIDE program is another microcomputer-based expert system that performs roadsidesafety analysis. In particular, the system has been developed to evaluate whether a trafficbarrier is required at a particular site. The general framework of ROADSIDE includesthree modules: user interface, inference engine, and the knowledge base. The user interfaceenables the user to "talk" to the computer, this includes transmitting the input and outputinformation. The inference engine is a collection of processing procedures to find aconclusion based on the user's rules. The knowledge base is the set of rules/facts used tomake decisions. Figure 2.16 shows a flow-chart of ROADSIDE.Conclutions and RecommendationsRoadside Barrier May Be WarrantedNon-Traversable LocationSite Geometry Fixed Object Is Present ObstaclesType Of ObstacleTraffic Information Cross-Section Figure 2.16 Simplified Reasoning Process used in ROADSIDESource: Development of Prototype Expert System for Roadside Safety, H. Zhou, D. Layton (1991).Roadside Safety Hardware Warranting AdvisorG1 Cable Guardrail/////7////////////////////iii /////7/7//i/77/////p///17/7/y///////7/7////x// //////////////i/i///ii/rimi/////i7iiiii/i/iimiii zwpwwii, ,/S3x5.7 steel post -- l< 16 ft >i< 16 ft \ -,- 3-3/4' Dia. Cables_I_ - I I \\\\\\\\.\\\\\\sm.\\\\\\\\\\\\\\\\•\\\\\\\:\\\\\ \\.\\\\\.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\.\\\\\v\ \\\\\\\.\\\\\\\wm.\\\\\\v\..\\\\\\\\\\\\\.\\\\\\\\\\\\\.\Travelled Way442.4.7 WARRANT ADVISOR (1989) Computing in Civil Eng. pp 490-497. [31]WARRANT ADVISOR is an object-oriented approach to warranting roadside safetyhardware. Initially developed in 1989 by Ray and Logie [32], WARRANT ADVISOR'smain objective is to provide a tool to explore the available alternatives in selecting roadsidesafety devices. The program is composed of three modules: constraint extraction,appurtenance selection, and design display. The constraint extraction module determinesthe constraints on the design, based on a graphical representation of the roadway site. Theappurtenance selection module uses the constraints and devices obtained from the firstmodule to determine the best device based on secondary criteria such as cost or technicalfeasibility. The third module, design display, produces a graphical display of the device usedfor the specific application. An example of the main-menu is shown in Figure 2.17.Figure 2.17 Menu Display From WARRANT ADVISORSource: An Object-Oriented Approach to Warranting Roadside Safety Hardware, M. Ray, D. Logie (1987).453.0 ROADSIDE HAZARD SIMULATION MODEL: REVIEW and ADVANCEMENT3.1 The Purpose and Objectives of RHSM.The purpose of creating a roadside hazard simulation model is to develop a tool to assessand evaluate dangerous roadside conditions. As well, the model can be used to evaluatesafety improvement alternatives.There are a number of objectives that RHSM must satisfy. First, the model must simulatethe errant vehicles trajectory upon leaving the roadway. Secondly, the model mustaccurately simulate the hazardous roadside, including all types of hazards. Third the modelshould simulate the errant vehicle's characteristics. The fourth objective, which is dependantupon the first three objectives, is to determine the consequence of a vehicle upon leavingthe roadway. The final objective is to complete an economic evaluation of the improvementalternatives and identify the best solution for a hazardous roadside.3.2 RHSM EvolutionSince its conception in the late 1970's, the Roadside Hazard Simulation Model (RHSM) hasundergone numerous revisions. This has included various calibrations and validations of themodel over the years. This review will focus on three different versions of the program:Version 5.0 (1979), Version 6.2 (1982), and Version 7.0 (1986).The initial version of RHSM was developed in July, 1978 (ROADSIDE HAZARDS: AMethodology and Technique for Determining Accident Potential) [33], however, real data46necessary to calibrate and validate the model was lacking. Shortly following this first versionof RHSM, Transport Canada undertook a study of single vehicle run-off-the-road accidentscollected over 4300 kilometres of roadway in five provinces [34] which provided thenecessary data required to validate the model.Version 5.0 of RHSM was developed by Cooper [35] in January 1979 under contract withTransport Canada. RHSM.V5 employed an updated probability of consequence table whichreflected the results of Transport Canada's accident study. Also included was the additionof an aggregated probability of consequence output. Unfortunately, a copy of the originalRHSM.V5 has not been located and a more detailed review of the program is not possible.The results produced by Version 5.0 were considered to be quite good and later versionsdid not produce results as favourable as the results which were obtained by Version 5.0.RHSM Version 6-2 was developed by Lenz and Sanderson [36] for Transport Canada inAugust 1982. It was decided to implement a number of additional factors to the programto try to better simulate a vehicle's off-road excursion. These additions to the programincluded considering vehicle roll-over, vehicle steer-back (correction), and improved vehiclecharacteristics. Another revision included an update of the distribution of encroachmentangles. Although the addition of the factors listed above seem reasonable, their additioninto the model did not produce good results. The results generated from Version 6.2 wereunrealistic, yielding results that were far too severe.47The latest version of was completed by Galway and Sanderson [37] in February 1986, againfor Transport Canada. RHSM Version 7.0 included the additional consideration of rollingresistance in determining vehicle trajectories [38]. Other modifications include the additionof vehicle characteristics such as cornering stiffness of the tire, longitudinal stiffness of thetire, and outside diameter of the tire. These additions have made the model verycomplicated and the changes were not been tested due to numerous computing errors.It appears that the evolution of the RHSM program has drifted away from its originalobjective; to maintain simplicity and ease in the evaluation of roadside hazards, and hasbecome a complex and difficult program to utilize Many revisions to the program seemreasonable in application and formulation, however, the generated results are not good.Upon a re-evaluation of the program objectives, it became apparent that a new model wasrequired to obtain a functional and accurate model. From the users perspective, perhapsthe most frustrating aspect of previous model versions is the lack of flexibility andunforgiving nature of the program.3.3 Model Advancement3.3.1 The ApproachAfter a great deal of effort was devoted to simply modifying one of the previous versionsof the program, it was decided to abandon the old versions and develop a new model.Although the new model utilizes much of the theory employed in the older versions itbecame possible to incorporate new ideas into the program without fear of disturbing the48existing code. The reason for this departure is due to the problems encountered indeciphering another person's source code and because the previous versions became difficultto interpret. With an understanding of the important aspects of the previous versions andanticipating important factors which were to be incorporated into the model, it becameobvious that developing a new model was the appropriate decision.The previous models were structured too rigidly and it was the goal of the new model tobecome as flexible as possible. As better model calibration information becomes available,it should be immediately and easily included into the new model. For example, if theprobability of consequence table was found to be outdated, or was not relevant at aparticular location, then it could be simply changed by the user to better reflect existingconditions. Older versions of the model performed like a "black box", where the user wouldbe prompted for data and the results would somehow appear after the program was run. Tohave the user get "inside" the program and access all the components of the model, a greaterunderstanding of the model will result. This is a goal of the new version of the program.The approach taken for the new version of RHSM, called RHSM Version 9, was to considerall the interacting factors involved when an errant vehicle leaves the roadway and enters ahazardous roadside area. All the important components required to produce an effectiveevaluation tool were identified and then were divided into seven parts and are presentedin Table 3.1.49Table 3.1 Components Considered in the Development of RHSM.V9Roadside Condition This includes all hazardous roadside features, including hazardousembankment slopes, objects, terrain, as well as the location andcharacteristics of each hazardous feature.Encroachment Characteristics This includes the vehicles encroachment speed distribution andencroachment angle distributions which are based on geometricfactors of the roadway under consideration.Vehicle and Roadside Interaction This includes the forces which are created when an errant vehicleencounters a hazardous roadside feature or the criticalspeed/embankment slope combination which will cause vehicle roll-over.An understanding of the vehicle's trajectory including location,velocity, and deceleration in relation to the roadside is required tounderstand these interactions.Accident Severity The critical speed required to cause vehicle roll-over is calculatedand compared with the simulated vehicle speed. If roll-over occurs,the simulated vehicle speed is used as the basis for the accidentseverity index.The power loss developed when a vehicle collides with a hazardousroadside object or terrain is calculated and then is used for thebasis of the accident severity index.Power or critical speed levels are converted into probabilities of NoDamage (ND), Property Damage Only (PDO), Injury (INJ), orFatal (FAT) accidents.The degree of passenger restraint, braking, or steer-back beingused affects the outcome probabilities.Aggregation The process of combining or aggregating the consequences of alltrajectories for the entire roadside environment (for each roadwayconfiguration alternative) as well as including the possibility ofmore than one encroachment location.Economic Evaluation The encroachment rate, accident costs, savings in accident costs,and mitigation costs are used to evaluate a benefit-cost ratioanalysis or alternatively, a cost-effectiveness approach can beemployed based on user defined criteria.Solution Recognition Based on the evaluation of the different improvement alternativesfor a particular hazardous roadside location, the best solution willbe identified to be ranked with other improvement locations.503.3.2 Model Basics and Assumptions.The first component of RHSM.V9 is to accurately simulate the roadside hazards andcharacteristics. This is done by identifying the location, dimensions, and equivalent frictioncoefficient for each hazard. RHSM.V9 considers a roadside area 20 meters wide,perpendicular to the roadway, and 100 meters in length, parallel to the roadway. Eachhazardous roadside object can be located within this area by specifying the rectangularcartesian coordinates of the object and providing a width for the object. Each change inembankment slope can be located at any distance from the roadway edge and below the 20meter maximum roadside lateral distance. The friction coefficients for each roadside hazardrange between 0 and 100, with 0 representing no affect on the vehicles trajectory, and 100representing a sudden stop in the vehicles trajectory (ie; a rigid wall).The second component in RHSM.V9's development is to consider vehicle encroachmentcharacteristics including simulating the vehicle speed and angle upon leaving the roadway.The encroachment speed probability is based on a normal distribution of occurrence abouta mean speed and standard deviation as defined by the user. The encroachment angleprobability is based on an empirically derived frequency distribution developed by DeLeuwCather Canada Ltd., and ADI Limited [39] for Transport Canada in 1978. The product ofthe encroachment speed probability and the encroachment angle probability provides theaccess probability. Access probability is important since the consequence of anencroachment is not only determined by the energy dissipated in reaching that location, butalso the access probability of reaching the location. For example, if two locations have the51same power dissipation level, but different probabilities of being reached, it is reasonableto assume that the one with the higher probability of being reached is more hazardous [40].The third component considered in the development of RHSM.V9 is how the vehicle androadside features interact. Due to the great number of possible combinations of roadside,object, and vehicle characteristics, a method is needed whereby the hazard level may beestimated quickly and economically. HVOSM is capable of reproducing vehicle movementsvery accurately, however, the high cost and long computing time required to examinedifferent roadside features discourage the use of this model for this type of application [41].A simpler model was required to quickly and accurately simulate the vehicle trajectoryduring a roadside encroachment, thus the conception of RHSM.RHSM considers the vehicle as a point with mass, which greatly simplifies the analysis ofthe vehicle's trajectory such that the location, velocity, deceleration, and power loss can beeasily computed. A comparison of the results produced by assuming the vehicle is a pointwith mass with the results produced by HVOSM which treats the vehicle as a sprung mass,indicated that the assumption that the vehicle treated as a point mass was valid, since theresults from RHSM were very similar to HVOSM. The only adjustment was for when thevehicle becomes air-borne. Correction factors have been introduced to account for air-borne landings and dive-in impacts. Once the vehicle trajectory is accurately simulated, thepower loss experienced by the vehicle or the critical speed required to cause roll-over couldbe calculated and then the accident severity could be determined.52Proposing a suitable accident severity index is the fourth component in the development ofRHSM. Statistical indices are developed based on accident records and depend on thequality of the data base to produce consistent results. An analytical index is based onphysical characteristics of an accident such as vehicle damage, velocity change, ordeceleration change [42]. RHSM.V9 uses the dissipation of energy over time (power) toserve as the severity index and if roll-over occurs, the velocity experienced at the time ofroll-over, forms the basis for the accident severity index.The point mass system used by RHSM.V9 provides the level of power dissipation andequates the power level into an accident severity level. The greater the power dissipation,the more severe the accident. A number of studies which utilize full-scale crash tests werechosen to derive this relationship which will be discussed in greater detail in the next sectionon program details. Also, the degree of passenger restraint, degree of braking, and steer-back will affect the severity of the accident. If it is determined that vehicle roll-over occursthen the severity of the accident is dependant upon the vehicle speed at the time of roll-over. The greater the roll-over speed, the greater the accident severity.The next component in the development of RHSM is to aggregate the consequences of allvehicle trajectories. For each combination of encroachment speed and angle the powerlevel dissipated or the roll-over speed is determined and a corresponding accident severityis assigned in terms of probability of consequence for each point along the errant vehicles'strajectory. The categories for probability of consequence are No Damage (ND), Property53Damage Only (PDO), Injury (INJ), and Fatality (FAT) accidents. The total consequenceof the single trajectory is the normalized sum of each probability. By weighting eachtrajectory with the access probability, summing the values over the trajectory length, andnormalizing the values, the consequence probabilities are obtained for the entire roadside.The sixth component in the development of RHSM.V9 is the economic evaluation of thedifferent safety improvement alternatives. Once a set of improvement alternatives areidentified each can be subjected to an economic evaluation to determine the optimumsolution for the location under review. A benefit-cost ratio and/or a cost-effectivenessevaluation can be selected by the user to evaluate the alternatives. Factors which arerelated to this component of the model development include encroachment rate, accidentcost, the savings in accident cost, and mitigation costs.The final component in the development of RHSM.V9 is to allow the user to comparedifferent locations in order to define a priority ranking system. Simply stated, it would allowthe user to judge the relative effectiveness of one project in relation to other projects.3.4 RHSM.V9 Program DetailsThis discusses the relevant aspects of each component of RHSM.V9's development,providing the information, source, and justification for the conventions and proceduresemployed by Version 9 of RHSM. The program details are sub-divided into six sectionswhich loosely reflect the components of the model.54The most noticeable advancement of RHSM.V9 over the previous versions is that the modelis now completely menu driven allowing the user freedom to move to and from the differentprogram components very easily and effectively. Upon activating the program, the user isgreeted by a main menu which systematically suggests an order to move through the variousprogram components. At each menu level a series of help screens are available to assist theuser to make appropriate decisions. Default values are supplied whenever possible so thatthe user may bypass values which are not relevant or not known for a particular site. Aseries of keystroke conventions were adopted and maintained throughout the program.Although this may seem trivial to the operation of the model, it is tremendously importantto the user who will operate the program. This section will systematically "travel" throughthe program to the different components or menu levels, identifying the input which isrequired by the program and explain the reasons/justification for each input requirement.3.4.1 Roadside Simulation and Model ParametersAll of the roadside simulation features and model parameters are included in the secondmain menu option labelled Edit Simulation Data. From the users standpoint, this is perhapsthe most important option since this is where all the operational, terrain, and objectinformation is supplied for each improvement alternative. When Edit Simulation Data isselected, a secondary menu appears called Input Set Titles which allows the user to run upto ten different roadside improvements alternatives at one time. The first input set title islabelled 'control' which suggests simulating the existing conditions (Do-Nothing alternative).Then up to nine other input sets can be used to simulate other improvement alternatives.55Once all the improvement alternative titles are entered on the Input Set Titles screen, theuser must detail the characteristics of each alternative. The user must access the SimulationData Menu for each alternative. This sub-menu is divided into four options: OperationData, Terrain Data, Clear-Zone Object Data, and Map of Roadside. Refer to Figure 3.1which shows a flow-chart of the operation of the Edit Simulation Data main menu option.EditSimulationDataInput Set Titles1. (Control)2.3.4.5.6.7.8.9.10.SimulationData MenuOperational DataTerrain DataObject DataMap Of RoadsideReturn To Input Set TitlesFigure 3.1 Edit Simulation Data Main Menu OptionsOperation DataThere are a total of 15 different parameters which the user can specify to control theoperation of the model and simulate the hazardous roadway. For ease of operation, all 15input fields are supplied with default values. The input parameters are divided into eightgroups, each representing a different component of the models operation. Below is a listof the 15 operational data parameters, divided into the eight groups, and a short descriptionof each.561) Horizontal CurvatureHorizontal Curvature allows the user to select a straight roadway section, a gentlecurve, a moderate curve, or a severe curve. The purpose is to make an adjustmentto the encroachment angle distribution due to the horizontal curvature. The greaterthe degree of roadway curvature, the greater the encroachment angle. Theseencroachment angle distributions are discussed in greater detail in a subsequentsection regarding calibration and defaults.2) Speed Increment, Angle IncrementThese two input parameters control the number of trajectories which the model willconsider. As the values for the speed and angle increments decrease, the modelbecomes more sensitive since more trajectories are considered. The purpose forthese parameters is to allow the user to select values which are suitable for aparticular location under review. For example, if the user wants a quick estimationof a relatively featureless roadside, values for the speed and angle increment can bequite large. Conversely, if the user wants a detailed, precise estimation of a roadsideconsisting of many small, detailed features, small values should be used for the speedand angle increments.3) Time Increment of Trajectory, Maximum Time of Trajectory.The time increment of the trajectory controls the "size" of the steps of the point massvehicle during it's off-road excursion. The smaller the time increment, the moresensitive the model will be. The maximum time of trajectory determines how far thepoint mass vehicle will travel into the roadside area. The value selected should be57large enough so that the vehicles travels past all roadside hazards, but not too largeso that the vehicle travels far beyond the 20 meter maximum lateral distance.4) Minimum Probability ConsideredThis input parameter controls the precision of the access probability. The purposeis to allow the user to select a value for access probability below which the accessprobability can be considered to have zero access probability. Access probability isthe product of the speed probability and the angle probability.5) Number of Encroachment Points, Encroachment SpacingThese two input parameters allow the user to specify any number and locations ofencroachment points along the 100 meter length of roadway. The purpose for theseparameters is to ensure that all roadside hazards will be reached in the evaluationof a particular hazardous roadside.6) Steer-Back Correction Angle, Degree of Braking, and Degree of RestraintThese three input parameters all affect the overall probability of consequence. Thepurpose of these parameters is to allow the user to compensate for vehicle occupantfactors which can alter the results of an off-road excursion. For example, as thevalues of each parameter increases, the outcome accident severity will decrease sincethe vehicle occupant are "protecting" themselves.7) Average Encroach. Speed, Speed Standard Deviation, Minimum Encroach. Speed.Average encroachment speed is self explanatory, with the probability of a certainencroachment speed is based on a normal frequency distribution. The speedstandard deviation parameter allows the user to simulate the vehicle speed patternsLow Speed Standard DeviationHigh Speed Standard Deviation58during the encroachment. If the speed patterns vary greatly during theencroachment, then the vehicle speed standard deviation should be large. Refer toFigure 3.2 for the relationship between the average encroachment speed and thespeed standard deviation.AverageEncroachment SpeedFigure 3.2 Relationship Between Encroachment Speed and Speed Standard DeviationSource: RHSM: A Methodology and Technique to Effectively Reduce Single Vehicle Accident PotentialThe minimum encroachment speed is the minimum speed in a direction parallel tothe roadway that will be reached by the point mass vehicle. Velocities below thisvalue are considered insignificant, and will not affect the program results.8) Vehicle ModelThis last operation parameter is to allow the user to select one of eight types ofvehicles. The purpose of this parameter is to let the user determine the results ofan improvement alternative for different types of automobiles. The exact dimensionsof the vehicle models will be discussed in a subsequent section regarding calibrationand defaults but it should be realized that any vehicle type can be represented.59Terrain DataTerrain Data is the second option under the Simulate Data Menu. There are fourcomponents which are required to accurately simulate the roadside terrain; the location ofthe terrain change (TY), the angle of the terrain change (TA), and the coefficient of terrainresistance (TM). Each change in terrain characteristics is identified as a strip parallel to theroadway and up to 20 terrain changes are allowed within the 20 meter wide roadside area.Refer to Figure 3.3 and Table 3.2 for an illustration of how the terrain geometry and terraincharacteristics are defined in RHSM.V9.0 2 7 10 20Distance from Roadway (meters)Table 3.2 Example of Roadside Terrain DescriptionDistance from Road (TY) Slope (TA) Friction Coefficient (TR)2 Beta 0.707 Beta 0.5510 0 0.55Figure 3.3 and Table 3.2 Example of Roadside Terrain Description60The user inputs the distance from the edge of the pavement (TY =0) for each change inembankment slope and change in friction coefficient. The change in embankment slope ismeasured in degrees, with a down-slope embankment adopting a negative angle conventionand an up-slope embankment adopting a positive angle convention. The terrain frictioncoefficient are dependant upon the type of terrain surface. The table below shows typicalfriction coefficients for ten different terrain surfaces.Table 3.2 Friction Coefficients for Typical Terrain SurfacesSurface Type Coefficient of Frictionrubber on dry asphalt or concrete 0.71rubber on wet concrete 0.70rubber on wet asphalt 0.45 - 0.81rubber on gravel 0.55rubber on sand 0.55rubber on dry dirt 0.65rubber on wet dirt 0.40 - 0.50rubber on snow 0.15rubber on sleet 0.07rubber on ice 0.06Source: M. Lenz, RHSM, for Transport Canada (1984)Another feature under this menu selection is to allow the user to visually check the crosssection of the embankment slope. This is to ensure that the embankment slope featureshave been simulated accurately.61Object DataThe Object Data is the third option under the Simulation Data Menu. There are seveninput requirements to accurately simulate any hazardous roadside object. The first fourinput requirements are to define the rectangular cartesian coordinates for the two nearestcorners of the hazardous object in relation to the edge of the roadway and the start of thehazardous roadside zone. The fifth input requirement is the width of the object. All fiveinput requirements are entered in meters. The sixth input requirement is to enter the typeof object, either a rigid object, a deformable object, or a passable object. Finally, therelative rigidity or the friction coefficient of the object is entered, with zero representing anobject which has no effect on a vehicles trajectory, and one-hundred representing a suddenstop in the vehicle's trajectory (such as a rigid wall). Refer to Table 3.4 which shows theobject identification coding system and Table 3.5 and Figure 3.4 which shows how a varietyof hazardous roadside objects can be located and simulated in the roadside area.Table 3.4 Object identification Coding SystemObject Identification CodingHazardous Object Type Relative Rigidity (Friction Coefficient) of ObjectR = rigid barrier 0 - 100 defines the limits of relative rigidity.0 = representing the least rigid object.100 = representing the most rigid object. D = deformable barrierP = passible barrierxAUtility Poles (x3) 62Object IdentificationXi I X2 I Yi 1 Y2 I Width Type Uf15 16 5 10 3.0 R 10030 31 5 6 1.0 D 7560 61 5 6 1.0 D 7590 91 5 6 1.0 D 750 99 12 13 0.5 D100Large ObjectNotes:X 1 = object starting x-coordinateX2 = object ending x-coordinateY1 = object starting y-coordinateY2 = object ending y-coordinateUf = object's coefficient of friction Fencey 0 20 Figure 3.4 and Table 3.5 Example of Roadside Object IdentificationMap of RoadsideThe roadside map is the fourth option under the Simulation Data Menu. If the user selectsthis option, a topographic map of the roadside will be drawn on the screen which shows theterrain changes in different coloured strips (parallel to the roadway), the hazardous roadsideobjects are represented by white rectangular boxes, and the encroachment point locationsshown by vehicles leaving the roadway. The purpose of this option is to give the user avisual check to ensure that the roadside hazards have been represented accurately.633.4.2 Economic Evaluation of Improvement AlternativesThe third option of RHSM.V9 main menu is Alternative Simulation Data. This optioncontrols the economic evaluation for each improvement alternative. Upon selecting thisoption, the user is presented with a screen which provides two options available to completethe economic evaluation: a benefit-cost ratio analysis and/or a cost effectiveness analysis.Benefit Cost Analysis If Benefit-Cost Analysis is selected by the user, another menu screen titled Benefit-CostAnalysis appears which consists of four components of the benefit-cost evaluation. Thesefour components include the Encroachment Rate Factors, Accident Costs, Mitigation Costs,and Present Value/Capital Recovery Factors.The Encroachment Rate Factors option is the first component of the Benefit-Cost analysis.The encroachment rate can be entered directly or if it is not known, then the program willcalculate it based on a number of factors selected by the user. To calculate theencroachment rate the user must enter the average daily traffic (ADT) and then select anumber of encroachment adjustment rate factors. The factors affecting the encroachmentrate include the roadway classification, design speed, lane width, number of lanes, shoulderwidth, horizontal curvature, vertical curvature, climatic conditions, traffic composition, andsight restrictions. Each factor has 5 or 6 options which the user can select to accuratelyrepresent the roadway. The selection and values of the encroachment rate adjustmentfactors used in RHSM.V9 are based on RTAC [43] and M.o.T.H. [44].64The second component used in the benefit-cost evaluation is the accident costs. A sub-screen called Costs of Accidents is provided where the total cost of each type of accidentis divided into two components: Direct Costs and Indirect Costs.Direct Costs: Includes only those costs directly associated with an accident such asmedical costs, property damage, lost work-time, legal costs, etc..Indirect Cost: Includes the intangible or societal costs associated with an accidentsuch as the value of life as well as a human being's net societal value.There are eight input fields which the user can access: a direct and indirect cost associatedwith each accident type (No Damage, Property Damage Only, Injury, Fatality). The reasonfor this division in accident costs is to emphasize the difference in the total value of accidentcosts when indirect costs are considered. For example, the M.O.T.H., Highway SafetyBranch has recently updated the value used for the cost of a fatal accident fromapproximately $500,000 per fatality (based on direct costs) to approximately $3,000,000 perfatality (based on direct and indirect costs). This 600 percent increase will have atremendous impact on the results of the evaluation of improvement alternatives. Defaultvalues for the accident costs are supplied, however, these values can be modified if new orbetter accident cost data becomes available.Mitigation Costs is the third component used in the benefit-cost analysis. Unlike theencroachment rate and accident cost components which are valid for all improvementalternatives, the mitigation cost component varies dependant upon the improvementalternative. For each improvement alternative, there are five components which may or may65not contribute to the mitigation cost, including barrier costs, embankment slope flattening,object removal, maintenance costs, or right of way acquisition. If barrier is required, theinstallation cost in dollars must be input as well as the maintenance cost for the roadsidearea in dollars per year. If slope flattening is required, the cost of the cut or fill in dollarsper cubic meter must be entered. The volume of the cut or fill required is calculated bydetermining the difference between cross-sectional profiles of the Do Nothing Alternativeand subsequent improvement alternatives and then multiplying by the length of the roadway.Also, the cost of cut removal and the cost of adding fill must be entered. If objectrelocation or removal is required, then the number of objects and the cost of removal ofeach type of object must be entered. Finally, if right of way acquisition is required, the totalcost of the right of way acquisition should be entered. Each improvement alternative canhave any combination of mitigative factors.The fourth and last component of the benefit-cost analysis is the Present Value/CapitalRecovery Factors. This component has two input requirements: the interest rate suitablefor public works investment, and the analysis period in years suitable for the project underreview. The purpose of these values is to allow the economic evaluation to be presentedin terms of an annual project cost and a total project cost. Annual project cost will discountall the initial construction costs into annual payments (Capital Recover Factor), and thetotal project cost will sum all the future annual costs into a present value of the total cost(Uniform Series, Present Worth Factor). Default values are supplied to assist the user inmaking a selection for the interest rate and analysis period.66Figure 3.5 shows a flow-chart summarizing the benefit-cost evaluation used by RHSM.V9.MAIN MENU ECONOMIC EVALUATION BENEFIT-COST ANALYSISAlternativeEvaluation Data 1. Benefit-Cost Analysis2. Cost-effectiveness Analysis 1. Encroachment Rate2. Accident Cost3. Mitigation Cost4. Present Value andCapitol Recovery Figure 3.5 RHSM's Benefit-Cost Ratio Economic EvaluationFor each improvement alternative, the probability of consequence results obtained from thesimulation run are multiplied by the encroachment rate to obtain the expected number ofaccident types per year. The number of accidents of each type (ND, PDO, INJ, FAT) ismultiplied by the corresponding cost of each accident type and then summed to a total costfor each improvement alternative. The mitigative costs of each improvement alternative iscalculated and the present value/capital recovery factors are used to evaluate accident costsand mitigative costs on an annual and total cost basis. The equations which calculate theannual cost (capital recovery) and the total cost (present value) are:Annual Costs: CR = i(1 / [O. + On-1)] Total Costs: Pv = [(1+i)°-1] / (1(1+The benefit associated with any alternative is the savings in accident cost, which is calculatedby determining the difference between the accident cost for the Do-Nothing alternative andthe accident costs for the subsequent alternatives. The cost associated with the benefit-costratio is the relative increase in the total mitigative costs of each improvement alternativewith respect to the Do-Nothing alternative. The benefit-cost ratio is then calculated and theimprovement alternative with the largest benefit-cost ratio is the "best" alternative.67Cost-Effectiveness Analysis The cost-effectiveness analysis is the second type of economic evaluation. Cost-effectivenessdoes not consider any of the benefits realized by a particular improvement alternative,instead, the effectiveness of each alternative is determined based on the cost ofimplementing a particular alternative. The two components of the cost-effectiveness analysisCriteria Weighting and Mitigative Costs.A cost-effective approach must consider the cost of each improvement alternative.Therefore a procedure identical to that used for the benefit-cost analysis is used todetermine the mitigation cost for each improvement alternative.Criteria Weighting is the second component of the cost-effectiveness analysis. The foureffectiveness criteria that the model considers are the accident consequence categories,namely ND, PDO, INJ, and FAT. This allows the user to specify the relative importanceof each effectiveness criteria. The importance or weight of each criteria is provided in termsof a subjective index with any scale. For example, if the user is only concerned withfatalities (FAT), the subjective weight for the other effectiveness criteria (ND, PDO, INJ)would be set to zero. Since the user specified zero for all other effectiveness criteria, anyvalue greater than zero could be used for FAT and still carry 100% of the importance.For each improvement alternative, the probability of consequence value of ND, PDO, INJ,and FAT are multiplied by the corresponding user defined weight for ND, PDO, INJ, and68FAT and then summed together to determine the severity of the alternative. Thealternative with the largest value represents the most severe or dangerous alternative.The relative increase in the mitigation costs with respect to the first improvement alternative(the Do-Nothing alternative) is the value required to determine which alternative is the mostcost-effective. To illustrate how the model determines which alternative is the best solution,refer to Figure 3.6 and Table 3.6. Six improvement alternatives are shown. The bestalternative from a safety perspective is alternative #6, since it yields the least severity,however, it is a very costly alternative. Less costly alternative such as #3 or #4 representbetter options from a cost-effective perspective even though the severities are slightly higher,the mitigation costs are significantly lower. Sound engineering judgement must be used todetermine the optimum alternative for specific individual conditions.Table 3.6 Cost-Effectiveness Evaluation7654152 ++Severity(1000's) 33+241+00 1 2 3 4 5 6 7 8Mitigation Cost (1000$)Alternative Severity MitigationCost1 6050 3002 4950 35003 2300 28504 950 43505 5250 60006 500 7100Figure 3.6 and Table 3.6 RHSM's Cost-Effectiveness Economic Evaluation693.4.3 Vehicle-Roadside Interaction Details (Simulation Details)This section details all the factors concerning the analysis of the vehicle-roadside interaction.These factors include: the encroachment characteristics, the vehicle trajectory, vehicle roll-over, the consequences of a vehicle leaving the road including critical roll-over speed andpower level dissipated, the accident severity level, and the aggregation of all the factors intoa useful result.Encroachment Characteristics There are three encroachment characteristics used in RHSM.V9 including: theencroachment locations as specified by the user, the vehicle encroachment speed probability,and the encroachment angle probability. The probability of an encroachment speed is basedon a normal frequency distribution, with a mean speed and a standard deviation defined bythe user. The probability of an encroachment angle is based on an empirically deriveddistribution [45] and is dependant upon the horizontal curvature of the roadway.Vehicle TrajectoryThe second step in analyzing the vehicle-roadside interaction is to determine the location,velocity, and deceleration of the vehicle as it progresses along the various trajectories. Asthe vehicle progresses along the trajectory, all the factors which tend to alter the motion ofthe vehicle are encountered and the affects on the vehicle trajectory is calculated. Factorswhich affect the vehicle's trajectory include: terrain changes, objects, roll-over, braking, dive-in impacts or air borne landings, and steer-back correction. In general terms, a vehicle70moving on a surface with a friction coefficient (MU) decelerates at a rate of a = (MU)g,where g =the acceleration due to gravity.Also included in analyzing the trajectory of the vehicle is the vehicle elevation with respectto the ground in order to determine if the vehicle becomes airborne. Adjustment factorsare required to compensate for dive-in impacts and air-borne landings. The method forobtaining the adjustment factors for air-borne landings and dive-in impacts was describedby Koike [46] for version 6.2 of RHSM. The simulation model HVOSM was used tosimulate the movement of a vehicle starting at flat terrain and landing on differentdowngrade slopes for air-borne landings and upgrade slopes for dive-in impacts. Thesimulation for each case was run for a range of speed and power levels, and then aregression analysis was used to derive the relationship between speed, embankment slopeangle, and the ratio of the power generated by the impact to the nominal power. Thispower ratio, which represents the terrain adjustment factor, was used to determine frictioncoefficients used for either air-borne landings or dive-in impacts. The two equations forcalculating the friction coefficients are shown below.Air-Borne Landing: F = 0.8662-0.1852(V*tan(A))+0.256(V*tan(A))2Dive-In Impacts: F = 0.8637 + 0.4961(V* tan(A)) + 0.07288 (V* tan(A)) 2where F = adjustment factor for friction coefficientV = pre-crush speed (meters per second)A = embankment slope angle (degrees)71Vehicle Roll-OverThe final component that must be addressed in the analysis of the vehicle trajectory is toexamine the occurrence of vehicle roll-over including dynamic roll-over and static roll-over.Although the vehicle is treated as a point with mass for the analysis of the trajectory, todetermine if roll-over occurs, the vehicle is given four dimensions (wheelbase, track-width,height, and centre of gravity) and mass.Dynamic roll-over occurs at terrain changes where a sudden drop-off is experienced by theoutside wheels and the overhanging weight of the vehicle causes a torque about the centreof gravity which tend to cause vehicle rotation. Refer to Figure 3.7 which illustrates theoccurrence of dynamic roll-over. The over-hanging weight of the vehicle is dependant uponthe dimensions of the vehicle and the angle of encroachment.Figure 3.7 Schematic of Dynamic Vehicle Roll-OverSource: RHSM: A Methodology and Technique to Effectively Reduce Single Vehicle Accident Potential,1984Static Roll-over can occur when a vehicle is on a steep embankment slope, or when a steer-back manoeuvre is attempted, causing a radial force which may cause a vehicle to roll-over.72By referring to Figure 3.8, for static roll-over to occur, the centre of gravity of the vehiclegoes through a transition (z) caused by the forces acting on the vehicle. To determine whenthe static roll-over occurs, the moments about the points of contact of the down-slopewheels are calculated. The forces which cause the vehicle to roll are the weight component(W) acting parallel to the embankment slope and the force due to radial acceleration (P).Figure 3.8 Schematic of Static Vehicle Roll-OverSource: RHSM:A Methodology and Technique to Effectively Reduce Single Vehicle Accident Potential, 1984Encroachment Consequences The next step in analyzing the vehicle-roadside interaction is to determine the consequencesof a vehicle leaving the roadway. There are two consequences which determine the hazardlevel subjected on a vehicle during an encroachment: the vehicle be subjected to factorswhich will alter the motion of the vehicle or the vehicle will roll. If the vehicle rolls, the73speed at which the roll-over occurred is the basis for the probability of consequence severityindex, otherwise the power level dissipated forms the basis for the consequence index.Once the vehicle speed exceeds the critical roll-over speed the vehicle will roll and the roll-over speed is translated into an accident severity index. The severity index will categorizeaccidents in terms of No Damage (ND), Property Damage Only (PDO), Injury (INJ), andFatalities (FAT). In the case of vehicle roll-over, the probability of ND does not exist.Table 3.7 is used by RHSM.V9 to provide the relationship between vehicle roll-over speedand probability of consequence.Table 3.7 Roll-Over Speed versus Accident Consequence ProbabilityVehicleRoll-OverSpeedRestrained Occupants Unrestrained OccupantsPDO INJ FAT PDO INJ FAT20 0.79 0.16 0.05 0.92 0.07 0.0160 0.70 0.25 0.05 0.92 0.07 0.0170 0.68 0.24 0.08 0.89 0.08 0.0380 0.59 0.25 0.16 0.80 0.14 0.0685 0.45 0.23 0.22 0.65 0.26 0.0990 0.10 0.62 0.28 0.40 0.48 0.1295 0.01 0.66 0.33 0.18 0.68 0.14100 0.00 0.62 0.38 0.10 0.75 0.15110 0.00 0.55 0.45 0.04 0.77 0.19120 0.00 0.52 0.48 0.02 0.78 0.20150 0.00 0.48 0.52 0.00 0.78 0.22Source:RHSM, A Methodology and Technique to Effectively Reduce Single Vehicle Accident Potential, 1984.74The other consequence possibility of a vehicle's roadside encroachment is that the vehiclewill not roll, but will traverse the roadside. RHSM.V9 calculates the power level dissipatedat various points along the vehicle's trajectory by simply multiplying the velocity and theacceleration experienced by the vehicle during a specified time span. The power level isonly an intermediate result which is translated into the same severity index categories usedfor the vehicle roll-over (ND, PDO, INJ, FAT). A number of barrier crash experimentswere used to establish the relationship between power and accident severity level. A studydone at the University of Saskatchewan [47] attempted to relate the AIS level (AbbreviatedInjury Scale) and the CDC (Centre for Disease Control) extent number. Another studydone by Campbell [48] establishes the relationship between speed and crash distance in rigidbarrier crashes. When the result of these studies are combined (Table 3.8), the relationshipbetween power level and accident severity level can be determined.Table 3.8 Dissipated Power Level Versus Accident SeverityPowerDissipated(W/kg)NoDamage(ND)Unrestrained Occupants Restrained OccupantsPDO INJ FAT PDO INJ FAT200 1.00 0.00 0.00 0.00 0.00 0.00 0.00300 0.50 0.50 0.00 0.00 050 0.00 0.00432 0.01 0.98 0.009 0.001 0.99 0.009 0.00011459 0.00 0.85 0.14 0.01 0.95 0.0495 0.00053092 0.00 0.60 0.37 0.03 0.88 0.119 0.0015331 0.00 0.26 0.62 0.12 0.74 0.25 0.0111628 0.00 0.00 0.55 0.45 0.02 0.93 0.0515685 0.00 0.00 0.15 0.85 0.00 0.63 03720348 0.00 0.00 0.00 1.00 0.00 0.00 1.00Source:RHSM, A Methodology and Technique to Effectively Reduce Single Vehicle Accident Potential, 198475The degree of restraint acts as an adjustment to the various accident severity categories.A linear interpolation between the two extreme cases is assumed, however, since relativelylittle is known about the relationship between power dissipation and accident consequence,the relationships are somewhat crude and subject to future modifications and improvements.The final component in analyzing the vehicle-roadside interaction is to aggregate all thecomponents of the simulation. The accident severity results obtained from each trajectoryis accumulated in the roadside grid matrix until all trajectories have been executed, with thefinal result being one value for each accident severity category.3.4.4 Calibration and DefaultsThe last option of RHSM.V9's main menu is labelled Calibration and Defaults and isprovided to make the program as flexible as possible. Once selected, a secondary menuappears called Calibration Data Menu which has nine options to choose from. The nineoptions include Operational Data, Departure Angle, Probability of Consequence Data, RollConsequences, Vehicle Characteristics, Encroachment Rate Calibration, Encroachment RateDefaults, Unit-Cost/Interest Rate/Analysis Period Defaults, and Save Data to Default File.Calibration and Defaults provides the ability to update the model as new and betterinformation becomes available or to correct for unique site locations.1) Operational DataAll 15 operational parameters used by RHSM can be accessed and changed as required.The current defaulted values represent "average" or "typical" conditions, with relatively quick76program run-time considered important. The defaulted values currently employed by theprogram are shown in Table 3.9.Table 3.9 Operational Parameters Default ValuesOperational Parameter Default Value I Operational Parameter I Default ValueHorizontal Curvature Straight Angle Increment 4 degreesTime Increment 0.05 seconds Speed Increment 2.0 mpsMaximum Time 10.0 seconds Minimum Probability 0.0000Number of Encroachments One Degree of Restraint 50%Location of Encroachments X=0, Y=0 Degree of Braking 0%Mean Speed 80 kph Degree of Steer-back 0 degreesSpeed Std. Deviation 10 kph Vehicle Type 4Minimum Speed 1.0 mps2) Departure AngleDeparture Angle is used to determine the probability that a certain encroachment angle willbe taken. The probability is based on an empirically derived frequency distribution rangingfrom a 2 degree encroachment angle to a 70 degree encroachment angle. Also included inthis Calibration Data option is the angle frequency distributions for the different horizontalcurves (gentle curve, moderate curve, and severe curve). Each departure angle distributioncan be changed to better simulate a particular location. A graph is available to view thefrequency distributions to ensure the they are suitable. The four default departure angledistributions are shown in Figure 3.9. The distribution for the straight roadway section isfrom on Transport Canada's study of off-road accidents [49].770 10 20 30 40 50 60 70FREaUENCY10009008007006006004003002001000Departure Angle (degrees)Figure 3.9 Departure Angle Frequencies3) Probability of Consequence TableTo change the probability of consequence table a power level and the probability of eachaccident consequence level must be entered. The table allows up to 50 sets of powerlevel/accident consequence probabilities, however, at the present time, only nine sets ofvalues are used. Although better results have not been found, this aspect of the modelcould be up-dated allowing for further calibration of the model. A graph is available viewthe relationship between power level and accident severity.4) Roll ConsequencesThe roll consequence table is structured identically to the probability of consequence table.The difference is that instead of power level, this table utilizes the speed at roll-over as thebasis for the accident severity result. Again up to 50 sets of values can be utilized and agraphical representation of the relationship between vehicle roll-over speed and accidentseverity can be viewed. When new and better research becomes available, this roll-overconsequence table can be immediately updated.785) Vehicle CharacteristicsThe purpose of vehicle characteristics is to allow the user to modify and select the types ofvehicles which are characteristic of the roadway under review. There are four factors whichare used to simulate vehicles: the vehicle's centre of gravity, the track width, the wheelbase,and the vehicle mass. The eight vehicles which currently represent the default vehicles aretaken from RHSM.V6.2 documentation [50], and are shown in Table 3.10.Table 3.10 Vehicle Characteristics: Default ValuesVehicleTypeWheel-base (m) Track-Width (m) Weight (kg) Centre of Gravity (m)1 2.40 1.30 922 0.512 2.52 1.42 979 0.533 2.59 1.42 1159 0.554 2.75 1.48 1404 0.585 2.95 1.55 1591 0.586 2.98 1.58 1859 0.587 2.24 1.30 636 0.518 2.75 1.48 1600 0.58Source: RHSM: A Methodology and Technique to Effectively Reduce Single Vehicle Potential, 19846) Encroachment Rate CalibrationEncroachment rate calibration provides ten encroachment rate factors, with each factorhaving 5 or 6 choices to simulate the roadway under review. The values generally rangefrom 0.80 to 1.30 for each factor and are meant to correct the encroachment rate due to thevarious characteristics of the roadway. The majority of the values were obtained directlyfrom TAC [51], others were derived from M.o.T.H sources [52], and others are new to theanalysis. Any of the values can be modified to better simulate unique locations.79Table 3.11 Encroachment Rate FactorsRoadway Class Design Speed Lane Width Number of Lanes Shoulder Widthtype value kph value meters value number value meters valueHighway 1.00 80 0.90 <3.0 0.90 2 (TW) 1.10 0.0 0.85Urban Freeway 1.00 90 0.95 3.4 0.95 4 (TW) 1.05 1.0 0.90Rural Freeway 0.95 100 1.00 3.7 1.00 4 (Div) 1.00 2.0 0.95Urban Arterial 1.05 110 1.05 4.0 1.05 6 (Div) 0.95 3.0 1.00Rural Arterial 1.10 120 1.10 >4.0 1.10 8 (Div) 0.90 4.0 1.05HorizontalCurveVerticalCurveClimaticConditionsAdjustValue(each)TrafficCompositionAdjustValueSightRestrict.AdjustValueflat <2% no freezing 1.00 1.familiar 1.00 none 1.00gentle 3% mod. freezing 1.05 2.un-familiar 1.10 temporary 1.05moderate 4% mod. fog 1.10 3.heavy vehicles 1.10 periodic 1.05severe 5% sig. freezing 1.15 4. platooning 1.10 slight 1.10moderate(outside)6% sig. fog 1.20 combine: 2-3,2-4, or 3-41.20 moderate 1.15severe(outside)>7% fog and freezing 1.25 combine: 2-3-4 1.30 severe 1.207) Encroachment Rate DefaultsThis option allows the user to select the default values which will be used when the programis run. The ten encroachment rate factors, each with 5 or 6 default choices are currentlyset at default values of 1.0.8) Unit Costs / Interest Rate / Analysis PeriodThe unit cost values which can be defaulted include barrier installation costs, barriermaintenance costs, cut/fill cost, slope maintenance cost, and the direct cost of each accident80type (ND, PDO, INJ, FAT). The present value/capital recovery factors include the interestrate and the analysis period. All of these factors will vary greatly from project to projectand therefore, having default values for each of the factors listed above may be difficult.9) Save Data to Default FileThe last option under the Calibration Data Menu is the Save Data to Default File option.The purpose of this option is to save the new defaults so that the next time the program isrun, the new defaults will be utilized. A sub-screen will appear to verify default changes.3.4.5 Display and Output ResultsThere are three options on RHSM.V9's main menu which relate to the displaying of theresults: Display Results, Output to Printer or File, and Plot Trajectories.1) Display ResultsOnce the simulation has been run, and Display Results has been selected, a sub-screenappears with two options: List Output and Graph Output. List Output will write the resultsof the simulation to the screen where the user can page-up or page-down to observe theresults. There is one screen available for the results of each improvement alternative aswell as a summary of the results from all the alternatives. For each improvementalternative, the output includes the total number of encroachment trajectories considered,the total number of vehicle roll-overs, the number and probability of roll-overs at the terrainchange, the number and probability of rolls on the slope, the aggregated probability ofaccident consequence (ND, PDO, INJ, FAT) and the results of the economic analysis.SeverityTop-RightVantage PointTop-Left Vantage Point 1100Roadside4N1N 2040 N// Bottom-LeftVantage PointRoadway8 1The second option under display results is Graph Output. The purpose of this option is toprovide a visual representation of the relative hazard level of each hazardous roadsidefeature. When this option is selected, the improvement alternatives title screen appears forthe user to select the alternative which results require visual inspection. Then the requiredconsequence criteria (either PDO, INJ, FAT) is selected to be illustrated graphically.Finally, the vantage point in which to view the graphical output is entered. Four vantagepoints are provided to ensure that the 3-D graph results can be viewed accurately. Oftena large peak in the foreground of the accident consequence surface will "hide" smallercontours behind. Figure 3.10 provides an example of a 3-D graph available in RHSM.V9and identifies the various vantage points.1 Bottom-RightVantage Point(Initial Encroachment Location)Figure 3.10 Three-Dimensional Graphic Results822) Output to Printer or FileThe purpose of the Output to Printer of File option is to either save the results of thesimulation run to a file or to get a print-out of the simulation results by sending the outputdirectly to the printer. The list of model components which can be output includes theOperational Data, Terrain Data, Clear-Zone Object Data, Departure Angle, Probability ofConsequence Data, Roll Consequence Table, Vehicle Characteristics, the Results, the B/CEvaluation, and the C-E Evaluation. Each of these components has been discussed in detailin the previous sections. The user is required to answer yes (Y) or no (N) for eachcomponent to be included in the output. This option is another example which illustratesthe flexibility that has been incorporated into RHSM.V9.3) Plot TrajectoriesPlot Trajectories provides a visual display of the trajectory of a vehicle during an off-roadexcursion. This is a check to ensure the vehicle's trajectory is simulated accurately. Theinformation required to view the trajectory include: the encroachment number, the initialvelocity of the vehicle during the roadside encroachment, and the initial encroachmentangle. The trajectory plot shows a topographic view and a cross-sectional view of theroadside surface and then the vehicles trajectory will be drawn on both views and the usercan observe how hazardous features in the roadside affect the vehicles trajectory. If roll-over occurs at any point along the trajectory, then a semi-circular line appears in the profileview to indicate where the vehicle roll-over occurred. An illustration of a hazardousroadside and a possible trajectory is shown in Figure 3.11.83PLAN100 20RoadsideVehicle TrajectoryRoadwayPROFILE Vehicle]Roll-Over 864204 6 20Distance From Roadway (meters)Figure 3.11 Vehicle Trajectory Plots3.4.6 Information Storage and RetrievalThe final two options on RHSM.V9's main menu are called Load Input Data and SaveInput Data. The purpose of these options is to save all input data including the EditSimulation Data, Alternative Evaluation Data, and Calibration and Defaults for a particularlocation. These storage and retrieval components of RHSM.V9 applies to the input dataonly and that the storage of results produced by the program are treated separately.RHSM GRAPH-2D • ROADSIDE MITIGATIONSIMULATE • ECONRUNGRAPH-3Dj—H ECONOMICTRAJECT —ad RUN DISPLAY —.I PRINT INPUTEDITGRAPH-2D► SAVECALIBRATEDEFAULTSOBJECT " FLY DYNROLL STATROLLCONSEQ843.5 Program DetailsSince version nine of the program has been completely re-developed, the program structure,subroutine names, and variable names are unique to version nine, whereas the previousversions (5.0, 6.2, and 7.0) were all very similar in structure and variable definition.RHSM.V9 has been written in Fortran77 and utilizes Prospero's Profor2 Compiler, andSaywhat Graphics software to improve the graphic capabilities and visual presentation.Although it is possible for a user to use RHSM.V9 without having any knowledge of howthe program works, it is important for the user to understand how the program flows,starting with input requirements and ending with the output results. Similar to the previousversions, RHSM.V9 utilizes a series of subroutines which separate the different componentsof the program. One main program called RHSM and twenty-one subroutines are used toeffectively handle all the operations of the program. Figure 3.12 shows a flow-chart of theprogram and Appendix C provides a descriptions of the purpose of each subroutine.Figure 3.12 Flow-Chart of RHSM.V9854.0 EVALUATION OF RHSM.V9: Results and Sensitivity AnalysisThis chapter examines the results produced by RHSM.V9 and details the effectiveness ofthe new version of the model. The model performance will be illustrated by performingnumerous program runs and comparing the results with previous results or expected results.4.1 Results Comparison: RHSM.V9 with Previous VersionsUnfortunately, when reviewing the previous versions of RHSM, there is a significant lackof information relating to results produced by each earlier version (RHSM.V5, RHSM.V6.2,and RHSM.V7). However, in a M.o.T.H. publication [53] the results of each version wereprovided and forms the foundation of this comparison. Another problem in forming thecomparison is that the operational parameters used to obtain the earlier results are notknown. Therefore, for operational parameters such as speed or degree of restraint, whichmay greatly affect the results produced, the values had to be estimated. The value of theresult, as well as the trends in the results is important in the comparison.For this comparison, a series of typical roadside ditch configurations were utilized, includingflat bottom ditches and V-shaped ditches. A flat bottom ditch has a variable front slope,but always has a one-meter wide bottom, a depth of 2.0 meters, and a 2:1 back slope for allcases. A V-ditch is a V-shaped ditch with varying front slopes, a 2:1 back slope, and a 2.0meter depth for all cases presented. The results obtained from RHSM.V9 use a meanencroachment speed of 80 kph with 50% seat belt usage. The results of the comparison areshown in Tables 4.1, 4.2, and 4.3, one table for each previous RHSM version.86Table 4.1 RHSM.V9 versus RHSM.VS Results ComparisonDitchConfig.ProbabilityNDProbability PDO Probability INJ Probability FAT Probability RollV9 VS V9 VS V9 VS V9 VS V9 VS4:1 FB 0.89 0.64 0.10 0.33 0.01 0.03 0.00 0.00 0.01 0.114:1 V 0.89 0.51 0.10 0.40 0.01 0.08 0.00 0.01 0.01 0.102:1 FB 0.72 0.46 0.22 0.32 0.04 0.16 0.01 0.06 0.01 0.642:1 V 0.70 0.24 0.23 0.52 0.05 0.18 0.02 0.07 0.02 0.64Table 4.2 RHSM.V9 versus RHSM.V6.2 Results ComparisonDitchConfig.Probability ND ProbabilityPDOProbability INJ ProbabilityFATProbability RollV9 V6.2 V9 V6.2 V9 V6.2 V9 V6.2 V9 V6.24:1 FB 0.89 0.95 0.10 0.01 0.01 0.03 0.00 0.01 0.01 0.233:1 FB 0.83 0.69 0.15 0.17 0.02 0.09 0.00 0.04 0.02 0.482:1 FB 0.72 0.36 0.22 0.39 0.04 0.18 0.01 0.07 0.02 0.824:1 V 0.89 0.03 0.10 0.69 0.01 0.21 0.00 0.07 0.01 0.713:1 V 0.83 0.02 0.15 0.65 0.02 0.23 0.00 0.09 0.01 0.912:1 V 0.70 0.01 0.23 0.64 0.05 0.25 0.02 0.10 0.01 0.99Table 4.3 RHSM.V9 versus RHSM.V7 Results ComparisonDitchConfig.ProbabilityNDProbabilityPDOProbability INJ Probability FAT Probability RollV9 V7 V9 V7 V9 V7 V9 V7 V9 V74:1 FB 0.89 0.92 0.10 0.00 0.01 0.04 0.00 0.03 0.01 0.303:1 FB 0.83 0.91 0.16 0.01 0.01 0.05 0.00 0.03 0.01 0.402.5:1 FB 0.77 0.79 0.20 0.03 0.03 0.11 0.00 0.06 0.01 0.502:1 FB 0.72 0.46 0.23 0.10 0.04 0.29 0.01 0.15 0.02 0.59 Notes: V9 - version nine V6.2 - Version 6.2 FB - Flat bottom ditch V7 - version seven VS - Version 5 V - V-shaped ditch87The major criticism of RHSM.V6.2 and RHSM.V7 was that the results generated from eachversion were far too severe. This is true, especially for the probability of vehicle roll-over,which according to M.o.T.H. standards, specifies that a 4:1 embankment slope isrecoverable, or in other words, would be very unlikely to cause vehicle roll-over. Thisproblem is overcome in Version 9 of RHSM, which produced very low roll-overprobabilities. As well as the roll-over probabilities, the accident consequence probabilitiesare also significantly less severe than those produced by Versions 6.2 and 7, which,considering the geometric configuration of the roadside terrain, seems more realistic.RHSM.V5 produced the "best" results of the three previous versions. RHSM.V9 producedresults that were relatively close to those produced by Version 5, especially for the injuryand fatality categories of accident consequence. The results produced by Version 9 aremoderately less severe than those produced by Version 5. If the operational parameterssuch as vehicle speed, seat-belt usage, or other parameters were modified, the resultsproduced by Version 9 could closely reflect those produced by Version 5. The trend ofincreasing accident severity with increases in embankment slope is valid.4.2 Results Evaluation: Hazardous Roadside Terrain SlopesThere are three factors which need to be analyzed in the evaluation of when an errantvehicle encounters hazardous roadside terrain including the location of the terrain changes,the severity of the terrain changes, and the friction coefficient which is representative of theroadside terrain. To ensure consistency, all the default values for the operational88parameters have been employed for each roadside terrain analyzed. Also, no hazardousroadside objects were used in the evaluation of the various roadside terrain in order toisolate the effects caused by the terrain.The first factor which will be considered in the evaluation of the hazardous roadside terrainis the location of the terrain changes. To emphasize the effects of the location of thehazardous terrain, a severe ditch configuration has been selected which is simulated atdifferent locations parallel to the edge of the roadway. The simulated V-shapes ditch hasa 53 degree front slope, a 53 degree back slope, and a depth of 4.0 meters. For the analysis,the ditch locations start at 0.0 meters, 5.0 meters, 10.0 meters, and 15 meters from the edgeof the roadway and the results have been tabulated in Table 4.4.Table 4.4 Location of Hazardous TerrainLocation ofTerrainHazard. (m)Accident Severity ConsequenceProbabilityRoll-Over ProbabilityND PDO INJ FAT Total on Slope @ Ter. Chg.0.0 0.58 0.14 0.16 0.12 0.24 0.22 0.025.0 0.68 0.11 0.15 0.07 0.15 0.10 0.0510.0 0.71 0.13 0.13 0.04 0.10 0.08 0.0215.0 0.80 0.11 0.07 0.02 0.09 0.05 0.04The results produced by RHSM.V9 for the variations in the location of the hazardousterrain appear to be quite good. The accident severity consequence probability results showthat as the location of the hazardous terrain feature increases in distance from the edge ofthe roadway, the accident severity consequence probability decreases. This is a reasonable89result since the vehicle has a greater distance in which to decelerate and therefore avoid thehazard or encounter the hazard at a lower speed. The roll-over probability results aresimilar, with the total roll-over probability decreasing with the distance from the edge of theroad to the hazardous terrain feature. The majority of the roll-overs occur on the slopeinstead of at the terrain change, which is a realistic result since air-borne and dive-in roll-overs usually occur on the slope.The second factor to be discussed in the evaluation of hazardous roadside terrain is theseverity or relative magnitude of the terrain slope. For this analysis, a series of differentslopes ranging from 0 degrees to 60 degrees were used for both the down-slope (negative)and up-slope (positive) directions. The terrain was simulated as flat for 2.0 meters from theroadway edge, then the variable slope was simulated for a distance which would allow foran effective fill height of 5.0 meters, and then the terrain was simulated as flat for theremaining 20.0 meter lateral distance. The results have are shown in Tables 4.5 and 4.6.Table 4.5 Degree of Down-Slope Terrain (Negative Slope Angles)Terrain Slope(degrees)Accident Severity ConsequenceProbabilityRoll-Over ProbabilityND PDO INJ FAT Total on Slope @ Ter. Chg.0 1.00 0.00 0.00 0.00 0.00 0.00 0.00-10 0.98 0.02 0.00 0.00 0.00 0.00 0.00-20 0.83 0.16 0.01 0.00 0.00 0.00 0.00-30 0.73 0.21 0.05 0.01 0.07 0.00 0.07-40 0.67 0.21 0.10 0.02 0.06 0.00 0.06-50 0.61 0.23 0.13 0.02 0.08 0.00 0.08-60 0.61 0.06 0.17 0.16 0.51 0.48 0.0390Table 4.6 Degree of Up-Slope Terrain (Positive Slope Angles)Terrain Slope(degrees)Accident Severity ConsequenceProbabilityRoll-Over ProbabilityND PDO INJ FAT Total on Slope @ Ter. Chg.0 1.00 0.00 0.00 0.00 0.00 0.00 0.0010 1.00 0.00 0.00 0.00 0.00 0.00 0.0020 1.00 0.00 0.00 0.00 0.01 0.00 0.0130 0.97 0.03 0.00 0.00 0.02 0.00 0.0240 0.88 0.07 0.03 0.01 0.03 0.00 0.03. 50 0.78 0.17 0.05 0.01 0.01 0.00 0.0160 0.61 0.06 0.17 0.16 0.48 0.48 0.00The results produced by RHSM.V9 for variations in the severity or slope of hazardousroadside terrain also appears to be quite good. The first observation should be that thedown-slope terrain is more hazardous than the up-slope terrain. This is a reasonable resultsince the up-slope terrain tends to slow the vehicle down and thus lessen the severity of theaccident consequence probability. The exception is for the very severe slope angles (60degrees), in which the vehicle roll-over becomes the significant factor causing similar resultsfor both positive and negative embankment slopes. The trends in the results are alsocorrect. For either down-slope or up-slope terrain, the accident severity increases with anincrease in the embankment slope angle. For down-slope terrain, the accident severityconsequence probability becomes significant near the -20 degree down-slope (approximatelya 3:1 slope), which according to AASHTO and TAC, becomes the point at which a slopeis unrecoverable.91The final factor which will be evaluated in the analysis of hazardous roadside terrain is thecoefficient of friction used to represent various roadside terrains. These values werediscussed in the previous chapter, where a table was provided which recommended valueswhich could be used for different terrain types. For this analysis, the values for terrainresistance varied from MU = 0.10 to MU = 0.90. The terrain was simulated as very flat (a2.0 degree down-slope), and no hazardous roadside objects. The results produced byRHSM.V9 have been tabulated below in Table 4.7.Table 4.7 Level of Terrain Friction CoefficientTerrain FrictionCoefficient (MU)Accident Severity Consequence ProbabilityND PDO INJ FATMU =0.10 1.00 0.00 0.00 0.00MU =030 1.00 0.00 0.00 0.00MU=0.50 1.00 0.00 0.00 0.00MU=0.70 0.99 0.01 0.00 0.00MU=0.90 0.77 0.23 0.00 0.00The results produced from RHSM.V9 for this aspect of hazardous terrain evaluations arevalid. The terrain friction coefficient acts as a factor to decelerate an errant vehicle, andin so doing, reduce the severity of the accident consequence probabilities. As the vehicledecelerates according to the terrain friction coefficient specified, a power loss, based on theproduct of the deceleration and change in velocity, results. However, at no time should thispower be large enough to cause accident resulting in injuries or fatalities. For example, ifthe roadside area under investigation has a surface that is asphalt, the program recommendsa high value for the coefficient of friction (approximately equal to MU = 0.70). Therefore,92it is reasonable to assume that as the errant vehicle leaves the road onto the flat asphaltroadside terrain, it should be able to stop without serious injury or fatality, even though,power loss has occurred through the application of the brakes and the rubber tires "gripping"the asphalt surface. The program provides these results.4.3 Results Evaluation: Hazardous Roadside ObjectsThere are three factors which need to be analyzed in the evaluation of the results producedby RHSM.V9 when a vehicle encounters hazardous roadside objects. These three factorsare the type of object, the size and number of objects, and the location of the objects inrelation to the roadway. For the purpose of consistency, all of the default values are usedfor the operational parameters, and the roadside terrain was simulated as very flat (2 degreedown-slope angle), with a very low friction coefficient for the terrain resistance. Althoughthis may appear to be an unrealistic assumption, the purpose is to isolate the hazardousobjects to see the affects of varying the three factors outlined above.The first factor considered is the type of object; either a rigid object, a deformable object,or a passable object, and the relative rigidity. The relative rigidity of an object ranges from0 to 100 and only applies to objects specified as deformable since rigid objects have adefaulted value of 100 for the rigidity factor and passable objects have a defaulted value of0 for the rigidity factor. In Table 4.8, the three different types of objects are presented, withthe deformable objects having a rigidity factor of MU = 50.93Table 4.8 Object TypesObjectTypeRigidityFactor (MU)Accident Severity Consequence ProbabilityND PDO 1 INJ FATRigid 100 0.65 0.20 0.13 0.02Deformable 50 0.66 0.24 0.09 0.01Passable 0 1.00 0.00 0.00 0.00The results produced are as expected: the rigid object has the most severe accidentprobability consequence, the passable object has the least severe accident probabilityconsequence, and the deformable object produces results between the two extremes.It is also important to evaluate how the relative rigidity factor (MU) affects the results ofthe program. By simulating the same size, number, and location of objects in the roadsideand varying the relative rigidity of the objects, the sensitivity of MU can be determined.One large object, 2.0 meters from the roadway, 95.0 meters by 16.0 meters in size issimulated with MU ranging from 3 to 30. The results of the analysis have been tabulatedin Table 4.9. The trend in the results is correct, indicating that as the friction coefficientof the hazardous objects increase, the accident severity consequence probability alsoincreases. The value of this component of the model is tremendously important, sincemany hazardous objects are considered deformable (including some roadside barriers) andobtaining a representative value for these objects will ensure accurate results. Moreresearch is required to achieve these values, some of which should become available fromM.o.T.H., Highway Safety Branch sponsored research by Navin and Thomson [54] regardingconcrete roadside barriers.94Table 4.9 Deformable Object Rigidity FactorDeformable ObjectRigidity Factor (MU)Accident Severity Consequence ProbabilityND PDO INJ FAT3 0.61 037 0.02 0.006 0.61 0.35 0.04 0.009 0.61 0.31 0.07 0.0012 0.61 0.28 0.10 0.0115 0.61 0.25 0.13 0.0118 0.61 0.22 0.15 0.0121 0.61 0.20 0.17 0.0124 0.61 0.19 0.19 0.0227 0.61 0.17 0.20 0.0230 0.61 0.16 0.20 0.02The second factor to be considered in the evaluation of hazardous roadside objects is toconsider the size and number of objects present in the roadside. The terrain data wasconsistent throughout this phase of the testing in order to isolate the object size andnumber. The terrain was given a very slight down-slope (2 degrees) and low frictioncoefficients for terrain resistance. For this analysis five different object sizes were selected:very small (0.2 x 0.2 meters), small (1.0 x 1.0 meters), medium (3.0 x 3.0 meters), large (5.0x 5.0 meters), and very large (15.0 x 15.0 meters). The initial contact location or the cornerof the object closet to the vehicle trajectory was constant, with the object size increasingperpendicularly away from this initial corner. The object type selected was rigid objects.The trend in the results produced by RHSM.V9 is valid, as shown in Table 4.10. Theaccident consequence severity increases as the size of the hazardous object increases. Thisis due to the increase in the access probability of the vehicle striking the object.95Table 4.10 Object SizeObjectSizeObjectDimensions(meters)Accident Severity Consequence ProbabilityND PDO INJ FATVery Small 0.2 x 0.2 1.00 0.00 0.00 0.00Small 1.0 x 1.0 0.87 0.08 0.04 0.00Medium 3.0 x 3.0 0.74 0.15 0.09 0.01Large 5.0 x 5.0 0.73 0.16 0.10 0.01Very Large 15.0 x 15.0 0.70 0.17 0.11 0.01In evaluating the results produced by increasing the number of hazardous roadside objects,the results are very similar to those results produced by increasing the size of the object.The terrain is similar to that specified earlier, and the simulated objects were located 5.0meters from the edge of the road, and spaced approximately 5.0 meters apart. As expected,the trend is that as the number of objects increase, the accident severity consequenceprobability also increases. The reason for this is the increase in the access probability of avehicle striking a hazardous roadside object. The results are presented in Table 4.11.Table 4.11 Number of Objects Parallel to the RoadwayNumber ofObjectsObjectDimensions(meters)Accident Severity Consequence ProbabilityND PDO INJ FAT1 1.2 x 1.2 0.87 0.08 0.04 0.002 1.2 x 1.2 0.80 0.12 0.08 0.013 1.2 x 12 0.73 0.16 0.10 0.014 1.2 x 1.2 0.68 0.18 0.13 0.015 1.2 x 1.2 0.68 0.18 0.13 0.0110 1.2 x 1.2 0.62 0.22 0.14 0.0215 1.2 x 1.2 0.62 0.21 0.15 0.0220 1.2 x 1.2 0.63 0.21 0.14 0.0296The third factor considered in the evaluation of hazardous roadside objects is the locationof the objects. A series of roadside objects were simulated at different locations within theroadside to evaluate the effects on the accident severity consequence probability. One runof the program was completed to evaluate the effects of moving a row of objects furtherfrom the edge of the roadway (parallel to the roadway) and a second run of the programwas completed to evaluate the effects of moving a row of objects further from the start ofthe hazardous area (perpendicular to the roadway). The objects simulated were rigidobjects with dimensions of 1 x 1 meters. In the direction parallel to the roadway, a row of10 objects were spaced at 5 meters apart, and in a direction perpendicular to the road, arow of 6 objects were spaced 3 meters apart. The results are shown in Tables 4.12 and 4.13.Table 4.12 Location of Objects Parallel to the RoadwayDistance fromEdge of theRoadAccident Severity Consequence ProbabilityND PDO INJ FAT3.0 meters 0.67 0.18 0.13 0.026.0 meters 0.66 0.20 0.13 0.0110.0 meters 0.70 0.20 0.09 0.0115.0 meters 0.79 0.15 0.05 0.00Table 4.13 Location of Objects Perpendicular to the RoadwayDistance fromStart of theHazard ZoneAccident Severity Consequence ProbabilityND PDO INJ FAT1.0 meter 0.99 0.01 0.00 0.0015.0 meters 0.63 022 0.14 0.0130.0 meters 0.77 0.14 0.08 0.0150.0 meters 0.79 0.17 0.04 0.0070.0 meters 0.93 0.06 0.01 0.0097The results produced by RHSM.V9 for both object location types are valid. When theobjects are parallel to the roadway, the accident severity consequence probability decreasesas the objects become further away from the edge of the roadway. Similarly, when theobjects are aligned perpendicular to the roadway, the accident severity consequenceprobability decreases as the objects get further away from the start of the start of thehazardous roadside area. The exception is for the line of objects only 1.0 meter into thehazardous zone, here, the vehicle is unable to reach these objects and the low accidentprobabilities are a result of a low access probability. The reason for the decrease inaccident severity probability as the objects get further away is that the vehicle has more timeto slow down (decelerate) and therefore the impact speed is reduced to a level which willcause a reduction in power loss and therefore, a reduction in accident severity consequencelevel.4.4 Sensitivity Analysis: Operational ParametersEach operational parameter will be subjected to a sensitivity analysis to determine theaffects on the overall results of the program. The hazardous roadside terrain and hazardousobjects have been held constant in order to compare the affects of one operationalparameter in relation to the others. The hazardous roadside is shown in Figure 4.1. Theoperational parameters have been divided into seven groups: speed, horizontal curve, timeincrements, number/location of encroachments, speed/angle increments, correctiveparameters, and vehicle model.Profile View12 13 14 16 18 200 298Vehicle SpeedThe mean vehicle velocity ranges from a low of 70 kph to a high of 120 kph, in incrementsof 10 kph. The simulation of the roadside are was quite detailed with a number of terrainchanges and hazardous objects. A diagram showing a three dimensional cross-sectional viewand a plan view of the hazardous roadside is provided in Figure 4.1 instead of a descriptionsince the diagram is self-explanatory. The roadside area has been simulated such that theaccident consequence probabilities would be quite severe in order to emphasize the affectsof the operational parameters.Plan ViewRigid ObjectsMU=100o0ooq qoo012 14 16 18 202Figure 4.1 Hazardous Roadside Area: Sensitivity Analysis of Operational Parameters99The results of the sensitivity analysis for mean vehicle speed are provided in Table 4.14.The trend in the results is correct, indicating that as the mean speed is increased, the overallaccident consequence probability becomes more severe. Validation of the exact valuesobtained from the model is difficult due to the lack of a detailed and large enough database. The results produced by RHSM.V9 appear to be "intuitively obvious" and thus providesupport in the model's validation process.Table 4.14 Mean Vehicle Encroachment SpeedMeanEncroachmentSpeed (kph)Accident Severity Consequence ProbabilityND PDO INJ FAT70 0.54 0.35 0.10 0.0280 0.49 0.35 0.13 0.0290 0.44 0.34 0.18 0.03100 0.44 0.29 0.22 0.05110 0.43 0.25 0.25 0.07120 0.44 0.21 0.25 0.09Horizontal CurveThe roadside terrain and hazardous objects have been simulated identically to thatillustrated earlier for the mean vehicle velocity. There are four categories of horizontalcurvature available to the user: a straight roadway section, a gentle curved section; amoderate curved section, and a severe curved section. As the roadway curvature increases,the angle of incidence becomes greater, and therefore the lateral vehicle velocity increaseswhich should cause an increase in the overall accident severity consequence probability.The results produced by RHSM.V9 have substantiated this statement, shown in Table 4.15.100Table 4.15 Horizontal CurvatureHorizontalCurvatureAccident Severity Consequence ProbabilityND PDO INJ FATStraight 0.49 0.35 0.13 0.02Gentle 0.47 0.36 0.15 0.03Moderate 0.45 0.36 0.16 0.03Severe 0.44 0.34 0.18 0.04The relationship between the straight roadway section and the curved roadway section isbased strictly on the geometric considerations of the curved roadway with respect to thestraight roadway. More research is required to establish whether this is an accurateassumption and/or to determine if any other factors will affect the encroachment angledistribution. Once this research is completed, it is recommended that the encroachmentangle distributions be updated.Time Increment of TrajectoryFor this sensitivity analysis, the hazardous roadside which was illustrated earlier has beenused to determine the affects of varying the time increment of the trajectory. The timeincrement varies from a low of 0.005 seconds to a high of 0.250 seconds, offering a widerange of values from the default value of 0.05 seconds. The results produced by RHSM.V9for this component of the sensitivity analysis are presented below in Table 4.16. It shouldbe noted that as the time increment decreases the cpu time required to run the programincreases significantly.101Table 4.16 Time Increment of TrajectoryTimeIncrement ofTrajectory(seconds)Accident Severity ConsequenceProbabilityRoll-Over ProbabilityND PDO INJ FAT Total on Slope @ Ter. Chg.0.005 0.52 0.17 0.21 0.09 0.37 0.37 0.000.010 0.48 0.17 0.25 0.10 0.34 0.34 0.000.050 0.49 0.35 0.13 0.02 0.15 0.13 0.020.100 0.51 0.23 0.22 0.03 0.05 0.03 0.020.150 0.64 0.16 0.14 0.06 0.07 0.02 0.050.200 0.73 0.19 0.06 0.02 0.05 0.01 0.040.250 0.69 0.19 0.08 0.03 0.06 0.01 0.05It can be concluded from these results that the "best" results are those with a small timeincrement of trajectory. This is because at larger time increments the vehicle may notencounter the various hazardous features in the roadside. In other words, if the timeincrement of the vehicle is large, the vehicle may "jump" over the hazardous feature whichwould normally cause an increase in the accident severity consequence probability.Number and Location of Encroachment PointsOnce again, the roadside illustrated earlier will be used for this aspect of the analysis. Forthis evaluation, four different situations were simulated: one encroachment at 0 meters, twoencroachments at 0 meters and 25 meters, two encroachments at 0 meters and 50 meters,and three encroachments at 0 meters, 25 meters, and 50 meters. The distance is measuredfrom the start of the hazardous roadside zone, parallel to the roadway. The results havebeen tabulated in Table 4.17.102Table 4.17 Encroachment Number and LocationEncroachmentNumber andLocationsAccident Severity ConsequenceProbabilityRoll-Over ProbabilityND PDO INJ FAT Total on Slope @ Ter. Chg.1 @ 0 m 0.49 035 0.13 0.02 0.15 0.13 0.022 @ 0, 25 m 0.23 0.19 039 0.18 0.34 0.34 0.002 @ 0, 50 m 0.30 0.43 0.23 0.05 0.14 0.13 0.013 @ 0, 25, 50 m 0.19 0.31 0.42 0.09 0.05 0.03 0.02Recalling the hazardous roadside simulated, it can be concluded that these results are verygood. The results of the first option (1 encroachment at 0 m) is less severe than the resultsproduced by the other options with more than one encroachment location. The results ofthe second option (2 @ 0, 25 m) is more severe than the results of the third option (2 @0, 50 m) because the third option "misses" many of the hazardous objects. The results ofthe fourth option (3 @ 0, 25, and 50 m) are "in-between" the second and third optionsbecause the results of all three encroachment locations are normalized for the entireroadside area.Speed/Angle IncrementsFor this analysis, the speed increment ranged from a low of 1 kph to a high of 4 kph, andthe angle increment, ranged from a low of 2 degrees to a high of 8 degrees. Obviously, asthe increment size increases, the "sensitivity" of the results produced decrease. The controlroadside, illustrated at the beginning of this section, was also utilized for this component ofthe sensitivity analysis. The results of the analysis are shown in Table 4.18.103Table 4.18 Speed and Angle IncrementsSpeed/AngleIncrementsAccident Severity ConsequenceProbabilityRoll-Over ProbabilityND PDO I INJ FAT Total on Slope @ Ter. Chg.1 / 2 0.23 0.44 0.25 0.08 0.18 0.17 0.012 / 4 0.48 0.17 0.25 0.10 0.34 0.34 0.003 / 6 0.57 0.32 0.10 0.01 0.17 0.17 0.004 / 8 0.89 0.06 0.05 0.01 0.06 0.06 0.00The results produced are as expected: as the speed/angle increments increase, the sensitivityof the results worsen, with the result being, that little confidence can be given to results withlarge speed or angle increments. Confident results are produced when the speed/angleincrements are at, or below, the default values of 2/4 respectively.Corrective Parameters (Braking, Restraint, and Steer-back)The next group of operational parameters to be evaluated in the sensitivity analysis are thefactors which tend to "protect" the vehicle occupants. These factors include the degree ofbraking, the degree of restraint, and the amount of vehicle steer-back. The roadside whichwas illustrated earlier is, once again, used for this part of the sensitivity analysis. The firstfactor to be considered is the degree of vehicle braking, which has been varied from 10percent braking to 80 percent braking. The results produced by RHSM.V9 are shown inTable 4.19, and appear to be quite good. The trend in the results agree with the expectedresults: as the degree of braking increases, the severity of the accident consequenceprobability decreases. The relative values of the results produced also appear to "intuitively"realistic.104Table 4.19 Degree of BrakingDegreeofBrakingAccident Severity ConsequenceProbabilityRoll-Over ProbabilityND PDO INJ FAT Total on Slope @ Ter. Chg.10 0.53 0.33 0.12 0.02 0.14 0.10 0.0420 0.55 031 0.12 0.02 0.13 0.10 0.0330 0.49 0.39 0.11 0.02 0.12 0.09 0.0340 0.49 0.40 0.10 0.01 0.11 0.09 0.0250 0.44 0.46 0.09 0.01 0.09 0.08 0.0160 0.35 0.56 0.08 0.01 0.10 0.08 0.0270 0.28 0.63 0.08 0.01 0.10 0.09 0.0180 0.23 0.69 0.07 0.01 0.09 0.08 0.01The second component of the "protection" operational parameters being evaluated todetermine the sensitivity is the degree of restraint. For this analysis, the degree of restraintranges from a low of 0 percent restraint (no seat-beat usage) to a high of 100 percentrestraint (full seat-belt usage). It is expected that as the degree of seat belt usage increasesthe severity of the accident consequence probability should decrease. The results of theanalysis, as shown below in Table 4.20, substantiate this statement. The trend in the resultsare good, however, the relative value of the results seem somewhat low. Research hasproven the effectiveness of restraint devices and therefore, the results produced byRHSM.V9 should clearly emphasize the effects of increased seat-belt usage. Perhaps anupdate of the probability of consequence table and the roll-over consequence table isrequired to account for the improvements in seat-belt effectiveness, especially since theconsequence table is based on research that is approximately ten years old.105Table 4.20 Degree of RestraintDegree ofRestraintAccident Severity ConsequenceProbabilityRoll-Over ProbabilityND PDO INJ FAT Total on Slope @ Ter. Chg.0 0.49 0.33 0.14 0.03 0.15 0.13 0.0215 0.49 0.34 0.14 0.03 0.15 0.13 0.0230 0.49 0.34 0.14 0.03 0.15 0.13 0.0245 0.49 0.35 0.14 0.02 0.15 0.13 0.0260 0.49 0.36 0.13 0.02 0.15 0.13 0.0275 0.49 0.36 0.13 0.02 0.15 0.13 0.0290 0.49 0.37 0.13 0.01 0.15 0.13 0.02100 0.49 0.37 0.13 0.01 0.15 0.13 0.02The third component of the three operational parameters used to simulate a vehicleoccupants ability to protect themselves is the degree of vehicle steer-back. The degree ofvehicle steer-back is not the angle between the front tires of the vehicle and a longitudinalaxis through the vehicle, but rather, it is the actual corrective angle which the vehicle willdeviate from the normal trajectory. The range of steer-back angles ranges from a low of 0degrees, to a high of 10 degrees. Table 4.21 presented the results below.Table 4.21 Degree of Vehicle Steer-BackDegree ofSteer-back(degrees)Accident Severity ConsequenceProbabilityRoll-Over ProbabilityND PDO INJ FAT Total on Slope @ Ter. Chg.0 0.49 0.35 0.13 0.02 0.15 0.13 0.022 0.68 0.18 0.08 0.06 0.49 0.47 0.024 0.66 0.06 0.13 0.15 0.58 0.56 0.026 0.66 0.04 0.14 0.16 0.62 0.60 0.028 0.61 0.05 0.16 0.18 0.64 0.63 0.0110 0.61 0.05 0.16 0.18 0.63 0.62 0.01106At first inspection , the results produced for variations in steer-back angle appear to bewrong, however, further inspection lends credibility to the results. Initially, it was expectedthat as the steer-back angle increased, the severity of the accident consequence probabilitywill decrease, however, the opposite is true. The reason is, that on un-recoverable slopes,such as those simulated, any correction in steer-back angle tends to increase the probabilityof roll-over and therefore, the accident consequence probability. This fact is substantiatedby the high probability of vehicle roll-overs produced by RHSM.V9. The reason for theincrease in vehicle roll-over is due to the increase in radial acceleration exerted on thevehicle as a result of attempting to deviate from the vehicle's normal trajectory.Vehicle TypeRHSM.V9 allows up to eight different vehicle types, with the difference being, thedimensions (wheelbase, track-width, height, and centre of gravity) and the mass of thevehicle. The default vehicles range in size from a compact car to a full size sedan based on1985 and 1990 typical vehicle models. The hazardous roadside terrain and objects havebeen simulated identically to the roadside illustrated earlier in this section. The results forvariations in vehicle type are shown in Table 4.22.The results of this aspect of the sensitivity analysis is somewhat difficult to interpret, andconceptually, this is true since there is a great deal of variability among vehicles with thesame dimensions and mass. The results appear quite good, with the smallest vehicles (type1 and 7) having the most severe accident consequence probability and roll-over probability.107The conclusion obtained from these results is that the vehicle types used for this analysis donot contribute to large variations in the results, which is a reasonable result since most ofthe vehicles are relatively close in size.Table 4.22 Vehicle TypeVehicle Type Accident Severity ConsequenceProbabilityRoll-Over ProbabilityNo I Mass ND PDO INJ FAT Total on Slope @ Ter. Chg.1 922 kg 0.490 0331 0.149 0.030 0.17 0.15 0.022 979 kg 0.492 0353 0.133 0.023 0.12 0.10 0.023 1159 kg 0.492 0.353 0.133 0.023 0.12 0.10 0.024 1404 kg 0.490 0.352 0.135 0.020 0.15 0.13 0.025 1591 kg 0.486 0329 0.161 0.025 0.12 0.11 0.016 1859 kg 0.486 0328 0.161 0.025 0.12 0.11 0.017 636 kg 0.490 0331 0.149 0.030 0.17 0.15 0.028 1600 kg 0.484 0.328 0.160 0.025 0.16 0.15 0.014.5 Sensitivity Analysis: Economic FactorsThis section details the sensitivity of the components which form the economic analysis ofthe model. The operational factors, hazardous roadside terrain, and hazardous objectsremain constant throughout this aspect of the analysis in order to isolate the effects of eacheconomic factor. There are four economic factors associated with the benefit-cost ratioanalysis of the model, and only one other factor associated with the cost-effectivenesscomponent of the model. The benefit-cost factors include the encroachment rate, theaccident costs, the mitigation costs, and the interest rate/time period factors. The factorassociated with the cost-effectiveness approach is weight of each effectiveness criteria.Profile View0 2 12 13 14 16 18 20108The roadside terrain and hazardous objects simulated for the economic sensitivity analysisis shown in Figure 4.2, together with the relevant details required for the analysis.Plan ViewRigid ObjectsMU=100000q q00012 14 16 18 2002Figure 4.2 Hazardous Roadside Area: Sensitivity Analysis of Economic FactorsBenefit-Cost AnalysisThe first factor associated with the benefit cost analysis used in RHSM.V9 is theencroachment rate. A total of ten different factors and the average daily traffic (ADT) areused to calculate the encroachment rate. The factors which cause the greatest and the leastaffect on the encroachment rate calculation have been selected to define the limits of the109encroachment rate sensitivity. As well, one set of factors which represent the an "average"affect on the encroachment rate has also been chosen for a comparative evaluation. Theroadway class is defined as an urban freeway and the average daily traffic is 5000 vehiclesper day. The results produced by RHSM.V9 are shown in Table 4.23.Table 4.23 Encroachment RateEncroachmentScenarioDescriptive FactorsExpectedEncroachmtRate(events/km/yr)1. Worse Case DS = 120 kphLW < 3.0 mNL = 2 (t-w)SW < 1.0 mHC = severeVC > 7%CC = severeTC = unfamiliarSR = severe5.8552. Best Case DS = 80 kphLW > 4.0 mNL = 8 (div.)SW > 4.0 mHC = flatVC = flatCC = noneTC = familiarSR = none0.7773. Average Case DS = 100 kphLW = 3.4 mNL = 4 (div.)SW = 3.0 mHC = ave.VC = 4%CC = moderateTC = averageSR = moderate2.013notes: Please note the following abbreviations:DS = design speed SW = shoulder width CC = climatic conditionsLW = lane width HC = horizontal curve TC = traffic compositionNL = no. of lanes VC = vertical curvature SR = sight restrictionsThe conclusion that can be drawn from the sensitivity of the encroachment rate calculationis that the encroachment rate can very significantly depending on the adjustment factorsselected by the user. Encroachment rate is critical in the evaluation of any hazardousroadside location. For example, if the roadside at a particular location is very hazardous,however, there is very low encroachment rate due to a very low ADT (as an example), thenthe encroachment rate has a significant effect on the evaluation of the improvementalternatives.110The second factor associated with the benefit cost analysis is the accident cost. For thisanalysis, the accident costs will vary between the values used by M.o.T.H. for the direct costsonly (ND = $0, PDO = $4,000, INJ = $13,000, and FAT = $600,000) to those values whichconsider both direct and indirect costs which have also been propose by M.o.T.H. (ND =$0, PDO = $6,000, INJ = 25,000, FAT = 3,000,000). To facilitate this analysis, a practicalexample with realistic improvement alternatives for the roadside described earlier, waschosen. For the given roadside, four alternatives were proposed: do nothing, flatten theslope to 3:1, install a roadside barrier 2.0 meters from the edge of the roadway, or removethe hazardous objects from the encroachment zone and flatten the slope to 3:1. Theaccident severity consequence probabilities produced by the program for the fouralternatives is shown below in Table 4.24.Table 4.24 Accident Severity Consequence ProbabilityImprovementAlternativeAccident Severity ConsequenceProbabilityRoll-over ProbabilityND PDO INJ I FAT Total on Slope Ter ChgDo Nothing 0.490 0.352 0.135 0.023 0.15 0.13 0.02Flatten Slope 0.589 0.308 0.095 0.008 0.01 0.00 0.01Install Barrier 0.593 0.252 0.138 0.017 0.01 0.00 0.01Remove Objects 0.718 0.228 0.049 0.006 0.01 0.00 0.01Before the sensitivity of the accident cost can be completed, a series of assumptionsregarding the economic factors must be made. The encroachment rate was simulatedidentically to that used for the "average" case scenario for the encroachment rate sensitivity.The interest rate and project time period was left at the default values of 8% and 30 yearsrespectively. The mitigation costs used for each alternative is provided in Table 4.25.111Table 4.25 Mitigation FactorsMitigationFactorImprovement AlternativeDo Nothing Flatten Slope Install Barrier RemoveObjects1.Barrier InstallationInstallation ($/100m) 10,000Maintenance ($/100m/yr) 1002.Slope FlatteningCost of Cut ($/m3) 3.00Cost of Fill ($/m3) 4.50Removal Cost ($/m3) 8.00Addition Cost ($/m3) 9.003. Maintenance Cost ($/yr) 1500 1000 1000 15004. Object Removal ($/object) 5 at 25005 at 15005. ROW Acquisition ($) 50,000Four different sets of accident costs were used for the sensitivity analysis and are definedas follows:ND ($) PDO ($) INJ ($) FAT ($)Case 1: 0 4,000 13,000 600,000Case 2: 0 4,500 17,000 1,400,000Case 3: 0 5,000 21,000 2,200,000Case 4: 0 6,000 25,000 3,000,000The results from the economic evaluation including the total accident cost, the totalmitigation cost, the relative accident cost, the relative mitigation cost, the benefit cost ratio,and the net benefit for each case are presented in Table 4.26.112Table 4.26 Results of Mitigation FactorsAlternative TAC(PV$)TMC(PV$)RAC(PV$)RMC(PV$)B/CRatioNet BenefitCase 1Do Nothing 33,812 16,887Flatten Slope 14,459 33,826 19,352 16,940 1.14 2,413Install Barrier 26,228 22,384 7,584 5,497 1.38 2,087Remove Objects 9,931 86,886 23,881 70,000 0.34 -96,119Case 2Do Nothing 71,842 16,887Flatten Slope 28,194 33,826 43,648 16,940 2.58 26,708Install Barrier 55,040 22,384 16,803 5,497 3.06 11,306Remove Objects 19,645 86,887 52,198 70,000 0.75 -17,802Case 3Do Nothing 109,873 16,887Flatten Slope 41,940 33,826 67,943 16,940 4.01 51,004Install Barrier 83,852 22,384 26,022 5,497 4.73 20,525Remove Objects 29,358 86,887 80,515 70,000 1.15 10515Case 4Do Nothing 148,259 16,887Flatten Slope 55,976 33,826 92,283 16,940 5.45 75,343Install Barrier 112,918 22,384 35,341 5,497 6.43 29,844Remove Objects 39,302 86,887 108,956 70,000 1.56 38956Notes: Please note the following abbreviations:TAC = total accident costs RAC = relative accident costsTMC = total mitigation costs RMC = relative mitigation costsPV$ = present value dollars B/C = benefit-cost ratioThe results of the sensitivity analysis for the accident costs indicates that the cost of accidenthas a profound affect on the decision whether or not to implement a particular improvementalternative. Although for this case simulated, the barrier installation is the best regardless113of the cost of accidents, the readiness to accept this alternative increases as the benefit costratio increases, due to the increase in accident costs. The evaluation of any improvementalternative greatly depends on the actual costs of accidents. For example, the relocation ofhazardous objects alternative "transforms" from an option which does not produce afavourable benefit-cost ratio (B/C < 1.0: B/C = 0.34) to an option which does produce a B/Cratio which would be considered favourable (B/C = 1.56)The mitigation costs are the third factor associated with the benefit-cost analysis used inRHSM.V9. Similar to the sensitivity analysis used for the accident costs, the sensitivityanalysis used for the mitigation costs will utilize the same roadside environment, with thesame improvement alternatives. The encroachment rate will also be identical to that usedin the previous section and the accident costs will be held constant with ND =$0,PDO = $4,000, INJ = $13,000, and FAT = $600,000. The three components of mitigation costswhich will be evaluated are barrier costs, the cost of flattening slopes, and the cost ofremoving and relocating objects. The first component to be discussed is the cost associatedwith installing and maintaining roadside barriers. The cost of installing the barrier rangesfrom a low of $5,000 per 100 meters to a high of $20,000 per 100 meters. Thecorresponding maintenance costs range from a low of $50 per year to a high of $1,000 peryear. All other mitigation values for the other improvement alternatives are similar to thoseused in the previous section. The results produced by RHSM.V9 have been tabulated inTable 4.27.114Table 4.27 Roadside Barrier CostsImprovementAlternativeTAC(PV$)TMC(PV$)RAC(PV$)RMC(PV$)B/CratioNetBenefitDo Nothing 33,812 16,887Barrier AlternativesInstallationCost ($)Maintenance Cost($)5,000 200 26,228 24,138 7,584 7,252 1.05 33210,000 400 26,228 31,390 7,584 14,503 0.52 -6,91915,000 700 26,228 39,767 7,584 22,880 033 -15,29720,000 1,000 26,228 48,144 7,584 31,258 0.24 -23,674Notes: Please note the following abbreviations:TAC = total accident costs RAC = relative accident costsTMC = total mitigation costs RMC = relative mitigation costsPV$ = present value dollars B/C = benefit-cost ratioThe results produced by varying the mitigation costs associated with installing andmaintaining roadside barriers are valid. The increase in the cost of barriers, increases thetotal mitigation costs and ultimately reduces the benefit-cost ratio and net benefit of theoption of installing roadside barrier. After discussion with M.o.T.H. staff, it was concludedthat the cost of roadside barrier could vary significantly, however, the average cost of barrierwas quoted at $8,000 per 100 meters which was within the range used for the sensitivity ofbarrier costs.The second component of the mitigation costs to be evaluated is the cost of flatteninghazardous embankment slopes. There are four elements which are required to calculate thetotal mitigative cost associated with flattening an embankment slope including the cost ofcut, the cost of fill, the cost of waste (cut) removal, and the cost of hauling additional fill115to the location. For this analysis, four different values have been used to cover the rangeof values used to represent the cost of earthwork for a hazardous roadside. The differentcombinations of costs are detailed in Table 4.28, together with the economic results.Table 4.28 Slope Flattening CostsImprovementAlternativesTAC(PV$)TMC(PV$)RAC(PV$)RMC(PV$)B/CRatioNetBenefitDo Nothing 33,811 16,887 ISlope FlatteningCutCostFillCostRemoveCostAddCost$ 2 $ 3 $ 4 $ 5 14,459 30,099 19,352 13,312 1.46 6,140$ 4 $ 6 $ 8 $ 10 14,459 43,310 19,352 26,424 0.73 -7,071$ 6 $ 9 $ 12 $ 15 14,459 56,522 19,352 39,636 0.49 -20,283$ 8 $ 12 $ 20 $ 20 14,459 69,734 19,352 52,847 0.37 -33,495Notes: Please note the following abbreviations:TAC = total accident costs RAC = relative accident costsTMC = total mitigation costs RMC = relative mitigation costsPV$ = present value dollars B/C = benefit-cost ratioThe results which are produced appear to be quite good. An increase in the cost ofearthwork, increases the total mitigative cost of the alternative, and thus, the benefit-costratio and net benefit decreases at a rate similar to the rate of increase in earthwork costs.The exact values of the results indicates that researching the exact values for earthwork ata particular location is essential in achieving confident results.The fourth and final element of the mitigation costs evaluated for this sensitivity analysisis the cost of removing and/or relocating hazardous objects and the need to acquire right-of-way (ROW). For the particular roadside considered, 2 sets of 5 objects are require to be116relocated, and therefore a series of scenarios have been developed detailing the differentcosts of relocating each type of object and the cost of the right-of-way required for each ofthe improvement alternatives. The results produced by RHSM.V9 for this analysis areprovided in Table 4.29.Table 4.29 Object Removal CostsImprovementAlternativesTAC(PV$)TMC(PV$)RAC(PV$)RMC(PV$)B/CRatioNetBenefitDo Nothing 33,811 16,887,Object RemovalObjectType 1($)ObjectType 2($)ROW($)500 1,000 10,000 9,931 34,387 23,881 17,500 1.36 6,3811,000 1,500 20,000 9,931 49,387 23,881 32,500 0.73 -8,6191,500 2,500 40,000 9,931 76,887 23,881 60,000 0.40 -36,1192,500 4,000 70,000 9,931 119,387 23,881 102,500 0.23 -78,619Notes: Please note the following abbreviations:TAC = total accident costs RAC = relative accident costsTMC = total mitigation costs RMC = relative mitigation costsPV$ = present value dollars B/C = benefit-cost ratioROW = Right of Way ($) = present dollarsThe fourth factor associated with the benefit cost analysis employed by RHSM.V9 is theinterest rate and time period factors. For this sensitivity analysis, the interest ranged froma low of 6% to a high of 10% while the time period remained constant at 30 years. Thenthe interest rate was held constant at 8% and the time period ranged from 20 years to 40years. Abbreviated economic results for each of the four improvement alternatives are117shown in Tables 4.30 and 4.31.Table 4.30 Varying the Interest Rate (i)ImprovementAlternative30 Years at 6% 30 Years at 8% 30 Years at 10%B/CRatioNetBenefitB/CRatioNetBenefitB/CRatioNetBenefitDo NothingFlatten Slope 0.46 -23,144 0.44 -24,397 0.43 -25,313Install Barrier 1.69 3,090 138 2,087 1.22 1,354Remove Objects 0.34 -46,119 0.34 -46,119 0.34 -46,119Table 4.31 Varying the Analysis Period (n)ImprovementAlternative20 Years at 8% 30 Years at 8% 40 Years at 8%B/CRatioNetBenefitB/CRatioNetBenefitB/CRatioNetBenefitDo NothingFlatten Slope 0.44 -25,117 0.44 -24,397 0.45 -24,064Install Barrier 1.25 1,511 1.38 2,087 1.45 2,354Remove Objects 0.34 -46,119 0.34 -46,119 034 -46,119The range of results produced by of the model with respect to the interest rate and theanalysis period for reasonable values of interest rate and time period are small. If un-realistic values are used for i and n, the results are poor.Cost Effectiveness AnalysisThe cost-effective economic evaluation considers only the mitigation costs associated witheach alternative and the accident severity based on the criteria weights input by the user.Since mitigation costs were considered previously under the benefit-cost analysis section,only the criteria weighting component of the cost-effectiveness analysis will be reviewed.118The scale used for the relative severity weighting is arbitrary, left to the discretion andknowledge of the user. For this analysis, five different severity weighting schemes have beentested for the roadside defined earlier and the corresponding improvement alternatives.Table 4.32 shows the results of each test.Table 4.32 Criteria Weighting SchemesAccidentConsequenceTest OneRelativeWeightTest TwoRelativeWeightTest ThreeRelativeWeightTest FourRelativeWeightTest FiveRelativeWeightND 0 0 1 250 1250PDO 0 0 2 250 1000INJ 0 50 1200 250 750FAT 100 50 70000 250 500ImprovementAlternativeDo Nothing 5 16 3530 504 1668Flatten Slope 2 10 1339 504 1753Install Barrier 3 16 2737 504 1723Remove Objects 1 5 915 504 1843To evaluate the cost effectiveness criteria weighting, the program provides visual assistancein the form of a graph. This allows the user to judge the effectiveness of each alternativein relation to the other alternatives. A series of graphs are presented below which illustratesthe usefulness of the cost effective analysis and the effects of varying the criteria weighting.Note the arbitrary nature of the severity scale and the ability of the user to "rate" theeffectiveness of each alternative.119Test One5 1 ImprovementAlternativesSeverity 32 1-Do Nothing4 2-Flatten Slope0 3-Install Barrier1 5000 100000 4-Remove ObjectsTest Two 20Mitigation Costs ($)1 3Severity2405000 100000Test Three Mitigation Costs ($)40001Severity 32401 5000 100000Test Four 1000Mitigation Costs ($)Severity 1 3 2 401 5000 100000Test Five Mitigation Costs ($)2000 41 3 2Severity015000 100000Mitigation Costs ($)Figure 4.3 Cost-Effectiveness Graphscomplete with the important details.Profile ViewOffset Slope Offset Slope Offset Slope Offset Slope0 0 4 -24 8 -36 12 -121 -6 5 -30 9 -30 13 -62 -12 6 -36 10 -24 14 03 -18 7 -42 11 -18 18 501204.6 Model Application: Typical Example RunsThe purpose of this section is to illustrate the usefulness of the program by presenting anumber of typical examples, outlining the application of the model for real-life situations.This section is divided into four sub-sections, each offering the optimum solution for eachtypical improvement option: do nothing, flatten slope, install barrier, and remove objects.4.6.1 Leave Roadside Unprotected Warranted (Do -Nothing Alternative)It may seem inappropriate to intentionally leave a hazardous location unprotected, however,from an engineering economic standpoint, often there may be no improvement alternativethat is cost-effective. The hazardous roadside used for this analysis is shown in Figure 4.4,Figure 4.4 Hazardous Roadside Area: Leave Roadside Unprotected Warranted121For each improvement alternative, the operational parameters were all set to the defaultvalues with the mean encroachment speed set at 80 kph. The second improvementalternative, after the do-nothing alternative, is to flatten the slope. In this case thesimulated slope was flattened to only a 5 degree down-slope angle from the roadwayshoulder, making the roadside very safe. The third improvement alternative, installing abarrier, simulated placing a rigid barrier at 2.0 meters from the edge of the roadway. Thefourth improvement option removed the simulated object located in the hazardous roadside.There are four groups of results which are used to evaluate the four improvementalternatives, including the accident consequence probability, the vehicle roll-overprobability, the benefit-cost analysis, and the cost effectiveness analysis. The first two havebeen summarized together in Table 4.33. Flattening the slope appears to be the "safest"alternative , whereas installing the barrier appears to be the most hazardous. This is areasonable conclusion since a barrier, although intended to protect errant vehicles, is initself a roadside hazard.Table 4.33 Unprotected Roadside: Accident Consequence ProbabilityImprovementAlternativesAccident Severity ConsequenceProbabilityVehicle Roll-Over ProbabilityND PDO INJ FAT Total on Slope Ter ChgDo Nothing 0.786 0.155 0.051 0.009 0.05 0.00 0.05Flatten Slope 0.927 0.063 0.009 0.000 0.00 0.00 0.00Install Barrier 0.671 0.176 0.137 0.017 0.00 0.00 0.00Remove Objects 0.888 0.092 0.015 0.005 0.05 0.00 0.05122The next result to consider is the benefit-cost ratio economic evaluation. The results, whichare shown in total present value dollars, are provided in Table 4.34. The values used formitigation costs were set such that they emphasize the desired result, however, the valueswere not un-realistic. By observing the benefit-cost ratios calculated and the net benefit,the three improvement options are rejected. Installing a barrier is the worst improvementalternative, with the negative b/c ratio indicating that the high cost of installing a barrierwould only increase the accident costs. The other two alternatives provide some accidentcost savings, however the high mitigation cost required to implement these alternativesmakes them unacceptable. Therefore, the best alternative is the do-nothing alternative.Table 4.34 Unprotected Roadside: Benefit-Cost AnalysisImprovementAlternativeTAC(PV$)TMC(PV$)RAC(PV$)RMC(PV$)B/CRatioNetBenefitDo Nothing 6,731 11,258Flatten Slope 749 95,571 5,982 84,314 0.07 -78,332Install Barrier 13,274 26,887 -6,543 15,629 -0.41 -22,172Remove Objects 3,395 51,258 3,336 40,000 0.08 -36,664Notes: Please note the following abbreviations:TAC = total accident costs RAC = relative accident costsTMC = total mitigation costs RMC = relative mitigation costsPV$ = present value dollars B/C = benefit-cost ratioThe last result to consider in the analysis of the hazardous roadside location is the cost-effectiveness evaluation. The critical weighting for each category of accident consequencewere ND = 2, PDO = 20, INJ = 200, and FAT =400,000. The results of this analysis areprovided in Table 4.35 together with a graph (Figure 4.5) to illustrate the effectiveness ofeach improvement option. There are two options less severe that the do-nothing alternative,123however, the costs associated with each are significantly greater than the do-nothingalternative. Remember that the recommendations are based on engineering judgement andeconomics, there may be the need from a safety or political basis (for example) to reducethe accidents regardless of the cost. This decision must be made by the user, familiar withtheir particular requirements and constraints.Table 4.35: Cost-Effectiveness AnalysisImprovementAlternativeMitigation Costs(PV$)SeverityDo Nothing 11,258 4094Flatten Slope 95,571 235Install Barrier 26,887 8054Remove Objects 51,258 2159Notes: Please note the following abbreviation: PV$ = present value dollars9000Severity200Improvement Alternatives1-Do Nothing3 2-Flatten Slope3-Install Barrier4-Remove Objects14210,000 110,000Mitigation Costs ($)Figure 4.5 Cost-Effectiveness Graph: Leave Roadside Unprotected Warranted1244.6.2 Flattening Embankment Slope WarrantedThe second typical situation to be modeled represents the case where the best alternativewould be to flatten the roadside terrain. The hazardous roadside terrain is shown below inFigure 4.6. Except for a severe ditch near the road, the terrain is relatively flat and safe,with only one hazardous object. Profile View 0 2 4 6 8 20 Figure 4.6 Hazardous Roadside Area: Flattening Embankment Slope WarrantedThe flattening the slope improvement alternative simply fills in the ditch thus having agentle uphill increase in the slope from 2.0 meters to 8.0 meters from the roadway edge.The installing a barrier option simulates a deformable barrier with a friction coefficient(MU) equal to 50, 2.0 meters from the roadways edge. Removing the hazardous objectalternative is identical to the do-nothing alternative, except no objects are simulated.125The accident severity consequence probability of the four alternatives are summarized inTable 4.36, together with the vehicle roll-over probabilities. The results indicate that theflattening the slope alternative is the "best" alternative from a safety perspective. This isreflected in the vehicle roll-over probability, where there is zero probability of vehicle roll-over if the slope is flattened as simulated.Table 4.36 Flattening Slope: Accident Consequence ProbabilityImprovementAlternativesAccident Severity ConsequenceProbabilityVehicle Roll-Over ProbabilityND PDO INJ FAT Total on Slope Ter ChgDo Nothing 0.486 0.229 0.194 0.090 0.027 0.22 0.05Flatten Slope 0.983 0.013 0.004 0.000 0.00 0.00 0.00Install Barrier 0.536 0.206 0.191 0.066 0.11 0.08 0.03Remove Objects 0.486 0.217 0.200 0.096 0.30 0.25 0.05The benefit-cost ratio economic evaluation, shown in Table 4.37, provides a clear indicationthat the best alternative for this particular roadside is to flatten the embankment slope. Inthis particular case, the amount of earthwork is relatively small, and the cost of theearthwork was entered at a low cost to emphasize the desired results. Any benefit-cost ratiovalue greater than 1.0 is considered an acceptable alternative. The third option of installinga barrier nearly reaches that value of 1.0, but because the value is less than 1.0, the netbenefit is negative. Removing the object improvement alternative has a negative 13/C ratioindicating that at this particular location, it acts as a barrier and stops some vehicles fromrolling over, thus reducing the accident costs, and therefore it should be left in place.Improvement Aftematives4 1-Do Nothing2-Flatten Slope3-Install Barrier4-Remove Objects132126Table 4.37 Flattening Slope: Benefit-Cost AnalysisImprovementAlternativeTAC(PV$)TMC(PV$)RAC(PV$)RMC(PV$)B/CRatioNetBenefitDo Nothing 71,479 11,258Flatten Slope 296 18,602 71,184 7,344 9.69 63,839Install Barrier 53,874 32,516 17,606 21,258 0.83 -3,652Remove Objects 75,648 51,258 -4,169 40,000 -0.10 -44,169The cost-effectiveness evaluation clearly indicates that slope flattening is the best alternative.The critical weighting values are similar to those used in the previous example. The resultsof the analysis are shown in Table 4.38 and Figure 4.7.Table 4.38 Flattening Slope: Cost-Effectiveness AnalysisImprovementAlternativeMitigation Costs(PV$)SeverityDo Nothing 11,258 56283Flatten Slope 18,602 124Install Barrier 32,516 39348Remove Objects 51,258 5658460,000Severity010,000 Mitigation Costs (S) 60,000Figure 4.7 Cost-Effectiveness Graph: Flattening Embankment Slope Warranted0q Row ofRigidq mObuirt1150D1274.6.3 Roadside Barrier WarrantedThe third typical situation to be modeled represents the case where the best alternativewould be to install a roadside barrier. The hazardous roadside terrain is shown below inFigure 4.8, together with the relevant details of the roadside environment.Profile View Plan View1000 5 200 2 4 6 8 20Figure 4.8 Hazardous Roadside Area: Roadside Barrier WarrantedThe flattening of the slope improvement alternative simply simulates a 2:1 slope (-26.7degrees) from the level shoulder, 2.0 meters from the edge of the roadway. Installing thebarrier option simulates a deformable barrier,with a coefficient of friction (MU) of 50, 2.0meters from the edge of the roadway. The removal of the objects alternative is selfexplanatory.128The accident severity consequence probability of the four alternatives indicates that theslope flattening alternative is the "safest", and the do-nothing and remove objects alternativesare the most "dangerous" alternative. The barrier installation improvement alternative hasresults between the safest and the most hazardous alternatives. The results produced byRHSM.V9 for the accident severity consequence probabilities are provided below in Table4.39, together with the vehicle roll-over probabilities.Table 4.39 Barrier Warranted: Accident Consequence ProbabilitiesImprovementAlternativesAccident Severity ConsequenceProbabilityVehicle Roll-Over ProbabilityND PDO INJ FAT Total on Slope Ter ChgDo Nothing 0.612 0.058 0.172 0.158 0.51 0.47 0.04Flatten Slope 0.549 0.297 0.141 0.016 0.01 0.00 0.01Install Barrier 0.609 0.106 0.186 0.099 0.26 0.26 0.00Remove Objects 0.612 0.058 0.172 0.158 0.51 0.47 0.04The results of the benefit-cost ratio economic evaluation indicates that both the flatteningof the slope alternative and the barrier installation alternative are viable. However, thebarrier installation has a higher B/C ratio and thus provides more return per dollar spenton mitigation purposes. However, the net benefit for the flattening of the slope alternativeis greater. In this particular case, the decision to implement one of these two options is lessclear and may depend on other factors such as budget constraints or political pressures. Theresult of the B/C ratio analysis is tabulated in Table 4.40. Notice that the alternative ofremoving the objects has no affect on the accident severity probability over the do-nothingalternative and therefore has a benefit-cost ratio of zero.129Table 4.40 Barrier Warranted: Benefit-Cost AnalysisImprovementAlternativeTAC(PV$)TMC(PV$)RAC(PV$)RMC(PV$)B/CRatioNetBenefitDo Nothing 119,674 11,258Flatten Slope 16,390 42,340 103,284 31,083 332 72,201Install Barrier 77,170 21,887 42,504 10,629 4.00 31,875Remove Objects 119,674 51,258 0 40,000 0.00 -40,000The results of the cost-effectiveness evaluation are provided in Table 4.41 below and theresults are graphed in Figure 4.9. The decision between options 2 and 3 must be madeknowing that the reduction in severity of option 2 comes with a increase in mitigation cost.Table 4.41 Barrier Warranted: Cost-Effectiveness AnalysisImprovementAlternativeMitigation Costs(PV$)SeverityDo Nothing 11,258 92963Flatten Slope 43,340 9682Install Barrier 21,887 58524Remove Objects 51,258 92963Improvement Alternatives14 1-Do Nothing2-Flatten Slope3-Install Barrier4-Remove Objects3210,000 60,000Mitigation Costs ($)Figure 4.9 Cost-Effectiveness Graph: Roadside Barrier Warranted100,000Severity0Tonq RigidObjects141:y50000001304.6.4 Hazardous Object Removal WarrantedThe final typical situation to be modelled represents the case where the best alternativewould be to remove the hazardous objects in the roadside environment. The hazardousroadside terrain for this example is shown in Figure 4.10, together with the details.Plan ViewProfile View0 2 4 8 8 10 200 20100Figure 4.10 Hazardous Roadside Area: Roadside Object Removal WarrantedThe description of the do-nothing alternative is presented above in the illustration. Theslope flattening alternative flattens the slope to a 20 degree down-slope, starting at 2.0meters from the edge of the roadway and continuing to the 20 meter maximum lateraldisplacement. The barrier installation option simulates a deformable barrier, with acoefficient of friction (MU) equal to 50, 2.0 meters from the roadway edge. The objectremoval alternative removes the ten rigid objects and leaves the terrain untouched.131The accident severity consequence probability determined by RHSM.V9 clearly indicatesthat removing the hazardous objects is the "safest" alternative. This is especially true forinjury accidents or accidents at lower power-loss levels. The results of the accident severityconsequence probability and vehicle roll-over probability are shown in Table 4.42.Table 4.42 Object Removal: Accident Consequence ProbabilityImprovementAlternativesAccident Severity ConsequenceProbabilityVehicle Roll-Over ProbabilityND PDO INJ FAT Total on Slope Ter ChgDo Nothing 0.611 0225 0.142 0.012 0.04 0.00 0.04Flatten Slope 0.599 0.247 0.139 0.015 0.00 0.00 0.00Install Barrier 0.632 0.181 0.166 0.021 0.01 0.00 0.01Remove Objects 0.828 0.139 0.019 0.014 0.08 0.00 0.08The results of the benefit-cost ratio economic evaluation clearly indicate that the dollarsrequired to flatten the slope or to install a barrier are not justified by the relatively smallincrease in the accident cost savings. In both cases, for approximately every 10.0 dollarsspent for mitigation purposes, only 1.0 dollar is retrieved in accident savings. The optionof removing the hazardous objects is the only alternative with a favourable benefit-cost ratio,with a value of 1.77. The results are provided below in Table 4.43.Table 4.43 Object Removal: Benefit-Cost AnalysisImprovementAlternativeTAC(PV$)TMC(PV$)RAC(PV$)RMC(PV$)B/CRatioNetBenefitDo Nothing 20,619 11,258Flatten Slope 15,633 68,650 4,986 57,392 0.09 -52,406Install Barrier 19,798 21,887 821 10,629 0.08 -9,808Remove Objects 11,770 16,258 8,850 5,000 1.77 3,850132Finally, the cost-effectiveness evaluation is considered, and for this particular case, theresults are very clear. The improvement alternatives simulated for flattening the slope andinstalling a roadside barrier both have higher severity and higher costs associated with themthan option four (removing the hazardous objects). The do-nothing alternative has a slightlyless mitigation cost than the object removal alternative, but the severity is significantlyhigher. Therefore it can be concluded that the "best" alternative would be to remove thehazardous objects. The results and the graphical illustration of the cost-effectivenessanalysis are provided below in Table 4.44 and in Figure 4.11.Table 4.44 Object Removal: Cost-Effectiveness AnalysisImprovementAlternativeMitigation Costs(PV$)SeverityDo Nothing 11,258 13377Flatten Slope 68,650 9335Install Barrier 21,887 12576Remove Objects 16,258 8497100,000Improvement Alternatives13 1-Do Nothing2-Flatten Slope3-install Barrier2 4-Remove ObjectsSeverity04 10,000 Mitigation Costs ($) 80,000Figure 4.11 Cost-Effectiveness Graph: Roadside Object Removal Warranted1335.0 CONCLUSIONS and RECOMMENDATIONSThis chapter summarizes the results and conclusions gained from this research and makesrecommendations based on these conclusions. The goal of this research project was todevelop a user friendly computer program used by highway safety professionals to evaluatehazardous roadside locations, as well as evaluating improvement alternatives proposed toreduce the level of hazard. This goal has been achieved with the development of Version9.0 of the Roadside-Hazard-Simulation-Model (RHSM.V9).At the outset of this project, the focus dealt specifically with improving roadside barrierwarrants. However, after reviewing the previous versions of RHSM and recognizing thatthe installation of a roadside barrier is only one solution for a hazardous roadside, the focusof the research was altered to include the evaluation of any improvement alternative.Consequently, the model will determine whether or not a roadside barrier is warranted, butit will also evaluate of any combination of improvement alternatives including embankmentslope flattening, roadside barrier installation, or hazardous object removal.Although some parts of the new version of RHSM are based on theory used in previousversions of the model, the entire model has been rewritten with an emphasis placed onmodel flexibility and user friendliness. Previous versions of the model tended to besomewhat difficult to use and unforgiving in nature, thus the new model was designed suchthat the user is confident working with the program. The menu-driven program providesnumerous help screens and visual aids to facilitate this need for model friendliness.134After preliminary testing of RHSM.V9, the results produced by the model appear to bequite good. The model was subjected to four levels of testing including a results comparisonwith previous versions of the model, a results evaluation for hazardous embankment slopesand objects, a sensitivity analysis of the model's operational parameters and economicfactors, and finally, a series of typical "real-life" applications of the model.In comparing the results produced by RHSM.V9 with previous versions of the model, resultsappear to be sound. The criticism of two previous versions of the program (Version 6.2 andVersion 7.0) was that they generated results far too severe, however, RHSM.V9 producedresults significantly less severe for identical encroachment and roadside conditions. Version5.0 of RHSM produced results that were good and fortunately, the results produced byVersion 9.0 are quite similar, although slightly less severe.The results evaluation for hazardous embankment slopes and hazardous roadside objectsalso produced favourable results. The analysis included varying the location of hazardousterrain, the severity of the embankment slope, the type of roadside terrain, the object type,the object rigidity, the object size, and the object location. In each case, the trend in theresults are correct such that as the hazard becomes more severe, the corresponding accidentconsequence becomes more severe. The magnitude of the results are difficult to validatedue to a lack of a large enough data base, however, the results appear to be intuitivelyrealistic.135The sensitivity analysis of the model's operational and the economic factors also produceresults which are quite good. The operational parameters tested include the encroachmentspeed, horizontal curve, time increments, number and location of encroachments, speed andangle increments, corrective parameters (braking, restraint, and steer-back), and vehiclemodel. The trends in the results for each parameter is correct as well as the relativeimportance of each operational parameter. The sensitivity of the economic factors used byRHSM.V9 include the encroachment rate, the accident costs, the mitigation costs, cost-effectiveness criteria importance, and the interest rate/time-period factors. The conclusionfrom this aspect of the evaluation of RHSM.V9 is that these economic factors are sitespecific in nature and require local knowledge to ensure values are correct for each factorin order to achieve confident over-all results.The last level of testing included a series of typical applications of the model representing"real-life" situations, illustrating how the model is intended to be used. The user simulatesthe roadside and encroachment characteristics for the hazardous location (representing the"do-nothing" alternative), then a series of improvement alternatives can be devised andsimulated for the hazardous location. The best solution was identified by the model foreach "real-life" example tested, thus proving the effectiveness of the new model.The general conclusion of this thesis is that RHSM.V9 can be used to improve theengineering analysis process in evaluating hazardous roadside locations. After preliminarytesting of the model, the results, and the trends in the results, appear to be quite good. The136program is meant to be used as a tool to assist the highway safety professional in makinga decision regarding the implementation of roadside safety improvement alternatives, andshould be used together with sound engineering judgement. Version 9.0 of RHSM hasevolved significantly from the last version of RHSM, and although future research may berequired to refine the results produced by the program, the model should form thefoundation for evaluating hazardous roadsides and improvement alternatives on BritishColumbia's Highway network.1376.0 FUTURE RESEARCHThis final chapter of the research project recommends various areas of research which willfurther the development of the Roadside-Hazard-Simulation-Model. The model has beendesigned such that as new or better information becomes available, it can be immediatelyand easily incorporated into the new model.Two components of the model which may require future research are the power-dissipation/probability of consequence table and the critical roll-over speed/probability of consequencetable. These two tables are used to determine the over-all probability of consequence ofan errant vehicle entering a hazardous roadside. Although the tables appear to producevalid results at the present time, further research to refine the tables could improve theover-all results. Once better information is available regarding these relationships, it canbe entered directly into the calibration component of the model.Other components of the model which may require future research includes the vehicledeparture angle frequencies, the encroachment speed distribution, the encroachment ratefactors, and the vehicle characteristics. Although significant changes in each of thesecomponents from is not expected, slight modifications based on new research may refine theresults. More research is also required to determine the total costs of accidents, as well asthe mitigation costs associated with each improvement alternative. Research is being doneon the real cost of accidents at the present time, however, the mitigation cost research mayhave to be done on a site-specific basis due to the great variability in values.138Further research is also required to determine the relative rigidity or friction coefficient ofvarious hazardous roadside objects. Research which quantifies these values is required, suchas the Ministry of Transportation and Highways, Highway Safety Branch, sponsored researchby Navin and Thomson [56] which should produce a relative rigidity value for concreteroadside barriers.One final area of research which should be suggested in the future development of RHSMis the suitability of this type of program for an object oriented programming approach. Atthe outset of this project it was determined that an object oriented programming approachwould be favourable, however due to time restrictions, it was decided to abandon thisapproach. If more time was available for the next revision of the program then thisapproach should be seriously considered.139References[1] Transport Canada; Roadside Hazards: A Methodology and Technique for DeterminingAccident Potential, B.C. Research for Transport Canada, July 1978.[2] Calcote, L.R.; Michie, L.D.; Location, Selection, and Maintenance of HighwayGuardrails and Median Barriers, National Cooperative Highway Research Program(NCHRP) Report #54, p. 2, 1968.[3] Bronstad, M.E.; Michie, L.D.; Location, Selection, and Maintenance of Highway TrafficBarriers, National Cooperative Highway Research Program (NCHRP) Report #118,pp. 8-9, 1971.[4] Ministry of Transportation and Highways; Highway Engineering Branch Design Manual,Province of British Columbia, Canadian Cataloguing in Publication Data, p. B-4.1,1992.[5] TAC; Manual of Geometric Design Standards for Canadian Roads, 1986 Metric Edition, Roads and Transportation Association of Canada, Ottawa, Ontario, p. F-9to F-37, 1986.[6] Bronstad, M.E.; Michie, L.D.; Location, Selection, and Maintenance of Highway TrafficBarriers, National Cooperative Highway Research Program (NCHRP) Report #118,pp. 1-22, 1971.[7] 'bid, pp. 1-22.[8] Calcote, L.R.; Michie, L.D.; Location, Selection, and Maintenance of HighwayGuardrails and Median Barriers, National Cooperative Highway Research Program(NCHRP) Report #54, p. 1-17, 1968.140[9] Bronstad, M.E.; Michie, L.D.; Location. Selection, and Maintenance of Highway TrafficBarriers, National Cooperative Highway Research Program (NCHRP) Report #118,pp. 1-22, 1971.[10] AASHTO; Roadside Design Guide, American Association of State Highway andTransportation Officials, Washington, D.C., p. 5.1-5.39, 1989.[11]Cooper, P.; Highway Safety Barriers, Transport Canada and B.C. Research, Vancouver,B.C., pp. 111-124, 1980.[12] Perera, H.; Development of an Improved Highway-Vehicle-Object-Simulation-Model(HVOSM) for Multi-Faced Rigid Barriers, Texas Transportation Institute,Transportation Research Record #1233, pp. 104-116, 1989.[13] McHenry, R.R.; DeLays, NJ.; Segal, DJ.; Determination of Physical Criteria forRoadside Energy Compression Systems, Calspan Corporation, Buffalo, New York,1976.[14]Cooper, P.; Highway Safety Barriers, Transport Canada and B.C. Research, Vancouver,B.C., pp. 94-95, 1980.[15] Segal, D.J.; Highway-Vehicle-Object-Simulation-Model (HVOSM), Federal HighwayAdministration (FHWA-RD-75), Calspan Corporation, Buffalo, New York, 1976.[16] Bligh, R.P.; Sicking, D.L.; Application of Barrier VII in Design of Flexible Barriers,Texas Transportation Institute, Transportation Research Record #1233, pp. 117-123,1989.[17] Powell, G.H.; A Computer Program for Evaluation of Automobile Barrier Systems,Federal Highway Administration (FHWA), U.S. Department of Transportation, 1973.141[18]Cooper, P.; Highway Safety Barriers, Transport Canada and B.C. Research, Vancouver,B.C., pp. 95-96, 1980.[19] Bligh, R.P.; Sicking, D.L.; Application of Barrier VII in Design of Flexible Barriers,Texas Transportation Institute, Transportation Research Record #1233, pp. 117-123,1989.[20] Ibid, p. 119.[21] Perera, H.S.; Ross, H.E.; Prediction of Roll-Overs Caused by Concrete Safety-ShapedBarriers, Texas Transportation Institute, Transportation Research Record #1233,1989.[22] Bruce, R.W.; Harm, E.E.; Iwankiw, N.R.; Guardrail/Vehicle Dynamic Interaction,Federal Highway Administration (FHWA), U.S. Department of Transportation, 1976.[23]Cooper, P.; Highway Safety Barriers, Transport Canada and B.C. Research, Vancouver,B.C., p. 96, 1980.[24] Ibid, p. 96.[25] AASHTO; Roadside Design Guide, American Association of State Highway andTransportation Officials, Washington, D.C., p. A-2, 1989.[26] Ibid, p. A-2.[27] Roschke, P.N.; Advisory System for Design of Highway Safety Structures, Journal ofTransportation Engineering, Vol. 117, Number 4, pp. 418-434, July-August 1991.[28] Ibid, pp. 418-434.[29] Zhou, H.; Layton, R.D.; Development of a Prototype Expert System for Roadside Safety, Journal of Transportation Engineer, Vol. 117, Number 4, pp. 435-443, 1991.142[31] Ray, M.H.; Logie, D.; An Object-Oriented Approach to Warranting Roadside SafetyHardware, Computing in Civil Engineering, American Society of Civil Engineers,New York, pp. 490-497, 1987.[32] Ibid, pp. 490-497.[33]Transport Canada; Roadside Hazards: A Methodology and Technique for DeterminingAccident Potential, B.C. Research for Transport Canada, July 1978.[34] Transport Canada; Study of Single-Vehicle Off-Road Accidents, DeLeuw CatherCanada Ltd. and ADI Limited for Transport Canada, December 1978.[35] Cooper, P.; Roadside Hazards: A Methodology and Technique for DeterminingAccident Potential, B.C. Research for Transport Canada, July 1978.[36] Lenz, M.; Sanderson, R.W.; The Roadside Hazard Simulation Model (RHSM); AMethodology and Technique to Effectively Reduce the Single Vehicle AccidentPotential (Version 6.2), Transport Canada, Ottawa, Ontario, 1984.[37] Galway, M.C.; Sanderson, R.W.; Roadside Hazard Simulation Model, Version 7.0,Transport Canada, Ottawa, Ontario, 1986.[38] Ministry of Transportation and Highways, Guardrail Warrants Memorandum, Provinceof British Columbia, Highway Safety Branch, Technical Memorandum, April 2, 1990.[39] Transport Canada; Study of Single-Vehicle Off-Road Accidents, DeLeuw CatherCanada Ltd. and ADI Limited for Transport Canada, December 1978.[40]Transport Canada; The Roadside Hazard Simulation Model (RHSM); A Methodologyand Technique to Effectively Reduce the Single Vehicle Accident Potential (Version6.2), Transport Canada, Ottawa, Ontario, p. 10, 1984.143[41] Koike, H.; Roadside Hazard Simulation Model: Its Development and Application,Proceedings of the Japan Society of Civil Engineers, p. 21, July 1985.[42]Transport Canada; The Roadside Hazard Simulation Model (RHSM); A Methodologyand Technique to Effectively Reduce the Single Vehicle Accident Potential (Version6.2), Transport Canada, Ottawa, Ontario, p. 101, 1984.[43] TAC; Manual of Geometric Design Standards for Canadian Roads, 1986 MetricEdition, Roads and Transportation Association of Canada, Ottawa, Ontario, p. F-9to F-37, 1986.[44]Ministry of Transportation and Highways; Highway Engineering Branch Design Manual,Province of British Columbia, Canadian Cataloguing in Publication Data, p. B-4.1,1992.[45] Transport Canada; Study of Single-Vehicle Off-Road Accidents, DeLeuw CatherCanada Ltd. and ADI Limited for Transport Canada, December 1978.[46] Koike, H.; Roadside Hazard Simulation Model: Its Development and Application,Proceedings of the Japan Society of Civil Engineers, p. 22, July 1985.[47] Transportation Centre; Study of the Relationship Between Vehicle Impact Speed andVarious Sensitivity Parameters, University of Saskatchewan, Saskatoon,Saskatchewan, 1976.[48] Campbell, K.L.; Energy Basis for Collision Severity, Society of Automotive Engineers(SAE) Paper Number 740565, 1974.[49] Transport Canada; Study of Single-Vehicle Off-Road Accidents, DeLeuw CatherCanada Ltd. and ADI Limited for Transport Canada, December 1978.144[50] Transport Canada; The Roadside Hazard Simulation Model (RHSM); A Methodologyand Technique to Effectively Reduce the Single Vehicle Accident Potential (Version6.2), Transport Canada, Ottawa, Ontario, p. 23-35, 1984.[51] TAC; Manual of Geometric Design Standards for Canadian Roads, 1986 MetricEdition, Roads and Transportation Association of Canada, Ottawa, Ontario, p. F-9to F-37, 1986.[52] TAC; Manual of Geometric Design Standards for Canadian Roads. 1986 MetricEdition, Roads and Transportation Association of Canada, Ottawa, Ontario, p. F-10,1986.[53] Ministry of Transportation and Highways; Roadside Guardrail Warrant Summary,Province of British Columbia, 1988.[54] Navin, F.; Thomson, R.; M.o.T.H. Preliminary Report: Preliminary Tests of Concrete Roadside Barrier Impacts (Technical Memorandum R-6), Accident InvestigationTeam, University of British Columbia, Vancouver, B.C., Nov. 1991.145BibliographyAASHTO; Roadside Design Guide, American Association of State Highway andTransportation Officials, Washington, D.C., p. 5.1-5.39, 1989.Bligh, R.P.; Sicking, D.L.; Application of Barrier VII in Design of Flexible Barriers,Texas Transportation Institute, Transportation Research Record #1233, pp. 117-123,1989.Bronstad, M.E.; Michie, L.D.; Location. Selection, and Maintenance of Highway TrafficBarriers, National Cooperative Highway Research Program (NCHRP) Report #118,pp. 1-22, 1971.Brown, G.; Benefit-Cost Analysis for Road Projects. The Cost Effective Procedure forTransportation Decisions, Civil Engineering 586 Class Notes, University of BritishColumbia, 1991.Bruce, R.W.; Hann, E.E.; Iwankiw, N.R.; Guardrail/Vehicle Dynamic Interaction,Federal Highway Administration (FHWA), U.S. Department of Transportation, 1976.Bryden, J.E.; Bruno, N.J.; Movable Concrete Median Barrier Risk Analysis, New YorkDepartment of Transportation, Transportation Research Record #1233, pp. 1-10,1989.Bryden, J.E.; Bruno, N.J.; Fortuniewicz, J.S.; Development of a Economic Model to Compare Median Barrier Costs, New York Department of Transportation,Transportation Research Record #1133, pp. 23-29, 1987.146Calcote, L.R.; Michie, L.D.; Location,Selection, and Maintenance of Highway Guardrailsand Median Barriers, National Cooperative Highway Research Program (NCHRP)Report #54, p. 1-17, 1968.Campbell, K.L.; Energy Basis for Collision Severity, Society of Automotive Engineers(SAE) Paper Number 740565, 1974.Carney, J.F.; Ray, M.H.; Safety Performance Evaluation of 21st Century Appurtenances,American Society of Civil Engineers (ASCE), pp. 177-188, 1988.Cooper, P.; Highway Safety Barriers, Transport Canada and B.C. Research, Vancouver,B.C., pp. 111-124, 1980.German, A.; Roll-Over Collisions: A Continuing Problem for Occupant Mortality,Accident Research Team, The University of Western Ontario, pp. 1-17, 1989.Koike, H.; Roadside Hazard Simulation Model: Its Development and Application,Proceedings of the Japan Society of Civil Engineers, p. 21, July 1985.Lawson, S.D.; Some Approaches to Roadside Crash Protection In the U.S. and theirPotential for Application in the U.K., Traffic Engineering and Control, Volume 29,Number 4, pp. 202-209, April 1988.Michie, J.D.; Recommended Procedures for the Safety Performance Evaluation ofHighway Appurtenances, National Cooperative Highway Research Program(NCHRP) Report #230, pp.1-41, March 1981.Miller, H.W.; Evaluation of Roadside Safety Improvements, Institute of TransportationEngineers (ITE) Journal, pp. 31-41, November 1980.147Ministry of Transportation and Highways; Highway Engineering Branch Design Manual,Province of British Columbia, Canadian Cataloguing in Publication Data, p. B-4.1,1992.Ministry of Transportation and Highways; Roadside Guardrail Warrant Summary,Province of British Columbia, 1988.Ministry of Transportation and Highways, Guardrail Warrants Memorandum, Provinceof British Columbia, Highway Safety Branch, Technical Memorandum, p 3, April 2,1990.Mc Carthy, L.; Roadside Safety: A National Perspective, Public Roads, Volume 50,Number 4, pp. 124-128, March 1987.McHenry, R.R.; DeLays, NJ.; Segal, DJ.; Determination of Physical Criteria forRoadside Energy Compression Systems, Calspan Corporation, Buffalo, New York,1976.Navin, F.; Thomson, R.; M.o.T.H. Preliminary Report: Preliminary Tests of ConcreteRoadside Barrier Impacts (Technical Memorandum R-6), Accident InvestigationTeam, University of British Columbia, Vancouver, B.C., Nov. 1991.Olivarez, D.R.; The 30-Foot Clear Zone Concept: A Guide not a Standard, Institute ofTransportation Engineers (ITE) Journal, Volume 58, Number 9, pp. 45-46,September 1988.Perera, H.; Development of an Improved Highway-Vehicle-Object-Simulation-Model(HVOSM) for Multi-Faced Rigid Barriers, Texas Transportation Institute,Transportation Research Record #1233, pp. 104-116, 1989.148Perera, H.S.; Ross, H.E.; Prediction of Roll-Overs Caused by Concrete Safety-ShapedBarriers, Texas Transportation Institute, Transportation Research Record #1233,1989.Pigman, J.G.; Agent, K.R.; Guidelines for the Installation of Guardrail, University ofKentucky, Transportation Research Record #1302, pp. 24-31, 1991.Powell, G.H.; A Computer Program for Evaluation of Automobile Barrier Systems,Federal Highway Administration (FHWA), U.S. Department of Transportation, 1973.Ramache, A.; Roadside Safety: A Knowledge-Based Approach, Transportation OperationsResearch, University of NewCastle upon Tyme, 1991.Ray, M.H.; Logie, D.; An Object-Oriented Approach to Warranting Roadside SafetyHardware, Computing in Civil Engineering, American Society of Civil Engineers,New York, pp. 490-497, 1987.Rollins, J.B.; McFarland, W.F.; Costs of Motor Vehicle Accidents and Injuries, TexasTransportation Institute, Transportation Research Record #1068, pp. 1-7, 1986.Roschke, P.N.; Advisory System for Design of Highway Safety Structures, Journal ofTransportation Engineering, Vol. 117, Number 4, pp. 418-434, July-August 1991.Schultz, L.C.; Pennsylvania's Guide Rail Standard: A Cost-Effective Change,Pennsylvania Department of Transportation, Transportation Research Record #1065,pp. 12-18, 1986.Segal, D.J.; Highway-Vehicle-Object-Simulation-Model (HVOSM), Federal HighwayAdministration (FHWA-RD-75), Calspan Corporation, Buffalo, New York, 1976.149Sicking, D.L.; Ross, H.E.; Benefit-Cost Analysis of Roadside Safety Alternatives, TexasTransportation Institute, Transportation Research Record #1065, pp. 98-105, 1986.Sicking, D.L.; Guidelines for Positive Barrier Use in Construction Zones, TransportationResearch Record #1035, pp. 85-93, 1987.TAC; Manual of Geometric Design Standards for Canadian Roads, 1986 Metric Edition,Roads and Transportation Association of Canada, Ottawa, Ontario, p. F-9 to F-37,1986.Transport Canada; Roadside Hazards: A Methodology and Technique for DeterminingAccident Potential, B.C. Research for Transport Canada, July 1978.Transport Canada; Study of Single-Vehicle Off-Road Accidents, DeLeuw CatherCanada Ltd. and ADI Limited for Transport Canada, December 1978.Transport Canada; The Roadside Hazard Simulation Model (RHSM); A Methodologyand Technique to Effectively Reduce the Single Vehicle Accident Potential (Version6.2), Transport Canada, Ottawa, Ontario, p. 10, 1984.Transportation Centre; Study of the Relationship Between Vehicle Impact Speed andVarious Sensitivity Parameters, University of Saskatchewan, Saskatoon,Saskatchewan, 1976.Turner, D.S.; Walters, J.V.; Hutt, IN.; Patrick, J.E.; Survey of State Utility ManualClear Zone Provisions, University of Alabama, Transportation Research Record#1233, pp. 164-177, 1989.Turner, D.S.; Barnett, T.; Case Study: Poles in the Urban Clear Zone, University ofAlabama, Transportation Research Record #1233, pp. 155-163, 1989.150Viner, LG.; Tamanini, F.J.; Effective Highway Barriers, Accident Analysis and Prevention,Volume 5, pp. 203-214,1973.Waterman, D.A.; A Guide to Expert Systems, Addison-Wesley Publishing co. Inc.,Menlo Park, California, 1986.Welch, R.E.; Concrete Safety-Shaped Simulations with Program GUARD, FederalHighway Administration (FHWA-RD-78-90), U.S. Department of Transportation,1977.Youngman, J.H.; Towards a Rational for Warrants with Application to Median Barriers,Accident Analysis and Prevention, Volume 5, pp. 223-230, 1973.Zegeer, C.V.; Reinfurt, D.W.; Hunter, W.W.; Hummer, J.; Stewart, R.; Herf, L.; AccidentEffects of Side-slope and Other Roadside Features on Two-Lane Roads,Transportation Research Record #1195, pp. 33-47, 1988.Ziegler, A.J.; Risk of Vehicle-Tree Accidents and Management of Roadside Trees,Michigan Department of Transportation, Transportation Research Record #1127, pp.37-43, 1987.Zhou, H.; Layton, R.D.; Development of a Prototype Expert System for Roadside Safety, Journal of Transportation Engineering, Volume 117, Number 4, pp. 435-443,July-August 1991.151APPENDIX INDEX PageAppendix A: Glossary of Terms 152Appendix B: RHSM: Sample Output 154Appendix C: RHSM: Structure 163Appendix D: RHSM: Source Code 166Global Variable Include File 166Program RHSM 172Subroutine INPUT 174Subroutine EDIT 178Subroutine GRAPH2D 184Subroutine ROADSIDE 186Subroutine ECONOMIC 192Subroutine MITIGATION 198Subroutine TRAJECT 200Subroutine RUN 206Subroutine SIMULATE 207Subroutine OBJECT 213Subroutine FLY 218Subroutine DYNROLL 219Subroutine STATROLL 220Subroutine CONSEQ 221Subroutine ECONRUN 223Subroutine DISPLAY 225Subroutine GRAPH3D 236Subroutine PRINT 242Subroutine SAVE 255Subroutine CALIBRAT 258Subroutine DEFAULTS 270152APPENDIX A: Glossary of TermsThere are a number of terms used in this report which are commonly used in the discussionof roadside improvement alternatives. Although many of the terms may seem simple bydefinition, for reasons of clarity, the definitions as they relate to this research project areprovided below.Improvement Alternative:refers to any proposed action which may improve a hazardous location in terms ofthe accident severity consequence level.Roadside Hazard:a roadside hazard includes any natural or man-made feature which could causedamage to an errant vehicle (or harm to its occupants) upon leaving the roadway andencountering the feature.Slope Reduction:included as an improvement alternative, refers to any action which will reduce thehazard produced by a steep embankment slope such as slope flattening or roundingof steep embankment slopes.Traffic Barriers:refers to any device which provides a relative degree of protection for a vehicle andits occupants from hazardous roadside features or from crossing a median. These areclassified into two groups; longitudinal barriers and crash cushion barriers. Crashcushion barriers are used to decelerate vehicles, usually used for head-on impacts atbridge piers or off-ramp gore areas. These barriers are excluded in this report.153Longitudinal Barriers:are traffic barriers placed parallel to the roadway in an attempt to redirect errantvehicles away from the off-road hazard. These include roadside barrier and medianbarriers.Roadside Barriers:are barriers, strategically placed to prevent an errant vehicle from having an off-roadexcursion either on a steep embankment slope, or at a roadside where hazardousobstacles (objects) exist.Encroachment Angle or Departure Angle:refers to the angle between the normal path that a vehicle travels on a roadway andthe path that an errant vehicle takes during an off-road excursion.Probability of Consequence:based on the power loss experienced by an errant vehicle upon leaving the roadway,the probability of consequence defines the consequence level (fatal, injury, propertydamage only, no damage) in terms of an expected rate of occurrence or probability.Severity Index:The severity index is an index used to quantify the power loss, associated with aprobability of consequence, into a realistic and meaningful value. As mentionedpreviously, the severity index includes four categories: no damage, property damageonly, injury, and fatality, each representing a different level of power loss. A largepower loss indicates a severe accident, and a negligible power loss indicates a minoraccident.154APPENDIX B: RI-ISM: Sample OutputThis appendix provides a sample of the output which can be obtained from the analysisusing RHSM.V9. The first two pages (155 and 156) provide the input data for each of thefour alternatives used in this example. The next two pages (157 and 158) contain thecalibration data, including the Departure Angle Distributions, the Probability ofConsequence Table, the Roll-Consequence Table, the Vehicle Characteristics, and theEconomic Default Costs and Weights. The next two pages (159 and 160) provide theindividual results for each alternative, including the Simulation Results, the AggregatedConsequence Probability, and the Economic Evaluation Factors. The last two pages (161and 162) are the Summary of Results which compares the results of all the alternatives. TheTitle Page is also shown below. All output does not have to be printed; the user has theoption to specify only the output required.ROADSIDE HAZARDS SIMULATION MODELTransport Canada Road SafetyRHSM Version 9 (June 1992)developed byPaul deLeurforBC Ministry of Transportation and HighwaysHighway Safety BranchandUniversity of British ColumbiaDepartment of Civil EngineeringTransportation GroupDate: 5/10/1992Time: 11:48INPUT DATADO NOTHINGOperational DataTime Increment * 0.0500 sMaximum Trajectory Time * 10.0000 sMinimum Halt Speed * 1.0000 m/sNumber of Origin Points * 1Increment of Origin Shift * 0.0000 mMean Speed * 80.0000 kphStandard Deviation of Speed * 10.0000 kphSpeed Increment in S.Dev. * 2.0000 s.d.Angle Change Increment * 4.0000 deg.Minimum Probability Considered * 0.0000Brake Application * 0.0000 %Percentage Seatbelt Use * 50.0000 5Steer Back Angle q 0.0000 deg.Horizontal Curvature * StraightVehicle Model Q 4Terrain Data (Terrain Change Points)Lateral Slope Terrain RollingOffset (m) Angle (Deg) Resistance Resistance0.000 0.000 0.4000 0.05002.000 -45.000 0.4000 0.05004.000 0.000 0.4000 0.05006.000 60.000 0.4000 0.05008.000 0.000 0.4000 0.0500Object DataEnd Point 1 End Point 2 Object Object FrictionX (m) Y (m) X (m) Y (m) Width Type Code50.0 6.0 60.0 2.0 2.0 D 50.0FLATTEN SLOPE Operational DataTime Increment * 0.0500 sMaximum Trajectory Time * 10.0000 sMinimum Halt Speed * 1.0000 m/sNumber of Origin Points * 1Increment of Origin Shift * 0.0000 mMean Speed * 80.0000 kphStandard Deviation of Speed * 10.0000 kphSpeed Increment in S.Dev. * 2.0000 s.d.Angle Change Increment * 4.0000 deg.Minimum Probability Considered * 0.0000Brake Application * 0.0000 5Percentage Seatbelt Use * 50.0000 %Steer Back Angle ? 0.0000 deg.Horizontal Curvature * StraightVehicle Model ? 4Terrain Data (Terrain Change Points)Lateral Slope Terrain RollingOffset (m) Angle (Deg) Resistance Resistance0.000 0.000 0.4000 0.05002.000 -13.700 0.4000 0.05008.000 0.000 0.4000 0.0500Object DataEnd Point 1 End Point 2 Object Object FrictionX (m) Y (m) X (m) Y (m) Width Type Code50.0 6.0 60.0 2.0 2.0 D 50.01550.4000 0.05000.4000 0.05000.4000 0.05000.4000 0.05000.4000 0.0500 0.000 0.000 2.000 -45.000 4.000 0.000 6.000 60.000 8.000 0.000156INSTALL BARRIER...Operational DataTime Increment * 0.0500 sMaximum Trajectory Time * 10.0000 sMinimum Halt Speed * 1.0000 m/sNumber of Origin Points * 1Increment of Origin Shift * 0.0000 mMean Speed * 80.0000 kphStandard Deviation of Speed * 10.0000 kphSpeed Increment in S.Dev. * 2.0000 s.d.Angle Change Increment * 4.0000 deg.Minimum Probability Considered * 0.0000Brake Application * 0.0000 %Percentage Seatbelt Use * 50.0000 %Steer Back Angle 0.0000 deg.Horizontal Curvature * StraightVehicle Model 3 4Terrain Data (Terrain Change Points)Lateral Slope Terrain RollingOffset (m) Angle (Deg) Resistance Resistance0.000 0.000 0.4000 0.05002.000 -45.000 0.4000 0.05004.000 0.000 0.4000 0.05006.000 60.000 0.4000 0.05008.000 0.000 0.4000 0.0500Object DataEnd Point 1 End Point 2 Object Object FrictionX (m) Y (m) X (m) Y (m) Width Type Code50.0 6.0 60.0 2.0 2.0 D 50.00.0 2.0 100.0 2.0 0.5 D 50.0REMOVE OBJECTS....Operational DataTime IncrementMaximum Trajectory TimeMinimum Halt SpeedNumber of Origin PointsIncrement of Origin ShiftMean SpeedStandard Deviation of SpeedSpeed Increment in S.Dev.Angle Change IncrementMinimum Probability ConsideredBrake ApplicationPercentage Seatbelt UseSteer Back AngleHorizontal CurvatureVehicle Model0.0500 s• 10.0000 s• 1.0000 m/s• 1• 0.0000 m• 80.0000 kph• 10.0000 kph• 2.0000 s.d.• 4.0000 deg.• 0.0000• 0.0000 %• 50.0000 %0.0000 deg.• Straight3 4Terrain Data (Terrain Change Points)Lateral Slope Terrain RollingOffset (m) Angle (Deg) Resistance ResistanceObject DataEnd Point 1 End Point 2 Object Object FrictionX (m) Y (m) X (m) Y (m) Width Type Code157CALIBRATION DATA **************************************************************Departure Angle Frequency DistributionsStraight SectionAngle Freq. Angle Freq. Angle Freq. Angle Freq. Angle Freq.2 44. 4 218. 6 472. 8 760. 10 908.12 943. 14 943. 16 895. 18 786. 20 672.22 572. 24 480. 26 410. 28 341. 30 284.32 245. 34 205. 36 166. 38 140. 40 118.42 96. 44 79. 46 57. 48 48. 50 39.52 26. 54 17. 56 13. 58 9. 60 4.62 4. 64 3. 66 2. 68 1. 70 0.Gentle CurveAngle Freq. Angle Freq. Angle Freq. Angle Freq. Angle Freq.2 30. 4 150. 6 320. 8 570. 10 770.12 870. 14 890. 16 890. 18 850. 20 780.22 670. 24 560. 26 460. 28 375. 30 320.32 275. 34 235. 36 200. 38 165. 40 140.42 120. 44 95. 46 75. 48 55. 50 45.52 35. 54 25. 56 20. 58 15. 60 10.62 8. 64 6. 66 4. 68 2. 70 0.Moderate CurveAngle Freq. Angle Freq. Angle Freq. Angle Freq. Angle Freq.2 20. 4 100. 6 210. 8 340. 10 540.12 700. 14 780. 16 815. 18 825. 20 820.22 790. 24 715. 26 590. 28 485. 30 385.32 325. 34 275. 36 235. 38 200. 40 170.42 140. 44 115. 46 90. 48 70. 50 60.52 50. 54 40. 56 30. 58 20. 60 15.62 12. 64 9. 66 6. 68 3. 70 0.Severe CurveAngle Freq. Angle Freq. Angle Freq. Angle Freq. Angle Freq.2 10. 4 60. 6 150. 8 275. 10 400.12 530. 14 620. 16 675. 18 715. 20 725.22 730. 24 725. 26 690. 28 630. 30 535.32 455. 34 380. 36 315. 38 260. 40 215.42 175. 44 145. 46 120. 48 100. 50 80.52 65. 54 55. 56 45. 58 35. 60 25.62 20. 64 16. 66 12. 68 8. 70 4.158Probability of Consequence TablePower No Unrestrained Restrained(W/kg) Damage PDO Fatal PDO Fatal1 0. 1.00 0.00 0.00 0.00 0.002 200. 1.00 0.00 0.00 0.00 0.003 300. 0.50 0.50 0.00 0.50 0.004 432. 0.01 0.98 0.00 0.99 0.005 1459. 0.00 0.85 0.01 0.95 0.006 3092. 0.00 0.60 0.03 0.70 0.007 5331. 0.00 0.26 0.12 0.35 0.018 11628. 0.00 0.00 0.45 0.02 0.059 15685. 0.00 0.00 0.85 0.00 0.37Roll Consequence TableUnrestrainedSpeed PDO FatalityRestrainedPDO Fatality5.55 0.30000 0.11000 0.35000 0.0600016.66 0.25000 0.29000 0.31000 0.2000019.44 0.20000 0.36000 0.25000 0.2500022.22 0.15000 0.40000 0.18000 0.2900023.61 0.10000 0.45000 0.08000 0.3400025.00 0.05000 0.52000 0.05000 0.4000026.39 0.01000 0.61000 0.01000 0.5500027.78 0.00000 0.70000 0.00000 0.6600030.56 0.00000 0.79000 0.00000 0.6900033.33 0.00000 0.85000 0.00000 0.7500041.67 0.00000 1.00000 0.00000 1.00000Vehicle CharacteristicsVehicleTypeWheelBase (m)TrackWidth (m)Weight(kg)Centre ofGravity (m)1 2.40 1.30 922.00 0.512 2.52 1.42 979.00 0.533 2.59 1.42 1159.00 0.554 2.75 1.48 1404.00 0.585 2.95 1.55 1591.00 0.586 2.98 1.58 1859.00 0.587 2.24 1.30 636.00 0.518 2.75 1.48 1600.00 0.58Economic Evaluation Default Costs and WeightsAccident Costs (B/C Analysis) Accident Importance (C-E Analysis)ND = 0.00 ND = 2PDO = 4000.00 PDO = 20INJ = 15000.00 INJ = 2000FAT = 500001.01 FAT = 400000159RESULTS ******************************************************************DO NOTHING Simulation ResultsTotal Number of Vehicle Trajectories = 144Total Number of Rolls 39Probability of Vehicle Roll-Over = 0.27Number of Rolls at Terrain Change 7Probability of Rolls at Terrain Change = 0.05Number of Rolls on Slope 32Probability of Rolls on Slope = 0.22Aggregated Probability of Overall Accident Consequence ClassificationNo Damage = 0.486Property Damage Only = 0.229Injury = 0.194Fatality = 0.090Economic Evaluation FactorsEncroachment Rate (/km/yr) = 1.4608Total Accident Costs = 71480.44 PV$/km 6349.42 $/km/yearTotal Mitigation Costs = 11257.79 PV$/km 1000.00 $/km/yearTotal Severity (/km/year) = 53283.FLATTEN SLOPESimulation ResultsTotal Number of Vehicle Trajectories 144Total Number of Rolls 0Number of Rolls at Terrain Change 0Number of Rolls on Slope 0Aggregated Probability of Overall Accident Consequence ClassificationNo Damage = 0.905Property Damage Only = 0.087Injury = 0.007Fatality = 0.001Economic Evaluation FactorsEncroachment Rate (/km/yr) = 1.4608Total Accident Costs • 1084.11 PV$/km 96.30 $/km/yearTotal Mitigation Costs 48280.58 PV$/km 4288.64 $/km/yearTotal Severity (/km/year) = 362.160INSTALL BARRIER...Simulation ResultsTotal Number of Vehicle Trajectories = 144Total Number of Rolls = 16Probability of Vehicle Roll-Over = 0.11Number of Rolls at Terrain Change = 5Probability of Rolls at Terrain Change = 0.03Number of Rolls on Slope = 11Probability of Rolls on Slope = 0.08Aggregated Probability of Overall Accident Consequence ClassificationNo DamageProperty Damage OnlyInjuryFatality= 0.536= 0.206= 0.191= 0.066PV$/kmPV$/kmEconomic Evaluation FactorsEncroachment Rate (/km/yr)Total Accident CostsTotal Mitigation CostsTotal Severity (/km/year)= 1.4608= 53874.58= 32515.57= 39348.4785.54 $/km/year2888.27 $/km/yearREMOVE OBJECTS....Simulation ResultsTotal Number of Vehicle TrajectoriesTotal Number of RollsProbability of Vehicle Roll-OverNumber of Rolls at Terrain ChangeProbability of Rolls at Terrain ChangeNumber of Rolls on SlopeProbability of Rolls on Slope= 144= 43= 0.30= 7= 0.05= 36= 0.25Aggregated Probability of Overall Accident Consequence ClassificationNo DamageProperty Damage OnlyInjuryFatality= 0.487= 0.217= 0.200= 0.096Economic Evaluation FactorsEncroachment Rate (/km/yr) = 1.4608Total Accident Costs = 75649.85Total Mitigation Costs = 51257.78Total Severity (/km/year) = 56585.PV$/km 6719.78 $/km/yearPV$/km 4553.10 $/km/year161SUMMARY OF RESULTS ***********************************************************Summary of Accident Consequence Probabilities(and differences from: DO NOTHINGAlternatives No Damage P.D.O. Injury FatalityDO NOTHING 0.49 0.23 0.19 0.09FLATTEN SLOPE 0.91 ( 0.42) 0.09 (-0.14) 0.01 (-0.19) 0.00 (-0.09)INSTALL BARRIER. 0.54 ( 0.05) 0.21 (-0.02) 0.19 ( 0.00) 0.07 (-0.02)REMOVE OBJECTS 0.49 ( 0.00) 0.22 (-0.01) 0.20 ( 0.01) 0.10 ( 0.01)Summary of Vehicle Roll-Over ProbabilitiesTotal Rolls Rolls on Slope Roll @ Terrain ChAlternatives Number (Prob.) Number (Prob.) Number (Prob.)DO NOTHING 39 ( 0.27) 32 ( 0.22) 7 ( 0.00)FLATTEN SLOPE 0 0 0INSTALL BARRIER. 16 ( 0.11) 11 ( 0.08) 5 ( 0.03)REMOVE OBJECTS 43 ( 0.30) 36 ( 0.25) 7 ( 0.05)Benefit Cost Ratio Economic EvaluationRelative Accident Savings and Relative Mitigatn Costs arewith respect to: DO NOTHING Relative RelativeAccident Mitigatn Accident Mitigatn B-C NetCosts Costs Savings Costs Ratio BenefitAlternatives (PV$) (PV$) (PV$) (PV$) (PV$)DO NOTHING 71480. 11258.FLATTEN SLOPE 1084. 48281. 70396. 37023. 1.90 33374.INSTALL BARRIER 53875. 32516. 17606. 21258. 0.83 -3652.REMOVE OBJECTS 75650. 51258. -4169. 40000. -0.10 -44169.Relative Relative Accident Mitigatn Accident Mitigatn B-C NetCosts Costs Savings Costs Ratio BenefitAlternatives ($/year) ($/year) ($/year) ($/year) ($/year)DO NOTHING 6349. 1000.FLATTEN SLOPE 96. 4289. 6253. 3289. 1.90 2964.INSTALL BARRIER 4786. 2888. 1564. 1888. 0.83 -324.REMOVE OBJECTS 6720. 4553. -370. 3553. -0.10 -3923.162Cost Effectiveness Economic EvaluationMitigation Costs SeverityAlternatives (PV$/km) (5/km/year) (/km/year)DO NOTHING 11258. 1000. 53283.FLATTEN SLOPE 48281. 4289. 362.INSTALL BARRIER 32516. 2888. 39348.REMOVE OBJECTS 51258. 4553. 56585,COST EFFECTIVENESS EVALUATION ALTERNATIVES62244.00SEVERITY1324 1 DO NOTHING 2 FLATTEN SLOPE 3 INSTALL BARRIER 4 REMOVE OBJECTS 326.2010132.007 MITIGATION COST (PV$/km) 56383.568Press <PGUP> or <PGDN> to page through results, <5> for an. costs & savings<CTRL><B> for benefit cost results, or <CTRL><X> or <ESC> to exit.163APPENDIX C: RHSM: Structure1. Program RHSM:The purpose of this main program is to make the necessary calls to the subroutinesat the appropriate time during the program operation.2. Subroutine INPUT: (Called from RHSM)The purpose of this subroutine is to retrieve a previously stored input data file andload it into the program for analysis.3. Subroutine EDIT: (Called from RHSM)The purpose of this subroutine is to initiate a new analysis or to edit a retrievedinput data file for analysis.4. Subroutine GRAPH2D (Called from EDIT)The purpose of this subroutine is to draw a cross-sectional view of the roadsideterrain (perpendicular to the roadway) to provide a check for the user.5. Subroutine ROADSIDE (Called from EDIT)The purpose of the subroutine is to draw a topographic map of the roadway, roadsidearea, and hazardous features to provide a visual check for the user.6. Subroutine ECONOMIC (Called from RHSM)The purpose of this subroutine is to allow the user to edit most of the economicevaluation parameters associated with the encroachment rate, accident costs, and thepresent value-capital recovery factors.7. Subroutine MITIGATION (Called from ECONOMIC)The purpose of this subroutine is to allow the user to edit the economic evaluationparameters associated with mitigation costs.8. Subroutine TRAJECT (Called from RHSM)The purpose of this subroutine is to draw single trajectories of a user defined set ofconditions (encroachment number, speed, and angle) to serve as a visual check.9. Subroutine RUN (Called from RHSM)The purpose of this subroutine is to initiate the program analysis, keeping track ofall the vehicle trajectories and results for each input set.16410. Subroutine SIMULATE (Called from TRAJECT and RUN)The purpose of this subroutine is to simulate a vehicle's motion as it traverses overa single trajectory in the roadside.11. Subroutine OBJECT (Called from SIMULATE)The purpose of this subroutine is to check whether or not any objects areencountered during a single trajectory and calculate the induced decelerations.12. Subroutine FLY (Called from SIMULATE)The purpose of this subroutine is to determine whether the vehicle becomes air-borne at each change in terrain slope.13. Subroutine DYNROLL (Called from SIMULATE)The purpose of this subroutine is to monitor the air-borne vehicles and check forvehicle roll-over upon landing.14. Subroutine STATROLL (Called from SIMULATE)The purpose of this subroutine is to determine whether a vehicle has rolled on theembankment slope.15. Subroutine CONSEQ (Called from SIMULATE)The purpose of this subroutine is to determine the probability of accidentconsequence by utilizing the power loss and vehicle roll-over speeds.16. Subroutine ECONRUN (Called from RUN)The purpose of this subroutine is to perform the economic analysis for each input setalternative.17. Subroutine DISPLAY (Called from RHSM)The purpose of this subroutine is to display the results of the RHSM analysis ontothe screen for the user to view.18. Subroutine GRAPH3D (Called from DISPLAY)The purpose of this subroutine is to draw a three-dimensional graph of the resultsover the hazardous roadside area.19. Subroutine PRINT (Called from RHSM)The purpose of this subroutine is to print the input data, calibration data, and/or theresults either to a file or directly to the printer.16520. Subroutine SAVE (Called from RHSM)The purpose of this subroutine is to save the input data sets to a file to be retrievedat a later time.21. Subroutine CALIBRATE (Called from RHSM)The purpose of this subroutine is to edit the calibration and operational parameterswhich are used for the default input data sets.22. Subroutine GRAPH2D (Called from CALIBRATE)The purpose of this subroutine is to draw a graph of the encroachment angledistributions and the probability of consequence distributions for both power loss andvehicle roll-over speeds.23. Subroutine DEFAULTS (Called from RHSM)The purpose of this subroutine is to load all the defaulted values into the programfor each input data set.166APPENDIX D: RHSM Source CodeGlobal Variable Include File* Global variable include fileVariables:Constants.G - gravitational acceleration constant.PI Pi.RAD - conversion multiplier from degrees to radians.Operational variable defaults.DEF - array of default values for 15 operationalvariables listed below.IDEF - character array contains asterisks for each ofthe 15 operational variables of up to 10 inputsets which have default values.The following operational variables are dimensioned for up to10 input sets:AINCR - angle increment to use in simulation.BRAKE - braking coefficient.HCURVE - horizontal curve type.= <blank> for straight sections.= G for gentle curves.= M for moderate curves.= S for severe curves.MITER - number of encroachment points.MODEL - model number of vehicle to use in simulation.PMIN - minimum probability to consider in simulation.REST - degree of occupant restraint.S 1 P,ER - steerback angle.TI - time increment to use in simulation.TITLE - title of input set.TMAX - length of time to model each trajectory.VINCR - initial velocity increment to use in simulation(in standard deviations).VMEAN - mean initial velocity.VMIN - minimum initial velocity to consider in simulation.VSD - initial velocity standard deviation.XINCR - distance between successive encroachment points.167* The following object variables are dimensioned for up to 10 input* sets:• NO - number of objects.• THM - array of object deceleration coefficients (mu) forup to 50 deformable objects.• THTYP - array of up to 50 object types.= R for rigid objects.= D for deformable objects.= S for snappable objects.• THWID - array of up to 50 object widths.a THX1 - array of up to 50 lower left corner x-coordinates.• THX2 - array of up to 50 lower right corner x-coordinates.• THX3 - array of up to 50 upper left corner x-coordinates.• THX4 - array of up to 50 upper right corner x-coordinates.• THY1 - array of up to 50 lower left corner y-coordinates.• THY2 - array of up to 50 lower right corner y-coordinates.• THY3 - array of up to 50 upper left corner y-coordinates.• THY4 - array of up to 50 upper right corner y-coordinates.• The following terrain variables are dimensioned for up to• 10 input sets:NT - number of terrain strips.• TA - array of slopes for up to 50 terrain strips.TM - array of terrain deceleration coefficients (mu)for up to 50 terrain strips.TR - array of rolling deceleration coefficients (mu)for up to 50 terrain strips.TY - array of up to 50 terrain strip offsets distancesfrom the road.Encroachment angles.• NOBS - array of the number of observations in theencroachment probabilities table• PP - array of encroachment angle probabilities for4 different horizontal curvatures (Straight,Gentle, Moderate, Severe) and 35 encroachmentangles between 2 and 70 degrees.Probability of consequences variables.• NPLA - number of entries in probability of consequencestable (up to 50).• PLA - array containing the following data:(1) - power level.(2) - probability of no damage.(3) - probability of property damage only forunrestrained occupants.(4) - probability of fatalities for unrestrainedoccupants.(5) - probability of property damage only forrestrained occupants.(6) - probability of fatalities for restrainedoccupants.168Roll consequences variables.• NVEL - number of roll consequence entries (up to 50).• RP1 - array containing the following data:(1) - probability of property damage only forunrestrained occupants.(2) - probability of fatalities for unrestrainedoccupants.RP2 - array containing the following data:(1) - probability of property damage only forrestrained occupants.(2) - probability of fatalities for restrainedoccupants.• VEL - array of velocities.Variables used during simulation run.• ACCEL - current vehicle acceleration.• ANGLE - current vehicle horizontal angle with road.• ELEVATION - current vehicle elevation relative to road.• FLYING - yes/no flag indicating whether a vehicle iscurrently airborne.• FLYTIME - the amount of time elapsed since a vehiclebecame airborne.• GROUND - elevation of ground at current vehicle location.• IENCR - current encroachment number.• INCIANGLE - angle of incidence of vehicle when meeting theground after being airborne.• INITANG - current initial angle.• INITVEL - current initial velocity.• KINENER - rotational kinetic energy built up while avehicle is airborne.• LASTPFAT - cumulative fatality probability at last timeincrement.• LASTPINJ - cumulative injury probability at last timeincrement.• LASTPND - cumulative no damage probability at last timeincrement.• LASTPPDO - cumulative property damage only probability atlast time increment.• LASTXX - x-coordinate of vehicle at last time increment.• LASTYY - y-coordinate of vehicle at last time increment.• OTSTRIP - the last terrain strip contacted.• PASTOBJ - an array of flags indicating whether an objecthas been encountered along a trajectory.• PFAT - current cumulative fatality probability.• PINJ - current cumulative injury probability.PND - current cumulative no damage probability.• PPDO - current cumulative property damage only probability.PWR - current power level.• TSTRIP - terrain strip at current vehicle location.• VANGLE - current vertical angle of vehicle.• VELOCITY - current vehicle velocity.• VVERT initial vertical velocity when a vehicle.becomes airborne.XX - current x-coordinate of vehicle.YY - current y-coordinate of vehicle.169Simulation results.DATA - array of overall consequence probabilities foreach of 10 input sets.NCALLS - array of the number of encroachments simulated foreach of 10 input sets.NIROL - array of the number of dynamic rolls detected foreach of 10 input sets.NJROL - array of the number of static rolls detected foreach of 10 input sets.NROLLS - array of the total number of rolls detected foreach of 10 input sets.SPRES - array of overall consequence probabilities foreach of 10 input sets and each of 50 x 10grid squares.Variables used for the Economic EvaluationACCOST - accident costsAFCOST - fill addition costsBINSTALL - barrier installation costsBMAINT - barrier maintenence costsCUTCOST - slope cutting costsCOSTROW - right-of-way costsCREMOVE - object removal costsFILLCOST - additional fill costsNREMOVE - number of objects to be removedWASTCOST - slope cutting waste costsBARRIER - is barrier requiredCFMAINT - is maintenence requiredOREMOVE - is object removal requiredROW - is right-of-way requiredSLOPE - is slope reduction requiredSEVERITY - cost-effective severity criteriaBC - benefit-cost analysisCE - cost-effectiveness analysisCLIMATE - climatic condition adjustment factorDESSPD - design speed adjustment factorHORCURVE - horizontal curve adjustment factorLANEWID - lane width adjustment factorNUMLANE - number of lanes adjustment factorRDCLASS - road class adjustment factorSHLDWID - shoulder width adjustment factorSIGHT - sight restrictions adjustment factorTRAFFIC - traffic composition adjustment factorVERCURVE - vertical curvature adjustment factorADT - average daily traffic volumeENCRATE - encroachment rateTFAT - total fatalities expectedTINJ - total injuries expectedTND - total no damage expectedTPDO - total property damage only expectedINTEREST - interest rate usedPERIOD - time period usedThe following vehicle variables are dimensioned for up to 8vehicle models.• CG - centre of gravity.• TRACK - track width.• VMASS - vehicle mass.• WBASE - wheel base.170Default VariablesDEFACCSTDEFBINSTDEFBMAINDEFCUTCSDEFFILCSDEFWASCSDEFADFCSDEFCFMAIDEFINTRTDEFPERDDEFSEVERDSADJUSTHCADJUSTLWADJUSTNLADJUSTRCADJUSTSADJUSTSWADJUSTTADJUSTVCADJUSTCADJUST- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value for- default value foraccident costsbarrier installationbarrier maintenenceslope cut costsslope fill costscut waste costsfill addition costsmaintenence costsinterest ratetime periodcost-effective criteria severitiesdesign speed adjustmnet factorhorizontal curve adjustment factorlane width adjustment factornumber of lanes adjustment factorroad class adjustment factorsight restrictions adjustment factorshoulder width adjustment factortraffic composition adjustment factorvertical curvature adjustment factorclimatic conditions adjuctment factorVariables used for the Economic ResultsCUTFILLMITCOSTTACCOSTFile and printer variables.- total slope cutting required- total slope filling required- total mitigation costs- total accident costDONE - yes/no flag indicating whether the analysis hasbeen completed since the current input setswere last edited. It is checked when trying todisplay or print results.INPUTF - name of input data file.OUTPUTF - name of output data file.OPTION - yes/no flags for each of 8 print options.OUTMODE - mode of output.= D for disk file.= P for printer.PAUSE - yes/no flag indicating whether to pause printingbetween pages for paper change.SAVED - yes/no flag indicating whether input data hasbeen saved. It is checked when trying to exitthe program.171INTEGER ADT, BARRIER(10), BC, CE, CLIMATE, DEFPERD, DEFSEVER(4),1 DESSPD, DONE, FLYING, HCURVE(10), HORCURVE, IENCR, LANEWID,2 MITER(10), MODEL(10), NCALLS(10), NIROL(10), NJR0L(10), NO(10),3 NOBS(4), NPLA, NREMOVE(10,3), NROLLS(10), NT(10), NUMLANE, NVEL,4 OREMOVE(10), OTSTRIP, PASTOBJ(50), PERIOD, RDCLASS, ROW(10),5 SAVED, SEVERTTY(4), SHLDWID, SIGHT, SLOPE(10), TRAFFIC, TSTRIP, VERCURVEREAL ACCEL, ACCOST(2,4), TACCOST(10), ADFCOST, AINCR(10),1 ANGLE, BINSTALL(10), BMAINT(10), BRAKE(10), CADJUST(6), CUT(10),2 CUTCOST, CFMAINT(10), CG(8), COSTROW(10), CREMOVE(10,3),3 DATA(10,4), DEF(15), DEFACCST(4), DEFADFCS, DEFBINST, DEFBMAIN,4 DEFCUTCS, DEFFILCS, DEFWASCS, DEFCFMAI, DEFINTRT, DISP,5 DSADJUST(5), ELEVATION, ENCRATE, F1LL(10), FILLCOST, FLYTIME, G,6 GROUND, HCADJUST(6), INCIANGLE, INTTANG, INITVEL, INTEREST,7 KINENER, LASTPFAT, LASTPINJ, LASTPND, LASTPPDO, LASTXX, LASTYY,8 LWADJUST(5), MAXZ, MINZ, MITCOST(10), NLADJUST(5), PFAT, PINJ,9 PND, PPDO, PI, PLA(50,6), PMIN(10), PP(4,35), PWR, RAD,1 RCADJUST(5), REST(10), RP1(50,2), RP2(50,2), SADJUST(6),2 SPRES(10,50,10,3), S1EER(10), SWADJUST(5), TA(10,50),2 TADJUST(6), THM(10,50), THWID(10,50), THX1(10,50), THX2(10,50),3 THX3(10,50), THX4(10,50), THY1(10,50), THY2(10,50), THY3(10,50),4 THY4(10,50), TFAT, TINJ, TND, TPDO, TI(10), TM(10,50), TMAX(10),5 TR(10,50), TRACK(8), TY(10,50), VANGLE, VCADJUST(6), VEL(50),6 VELOCITY, VINCR(10), VMASS(8), VMEAN(10), VMIN(10), VSD(10),7 VVERT, WASTCOST, WBASE(8), XINCR(10), XX, YYCHARM-MR*1 IDEF(10,15), OPTION(10), OUTMODE, PAUSE, THTYP(10,50)CHARACIT,R*36 INPUTF,OUTPUTFCHARACIER*50 TITLE(10)COMMON /ANGLE/ NOBS, PPCOMMON /CONST/ G, PI, RADCOMMON /DEFLT/ CADJUST, DEF, DEFACCST, DEFBINST, DEFBMAIN,1 DEFCUTCS, DEFFILCS, DEFWASCS, DEFADFCS, DEFCFMAI,2 DEFINTRT, DEFPERD, DSADJUST, HCADJUST, IDEF,3 LWADJUST, NLADJUST, RCADJUST, DEFSEVER,3 SADJUST, SWADJUST, TADJUST, VCADJUSTCOMMON /ECON/ ACCOST, ADFCOST, ADT, BARRIER, BC, BINSTALL,1 BMAINT, CE, CUTCOST, CFMAINT, CLIMATE, COSTROW,2 CREMOVE, DESSPD, ENCRATE, FILLCOST, HORCURVE,3 INTEREST, LANEWID, NREMOVE, NUMLANE, OREMOVE,4 PERIOD, RDCLASS, ROW, SEVERITY, SHLDWID, SIGHT,5 SLOPE, TRAFFIC, TFAT, TINJ, TND, TPDO, VERCURVE, WASTCOSTCOMMON /ECRSLT/ TACCOST, CUT, FILL, MITCOSTCOMMON /10/ DONE, INPUTF, OUTPUTF, OPTION, OUTMODE, PAUSE, SAVEDCOMMON /OBJCT/ NO, THM, THTYP, THWID, THX1, THX2, THX3, THX4,1 THY1, THY2, THY3, THY4COMMON /OPER/ AINCR, BRAKE, HCURVE, MITER,1 MODEL, PMIN, REST, STEER, TI, TITLE, TMAX,2 VINCR, VMEAN, VMIN, VSD, XINCRCOMMON /PRCN/ NPLA, PLACOMMON /RESLT/ DATA, NCALLS, NIROL, NJROL, NROLLSCOMMON /ROLC/ NVEL, RN, RP2, VELCOMMON /RUNV/ ACCEL, ANGLE, DISP, ELEVATION, FLYING, FLYTIME,1 GROUND, IENCR, INCIANGLE, INITANG, INITVEL,2 KINENER, LASTPFAT, LASTPINJ, LASTPND, LASTPPDO,3 LASTXX, LASTYY, OTSTRIP, PASTOBJ, PFAT, PINJ, PND,4 PPDO, PWR, TSTRIP, VANGLE, VELOCITY, VVERT, XX, YYCOMMON /SR/ SPRESCOMMON /TERR/ NT, TA, TM, TR, TYCOMMON /TRAJ/ MINZ, MAXZ***172COMMON /VHCST/ CG, TRACK, VMASS, WBASEPROGRAM RHSMRHSM main menuINTEGER CHOICEINCLUDE 'RHSM.INS'** Set all inputs to default values*CALL DEFAULTS** Set constants*G = 9.8091PI = 3.14159RAD = 0.0174533** Load main menu*CALL INITSCREENWRITE (*,*) CHAR(255),CHAR(255),'SET LIBRARY TO RHSM.LIB/'10 WRITE (*,*) CHAR(255), CHAR(255), 'MENU/'READ (*,*) CHOICE*Load input data from a file*IF (CHOICE .EQ. 1) THENCALL INPUTEdit simulation dataELSEIF (CHOICE .EQ. 2) THENCALL EDITSAVED =0Edit economic evaluation parametersELSEIF (CHOICE.EQ.3) THENCALL ECONOMICPlot trajectories*ELSEIF (CHOICE.EQ.4) THENCALL TRAJECTRun analysisELSEIF (CHOICE .EQ. 5) THENCALL RUNDisplay or graph results*ELSEIF (CHOICE .EQ. 6.AND.DONE.EQ.1) THENCALL DISPLAY* Print input data and resultsELSEIF (CHOICE .EQ. 7.AND.DONE.EQ.1) THENCALL PRINTSave input dataELSEIF (CHOICE .EQ. 8) THENCALL SAVESAVED =1Edit calibration and defaults dataELSEIF (CHOICE EQ 9) THENCALL CALIBRATQuitELSEIF (CHOICE.EQ.10) THENIF (SAVED.EQ.0) THENWRITE (*,*) CHAR(255),CHAR(255),'SAVE/'CALL GETKEYBOARD(CH,II)IF (II.E,Q.21) THENCALL CLRSCRSTOPENDIFELSECALL CLRSCRSTOPENDIFENDIFGOTO 10END173174SUBROUTINE INPUTThis subroutine loads input data from a file on diskINTEGER CODE, CF, POSCHARAC1ER*12 FILNAMCHARAC1ER•76 FIELD(120)INCLUDE 'RHSM.INS'COMMON /SCRN/ FIELDEnter name of file to inputFIELD (1)=INPUTF1 WRITE (*,*) CHAR(255), CHAR(255),FILNAM = 10'CODE = 0CF = 0POS = 1DO 5 1=1,36IF (ICHAR(INPUTF(1:1)).NE.32.ANDICHAR(INPUTF(I:1)).NE.0) THENPOS=P0S+1ELSEGOTO 6ENDIF5 CONTINUE6 CALL SCREENIO (FILNAM, CODE, CF, POS)IF (CODE.EQ.1) RETURNINPUTF = FIELD(1)DONE=0SAVED =1Read data from fileOPEN (10, FILE=INPUTF, STATUS ='OLD',ERR=1000)Read operating data for each input setDO 20 1=1,10READ (10,30,ERR= 1000) ITTLE(1)30 FORMAT (A50)DO 50 J=1,16IDEF(I,J)="50 CONTINUEREAD (10,55,ERR=1000) TI(I),TMAX(1),VMIN(1),MITER(I),1 XINCR(I)55 FORMAT (3F10.3,I4,F10.3)READ (10,57,ERR=1000) VMEAN(I), VSD(I), VINCR(I), AINCR(I),1 PMIN(I),BRAKE(I), REST(I)57 FORMAT (7F10.3)READ (10,57,ERR=1000) S1 EER(I)READ (10,59,ERR= 1000) HCURVE(I), MODEL(I)59 FORMAT (213)* Check default valuesIF (TI(I).EQ.DEF(1)) IDEF(I,1)='*'IF (TMAX(I).EQ.DEF(2)) IDEF(I,2)='*'IF (VMIN(I).EQ.DEF(3)) IDEF(I,3)='*'IF (MITER(I).EQ.DEF(4)) 1DEF(1,4)='*'IF (XINCR(I).EQ.DEF(5)) IDEF(I,5)='*'IF (VMEAN(I).EQ.DEF(6)) IDEF(I,6)='*'175IF (VSD(I).E,Q.DEF(7)) IDEF(1,7)="'IF (VINCR(I).EQ.DEF(8)) IDEF(I,8)='*'IF (AINCR(I).EQ.DEF(9)) IDEF(I,9)='`'IF (PMIN(I).EQ.DEF(10)) IDEF(I,10)='*'IF (BRAKE(I).EQ.DEF(11)) IDEF(I,11)='*'IF (REST(I).EQ.DEF(12)) IDEF(1,12)='*'IF (SIEER(I).EQ.DEF(13)) IDEF(I,13)='*'IF (HCURVE(I).EQ.INT(DEF(14))) IDEF(I,14)='*'IF (MODEL(I).EQ.INT(DEF(15))) IDEF(I,15)='*'*• Read terrain dataREAD (10,61,ERR= 1000) NT(I)61 FORMAT (13)DO 60 J=1,NT(I)READ (10,65,ERR= 1000) TY(I,J), TA(I,J), TM(I,J), TR(I,J)65 FORMAT (F6.3,F6.2,2F6.4)60 CONTINUE• Read object dataREAD (10,61,ERR= 1000) NO(I)DO 75 J=1,NO(I)READ (10,77,ERR=1000) THX1(I,J),THX2(I,J),THY1(I,J),1 THY2(I,J),THM(I,J),THWID(I,J),THTYP(I,J)77 FORMAT (6F5.1,A1)THX3(I,J) = THX1(1,J)-THWID(1,J)* COS(3.1416/2-ATAN((THY 2(I,J)-1 THY1(I,J))/(THX2(I,J)-THX1(I,J))))l'HY3(1,J)=THY1(1,J)+THWID(I,J)*SIN(3.1416/2-ATAN((THY2(1,J)-1 THY1(I,J))/(T11X2(I,J)-THX1(I,J))))THX4(1,J)=THX2(1,J)-THWID(I,J)*COS(3.1416/2-ATAN((THY1(1,J)-1 THY2(I,J))/(THX1(I,J)-THX2(1,J))))THY4(1,J)=THY2(I,J)+THWID(I,J)*SIN(3.1416/2-ATAN((THY1(1,J)-1 THY2(1,J))/(THX1(1,J)-THX2(1,J))))75 CONTINUE20 CONTINUE• Roll consequence data*READ (10,61,ERR= 1000) NVELDO 80 I=1,NVELREAD (10,90,ERR= 1000) RP1(I,1),RP1(I,2)READ (10,90,ERR=1000) RP2(I,1),RP2(I,2)READ (10,90,ERR= 1000) VEL(I)90 FORMAT (2F10.3)80 CONTINUEAngle probability dataDO 100 I= 1,4NOBS(I) = 0DO 100 J=1,35READ (10,110,ERR=1000) PP(I,J)110 FORMAT (F10.3)NOBS(I) = NOBS(I) + PP(I,J)100 CONTINUEVehicle characteristics176*Vehicle characteristicsDO 120 1=1,8READ (10,130,ERR= 1000) CG(I)READ (10,130,ERR= 1000) TRACK(I)READ (10,130,ERR= 1000) VMASS(I)READ (10,130,ERR=1000) WBASE(I)130 FORMAT (F10.3)120 CONTINUEProbability of consequence dataREAD (10,61,ERR=10130) NPLADO 140 I = 1,NPLAREAD (10,150,ERR=1000) (PLA(I,J),J =1,6)150 FORMAT (F7.1,5F7.5)140 CONTINUEEconomic data*DO 160 1=1,10READ (10,165) BARRIER(I),ROW(I),OREMOVE(I),NREMOVE(I,1),1 NREMOVE(1,2),NREMOVE(I,3)165 FORMAT (614)READ (10,170) BINSTALL(I),BMAINT(I),CFMAINT(I),COSTROW(I),1 CREMOVE(I,1),CREMOVE(I,2),CREMOVE(I,3)170 FORMAT (7F9.2)160 CONTINUEREAD (10,170) CUTCOST,FILLCOST,WASTCOST,ADFCOSTREAD (10,190) (ACCOST(1,1),I = 1,4)READ (10,190) (ACCOST(2,0,1=1,4)190 FORMAT (4F9.2)READ (10,200) CLIMATE, DESSPD, HORCURVE, LANEWID, NUMLANE,1 RDCLASS, SHLDWID, SIGHT, SLOPE, TRAFFIC, VERCURVE200 FORMAT (1111)READ (10,210) ADT,ENCRATE,INTEREST,PERIOD210 FORMAT (I8,F8.4,F4.2,14)READ (10,220) BC,CEIF (BC.EQ.1) THENOPTION(9)='Y'ELSEOPTION(9)='N'ENDIFIF (CE.EQ.1) THENOPTION(10)='Y'ELSEOPTION(10)='N'ENDIF220 FORMAT (211)READ (10,230) SEVERITY(1),SEVERITY(2),SEVERITY(3),SEVERITY(4)230 FORMAT (4I11)CLOSE (10)RETURNError reading file* Error reading file* Check if directory is to be displayed1000 WRITE (*,*) CHAR(7),CHAR(7)CALL CURSOROFFWRITE (*,*) CHAR(255),CHAR(255),'FILERR/'CALL GETKEYBOARD(CH,II)CALL CURSORONGOTO 1END177178SUBROUTINE EDITThis subroutine is used to edit simulation input dataINTEGER CODE, CF, HC, ISET, NUMLIN, NUMPTS, POSREAL GX(100),GY(16,100),HOLDCHARAC1ER*1 CHOLDCHARACTER*12 FILNAMCHARACTER*18 )(TITLE, YITTLECHARAC1 ER*76 FIELD (120)CHARACTER*80 TILEINCLUDE 'RHSM.INS'COMMON /SCRN/ FIELDCOMMON / GRPH2D / NUMLIN,NUMPTS,GX,GY,XTITLE,YTITLE,TTLEISET=1*Input Set Titles1 WRITE (*,*) CHAR(255),CHAR(255),'TITLES/DO 10I=1,10FIELD(I)=ITTLE(I)10 CONTINUECODE= 0CF =ISETPOS =0FILNAM = 11 TLES'15 CALL SCREENIO (FILNAM,CODE,CF,POS)IF (CODE.EQ.1) RETURNDONE= 0SAVED =0DO 20 1=1,10TITLE(I) = FIELD(I)20 CONTINUEIF (CODE.EQ.18.AND.ICHAR( 111 LE(CF)(1:1)).NE.O.AND.1 ICHAR(TTTLE(CF)(1:1)).NE.32) THENISET= CF25 WRITE (*,*) CHAR(255),CHAR(255),'EDIT/'READ (*,*) CHOICE*Operational Data*IF (CHOICE.EQ.1) THENWRITE (*,*) CHAR(255),CHAR(255),'OPERATE/'IF (HCURVE(ISET).EQ.1) FIELD(1)="IF (HCURVE(ISET).E0.2) FIELD(1)='G'IF (HCURVE(ISEI).EQ.3) FIELD(1)='M'IF (HCURVE(ISET).EQ.4) FIELD(1)='S'WRITE (FIELD(2),30) TI(ISET)30 FORMAT (F10.3)WRITE (FIELD(3),30) TMAX(ISET)WRITE (FIELD(4),35) MITER(ISET)35 FORMAT (110)WRITE (FIELD(5),30) XINCR(ISET)WRITE (FIELD(6),30) VMEAN(ISET)WRITE (FTELD(7),30) VSD(ISET)WRITE (FIELD(8),30) VMIN(ISET)WRITE (FIELD(9),30) VINCR(ISET)WRITE (FIELD(10),30) AINCR(ISET)WRITE (FIELD(11),30) PMIN(ISET)WRITE (FIELD(12),30) STEER(ISEI)179WRITE (FIELD(13),30) BRAKE(ISET)WRITE (FIELD(14),30) REST(ISET)WRITE (FIELD(15),40) MODEL(ISET)40 FORMAT (I1)FTLNAM= 'OPERATE'CODE= 0CF =0POS = 050 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45) GOTO 50IF (ICHAR(FIELD(1)(1:1)).EQ.O.ORICHAR(FIELD(1)(1:1)).EQ.32) THENHCURVE(ISET) = 1ELSEIF (FIELD(1) EQ.'G') THENHCURVE(ISET)= 2ELSEIF (FIELD(1).EQ.'M') THENHCURVE(ISET) = 3ELSEIF (FIELD(1).EQ.'S') THENHCURVE(ISET) =4ENDIFREAD (FIELD(2),30) 1T(ISET)READ (FIELD(3),30) TMAX(ISET)READ (FIELD(4),35) MITER(ISET)READ (FIELD(5),30) XINCR(ISET)READ (FIELD(6),30) VMEAN(ISET)READ (FIELD(7),30) VSD(ISET)READ (FIELD(8),30) VMIN(ISET)READ (FIELD(9),30) VINCR(ISET)READ (FIELD(10),30) AINCR(ISET)READ (FIELD(11),30) PMIN(ISET)READ (FIELD(12),30) STEER(ISET)READ (FIELD(13),30) BRAKE(ISET)READ (FIELD(14),30) REST(ISET)READ (FIELD(15),40) MODEL(ISET)*Check default values*DO 55 J=1,16IDEF(ISET,J)="55 CONTINUEIF (TI(ISEI).EQ.DEF(1)) IDEF(ISET,1)='*'IF (TMAX(ISET).EQ.DEF(2)) IDEF(ISET,2)='*'IF (VMIN(ISET).EQ.DEF(3)) IDEF(ISET,3)='*'IF (MITER(ISET).EQ.DEF(4)) IDEF(ISET,4)='*'IF (XINCR(ISET).EQ.DEF(5)) IDEF(ISET,5)='*'IF (VMEAN(ISET).EQ.DEF(6)) IDEF(ISET,6)='*'IF (VSD(ISET).EQ.DEF(7)) IDEF(ISET,7)='*'IF (VINCR(ISET).EQ.DEF(8)) IDEF(ISET,8)='*'IF (AINCR(ISET).EQ.DEF(9)) IDEF(ISET,9)='*'IF (PMIN(ISET).EQ.DEF(10)) IDEF(ISET,10)='*'IF (BRAKE(ISE1).EQ.DEF(11)) IDEF(ISET,11)='*'IF (REST(ISET).EQ.DEF(12)) IDEF(ISET,12)='*'IF (STEER(ISET).EQ.DEF(13)) IDEF(ISET,13)='*'IF (HCURVE(ISET).EQ.INT(DEF(14))) IDEF(ISET,14)='*'IF (MODEL(ISET).EQ.INT(DEF(15))) IDEF(ISET,15)=Edit terrain data180Edit terrain dataELSEIF (CHOICE.EQ.2) THEN65 WRITE (*,*) CHAR(255),CHAR(255),'TERRAIN/'DO 60 1=1,20WRITE (FIELD((I-1)*4+1),70) TY(ISET,I)70 FORMAT (F6.3)WRITE (FIELD((I-1)*4 +2),75) TA(ISET,I)75 FORMAT (F6.2)WRITE (FIELD((I-1)*4 +3),80) TM(ISET,I)80 FORMAT (F6.4)WRITE (FIELD((1-1)*4+4),80) TR(ISET,I)60 CONTINUEFILNAM = 'TERRAIN'CODE= 0CF = 0POS -= 090 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45.AND.CODE.NE.34) GOTO 90NT(ISET)= 0DO 95 1=1,20READ (FIELD((I-1)*4+ 1),70) TY(ISET,I)READ (FIELD((I-1)*4 +2),75) TA(ISET,I)READ (FIELD((I-1)*4+3),80) TM(ISET,I)READ (FIELD((I-1)*4 +4),80) TR(ISET,I)IF (I.EQ.1.0R.TY(ISET,I).NE.0) NT(ISET) = NT(ISET) + 195 CONTINUESort Terrain DataDO 96 1=1,19DO 96 J=I+1,20IF ((TY(ISET,I).GT.TY(ISET,J).AND.TY(ISET,J).NE.0)1 .0R.(LNE.LAND.TY(ISET,I).E.Q.0)) THENHOLD =TY(ISET,I)TY(ISET,I) =TY(ISET,J)TY(ISET,J) = HOLDHOLD =TA(ISET,I)TA(ISET,I) =TA(ISET,J)TA(ISET,J) = HOLDHOLD =TM(ISET,I)TM(ISET,I) =TM(ISET,J)TM(ISET,J) = HOLDHOLD =TR(ISET,I)TR(ISET,I)=TR(ISET,J)TR(ISET,J) = HOLDENDIF96 CONTINUEPlot terrain profileIF (CODE.EQ.34) THENNUMLIN = 1NUMFTS = NT(ISE1) + 2GX(1)= 0GY(1,1) = 0DO 97 I =1,NT(ISET)GX(I + 1) = TY(ISET,I)IF (I.EQ.1) THENGY(LI + 1)=0181ELSEGY(1,I + 1) = GY(1,I)+(GX(I +1)-GX(1))*TAN(TA(ISET,I-1)*RAD)ENDIF97 CONTINUEGX(NT(ISET) +2) =20IF (NT(ISET).GT.0) THENGY(1,NT(ISET) +2) = GY(1,NT(ISET) + 1) + (GX(NT(ISET) + 2)- 1 GX(NT(ISET)+1))*TAN(TA(ISET,NT(ISET))*RAD)ELSEGY(1,N'T(ISET)+ 2) = 0ENDIFX1TTLE= 'Distance from Road'YTITLE= ' Elevation 'TTLE= 'Roadside Cross Section Profile'CALL GRAPH2DGOTO 65ENDIF*Clear Zone Object data*ELSEIF (CHOICE.EQ.3) THENIPAGE= 1105 WRITE ( 5 , 5) CHAR(255),CHAR(255),'OBJECT/'DO 100 I=1,10WRITE (FIELD(I),106) (IPAGE-1) 5 10 + I106 FORMAT (12)WRITE (FIELD(10 +1) 9 110) THX1(ISET,(IPAGE-1) 5 10 + I)110 FORMAT (F5.1)WRITE (FIELD(20+ I),110) THY1(ISET,(IPAGE-1) 5 10 +I)WRITE (FIELD(30+I),110) THX2(ISET,(IPAGE-1) 5 10 + I)WRITE (FIELD(40+ I),110) THY2(ISET,(IPAGE-1) 5 10 + I)WRITE (FIELD(50+I),110) THWID(ISET,(IPAGE-1)*10 +I)F1ELD(60 +1)=THTYP(ISE'T,(IPAGE-1) 5 10 + I)WRITE (FIELD(70+I),110) THM(ISET,(IPAGE-1)*10 + I)100 CONTINUEF1LNAM = 'OBJECT'CODE = 0CF =0POS = 0120 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45AND.CODE.NE.73.AND.CODE.NE.81) GOTO 120DO 130 1=1,10READ (FIELD(10 + 4110) THX1(ISET,(IPAGE-1)*10+ I)READ (FIELD(20+ I),110) THY1(ISET,(IPAGE-1) 5 10+ I)READ (FIELD(30+ 4110) THX2(ISET,(IPAGE-1) 5 10 + I)READ (FIELD(40 +1) 9110) THY2(ISET,(IPAGE-1) 5 10+ I)IF (THX1(ISET,(IPAGE-1) 510+1).GT. 1 THX2(ISET,(IPAGE-1)510+ I)) THENHOLD =THX1(ISET,(IPAGE-1) 5 10+ I)THX1(ISET,(IPAGE-1) 5 10 + I) = THX2(ISET,(IPAGE-1) 5 10 + I)THX2(ISET,(IPAGE-1) 5 10 + I) = HOLDHOLD =THY1(ISET,(IPAGE-1)'10+ I)THY1(ISET,(IPAGE-1) 5 10 + I) = THY2(ISET,(IPAGE-1) 5 10 + I)THY2(ISET,(IPAGE-1)*10 + I) = HOLDENDIFREAD (FIELD(50+ I),110) THWID(ISET,(IPAGE-1)*10 + I)THTYP(ISET,(IPAGE-1) 5 10+ I) = FIELD(60+ I)READ (FIELD(70+ 4110) THM(ISET,(IPAGE-1) 5 10+ I)IF (THWID(ISET,(IPAGE-1) 5 10+1).NE.0) THEN182THX3(ISET,(IPAGE-1)*10+I)=THX1(ISET,(IPAGE-1)*10 +1)- 1 THWID(ISET,(IPAGE-1)*10 + I)*COS(3.1416/2- 2 ATAN((THY2(ISET,(IPAGE-1)*10+0-THY1(ISET,(IPAGE-1)* 3 10 + I))/(THX2(ISET,(IPAGE-1)*10 + D-THX1(ISET,(IPAGE-1)* 4 10 + I))))THY3(ISET,(IPAGE-1)*10 +1) =THY1(ISET,(IPAGE-1)*10 + I) + 1 l'HWID(ISET,(IPAGE-1)*10 + I)*SIN(3.1416/2- 2 ATAN((-THY2(ISET,(IPAGE-1)*10+1)-THY1(ISET,(IPAGE-1)* 3 10+ I))/(THX2(ISET,(IPAGE-1)*10+ 0-THX1(ISET,(IPAGE-1)* 4 10 + I))))THX4(ISET,(IPAGE-1)*10+ I)=THX2(ISET,(IPAGE-1)*10 + I)- 1 THWID(ISET,(IPAGE-1)*10 + I)*COS(3.1416/2- 2 ATAN((THY1(ISET,(IPAGE-1)*10+1)-THY2(ISET,(IPAGE-1)* 3 10 +I))/(THX1(ISET,(IPAGE-1)*10+ D-THX2(ISET,(IPAGE-1)* 4 10 + I))))THY4(ISET,(IPAGE-1)*10+I)=THY2(ISET,(IPAGE-1)*10+I)+ 1 THWID(ISET,(IPAGE-1)*10 + I)*SIN(3.1416/2- 2 ATAN((THY1(ISET,(IPAGE-1)*10+I)-THY2(ISET,(IPAGE-1)* 3 10+ I))/(THX1(ISET,(IPAGE-1)*10+D-THX2(ISET,(IPAGE-1)* 4 10+I))))ENDIF 130 CONTINUEIF (CODE.EQ.81.ORCODE.EQ.73) THENIF (IPAGE.EQ.1) THENIPAGE= 2ELSEIPAGE= 1ENDIFGOTO 105ENDIFNO(ISET) = 0DO 128 1=1,20IF (THWID(ISET,I).GT.0) NO(ISET) = NO(ISET) + 1 128 CONTINUEDO 135 1=1,19DO 135 J=1+1,20IF (THWID(ISET,I).LT.THWID(ISET,J)) THENHOLD =THX1(ISET,I)THX1(ISET,I) =THX1(ISET,J)THX1(ISET,J) = HOLDHOLD =THY1(ISET,I)THY1(ISET,I)=THY1(ISET,J)THY1(ISET,J) = HOLDHOLD =THX2(ISET,I)THX2(ISET,I) =THX2(ISET,J)THX2(ISET,J) = HOLDHOLD =THY2(ISET,I)THY2(ISET,I) =THY2(ISET,J)THY2(ISET,J) = HOLDHOLD =THX3(ISET,I)THX3(ISET',I)=THX3(ISET,J)THX3(ISET,J) = HOLDHOLD =THY3(ISET,I)THY3(ISET,I)=THY3(ISET,J)THY3(ISET,J) = HOLDHOLD =THX4(ISET,I)THX4(ISET,I)=THX4(ISET,J)THX4(ISET,J) = HOLDHOLD =THY4(ISET,I)THY4(ISET,I) =THY4(ISET,J)THY4(ISET,J) = HOLDHOLD =THWID(ISET,I)THWID(ISET,I)=THWID(ISET,J)THWID(ISET,J) = HOLDCHOLD =THTYP(ISET,I)THTYP(ISET,I) = THTYP(ISET,J)THTYP(ISET,J) = CHOLDHOLD =THM(ISET,I)THM(ISET,I)=THM(ISET,J)THM(ISET,J) =HOLDENDIF135 CONTINUEMap of Roadside*ELSEIF (CHOICE.EQ.4) THENCALL ROADSIDE(ISET)ELSEGOTO 1ENDIFGOTO 25ELSEIF (CODE.EQ.45) THENRETURNENDIFGOTO 1END183184SUBROUTINE GRAPH2DThis subroutine is used to plot a two dimensional graphINTEGER IX1,IX2,IY1,IY2,NUMLIN,NUMPTSREAL MAXX,MAXY,MINX,MINY,X(100),Y(16,100)CHARAC1ER*1 CHCHARAC1ER*18 )(TITLE, YTITLECHARACTER*80 TITLECOMMON / GRPH2D / NUMLIN,NUMPTS,X,Y,XTITLE,YTITLE,TITLEDetermine plot scales*MAYA = X(1)MINX= X(1)MAXY = Y(1,1)MINY =Y(1,1)IF (MAXY.EQ.MINY) MAXY =MINY +1DO 10 I =1,NUMPTSIF (X(I).GT.MAXX) MAXX=X(I)IF (X(I).LT.MINX) MINX = X(I)DO 10 J=1,NUMLINIF (Y(J,I).GT.MAXY) MAXY=Y(J,I)IF (Y(J,I).LT.MINY) MINY=Y(J,I)10 CONTINUE* Draw axes*CALL CLRSCRCALL SETSCREENMODE(16)CALL DRAW (40,40,40,310,7)CALL DRAW (40,310,640,310,7)DO 15 1=1,10CALL DRAW (40,40+ (I-1)*270/10,43,40+(I-1)*270/10,7)CALL DRAW (40+I*600/10,310,40+1*600/10,307,7)15 CONTINUECALL GOTOXY (1,2)WRITE (*,20) MAXY20 FORMAT (F10.3)CALL GOTOXY (1,4)DO 30 1=1,18WRITE (*,35) YTITLE(11)35 FORMAT (1X,A1)30 CONTINUECALL GOTOXY (1,23)WRITE (*,20) MINYCALL GOTOXY (1,24)WRITE (*,40) MINX,XTITLE,MAXX40 FORMAT (4X,F10.3,18X,A18,18X,F10.3)Plot curve*DO 50 I=1,NUMLINIY2=310-(Y(I,1)-MINY)*270/(MAXY-MINY)IX2=40DO 50 J=2,NUMPTSIY1=310-(Y(1,J)-MINY)*270/(MAXY-MINY)IX1=40+(X(J)-MINX)*600/(MAXX-MINX)CALL DRAW (IX1,IY1,IX2,IY2,16-I)IY2=IY1IX2=IX150 CONTINUE**Write headingsCALL GOTOXY(1,1)WRITE (*,60) TITLE60 FORMAT (1X,A80)CALL GETICEYBOARD(CH,II)CALL SETSCREENMODE(3)RETURNEND185186SUBROUTINE ROADSIDE(ISET)*This subroutine plots a map of the roadside*INTEGER COLOUR,ISET,LASTYREAL DENOM,MEANANG,NUMER,RADIUS(4)INCLUDE 'RHSM.INS'** Titles*CALL CLRSCRCALL SETSCREENMODE(16)CALL GOTOXY(1,1)WRITE (*,60)60 FORMAT (1X,'Roadside Map')• Straight road section*IF (HCURVE(ISET).EQ.1) THENCALL GOTOXY (1,4)WRITE (*,65)65 FORMAT (79X,'20')CALL GOTOXY (2,11)WRITE (*,70)70 FORMAT (1X,'100',76X,'0')Draw basic map*CALL DRAW (30,50,30,166,7)CALL DRAW (30,50,610,50,7)CALL DRAW (30,166,610,166,7)CALL DRAW (610,50,610,166,7)*Draw roadDO 10 1=30,610,30CALL DRAW (1,202,1+15,202,14)10 CONTINUE* CALL DRAW (30,238,610,238,7)Draw terrain stripsLASTY =166COLOUR =1DO 20 I=1,NT(ISET)NEXTY=166-TY(ISET,1)*(166-50)/20CALL DRAW (30,NEXTY,610,NEXTY,7)IF (ABS(NEXTY-LASTY).GE.3) CALL FILLSHAPE (320,(NEXTY +1 LASTY)/2,COLOUR,7)LASTY=NEXTYCOLOUR=COLOUR+1IF (COLOUREQ.15) COLOUR=120 CONTINUEIF (ABS(50-LASTY).GE.3) CALL FILLSHAPE (320,(50+LASTY)/2,1 COLOUR,7)Objects187ObjectsDO 30 I=1,NO(ISET)IX1=610-THX1(ISET,I)*(610-30)/100IY1 =166-THY1(ISET,I)*(166-50)/20IX2 = 610-THX2(ISET,I)*(610-30)/1001Y2=166-THY2(ISET,I)*(166-50)/20IX3=610-THX3(ISET,I)*(610-30)/100IY3=166-THY3(ISET,I)*(166-50)/20IX4=610-THX4(ISE'T,I)*(610-30)/100IY4=166-THY4(ISET,1)*(166-50)/20CALL DRAW (IX1,1Y1,1X2,1Y2,15)CALL DRAW (IX1,1Y1,IX3,1Y3,15)CALL DRAW (IX2,1Y2,1X4,1Y4,15)CALL DRAW (IX3,1Y3,1X4,1Y4,15)30 CONTINUEDraw the DeSotosNUMER=0DENOM= 0DO 40 1=1,35NUMER=NUMER+I*2*PP(HCURVE(ISET),I)DENOM=DENOM+PP(HCURVE(ISET),1)40 CONTINUEIF (DENOM.NE.0) THENMEANANG=NUMER/DENOMELSEMEANANG=35ENDIFMEANANG = MEANANG*RADDO 50 I=1,MITER(ISET)OFFSET= XINCR(ISET)*(I-1)IX1=610-OFFSET*(610-30)/100+((WBASE(MODEL(ISET))*1.2*1 COS(MEANANG)+TRACK(MODEL(ISET))*COS(3.1416/2-MEANANG))/2-2 TRACK(MODEL(ISET))*COS(3.1416/2-MEANANG))*5.8IY1 =1661X2=1X1-TRACK(MODEL(ISET))*5.8*COS(3.1416/2-MEANANG)IY2=1Y1+TRACK(MODEL(ISE1))*5.8*SIN(3.1416/2-MEANANG)IX3=IX1+VVBASE(MODEL(ISET))*1.2*5.8*COS(MEANANG)IY3=1Y1+WBASE(MODEL(ISE1))*1.2*5.8*SIN(MEANANG)1X4=IX3-TRACK(MODEL(ISET))*5.8*COS(3.1416/2-MEANANG)IY4=1Y3+TRACIC(MODEL(ISET))*5.8*SIN(3.1416/2-MEANANG)CALL DRAW (1X1,1Y1,IX2,IY2,15)CALL DRAW (IX1,1Y1,1X3,IY3,15)CALL DRAW (1X2,1Y2,IX4,IY4,15)CALL DRAW (IX3,1Y3,IX4,IY4,15)IF (ABS(IY1-1Y4).GE.3.AND.ABS(DC2-IX3).GE.3) CALL1 FILLSHAPE ((IX2+IX3)/2,(1Y1+1Y4)/2,MODEL(ISET),15)CALL DRAW (IX1-(IX1-IX3)/3,1Y1+(1Y3-1Y1)/3,1X2-(1X2-1X4)/3,1 1Y2 + (IY4-1Y2)/3,15)CALL DRAW (IX1-2*(IX1-1X3)/3,1Y1+2*(1Y3-1Y1)/3,1 IX2-2*(1X2-1X4)/3,1Y2+2*(1Y4-1Y2)/3,15)50 CONTINUE* Curved sections*188ELSERADIUS(2) =400RADIUS(3)=200RADIUS(4) = 70IF (HCURVE(ISET).EQ.2) THENCALL GOTOXY (1,5)WRITE (*,80)80 FORMAT (78X,'20')CALL GOTOXY (1,12)WRITE (*,90)90 FORMAT (2X,'100',73X,'0')ELSEIF (HCURVE(ISET).EQ.3) THENCALL GOTOXY (1,6)WRITE (*,82)82 FORMAT (76X,'20')CALL GOTOXY (1,12)WRITE (*,92)92 FORMAT (4X,'100 9,66X,'0')ELSECALL GOTOXY (1,10)WRITE (*,84)84 FORMAT (73X,'20')CALL GOTOXY (1,14)WRITE (*,94)94 FORMAT (11X,'100',53X,'0')ENDIFDraw basic mapSCALE= (238.-50.)/(RADIUS(HCURVE(ISET))+ 26-1 (RADIUS(HCURVE(ISET))-6)*COS(100./RADIUS(HCURVE(ISET))/2))XCEN=320YCEN=50+(RADIUS(HCURVE(ISET))+26)*SCALEDO 100 A= 3.1416/2 +100./RADIUS(HCURVE(ISE 0)/2,3.1416/2-1 100./RADIUS(HCURVE(ISET))/2,-100./RADIUS(HCURVE(ISET))/20IX1=XCEN+(RADIUS(HCURVE(ISEI))+26)*COS(A)*SCALEIY1=YCEN-(RADIUS(HCURVE(ISET))+26)*SIN(A)*SCALEIX2=XCEN+(RADIUS(HCURVE(ISET))+26)*COS(A-100./1 RADIUS(HCURVE(ISET))/20)*SCALEIY2=YCEN-(RADIUS(HCURVE(ISET))+26)*SIN(A-100./1 RADIUS(HCURVE(ISET))/20)*SCALECALL DRAW (IX1,IY1,IX2,IY2,7)IX1=XCEN+(RADIUS(HCURVE(ISET))-6)*COS(A)*SCALEIY1=YCEN-(RADIUS(HCURVE(ISET))-6)*SIN(A)*SCALEIX2=XCEN+(RADIUS(HCURVE(ISET))-6)*COS(A-100./1 RADIUS(HCURVE(ISET))/20)*SCALEIY2=YCEN-(RADIUS(HCURVE(ISET))-6)*SIN(A-100./1 RADIUS(HCURVE(ISET))/20)*SCALECALL DRAW (IX1,IY1,IX2,IY2,7)IX1=XCEN+(RADIUS(HCURVE(ISET))+6)*COS(A)*SCALEIY1=YCEN-(RADIUS(HCURVE(ISET))+6)*SIN(A)*SCALEIX2 = XCEN+(RADIUS(HCURVE(ISET))+6)*COS(A-100./1 RADIUS(HCURVE(ISET))/20)*SCALEIY2=YCEN-(RADIUS(HCURVE(ISET))+6)*SIN(A-100./1 RADIUS(HCURVE(ISET))/20)*SCALECALL DRAW (IX1,IY1,IX2,IY2,7)IX1= XCEN+(RADIUS(HCURVE(ISET)))*COS(A)*SCALEIY1= YCEN-(RADIUS(HCURVE(ISET)))*SIN(A)*SCALEIX2=XCEN+(RADIUS(HCURVE(ISET)))*COS(A-100./1 RADIUS(HCURVE(ISET))/20)*SCALEIY2=YCEN-(RADIUS(HCURVE(ISET)))*SIN(A-100./1 RADIUS(HCURVE(ISET))/20)*SCALE189CALL DRAW (IX1,1Y1,IX1+(1X2-1X1)/2,1Y1+(1Y2-1Y1)/2,14)Draw terrain strips*DO 110 I= 1,NT(ISET)IX1= XCEN + (RADIUS(HCURVE(ISET)) + 6 +TY(ISET,I))*COS(A)*SCALEIY1 = YCEN-(RADIUS(HCURVE(ISET)) + 6 +TY(ISET,I))*SIN(A)*SCALE!X2 = XCEN + (RADIUS(HCURVE(ISET)) + 6 +TY(ISET,I))*COS(A-100./ 1 RADIUS(HCURVE(ISET))/20)*SCALEIY2 = YCEN-(RADIUS(HCURVE(ISET))+ 6 +TY(ISET,I))*SIN(A-100./ 1 RADIUS(HCURVE(ISE1))/20)*SCALECALL DRAW (IX1,1Y1,IX2,IY2,7) 110 CONTINUE100 CONTINUE* Draw terrain endsIX1= XCEN+ (RADIUS(HCURVE(ISET))+ 6)*COS(3.1416/2 +100./1 RADIUS(HCURVE(ISET))/2)*SCALEIY1 = YCEN-(RADIUS(HCURVE(ISET)) + 6)*SIN(3.1416/2 + 100./1 RADIUS(HCURVE(ISET))/2)*SCALEIX2 = XCEN+ (RADIUS(HCURVE(ISET))+ 26)*COS(3.1416/2 +100./1 RADIUS(HCURVE(ISET))/2)*SCALEIY2=YCEN-(RADIUS(HCURVE(ISET))+26)*SIN(3.1416/2 +100./1 RADIUS(HCURVE(ISET))/2)*SCALECALL DRAW (1X1,1Y1,IX2,IY2,7)IX1= XCEN+(RADIUS(HCURVE(ISET))+6)*COS(3.1416/2-100./1 RADIUS(HCURVE(ISET))/2)*SCALEIY1 = YCEN-(RAD IUS(HCURVE(ISET)) + 6)* SIN(3.1416/2-100./1 RADIUS(HCURVE(ISET))/2)*SCALEIX2=XCEN+(RADIUS(HCURVE(ISET))+26)*COS(3.1416/2-100./1 RADIUS(HCURVE(ISET))/2)*SCALEIY2=YCEN-(RADIUS(HCURVE(ISET))+ 26) 5SIN(3.1416/2-100./1 RADIUS(HCURVE(ISET))/2)*SCALECALL DRAW (IX1,1Y1,1X2,TY2,7)*Colour terrain strips*LASTY=YCEN-(RADIUS(HCURVE(ISET))+6)*SCALECOLOUR=1DO 120 I=1,NT(ISET)NEXTY=YCEN-(RADIUS(HCURVE(ISET))+6+TY(ISET,I))*SCALEIF (ABS(NEXTY-LASTY).GE.3) CALL FILLSHAPE (320,(NEXTY +1 LASTY)/2,COLOUR,7)LASTY = NEXTYCOLOUR= COLOUR+1IF (COLOUREQ.15) COLOUR= 1120 CONTINUEIF (ABS(50-LASTY).GE.3) CALL FILLSHAPE (320,(50 + LASTY)/2,1 COLOUR,7)ObjectsDO 130 I = 1,NO(ISET)DO 130 J=1,4IF (J.EQ.1) THENXX1=100-THX1(ISET,I)YY1 =THY1(ISET,I)XX2=100-THX2(ISET,I)YY2=THY2(ISET,I)ELSEIF (J.EQ.2) THENXX1=100-THX1(ISET,I)190YY1=THY1(ISET,I)XX2=100-THX3(ISET,I)YY2=THY3(ISET,I)ELSEIF (J.EQ.3) THENXX1=100-THX2(ISET,I)YY1=THY2(ISET,I)XX2=100-THX4(ISET,I)YY2 =THY4(ISET,I)ELSEXX1=100-THX3(ISET,I)YY1=THY3(ISET,I)XX2=100-THX4(ISET,I)YY2 =THY4(ISET,I)ENDIFIF (ABS(XX1-XX2).GT.0.1) THENYD1=YY1YD2=YY1+(YY2-YY1)/20DO 135 A=3.1416/2+ 100./RADIUS(HCURVE(ISET))/2-XX1/ 1 100.*100./RADIUS(HCURVE(ISET)),3.1416/2 + 100./ 2 RADIUS(HCURVE(ISET))/2-XX2/100.*100./ 3 RADIUS(HCURVE(ISET))-(XX1-XX2)/100.*100./ 4 RADIUS(HCURVE(ISET))/20,(XX1-XX2)/100.* 5 100./RADIUS(HCURVE(ISET))/20YD1=YD1 + (YY2-YY1)/20YD2=YD2+(YY2-YY1)/20IX1= XCEN+ (RADIUS(HCURVE(ISE1)) + 6 + YD1)*COS(A)*SCALEIY1 =YCEN-(RADIUS(HCURVE(ISET)) + 6 + YD1)*SIN(A)*SCALEIX2 = XCEN+ (RADIUS(HCURVE(ISET))+6+ YD2)* 1 COS(A+(XX1-XX2)/100.*100./RADIUS(HCURVE(ISET))/20)* 2 SCALEIY2 = YCEN-(RADIUS(HCURVE(ISET)) + 6 + YD2)* 1 SIN(A + (XX1-XX2)/100.*100./RADIUS(HCURVE(ISET))/20)* 2 SCALECALL DRAW (IX1,IY1,IX2,IY2,15) 135 CONTINUEELSEIX1= XCEN+ (RADIUS(HCURVE(ISET)) + 6 + YY1)*COS(3.1416/2+ 1 100./RADIUS(HCURVE(ISET))/2-XX1/100.*100./ 2 RADIUS(HCURVE(ISET)))*SCALEIY1 = YCEN-(RADIUS(HCURVE(ISET)) + 6 + YY1)*SIN(3.1416/2+ 1 100./RADIUS(HCURVE(ISET))/2-XX1/100.*100./ 2 RADIUS(HCURVE(ISET)))*SCALEIY2= YCEN-(RADIUS(HCURVE(ISET)) + 6 + YY2)*SIN(3.1416/2 + 1 100./RADIUS(HCURVE(ISET))/2-XX2/100.*100./ 2 RADIUS(HCURVE(ISET)))*SCALECALL DRAW (IX1,IY1,IX1,IY2,15)ENDIF130 CONTINUEDraw the DeSotosNUMER= 0DENOM = 0DO 140 I=1,35NUMER= NUMER+ I*2*PP(HCURVE(ISET),I)DENOM = DENOM + PP(HCURVE(ISET),I)140 CONTINUEIF (DENOM.NE.0) THENMEANANG= NUMER/DENOMELSEMEANANG =35ENDIF191MEANANG =MEANANG*RADDO 150 I=1,MITER(ISET)OFFSET= XINCR(ISET)*(I-1)IX1 = XCEN+(RADIUS(HCURVE(ISET))+ 6)*COS(3.1416/2-1 100./RADIUS(HCURVE(ISET))/2 + OFFSET/100.* 100./2 RADIUS(HCURVE(ISET)))*SCALEIY1=YCEN-(RADIUS(HCURVE(ISET)) +6)*SIN(3.1416/2-1 100./RADIUS(HCURVE(ISET))/2+ OFFSET/100.'100./2 RADIUS(HCURVE(ISET)))*SCALEIX2 = IX1-TRACK(MODEL(ISET))*SCALE*COS(3.1416/2-MEANANG-1 (3.1416/2-100./RADIUS(HCURVE(ISET))/2-OFFSET/100.'100./2 RADIUS(HCURVE(ISET))))IY2= IY1 +TRACK(MODEL(ISET))*SCALE*SIN(3.1416/2-MEANANG-1 (3.1416/2-100./RADIUS(HCURVE(ISET))/2-OFFSET/100.'100./2 RADIUS(HCURVE(ISET))))IX3=1X1+WBASE(MODEL(ISET))*1.2*SCALE*COS(MEANANG+1 (3.1416/2-100./RADIUS(HCURVE(ISET))/2-OFFSET/100.*100./2 RADIUS(HCURVE(ISET))))IY3=1Y1+WBASE(MODEL(ISET))*1.2*SCALE*SIN(MEANANG+1 (3.1416/2-100./RADIUS(HCURVE(ISET))/2-OFFSET/100.*100./2 RADIUS(HCURVE(ISET))))IX4 =IX3-TRACK(MODEL(ISET))*SCALE*COS(3.1416/2-MEANANG-1 (3.1416/2-100./RADIUS(HCURVE(ISET))/2-OFFSET/100.*100./2 RADIUS(HCURVE(ISET))))IY4=1Y3 +TRACK(MODEL(ISET))*SCALE*SIN(3.1416/2-MEANANG-1 (3.1416/2-100./RADIUS(HCURVE(ISET))/2-OFFSET/100.*100./2 RADIUS(HCURVE(ISET))))CALL DRAW (1X1,1Y1,IX2,IY2,15)CALL DRAW (1X1,1Y1,IX3,IY3,15)CALL DRAW (IX2,1Y2,1X4,1Y4,15)CALL DRAW (1X3,1Y3,IX4,IY4,15)IF (ABS(IY1-1Y4).GE.3.AND.ABS(IX2-1X3).GE.3) CALL1 FILLSHAPE ((IX2+IX3)/2,(1Y1+1Y4)/2,MODEL(ISET),15)CALL DRAW (IX1-(IX1-IX3)/3,1Y1+(1Y3-1Y1)/3,1X2-(1X2-1X4)/3,1 IY2 + (IY4-1Y2)/3,15)CALL DRAW (IX1-2*(1X1-1X3)/3,1Y1+2*(1Y3-1Y1)/3,1 DC2-2*(DC2-1X4)/3,1Y2+2*(IY4-1Y2)/3,15)150 CONTINUEENDIF*Draw messagesCALL GOTOXY (1,18)WRITE (*,390)390 FORMAT (3X,'Terrain changes are represented by coloured strips',1 ' parallel to the road')WRITE (*,400)400 FORMAT (3X,'Roadside objects are represented by white rectangles')WRITE (*,410)410 FORMAT (3X,'Encroachment points and mean departure angles')WRITE (*,420)420 FORMAT (4X,'are shown using cars leaving the road')WRITE (*,*)WRITE (*,430)430 FORMAT (3X,'Press any key to return to edit menu')CALL GETKEYBOARD(CH,II)CALL SETSCREENMODE(3)RETURNEND192SUBROUTINE ECONOMICThis subroutine is used to edit economic evaluation parametersINTEGER CF,CHOICE,CODE,COLUMN,IPAGE,MENU,NSET,POS,ROWWCHARAC1ER*1 CHCHARACTER*12 FILNAMCHARAC1'ER*76 FIELD(120)INCLUDE 'RHSM.INS'COMMON /SCRN/ FIELD5 Load evaluation type menu1 WRITE ( 5 , 5 ) CHAR(255),CHAR(255),'EDIT-EV/'IF (BC.EQ.1) FIELD(1)='Y'IF (BC.EQ.0) FIELD(1)='N'IF (CE EQ 1) FIELD(2)='Y'IF (CE.EQ.0) FIELD(2)='N'CODE=0POS =0CF = 0FILNAM = 'EDIT-EV'5 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) RETURNIF (CODE.NE.48.AND.CODE.NE.46.AND.CODE.NE .45) GOTO 5IF (FIELD(1).EQ.'Y') BC= 1IF (FIELD(1) EQ.'N') BC =0IF (FIELD(2).EQ.'Y') CE= 1IF (FIELD(2).EQ.'N') CE= 0OPTION(9) = FIELD(1)OPTION(10) = FIELD(2)■Benefit Cost analysis5IF (CODE.EQA8.AND.BC.EQ.1) THEN15 WRITE ( 5 , 5 ) CHAR(255),CHAR(255),'EDIT-BC/'READ ( 5,10) CHOICE10 FORMAT (13)5Encroachment RateIF (CHOICE.EQ.1) THEN55 Enter encroachment rate or choose to calculate it17 WRITE (5 , 5) CHAR(255),CHAR(255),'ENCROACH/'WRITE (FIELD(1),20) ENCRATE20 FORMAT (F8.4)CODE= 0CF = 0POS= 0FILNAM='ENCRCH1'CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 15READ (FIELD(1),20) ENCRATEEnter parameters to calculate encroachment rateIF (ENCRATE.EQ.0) THENIPAGE= 1193** Page 133 IF (IPAGE.EQ.1) THENMENU =1WRITE (*,*) CHAR(255),CHAR(255),'ENCROACH/'WRITE (*,*) CHAR(255),CHAR(255),'ENCRSUB/'CALL GOTOXY(19,15+RDCLASS)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(35,15+DESSPD)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(47,15 + LANEWID)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(64,15+NUMLANE)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(76,15+SHLDWID)CALL PUTCHATTR(CHAR(17),1,2,1)30 WRITE (FIELD(1),25) ADT25 FORMAT (18)CODE= 0CF= 0POS =0FILNAM = 'ENCRSUB'CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 17READ (FIELD(1),25) ADTIF (CODE.EQ.73.ORCODE.EQ.81) THENIPAGE= 2GOTO 33ELSEIF (CODE.EQ.45) THENGOTO 15ENDIFCALL CURSOROFF35 IF (MENU.EQ.1) THENCHOICE= RDCLASSCOLUMN=19EISELE (MENU.EQ.2) THENCHOICE= DESSPDCOLUMN=35ELSEIF (MENU.EQ.3) THENCHOICE= LANEWIDCOLUMN=47ELSEIF (MENU.EQ.4) THENCHOICE= NUMLANECOLUMN = 64ELSECHOICE = SHLDWIDCOLUMN= 76ENDIF40 CALL GOTOXY(COLUMN,15 + CHOICE)CALL PUTCHATTR(CHAR(17),1,10,1)CALL GETKEYBOARD(CH,CODE)IF (CODE.EQ.1) GOTO 17IF (CODE.EQ.72) THENCALL PUTCHATTR(",1,10,1)CHOICE= CHOICE-1IF (CHOICE.EQ.0) CHOICE=5ELSEIF (CODEEQ.80) THENCALL PUTCHATTR(" 9 1,10,1)CHOICE= CHOICE+ 1IF (CHOICE.EQ.6) CHOICE= 1194ELSEIF (CODE.EQ.75.0R.CODE.EQ.77.0R.CODE.EQ.73.0R.1 CODE. EQ.81.0R.CODE.EQ.45) THENCALL PUTCHATTR(CHAR(17),1,2,1)IF (MENU.EQ.1) THENRDCLASS = CHOICEELSEIF (MENU.EQ.2) THENDESSPD = CHOICEELSEIF (MENU.EQ.3) THENLANEWID = CHOICEELSEIF (MENU.EQ.4) THENNUMLANE= CHOICEELSESHLDWID = CHOICEENDIFIF (CODE.EQ.75) THENIF (MENU.EQ.1) GOTO 30MENU = MENU-1GOTO 35ELSEIF (CODE.EQ.77) THENIF (MENU.EQ.5) GOTO 30MENU= MENU +1GOTO 35ELSEIF (CODE.EQ.45) THENGOTO 15ELSEIPAGE=2GOTO 33ENDIFENDIFGOTO 40* Page 2ELSEWRITE-(*,*) CHAR(255),CHAR(255),'ENCRCH2/'MENU = 1CALL GOTOXY(27,10+HORCURVE)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(45,10+VERCURVE)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(79,10+ CLIMATE)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(27,18 +TRAFFIC)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(55,18 + SIGHT)CALL PUTCHATTR(CHAR(17),1,2,1)CALL CURSOROFF50 IF (MENU.EQ.1) THENCHOICE = HORCURVECOLUMN= 27ROWW = 10ELSEIF (MENU.EQ.2) THENCHOICE= VERCURVECOLUMN =45ROWW = 10ELSEIF (MENU.EQ.3) THENCHOICE= CLIMATECOLUMN = 79ROWW =10195ELSEIF (MENU.EQ.4) THENCHOICE=TRAFFICCOLUMN = 27ROWW =18ELSECHOICE= SIGHTCOLUMN =55ROWW =18ENDIF60 CALL GOTOXY(COLUMN,ROWW+ CHOICE)CALL PUTCHATTR(CHAR(17),1,10,1)CALL GETKEYBOARD(CH,CODE)IF (CODE.EQ.1) GOTO 17IF (CODE.EQ.72) THENCALL PUTCHATTR(",1,10,1)CHOICE = CHOICE-1IF (CHOICEEQ.0) CHOICE= 6ELSEIF (CODE.EQ.80) THENCALL PUTCHATTR(",1,10,1)CHOICE= CHOICE+ 1IF (CHOICEEQ.7) CHOICE=1ELSEIF (CODE.EQ.75.0R.CODE.EQ.77.0ILCODE.EQ.73.0R.1 CODE.EQ.81.0R.CODE.EQ.45) THENCALL PUTCHATTR(CHAR(17),1,2,1)IF (MENU.EQ.1) THENHORCURVE= CHOICEELSEIF (MENU.EQ.2) THENVERCURVE= CHOICEELSEIF (MENU.EQ.3) THENCLIMATE= CHOICEELSEIF (MENU.EQ.4) THENTRAFFIC= CHOICEELSESIGHT= CHOICEENDIFIF (CODE.EQ.75) THENMENU = MENU-1IF (MENU.EQ.0) MENU =5GOTO 50ELSEIF (CODE.EQ.77) THENMENU = MENU +1IF (MENU.EQ.6) MENU =1GOTO 50ELSEIF (CODE.EQ.45) THENGOTO 15ELSEIPAGE= 1GOTO 33ENDIFENDIFGOTO 60ENDIFELSEGOTO 15ENDIF* Accident costs196Accident costsELSEIF (CHOICE.EQ.2) THENWRITE ( 5 , 5 ) CHAR(255),CHAR(255),'ACC-COST/'DO 70 1=1,2DO 70 J=1,4WRITE (FIELD((.1-1) 53+ 0,80) ACCOST(I,J)80 FORMAT (F10.2)WRITE (FIELD(J 53),80) ACCOST(1,J)+ACCOST(2,J)70 CONTINUECODE=0CF= 0POS=0FILNAM = 'ACC-COST'85 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 15IF (CODE.NE.20.AND.CODE.NE.45) GOTO 85DO 90 I=1,2DO 90 J=1,4READ (FIELD((J-1) 53+I),80) ACCOST(I,J)90 CONTINUEIF (CODE.EQ.20) THENDO 100 I=1,4WRITE (FIELD(I 53),80) ACCOST(1,I)+ACCOST(2,1)100 CONTINUEELSEIF (CODE.EQ.45) THENGOTO 15ENDIFGOTO 85*Mitigation costsELSEIF (CHOICE.EQ.3) THENCALL MITIGATIONGOTO 15*Present Value and Capital Recovery Data*ELSEIF (CHOICE.EQ.4) THENWRITE ( 5 , 5 ) CHAR(255),CHAR(255),'PV-CREEN/'WRITE (FIELD(1),170) INTEREST170 FORMAT (F5.2)WRITE (FIELD(2),180) PERIOD180 FORMAT (14)CODE= 0CF=0POS =0FILNAM = 'PV-CR'190 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 15IF (CODE.NE.45) GOTO 190READ (FIELD(1),170) INTERESTREAD (FIELD(2),180) PERIODGOTO 15ELSEGOTO 1ENDIFCost Effectiveness AnalysisCost Effectiveness AnalysisELSEIF (CODE.EQ.46.AND.CE.EQ.1) THEN201 WRITE (*,*) CHAR(255),CHAR(255),'EDIT-CE/'READ (*,10) CHOICECost Effectiveness WeightingsIF (CHOICE.EQ.1) THENWRITE (*,*) CHAR(255),CHAR(255),'COSTEFF/DO 200 I=1,4WRITE (FIELD(I),210) SEVERITY(I)210 FORMAT (I11)200 CONTINUECODE = 0CF=0POS = 0FILNAM = 'COSTEFF'205 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 201IF (CODE.NE.45) GOTO 205DO 220 I=1,4READ (FIELD(I),210) SEVERITY(I)220 CONTINUEMitigation costsELSEIF (CHOICE.EQ.2) THENCALL MITIGATIONELSEGOTO 1ENDIFGOTO 201ELSEIF (CODE.EQ.45) THENRETURNENDIFGOTO 1END197198SUBROUTINE MITIGATIONThis subroutine edits mitigation cost dataINTEGER CF,CODE,ISET,POSCHARACTER*12 FILNAMCHARACIER*76 FIELD(120)INCLUDE 'RHSM.INS'COMMON /SCRN/ FIELDISET= 0114 ISET=ISET + 1IF (ISET.EQ.11) RETURNIF (ICHAR(111LE(ISET)(1:1)).EQ.32.0R.ICHAR(111LE(ISET)(1:1)).EQ.1 0) GOTO 114115 WRITE (*,*) CHAR(255),CHAR(255),'MIT-COST/'WRITE (FIELD(1),10) ISET10 FORMAT (I3)FIELD(2) =TITLE(ISET)IF (BARRIER(ISET).EQ.0) FIELD(3)='N'IF (BARRIER(ISE1).EQ.1) FIELD(3)='Y'WRITE (FIELD(4),120) BINSTALL(ISET)120 FORMAT (F9.2)WRITE (FIELD(5),120) BMAINT(ISET)IF (SLOPE(ISET).EQ.0) FIELD(6)='N'IF (SLOPE(ISET).EQ.1) FTELD(6)='Y'WRITE (FIELD(7),120) CUTCOSTWRITE (FIELD(8),120) FILLCOSTWRITE (FIELD(9),120) WASTCOSTWRITE (FIELD(10),120) ADFCOSTWRITE (FIELD(11),120) CFMAINT(ISET)IF (OREMOVE(ISET).EQ.0) FIELD(12)='N'IF (OREMOVE(ISET).EQ.1) FIELD(12)='Y'DO 130 1=1,3WRITE (FIELD(13+(1-1)*2),10) NREMOVE(ISET,I)WRITE (FIELD(14+(1-1)*2),120) CREMOVE(ISET,I)130 CONTINUEIF (ROW(ISET).EQ.0) FIELD(19)='N'IF (ROW(ISET).EQ.1) FIELD(19)='Y'WRITE (FIELD(20),120) COSTROW(ISET)CODE=0CF=0POS = 0FILNAM = 'MIT-COST'135 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) RETURNIF (CODE.NE.45.AND.CODE.NE.73AND.CODE.NE.81) GOTO 135IF (FIELD(3).EQ.'N') BARRIER(ISET)=0IF (FIELD(3).EQ.'Y') BARRIER(ISET)=1READ (FIELD(4),120) BINSTALL(ISET)READ (FIELD(5),120) BMAINT(ISET)IF (FIELD(6).EQ.'N') SLOPE(ISET)=0IF (FIELD(6).EQ.'Y') SLOPE(ISET) = 1READ (FIELD(7),120) CUTCOSTREAD (FIELD(8),120) FILLCOSTREAD (FIELD(9),120) WASTCOSTREAD (FIELD(10),120) ADFCOSTREAD (FIELD(11),120) CFMAINT(ISE1)IF (FIELD(12).EQ.'N') OREMOVE(ISET) = 0IF (FIELD(12).EQ.'Y') OREMOVE(ISET) = 1199DO 140 I=1,3READ (FIELD(13+(I-1)*2),10) NREMOVE(ISET,I)READ (FIELD(14 + (I-1)*2),120) CREMOVE(ISET,I)140 CONTINUEIF (FIELD(19).EQ.'N') ROW(ISET)= 0IF (FIELD(19).EQ.'Y') ROW(ISET) = 1READ (FIELD(20),120) COSTROW(ISET)IF (CODE.EQ.73) THEN150 ISET= ISET-1IF (ISET.EQ.0) ISET=10IF (ICHAR(ITTLE(ISET)(1:1)).EQ.32.0R.ICHAR(111 LE(ISET)(1:1)).1 EQ.0) GOTO 150ELSEIF (CODE.EQ.81) THEN160 ISET = ISET + 1IF (ISET.EQ.11) ISET= 1IF (ICHAR(11TLE(ISET)(1:1)).EQ.32.0R.ICHAR(1111E(ISET)(1:1)).1 EQ.0) GOTO 160ELSERETURNENDIFGOTO 115END200SUBROUTINE TRAJECTThis subroutine plots single trajectories given a set of initialconditionsINTEGER CODE, CF, ISET, POS, RUNTYPEREAL LASTY,RADIUS(4)CHARACIER*1 CH •CHARAC1ER*12 FILNAMCHARAC1ER*76 FIELD(120)INCLUDE 'RHSM.INS'COMMON /SCRN/ FIELDReset trajectory variablesIENCR= 0INTTVEL= 0INITANG =0Choose input set*12 WRITE (*,*) CHAR(255),CHAR(255),'TRAJECT1/'DO 22 1=1,10DO 22 J=1,50CALL GOTOXY (21 +J,7 + I)CALL PUTCHAR(11TLE(I)(J:J),1)22 CONTINUE32 WRITE (*,*) CHAR(255),CHAR(255),'DISPLAY4/'READ (*,42) ISET42 FORMAT (I3)IF (ISET.EQ.11) RETURNIF (ICHAR(111'LE(ISET)(1:1)).EQ.O.ORICHARCITTLE(ISET)(1:1)).1 EQ.32) GOTO 32* Enter initial variables43 WRITE (*,*) CHAR(255),CHAR(255),'TRAJECT/'FIELD(1) =TITLE(ISET)WRITE (FIELD(2),52) IENCR52 FORMAT (I8)WRITE (FIELD(3),52) MITER(ISET)WRITE (FIELD(4),62) XINCR(ISET)62 FORMAT (F8.2)WRITE (FIELD(5),62) INITVELWRITE (FIELD(6),62) VMEAN(ISET)WRITE (FIELD(7),62) VSD(IS 31)WRITE (FTELD(8),62) VMIN(ISET)WRITE (FIELD(9),62) INITANGRead trajectory parametersCODE=0POS =0CF=0FILNAM = TRAJECT'CALL SCREENIO(FTLNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 12READ (FIELD(2),52) IENCRREAD (FIELD(5),62) INITVELREAD (FIELD(9),62) INITANG**201• Draw map on screen*CALL CLRSCRCALL SETSCREENMODE(16)CALL GOTOXY(1,1)WRITE (*,61) ISET,IENCR,INITANG,INITVEL61 FORMAT (1X,'Trajectory Plot: ISET = ',I2,' EN = IA =1 F'8.2,' IV = ',F8.2)** Straight road section*IF (HCURVE(ISET).EQ.1) THENCALL GOTOXY (1,4)WRITE (*,65)65 FORMAT (79X,'20')CALL GOTOXY (2,11)WRITE (*,70)70 FORMAT (1X,'100',76X,'0')• Draw basic map*CALL DRAW (30,50,30,166,7)CALL DRAW (30,50,610,50,7)CALL DRAW (30,166,610,166,7)CALL DRAW (610,50,610,166,7)Draw terrain stripsLASTY =166DO 20 I=1,NT(ISET)NEXTY=166-TY(ISET,I)*(166-50)/20CALL DRAW (30,NEXTY,610,NEXTY,7)LASTY=NEXTY20 CONTINUEObjectsDO 30 I=1,NO(ISET)IX1=610-THX1(ISET,I)*(610-30)/100IY1=166-THY1(ISET,I)*(166-50)/20IX2=610-THX2(ISET,I)*(610-30)/100IY2=166-THY2(ISE1',I)*(166-50)/20IX3=610-THX3(ISET,I)*(610-30)/100IY3=166-THY3(ISET,I)*(166-50)/20IX4=610-THX4(ISET,I)*(610-30)/100IY4=166-THY4(ISET,I)*(166-50)/20CALL DRAW (IX1,IY1,IX2,IY2,15)CALL DRAW (IX1,IY1,IX3,IY3,15)CALL DRAW (IX2,IY2,IX4,IY4,15)CALL DRAW (IX3,IY3,IX4,IY4,15)30 CONTINUE* Curved sectionsELSERADIUS(2) ,m)RADIUS(3) = 200RADIUS(4) = 70202IF (HCURVE(ISET).EQ.2) THENCALL GOTOXY (1,5)WRITE (*,80)80 FORMAT (78X,'20')CALL GOTOXY (1,12)WRITE (*,90)90 FORMAT (2X,'100',73X,'0')ELSEIF (HCURVE(ISET).EQ.3) THENCALL GOTOXY (1,6)WRITE (*,82)82 FORMAT (76X,'20')CALL GOTOXY (1,12)WRITE (*,92)92 FORMAT (4X,'100',66X,'0')ELSECALL GOTOXY (1,10)WRITE (*,84)84 FORMAT (73X,'20')CALL GOTOXY (1,14)WRITE (*,94)94 FORMAT (11X,'100',53X,'0')ENDIFDraw basic mapSCALE= (238.-50.)/(RADIUS(HCURVE(ISET))+26-1 (RADIUS(HCURVE(ISET))-6)*COS(100./RADIUS(HCUR'VE(ISET))/2))XCEN=320YCEN=50+ (RADIUS(HCURVE(ISET))+26)*SCALEDO 100 A =3.1416/2 + 100./RADIUS(HCURVE(ISET))/2,3.1416/2-1 100./RADIUS(HCURVE(ISEI))/2,-100./RADIUS(HCURVE(ISET))/20IX1=XCEN+(RADIUS(HCURVE(ISET))+26)*COS(A)*SCALEIY1=YCEN-(RADIUS(HCURVE(ISET))+26)*SIN(A)*SCALEIX2= XCEN+ (RADIUS(HCURVE(ISET))+26)*COS(A-100./1 RADIUS(HCURVE(ISET))/20)*SCALEIY2=YCEN-(RADIUS(HCURVE(ISET))+26)*SIN(A-100./1 RADIUS(HCURVE(ISET))/20)*SCALECALL DRAW (IX1,1Y1,IX2,IY2,7)IX1= XCEN+(RADIUS(HCURVE(ISET))+6)*COS(A)*SCALEIY1=YCEN-(RADIUS(HCURVE(ISEI))+6)*SIN(A)*SCALEIX2 = XCEN+ (RADIUS(HCURVE(ISET))+6)*COS(A-100./1 RADIUS(HCURVE(ISEI))/20)*SCALEIY2=YCEN-(RADIUS(HCURVE(ISEI))+6)*SIN(A-100./1 RADIUS(HCURVE(ISET))/20)*SCALECALL DRAW (1X1,1Y1,IX2,IY2,7)*Draw terrain strips*DO 110 I =1,NT(ISET)IX1= XCEN+ (RADIUS(HCURVE(ISET)) + 6 +TY(ISET,I))*COS(A)*SCALEIY1=YCEN-(RADIUS(HCURVE(ISET))+ 6 +TY(ISET,I))*SIN(A)*SCALEIX2 = XCEN+ (RADIUS(HCURVE(ISET)) + 6 +TY(ISET,I))*COS(A-100./ 1 RADIUS(HCURVE(ISET))/20)*SCALEIY2 = YCEN-(RADIUS(HCURVE(ISET)) + 6 + TY(ISET,I))*SIN(A-100./ 1 RADIUS(HCURVE(ISET))/20)*SCALE. CALL DRAW (IX1,1Y1,IX2,IY2,7) 110 CONTINUE100 CONTINUE203** Draw terrain endsIX1= XCEN + (RADIUS(HCURVE(ISET))+ 6)*COS(3.1416/2 +100./1 RADIUS(HCURVE(ISET))/2)*SCALEW1=YCEN-(RADIUS(HCURVE(ISEI))+6)*SIN(3.1416/2 +100./1 RADIUS(HCURVE(ISET))/2)*SCALEIX2= XCEN + (RADIUS(HCURVE(ISET)) + 26)*COS(3.1416/2 +100./1 RADIUS(HCURVE(ISET))/2)*SCALEIY2 =YCEN-(RADIUS(HCURVE(ISET)) + 26)*SIN(3.1416/2 +100./1 RADIUS(HCURVE(ISET))/2)*SCALECALL DRAW (IX1,IY1,IX2,IY2,7)IX1=XCEN+(RADIUS(HCURVE(ISET))+6)*COS(3.1416/2-100./1 RADIUS(HCURVE(ISET))/2)*SCALEIY1=YCEN-(RADIUS(HCURVE(ISET))+6)*SIN(3.1416/2-100./1 RADIUS(HCURVE(ISET))/2)*SCALEIX2=XCEN+(RADIUS(HCURVE(ISET))+26)*COS(3.1416/2-100./1 RADIUS(HCURVE(ISET))/2)*SCALEW2 =YCEN-(RADIUS(HCURVE(ISET)) + 26)*SIN(3.1416/2-100./1 RADIUS(HCURVE(ISET))/2)*SCALECALL DRAW (IX1,IY1,DC2,IY2,7)ObjectsDO 130 I =1,NO(ISET)DO 130 J=1,4IF (J.EQ.1) THENXX1=100-THX1(ISET,I)YY1=THY1(ISET,I)XX2=100-THX2(ISET,I)YY2 =THY2(ISET,I)ELSEIF (J.EQ.2) THENXX1=100-THX1(ISET,I)YY1=THY1(ISE'T,I)XX2=100-THX3(ISET,I)YY2=THY3(ISET,I)ELSEIF (J.EQ.3) THENXX1=100-THX2(ISET,I)YY1=THY2(ISET,I)XX2=100-THX4(ISET,I)YY2=THY4(ISET,I)ELSEXX1=100-THX3(ISET,I)YY1=THY3(ISET,I)XX2=100-THX4(ISET,I)YY2 =THY4(ISET,I)ENDIFYD1=YY1YD2=YY1+(YY2-YY1)/20DO 130 A=3.1416/2 + 100./RADIUS(HCURVE(ISET))/2-XX1/1 100.*100./RADIUS(HCURVE(ISET)),3.1416/2 +100./2 RADIUS(HCURVE(ISE'T))/2-XX2/100.*100./3 RADIUS(HCURVE(ISET))-(XX1-XX2)/100.*100./4 RADIUS(HCUR'VE(ISET))/20,(XX1-XX2)/100.*5 100./RADIUS(HCURVE(ISET))/20YD1=YD1+(YY2-YY1)/20YD2=YD2+(YY2-YY1)/20IX1= XCEN+ (RADIUS(HCURVE(ISET)) + 6 + YD1)*COS(A)*SCALEIY1 =YCEN-(RADIUS(HCURVE(ISE1)) + 6 + YD1)*SIN(A)*SCALEIX2 = XCEN+ (RADIUS(HCURVE(ISET))+ 6 + YD2)*1 COS(A+(XC1-XX2)/100.*100./RADIUS(HCURVE(ISEI))/20)*2 SCALE**204IY2 = YCEN-(RADIUS(HCURVE(ISET))+ 6 + YD2)*1 SIN(A+ (XX1-XX2)/100.*100./RADIUS(HCURVE(ISET))/20)*2 SCALECALL DRAW (IX1,IY1,IX2,IY2,15)130 CONTINUEENDIF* Draw cross section*CALL DRAW (40,213,40,313,7)CALL DRAW (40,313,600,313,7)IF (NT(ISET).EQ.0) THENCALL DRAW (40,225,600,225,2)ELSEMINZ = 0MAXZ = 0Z=0DO 160 I =1,NT(ISET)IF (I.LT.NT(ISET)) THENZ= Z+ (TY(ISET,I+1)-TY(ISET,I))*TAN(TA(ISET,I)*RAD)ELSEZ=Z+ (20.0-TY(ISET,I))*TAN(TA(ISET,I)*RAD)ENDIFIF (Z.GT.MAXZ) MAXZ=ZIF (Z.LT.MINZ) MINZ= Z160 CONTINUEIF (MAXZ EQ MINZ) MAXZ = MINZ + 1IX1 = 40IY1=313-(0.0-MINZ)/(MAXZ-MINZ)*(313-213)Z=0DO 170 I = 1,NT(ISET)1X2 =40 +TY(ISET,I)/20.0*560IY2=313-(Z-MINZ)/(MAXZ-MINZ)*(313-213)CALL DRAW (IX1,IY1,IX2,IY2,2)IF (I.LT.NT(ISET)) THENZ=Z+ (TY(ISET,I +1)-TY(ISET,I))*TAN(TA(ISET,I)*RAD)ELSEZ= Z+ (20.0-TY(ISET,I))*TAN(TA(ISET,I)*RAD)ENDIFIX1=IX2IY1=IY2170 CONTINUEIX2 = 600IY2=313-(Z-MINZ)/(MAXZ-MINZ)*(313-213)CALL DRAW (IX1,IY1,DC2,IY2,2)ENDIFCALL GOTOXY(1,15)WRITE (*,172) MAXZ172 FORMAT (1X,F4.0)CALL GOTOXY(1,21)WRITE (*,172) MINZCALL GOTOXY (1,23)WRITE (*,173)173 FORMAT (5X,'0',67X,'20')* Put input data into proper unitsINITVEL = INITVEL / 3.6REST(ISET) = REST(ISET) / 100.S1 bER(ISET) = STEER(ISET) * RADDO 140 J=1,NT(ISET)TA(ISET,J) = TA(ISET,J) * RAD140 CONTINUEANGLE=INITANG*RADPlot trajectoryRUNTYPE=2CALL SIMULATE(ISET,RUNTYPE)Reset input data unitsINITVEL = 3.6 * INITVELREST(ISET) = 100. * REST(ISET)STEER(ISET) = STEER(ISET) / RADDO 150 J=1,NT(ISET)TA(ISET,J) = TA(ISET,J) / RAD150 CONTINUECALL GETKEYBOARD(CH,II)CALL SETSCREENMODE(3)CALL CLRSCRGOTO 43END205206SUBROUTINE RUNThis subroutine runs the RHSM analysisINTEGER ISET,NITER,RUNTYPELOGICAL KYPINCLUDE 'RHSM.INS'For every input setDO 10 ISET=1,10IF (ICHARCIT1LE(ISET)(1:1)).NE.O.ANDICHAR(TITLE(ISET)(1: 1)).1 NE.32) THEN*Put input data into proper units*VMEAN(ISET) = VMEAN(ISET) / 3.6VSD(ISET) = VSD(ISET) / 3.6VMIN(ISET) = VMIN(ISET) / 3.6BRAICE(ISET) = BRAKE(ISET) / 100.REST(ISE1) = REST(ISET) / 100.STEER(ISET) = STEER(ISET) * RADDO 15 J=1,NT(ISET)TA(ISET,J) = TA(ISET,J) * RAD15 CONTINUEReset results variablesDATA(ISET,1) = 0DATA(ISET,2) = 0DATA(ISET,3) = 0DATA(ISET,4) =0NCALLS(ISET)= 0NROLLS(ISET) = 0NIROL(ISET)=0NJR0L(ISET)=0Percent complete messageCALL CLRSCRCALL CURSOROFFWRITE (*,18) ISET18 FORMAT (1X,'Input Set ',I2,' (Press <ESC> to abort)')WRITE (*,*) ' Percent Complete'WRITE (*,*)NITER= MITER(ISET)*68.0/AINCR(ISET)For every encroachment point* DO 20 IENCR=1,MITER(ISET)For every encroachment angleDO 20 INITANG=2.0,70.0,AINCR(ISET)Update percent complete messageCALL GOTOXY(1,4)WRITE (*,*) INTWINITANG-2.0)/AINCR(ISET)+(IENCR-1)*1 68.0/AINCR(ISET))*100/NITER)207For every encroachment velocityDO 20 INITVEL=VMIN(ISET),150.0/3.6,(VINCR(ISET)*1 VSD(ISET))Check if user pressed escapeCALL KEYPRESSED(KYP)IF (KYP) THENCALL GETKEYBOARD(CH,II)IF (II.EQ.1) THENDONE=0VMEAN(ISE1) = 3.6 * VMEAN(ISET)VSD(ISET) = 3.6 VSD(ISET)VMIN(ISET) = 3.6 * VMIN(ISET)BRAKE(ISET) = 100. * BRAKE(ISET)REST(ISET) = 100. * REST(ISET)S1EER(ISET) = STEER(ISE1) / RADDO 21 J=1,NT(ISET)TA(ISET,J) = TA(ISET,J) / RAD21 CONTINUERETURNENDIFENDIFANGLE=INITANG•RADNCALLS(ISET) = NCALLS(ISET) + 1Simulate vehicle on trajectory and update resultsNote: RUNTYPE distinguishes this analysis from a trajectory plotRUNTYPE=1CALL SIMULATE(ISET,RUNTYPE)20 CONTINUEPerform economic analysisCALL ECONRUN(ISET)Reset input data unitsVMEAN(ISET) = 3.6 * VMEAN(ISET)VSD(ISET) = 3.6 VSD(ISET)VMIN(ISET) = 3.6 * VMIN(ISET)BRAKE(ISET) = 100. * BRAKE(ISET)REST(ISET) = 100. REST(ISET)S1EER(ISET) = S1EER(ISET) / RADDO 26 J=1,NT(ISET)TA(ISET,J) = TA(ISET,J) / RAD26 CONTINUEENDIF10 CONTINUECALL CURSORONDONE= 1RETURNEND208SUBROUTINE SIMULATE(ISET,RUNTYPE)This subroutine simulates a vehicle driving over a singletrajectoryINTEGER DIVEIN,ISET,ROLL,RUNTYPEREAL LASFELEV,PANG,PVEL,RADIUS(4),TIMEINCLUDE 'RHSM.INS'Velocity and angle probability for RHSM analysisIF (RUNTYPE.EQ.1) THENPVEL=(1/(VSD(ISET)*SQRT(2*PI))*EXP(-0.5*((INITVEL-VINCR(ISET)*VSD(ISET)/2-VMEAN(ISET))/VSD(ISET))**2)+1/(VSD(ISET)*SQRT(2*P1))*EXP(-0.5*((INTIVEL+VINCR(ISET)*VSD(ISET)/2-VMEAN(ISET))/VSD(ISET))**2))/2*VINCR(ISET)*VSD(ISET)PANG = (PP(HCURVE(ISET),INT(INITANG/2))+ (INITANG-2*INT(INITANG/2))/2.0*(PP(HCURVE(ISET),INT(INITANG/2) + 1)-PP(HCURVE(ISET),INT(INITANG/2))))/NOBS(HCURVE(ISET))ENDIFDetermine initial location, velocity and accelerationXX= (IENCR-1)*XINCR(ISE 1 )YY =0LASTXX= XXLASTYY =YYVELOCITY = INITVELACCEL= 0TSTRIP =0ELEVATION = 0LAS 1 ELEV = 0GROUND =0 •FLYING = 0VANGLE=0Reset passing of object flags*DO 22 K=1,NO(ISET)PASTOBJ(K)= 0 '22 CONTINUE*First terrain stripOTSTRIP =TSTRIP23 IF (I51'RIP.LT.NT(ISE1)) THENIF (YY.GE.TY(ISET,TSTRIP +1)) THENTSTRIP =TSTRIP + 1GOTO 23ENDIFENDIFIncrement time through trajectoryDO 21 TIME = 0.0,TMAX(ISET),TI(ISET)Current location, ground elevation and vehicle elevation***209Current location, ground elevation and vehicle elevationROLL= 0DIVEIN= 0IF (1'STRIP.GE.1) THENLASTXX = XXXX = XX +VELOCITY*TI(ISET)*COS(ANGLE)*COS(VANGLE)LASTYY =YYYY =YY+'VELOCITY*TI(ISET)*SIN(ANGLE)*COS(VANGLE)Terrain changes*OTSTRIP =TSTRIP50 IF (TSTRIP.LT.NT(ISET)) THENIF (YY.GETY(ISET,TSTRIP +1)) THENTSTRIP =TSTRIP +1GOTO 50ENDIFENDIFGROUND = GROUND +VELOCITY*TI(ISET)*TAN(TA(ISET,TSTRIP))*1 SIN(ANGLE)*COS(VANGLE)Vehicle in contact with the groundVehicle stability on slopeIF (FLYING.EQ.0) THENCALL STATROLL(ISET,ROLL)IF (ROLL.EQ.1) GOTO 80Check if vehicle flys at terrain changesIF (OTSTRIP.NE.TSTRIP) CALL FLY(ISET)Airborne vehicleELSECALL DYNROLL(ISET,ROLL,DIVEIN)IF (ROLL.EQ.LORDIVEIN.EQ.1) GOTO 80ENDIFIF (FLYING.EQ.0) THENLASTELEV = ELEVATIONELEVATION= GROUNDVANGLE=-ATAN(TAN(TA(ISET,TSTRIP))*SIN(ANGLE))Adjust horizontal angle for steerbackIF (S1 LER(ISE1).NE.0) THENIF (VELOCITY**2*S1EER(ISET)/WBASE(MODEL(ISE1))*1 COS(ANGLE+3.1416/2)*COS(ATAN(TAN(TA(ISET,TSTRIP))*2 SIN(ANGLE+3.1416/2)))*TI(ISET)+VELOCITY*COS(ANGLE)*3 COS(VANGLE).NE.0) THENANGLE= ATAN((VELOCITY**2*SlIER(ISE1')/1 WBASE(MODEL(ISE1))*SIN(ANGLE+ 3.1416/2)*2 COS(ATAN(TAN(TA(ISET,TSTRIP))*SIN(ANGLE+3 3.1416/2)))*TI(ISET)+'VELOCITY*SIN(ANGLE)*4 COS(VANGLE))/(VELOCITY**2*STEER(ISET)/5 WBASE(MODEL(ISET))*COS(ANGLE+ 3.1416/2)*6 COS(ATAN(TAN(TA(ISET,TSTRIP))*SIN(ANGLE+7 3.1416/2)))*TI(ISET)+VELOCITY*COS(ANGLE)*8 COS(VANGLE)))**210ELSEIF (VELOCITY"2*SThER(ISET)/WBASE(MODEL(ISET))*1 SIN(ANGLE+3.1416/2)*COS(ATAN(TAN(TA(ISET,TSTRIP))*2 SIN(ANGLE+3.1416/2)))*TI(ISET)+ VELOCITY*SIN(ANGLE)*3 COS(VANGLE).GT.0) THENANGLE =3.1416/2ELSEANGLE= -3.1416/2ENDIFENDIFELSELAS 1 ELEV = ELEVATIONVVERT=VELOCTIT*SIN(VANGLE)ELEVATION = ELEVATION-0.5*G*TI(ISET)**2-VVERT*TT(ISET)VANGLE =ATAN((VVERT + G*FL,YTIME)/(VELOCITY*COS(VANGLE)))ENDIFELSELASDOC= XXXX = XX + VELOCITY *TI(ISE I )*COS(ANGLE)LASTYY=YYYY=YY +VELOCITY*TI(ISET)*SIN(ANGLE)ENDIFIF (XX.GT.100.0R.XX.LT.0) RETURNIF (YY.GT.20.ORYY.LT .0) RETURNTerrain changes*51 IF (TSTRIP.LT.NT(ISET)) THENIF (YY.GE.TY(ISET,TSTRIP +1)) THENTSTRIP =TSTRIP +1GOTO 51ENDIFENDIF*Acceleration change because of terrainACCEL= G*SIN(VANGLE)IF (FLYING.EQ.0) THENIF (TSTRIP.GT.0) ACCEL=ACCEL-(TR(ISET,TSTRIP)+1 TM(ISET,TSTRIP))*GENDIFAcceleration change because of objectsCALL OBJECT(ISET)Acceleration change because of brakingIF (FLYING.EQ.0) ACCEL=ACCEL-BRAKE(ISET)*GCalculate velocity and powerVELOCITY = VELOCITY + ACCEL*11(ISB I )/2PWR=ABS(VELOCTTY*ACCEL)VELOCITY = VELOCITY +ACCEL*TI(ISET)/2Plot trajectory***211* Plot trajectory80 IF (RUNTYPE.EQ.2) THENIF (HCURVE(ISET).EQ.1) THENIX1=610-LASTXX*(610-30)/100IY1=166-LASTYY*(166-50)/20IX2 = 610-XX*(610-30)/100IY2=166-YY*(166-50)/20CALL DRAW (IX1,IY1,IX2,1Y2,15)ELSERADIUS(2) =400RADIUS(3) = 200RADIUS(4) = 70SCALE= (238.-50.)/(RADIUS(HCURVE(ISET))+26- 1 (RADIUS(HCURVE(ISET))-6)*COS(100./RADIUS(HCURVE(ISET))/ 2 2))XCEN = 320YCEN=50+ (RADIUS(HCURVE(ISET)) +26)*SCALEXX1=100-LASTX.XYY1=LASTYYXX2=100-XXYY2=YYYD1=YY1YD2 = YY1 + (YY2-YY1)/20DO 130 A= 3.1416/2 +100./RADIUS(HCURVE(ISET))/2-XX1/ 1 100.*100./RADIUS(HCURVE(ISET)),3.1416/2 +100./ 2 RADIUS(HCURVE(ISET))/2-XX2/100.*100./ 3 RADIUS(HCURVE(ISET))-(XX1-XX2)/100.*100./ 4 RADIUS(HCURVE(ISET))/20,(XX1-XX2)/100.* 5 100./RADIUS(HCURVE(ISE1))/20YD1 = YD1 + (YY2-YY 1)/20YD2 =YD2 + (YY2-YY1)/20IX1= XCEN+ (RADIUS(HCURVE(ISL,1))+ 6 + YD1)*COS(A)*SCALEIY1=YCEN-(RADIUS(HCURVE(ISET))+6+YD1)*SIN(A)*SCALEIX2 = XCEN+ (RADIUS(HCURVE(ISET))+ 6 + YD2)* 1 COS(A+(XX1-XX2)/100.*100./RADIUS(HCURVE(ISET))/20)* 2 SCALEIY2 = YCEN-(RADIUS(HCURVE(ISET))+ 6 + YD2)* 1 SIN(A+(XX1-XX2)/100.*100./RADIUS(HCURVE(ISET))/20)* 2 SCALECALL DRAW (IX1,IY1,IX2,IY2,15)130 CONTINUEENDIFIX1=40+LASTYY/20.0*560IY1=313-(LASTELEV-MINZ)/(MAXZ-MINZ)*(313-213)IX2=40+YY/20.0*560IY2=313-(ELEVATION-MINZ)/(MAXZ-MINZ)*(313-213)CALL DRAW (IX1,IY1,IX2,1Y2,15)IF (ROLL.EQ.1) THENCALL DRAW (1X2,1Y2,IX2 + 6,1Y2-5,15)CALL DRAW (IX2+6,1Y2-5,1X2 +11,IY2-10,15)CALL DRAW (IX2+11,1Y2-10,1(2 + 11,1Y2-15,15)CALL DRAW (IX2+11,1Y2-15,1X2+8,1Y2-20,15)CALL DRAW (IX2 + 8,1Y2-20,IX2 + 3,IY2-23,15)CALL DRAW (IX2+3,1Y2-23,IX2-2,IY2-20,15)CALL DRAW (1X2-2,1Y2-20,IX2-4,IY2-15,15)CALL DRAW (1X2-4,1Y2-15,IX2-2,IY2-10,15)ENDIFENDIF212Calculate outcome probabilities using probability ofconsequences or rolling consequences tableCALL CONSEQ(ISET,ROLL)Update overall probabilities for RHSM analysisIF (RUNTYPE.EQ.1) THENLASTPND = DATA(ISET,1)LASTPPDO = DATA(ISET,2)LASTPINJ= DATA(ISET,3)LASTPFAT=DATA(ISET,4)DATA(ISET,4)=LASTPFAT+PFAT*PANG*PVEL*(1-LASTPFAT)DATA(ISET,3)=LASTPINJ*(1-PFAT*PANG*PVEL)+PINJ*PANG*PVEL*1 (1-LASTPFAT-LASTPINJ)DATA(ISET,2)=LASTPPD0*(1-(PFAT+PINJ)*PANG*PVEL)+1 PPDO*PANG*PVEL*LASTPNDDATA(ISET,1)=1-DATA(ISET,2)-DATA(ISET,3)-DATA(ISET,4)*Update spacial probabilities*IX = INT(XX/2) + 1IY =INT(YY/2) + 1SPRES(ISE'1',IX,IY,3)=SPRES(ISET,IX,IY,3)+PFAT*PANG*PVEL*1 (1-LASTPFAT)SPRES(ISET,IX,IY,2)=SPRES(ISET,IX,IY,2)+PINJ*PANG*PVEL*1 (1-LASTPFAT-LASTPINJ)SPRES(ISET,IX,IY,1) = SPRES(ISET,IX,IY,1) + PPDO*PANG*PVEL*1 LASTPNDENDIFIF (VELOCITY.LE.0) RETURN21 CONTINUERE-TURNEND213SUBROUTINE OBJECT (ISET)This subroutine checks if objects are encountered and calculatesthe induced decelerationsINTEGER ISETREAL A,COORD(5,2),B,C,LX(2),LY(2),NX(2),NY(2),OBJANGLE(2),1 OBJDIST(2),XCROSS,XX1,XX2,YCROSS,YYLYY2INCLUDE 'RHSMINS'For each objectDO 25 K=1,NO(ISET)Do a quick check to see if object is in vicinityIF (a(XX.GE.THX1(ISET,K).ORXX.GE.THX3(ISET,K)).AND.1 (XX.LE.THX2(ISET,K).0R.XX.LE.THX4(ISET,K)).AND.2 (YY.GE.THY1(ISET,K).ORYY.GE.THY2(ISET,K)).AND.3 (YY.LE.THY3(ISET,K).0R.YY.LE.THY4(ISET,K))).OR.4 SQRT((XX-THX1(ISET,K))**2+(YY-THY1(ISET,K))**2).LE.5).AND.S PASTOBJ(K).EQ.0) THENDetermine crossing points of object lines and vehicle sidetrajectories to see if object lies on vehicle pathNX(1) = XX-TRACK(MODEL(ISET))/2*SIN(ANGLE)*COS(VANGLE*COS(ANGLE))NY(1)=YY+TRACIC(MODEL(ISET))/2*COS(ANGLE)*COS(VANGLE*COS(ANGLE))LX(1)=LASTXX-TRACK(MODEL(ISET))/2*SIN(ANGLE)*COS(VANGLE*COS(ANGLE))LY(1)=LASTYY+TRACK(MODEL(ISET))/2*COS(ANGLE)*COS(VANGLE*COS(ANGLE))NX(2) = XX +TRACK(MODEL(ISET))/2*SIN(ANGLE)*COS(VANGLE*COS(ANGLE))NY(2) = YY-TRACK(MODEL(ISET))/2*COS(ANGLE)*COS(VANGLE*COS(ANGLE))LX(2)=LASTXX+TRACK(MODEL(ISET))/2*SIN(ANGLE)*COS(VANGLE*COS(ANGLE))LY(2)=LASTYY-TRACK(MODEL(ISET))/2*COS(ANGLE)*COS(VANGLE*COS(ANGLE))DO 26 M=1,2OBJDIST(M) =-1For each object, determine corners making up four sidesDO 27 L=1,4IF (L.EQ.1) THENXX1=THX1(ISET,K)YY1 =l'HY1(ISET,K)XX2=THX2(ISET,K)YY2=THY2(ISET,K)ELSEIF (L.EQ.2) THENXX1 = THX1(ISET,K)YY1=THY1(ISET,K)XX2 =THX3(ISET,K)YY2=THY3(ISET,K)ELSEIF (L.EQ.3) THENXX1=THX2(ISET,K)YY1=THY2(ISET,K)XX2=THX4(ISET,K)YY2=THY4(ISET,K)ELSEXX1=THX3(ISET,K)YY1=THY3(ISET,K)XX2 = THX4(ISET,K)YY2=THY4(ISET,K)ENDIF**214If neither trajectory nor object line are verticalIF (ABS(XX1-XX2).GT.0.1) THENIF (ABS(NX(M)-LX(M)).GT.0.1) THENIf lines are not parallelIF (ABS((YY1-YY2)/(XX1-XX2)-(NY(M)-LY(M))/1 (NX(M)-LX(M))).GT.0.01) THENXCROSS = (NY(M)-YY2+ (YY1-YY2)/(XX1-XX2)*XX2-1 (LY(M)-NY(M))/(LX(M)-NX(M))*NX(M))/2 ((YY1-YY2)/(XX1-XX2)-(LY(M)-NY(M))/3 (LX(M)-NX(M)))YCROSS= LY(M) + (NY(M)-LY(M))/(NX(M)-LX(M))*1 (XCROSS-LX(M))IF (((XCROSS.GT.XXLAND.XCROSS.LT.XX2).OR.1 (XCROSS.LT.XX1 AND.XCROSS.GT.XX2))AND.2 ((XCROSS.GT.LX(M).AND.XCROSS.LT.NX(M)).0R.3 (XCROSS.LT.LX(M).AND.XCROSS.GT.NX(M)))) THENIF ((OBJDIST(M).EQ.-1).0R.(OBJDIST(M).GT.1 SQRT((XCROSS-LX(M))**2+ (YCROSS-2 LY(M))**2))) THENOBJDIST(M)=SQRT((XCROSS-LX(M))**2+1 (YCROSS-LY(M))**2)C=SQRT((YY2-LY(M))**2+ (XX2-LX(M))**2)B= SQRT((YY2-YCROSS)**2+ (XX2-XCROSS)**2)A = SQRT((YCROSS-LY(M))**2 + (XCROSS-1 LX(M))**2)OBJANGLE(M)=ACOS((A**2+ B**2-C**2)/1 (2*A*B))IF (OBJANGLE(M).GT.3.1416/2)1 OBJANGLE(M) = 3.1416-OBJANGLE(M)ENDIFENDIFENDIFIf only trajectory is verticalELSEXCROSS = NX(M)YCROSS=YY1+(YY2-YY1)/(XX2AX1)*(XCROSS-XX1)IF a(XCROSS.GT.XXLAND.XCROSS.LT .XX2).OR.1 (XCROSS.LT.XXLAND.XCROSS.GT .)0(2)).AND.2 ((YCROSS.GT.LY(M).AND.YCROSS.LT.NY(M)).OR.3 (YCROSS.LT.LY(M).AND.YCROSS.GT.NY(M)))) THENIF ((OBJDIST(M).EQ.-1).0R(OBJDIST(M).GT.1 SQRT((XCROSS-LX(M))**2+ (YCROSS-2 LY(M))**2))) THENOBJDIST(M)=SQRT((XCROSS-LX(M))**2+1 (YCROSS-LY(M))**2)C=SQRT((YY2-LY(M))**2+ (XX2-LX(M))**2)B =SQRT((YY2-YCROSS)**2+ (XX2-XCROSS)**2)A = SQRT((YCROSS-LY(M))**2 + (XCROSS-1 LX(M))**2)OBJANGLE(M)=ACOS((A**2+B**2-C**2)/(2*A*B))IF (OBJANGLE(M).GT.3.1416/2) OBJANGLE(M)=1 3.1416-OBJANGLE(M)ENDIFENDIFENDIF*215If only object line is verticalELSEIF (ABS(NX(M)-LX(M)).GT.0.1) THENXCROSS=XX1YCROSS=LY(M)+ (NY(M)-LY(M))/(NX(M)-LX(M))*1 (XCROSS-LX(M))IF WYCROSS.GT.YYLAND.YCROSS.LT.YY2).0R.1 (YCROSS.LT.YY1.AND.YCROSS.GT .YY2)).AND.2 ((XCROSS.GT.LX(M).AND.XCROSS.LT.NX(M)).0R.3 (XCROSS.LT.LX(M).AND.XCROSS.GT.NX(M)))) THENIF ((013JDIST(M).EQ.-1).0R.(OBJDIST(M).GT.1 SQRT((XCROSS-LX(M))**2+ (YCROSS-2 LY(M))**2))) THENOBJDIST(M)=SQRT((XCROSS-LX(M))**2+1 (YCROSS-LY(M))**2)C=SQRT((YY2-LY(M))**2 + (XX2-LX(M))**2)B=SQRTOY2-YCROSS)**2+ (XX2-XCROSS)**2)A =SQRT((YCROSS-LY(M))**2 + (XCROSS-1 LX(M))**2)OBJANGLE(M)=ACOS((A**2+B**2-C**2)/(2*A*B))IF (OBJANGLE(M).GT.3.1416/2) OBJANGLE(M)=1 3.1416-OBJANGLE(M)ENDIFENDIFENDIFENDIF27 CONTINUE26 CONTINUECalculates the accelerations induced by meeting objectsOBJD =0IF (OBJDIST(1).NE.-1.AND.013JDIST(2).NE.-1) THENIF (OBJANGLE(1).EQ.OBJANGLE(2)) THENOBJD =1OBJA= OBJANGLE(1)ELSEOBJD =1OBJA= 3.1416/2ENDIFELSEIF (OBJDIST(1).NE.-1) THENOBJD =1OBJA = 3.1416/2ELSEIF (OBJDIST(2).NE.-1) THENOBJD =1OBJA =3.1416/2ENDIFCheck if object lies entirely in vehicle's pathIF (OBJD.EQ.0) THENCOORD(1,1) = NX(1)COORD(1,2) = NY(1)COORD(2,1)=NX(2)COORD(2,2) = NY(2)COORD(3,1) = LX(2)COORD(3,2) = LY(2)COO FtD (4,1) = LX(1)COORD(4,2) = LY(1)COORD(5,1) = NX(1)216COORD(5,2)=NY(1)CONTROL = 0DO 30 1=1,4CONTROL = CONTROL + COORD(I,1)*COORD(I + 1,2)CONTROL = CONTROL-COORD(I +1,1)*COORD(1,2)30 CONTINUECONTROL =ABS(CONTROL)DO 40 I=1,4TESTAREA=0DO 50 J=1,4IF (I.EQ.J) THENTESTAREA=TESTAREA+COORD(J,1)*YY1TESTAREA=TESTAREA + )0C1*COORD(J+ 1,2)TESTAREA=TESTAREA-XX1*COORD(J,2)TFSTAREA=TFSTAREA-COORD(J+1,1)*YY1ELSETESTAREA=TESTAREA+ COORD(I,1)*COORD(I +1,2)TESTAREA=TESTAREA-COORD(1+1,1)*COORD(1,2)ENDIF50 CONTINUETESTAREA=ABS(TESTAREA)IF (TESIAREA.GT.CONTROL) GOTO 4540 CONTINUEOBJD = 1OBJA = 3.1416/2ENDIF*Rigid objects45 IF (OBJD.EQ.1) THENIF (THTYP(ISET,K).EQ.'R') THENIF (VMASS(MODEL(ISF,1)).GT.1500) THENACCEL =ACCEL-(1325*VELOCITY *SIN(OBJA)-1 1.325*VELOCITY*COS(OBJA)*SIN(013JA))*GELSEACCEL=ACCEL-(1.325*VELOCITY*SIN(OBJA)+1 1.325*'VELOCITY*COS(OBJA)*SIN(OBJA))*2 (270.0*EXP(-3.5*VELOCITY**0.10))*GENDIFDeformable objectsELSEIF (THTYP(ISET,K).EQ.'D') THENIF (VMASS(MODEL(ISET)).GT.1500) THENACCEL=ACCEL-(1.325*VELOCITY*THM(ISET,K)/100*1 SIN(OBJA)-1.325*VELOCITY*THM(ISET,K)/100*2 COS(OBJA)*SIN(OBJA))*GELSEACCEL=ACCEL-(1.325*VELOCITY*THM(ISET,K)/100*1 SIN(OBJA)+1.325*VELOCITY*THM(ISET,K)/100*2 COS(OBJA)*SIN(OBJA))*3 (640.0*EXP(-3.6*VELOCITY**0.12))*GENDIFPassable objects**217Passable objectsELSEIF (VMASS(MODEL(ISET)).GT.1500) THENACCEL=ACCEL-(3.6*EXP(1.46*(VELOCITY*1 SIN(OBJA))**0.34)/(9.8*VELOCITY*2 SIN(OBJA))-3.6*EXP(1.46*(VELOCITY*3 COS(OBJA))**0.34)/(9.8*VELOCITY*4 COS(OBJA)*SIN(OBJA)))*GELSEACCEL=ACCEL-(3.6*EXP(1.46*(VELOCITY*1 SIN(OBJA))**0.34)/(9.8*VELOCITY*2 SIN(OBJA))+ 3.6*EXP(1A6*(VELOCITY*3 COS(OBJA))**0.34)/(9.8*VELOCITY*4 COS(OBJA)*SIN(OBJA)))*5 640.0*EXP(-3.6*VELOCITY**0.12)*GENDIFENDIFPASTOBJ(K) =1ENDIFENDIF25 CONTINUERETURNEND218* SUBROUTINE FLY(ISET)* This subroutine initiates flying at terrain changes*INTEGER ISETINCLUDE 'RHSM.INS'If flying off shoulderIF (TSTRIP.EQ.1) THENIF (TA(ISET,TSTRIP).LT.0) THENWERT= VELOCITY*SIN(VANGLE)FLYING =1KINENER= 0FL,YTIME= 0IF (ANGLE.LE.ATAN(TRACK(MODEL(ISE1))/WBASE(MODEL(ISET))))1 THENDISP=TRACK(MODEL(ISET))/4-WBASE(MODEL(ISET))**2/(12*1 TRACK(MODEL(ISET)))*(TAN(ANGLE))**2ELSEDISP=WBASE(MODEL(ISET))**2/(6*W13ASE(MODEL(ISET))*1 TAN(ANGLE))ENDIFENDIF*If flying off one terrain strip over another*ELSEIF (TA(ISET,TSTRIP).LT.TA(ISET,OTSTRIP)) THEN'VVERT=VELOCITY*SIN(VANGLE)FLYING =1KINENER= 0FLYTIME= 0IF (ANGLE.LE.ATAN(TRACK(MODEL(ISET))/WBASE(MODEL(ISET))))1 THENDISP =TRACK(MODEL(ISET))/4-WBASE(MODEL(ISET))**2/(12*1 TRACK(MODEL(ISET)))*(TAN(ANGLE))**2ELSEDISP= WBASE(MODEL(ISET))**2/(6*WBASE(MODEL(ISET))*1 TAN(ANGLE))ENDIFENDIFENDIFRETURNEND219SUBROUTINE DYNROLL(ISET,ROLL,DIVEIN)This subroutine monitors airborne vehicles and checks forrolling upon landingINTEGER DIVEIN,ISET,ROLLREAL POTENER,VINCIDENCEINCLUDE 'RHSM.INS'If vehicle has not yet landedROLL = 0DIVEIN= 0IF (ELEVATION.GT.GROUND) THENKINENER=KINENER+0.5*(6*G*DISP)/(WBASE(MODEL(ISET))**2+1 TRACIC(MODEL(ISEI))**2)*TI(ISE1)FLYTIME=FLYTIME+TI(ISET)If vehicle has landedELSECheck for rollingFLYING =0INCIANGLE=3.1416-VANGLE-ATAN(TAN(TA(ISET,TSTRIP))*SIN(ANGLE))IF (INCIANGLE.GT.3.1416/2) INCIANGLE=3.1416-INCIANGLEIF (FLYTIME.GT.0) THENPOTENER=VMASS(MODEL(ISET))*(CG(MODEL(ISE1))**2+1 TRACK(MODEL(ISET))**2/4)**0.5*(1-SIN(INCIANGLE+2 ATAN(2*CG(MODEL(ISE1'))/TRACK(MODEL(ISET)))))IF (KINENERGT.POTENER) THENVehicle rollsNROLLS(ISET) = NROLLS(ISET) + 1NIROL(ISE'T)= NIROL(ISET) + 1ROLL=1Vehicle does not rollELSEVINCIDENCE=-VELOCITY*SIN(INCIANGLE)IF (TA(ISET,TSTRIP).LT.0) THENACCEL=ACCEL-(0.8662-0.1852*VINCIDENCE*TAN(INCIANGLE)+1 0.256*(VINCIDENCE*TAN(INCIANGLE))**2-1)*G*2 TM(ISET,TSTRIP)ELSEACCEL=ACCEL-(0.8637+0.4961*VINCIDENCE*TAN(INCIANGLE)+1 0.07288*(VINCIDENCE*TAN(INCIANGLE))**2-1)*G*2 TM(ISET,TSTRIP)ENDIFVELOCITY = VELOCITY +ACCEL*TI(ISET)/2PWR =ABS(VELOCITY*ACCEL)VELOCITY = VELOCITY +ACCEL*TI(ISET)/2DIVEIN =1ENDIFENDIFENDIFRETURNEND*220SUBROUTINE STATROLL(ISET,ROLL)This subroutine checks for rolling on slopesINTEGER ISET,ROLLREAL VCRITINCLUDE 'RHSM.INS'Outwards roll (if back steering)ROLL = 0IF aSTEER(ISET).GT.O.ANDATAN(TAN(TA(ISET,TSTRIP))*1 SIN(ANGLE+3.1416/2)).GE.0).0R(SIEER(ISET).LT.O.AND.2 ATAN(TAN(TA(ISET,TSTRIP))*SIN(ANGLE-3.1416/2)).GE.0)) THENIF (ABS(ATAN(TAN(TA(ISET,TSTRIP))*SIN(ANGLE-3.1416/2))).GT.1 ATAN(TRACK(MODEL(ISET))/(2*CG(MODEL(ISET))))) THENVCRTT= 0ELSEVCRIT= SQRT((VMASS(MODEL(ISET))*G*1 (COS(ABS(ATAN(TAN(TA(ISET,TSTRIP))*SIN(ANGLE+3.1416/2))))*2 TRACK(MODEL(ISET))/2-SIN(ABS(ATAN(TAN(TA(ISET,TSTRIP))*3 SIN(ANGLE+ 3.1416/2))))*CG(MODEL(ISEI)))/CG(MODEL(ISET)))*4 WBASE(MODEL(ISEI ))/(VMASS(MODEL(ISET))*ABS(S1 tER(ISET))))ENDIFStatic roll (back steering)IF (VELOCITY.GT.VCRIT) THENNROLLS(ISET)=NROLLS(ISE,1)+ 1NJROL(ISET) = NJROL(ISET) + 1ROLL= 1ENDIFInwards roll (back steering)ELSEIF ((SI LER(ISET).GT.O.AND.ATAN(TAN(TA(ISET,TSTRIP))*1 SIN(ANGLE + 3.1416/2)).LT.0).0R4S1 hER(ISET).LT.O.AND.2 ATAN(TAN(TA(ISET,TSTRIP))*SIN(ANGLE-3.1416/2)).LT.0)) THENIF (ABS(ATAN(TAN(TA(ISET,TSTRIP))*SIN(ANGLE-3.1416/2))).GT.1 ATAN(TRACK(MODEL(ISET))/(2*CG(MODEL(ISET))))) THENVCRIT= SQRT((VMASS(MODEL(ISET))*G*1 (-COS(ABS(ATAN(TAN(TA(ISET,TSTRIP))*SIN(ANGLE+3.1416/2))))*2 TRACK(MODEL(ISET))/2+SIN(ABS(ATAN(TAN(TA(ISET,TSTRIP))*3 SIN(ANGLE+ 3.1416/2))))*CG(MODEL(ISET)))/CG(MODEL(ISEI)))*4 WBASE(MODEL(ISEI))/(VMASS(MODEL(ISET))*ABS(S1 EER(ISET))))ENDIFStatic rollIF (VELOCITY.LT.VCRIT) THENNROLLS(ISET) = NROLLS(ISET) + 1NJR0L(ISET)= NJROL(ISET) + 1ROLL = 1ENDIFIf not back steeringELSEIF (ABS(ATAN(TAN(TA(ISET,TSTRIP))*SIN(ANGLE-3.1416/2))).GT.1 ATAN(TRACK(MODEL(ISET))/(2*CG(MODEL(ISEI))))) THENNROLLS(ISET) = NROLLS(ISET) + 1NJR0L(ISET) =NJR0L(ISET)+ 1ROLL = 1ENDIFRETURNEND***221SUBROUTINE CONSEQ(ISET,ROLL)This subroutine determines the consequences of power valuesand rollingINCLUDE 'RHSM.INS'Calculate outcome probabilities using probability ofconsequences tableIF (ROLL.EQ.0) THENIF (PWRLT.PLA(1,1)) THENPPDO = (PLA(1,3)*(1-REST(ISET))+PLA(1,5)*REST(ISET))*PWR/1 PLA(1,1)PFAT=(PLA(1,4)*(1-REST(ISET))+PLA(1,6)*REST(ISET))*PWR/1 PLA(1,1)PND=1-(1-PLA(1,2))*PWR/PLA(1,1)PINJ=1-PPDO-PFAT-PNDELSEDO 70 K=2,NPLAIF (PWRLT.PLA(K,1)) THENPPDO=PLA(K-1,3)*(1-REST(ISET))+PLA(K-1,5)*REST(ISL1)+1 (PWR-PLA(K-1,1))*(PLA(K,3)*(1-REST(ISET))+PLA(K,5)*2 REST(ISE1)-PLA(K-1,3)*(1-REST(ISET))-PLA(K-1,5)*3 REST(ISET))/(PLA(IC,1)-PLA(K-1,1))PFAT=PLA(K-1,4)*(1-REST(ISET))+PLA(K-1,6)*REST(ISET)+1 (PWR-PLA(K-1,1))*(PLA(K,4)*(1-REST(ISET))+PLA(K,6)*2 REST(ISE1)-PLA(K-1,4)*(1-REST(ISET))-PLA(K-1,6)*3 REST(ISET))/(PLA(IC,1)-PLA(K-1,1))PND=PLA(K-1,2)+(PWR-PLA(K-1,1))*(PLA(K,2)-PLA(K-1,2))/1 (PLA(K,1)-PLA(K-1,1))PINJ=1-PPDO-PFAT-PNDRETURNENDIF70 CONTINUEENDIF*Vehicle rolls*ELSEIF (VELOCITY.LT.VEL(1)) THENPPDO = (RP1(1,1)*(1-RFST(ISET))+ RP2(1,1)*REST(ISB1))*1 VELOCITY/VEL(1)PFAT=(RP1(1,2)*(1-REST(ISET))+ RP2(1,2)*REST(ISET))*1 VELOCITY/VEL(1)PND =0PINJ=1-PPDO-PFAT-PNDVELOCITY =0ACCEL = 0ELSEDO 55 K=2,NVELIF (VELOCITY.LT.VEL(K)) THENPPDO=RP1(K-1,1)*(1-REST(ISET))+RP2(K-1,1)*REST(ISET)+1 (VELOCITY-VEL(K-1))*(RP1(K,1)*(1-REST(ISET))+RP2(K,1)*2 REST(ISET)-RP1(K-1,1)*(1-REST(ISET))-RP2(K-1,1)*3 REST(ISET))/(VEL(K)-VEL(K-1))PFAT=RP1(K-1,2)*(1-REST(ISET))+RP2(K-1,2)*REST(ISET)+1 (VELOCITY-VEL(K-1))*(RP1(K,2)*(1-REST(ISET))+ RP2(IC,2)*2 REST(ISET)-RP1(K-1,2)*(1-REST(ISET))-RP2(K-1,2)*3 REST(ISET))/(VEL(K)-VEL(K-1))PND = 0PINJ=1-PPDO-PFAT-PNDVELOCITY =0ACCEL= 0RETURNENDIF55 CONTINUEENDIFENDIFRETURNEND222223SUBROUTINE ECONRUN(ISET)*This subroutine performs economic analyses for specific input sets*INTEGER ISET,STRIPLSTRIP2REAL BASE(5),ELEV1,ELEV2INCLUDE 'RHSM.INS'DATA BASE /0.25, 0.25, 0.2, 0.35, 0.4/*** Calculate encroachment rate (if neccesary)IF (ENCRATE.LE.0) ENCRATE = ADT/1000*BASE(RDCLASS)*1 RCADJUST(RDCLASS)*DSADJUST(DFSSPD)*LWADJUST(LANEWID)*2 NLADJUST(NUMLANE)*SWADJUST(SHLDWID)*HCADJUST(HORCURVE)*3 VCADJUST(VERCURVE)*CADJUST(CLIMATE)*TADJUST(TRAFFIC)*4 SADJUST(SIGHT)*Calculate total accident costs*TACCOST(ISET) = 0DO 10 1=1,4TACCOST(ISET)=TACCOST(ISET)+ENCRATE*DATA(ISET,I)*(ACCOST(1,I)+1 ACCOST(2,I))10 CONTINUE*Calculate mitigation costs** MITCOST(ISET)= 0Barriers*IF (ISET.GT.1) THENIF (BARRIER(ISET).EQ.1) THENMITCOST(ISET)=MITCOST(ISET)+BINSTALL(ISET)+BMAINT(ISET)*1 ((1+INTERFST/100)**PERIOD-1)/(INTERES1'/100*2 (1 +INTEREST/100)**PERIOD)ENDIF*Slope changes*IF (SLOPE(ISE1).EQ.1) THENSTRIP1 =0STRIP2 = 0ELEV1 = 0ELEV2=0CUT(ISET) = 0FILL(ISE1)=0DO 20 A=1,20,130 IF (A.GT.TY(1,STRIP1 + 1).AND.(TY(1,STRIP1 + 1).NE.O.OR.1 STRIPLEQ.0)) THENSTRIP1= STRIP1 + 1GOTO 30ENDIF40 IF (A.GT.TY(ISET,STRIP2+ 1).AND.(TY(ISET,STRIP2+ 1).NE.O.1 ORSTRIP2.EQ.0)) THENSTRIP2 = STRIP2 +1GOTO 40ENDIFOLDELEV1=ELEV1OLDELEV2=ELEV2IF (STRIPLGT.0) ELEV1=ELEV1+1*TAN(TA(1,STRIP1)*RAD)IF (STRIP2.GT.0) ELEV2=ELEV2+1*TAN(TA(ISET,STRIP2))224IF (ELEV1 GT.ELEV2) CUT(ISE1)=CUT(ISET)+1 ((ELEV1+OLDELEV1)/2-(ELEV2+OLDELEV2)/2)*1•100IF (ELEV2 GT.ELEV1) F1LL(ISET)=FILL(ISET)+1 ((ELEV2+OLDELEV2)/2-(ELEV1+OLDELEV1)/2)*1 1*10020 CONTINUEMITCOST(ISET)=MITCOST(ISET)+CUT(ISET)*CUTCOST+FILL(ISET)*1 FILLCOSTIF (CUT(ISET).GT.FILL(ISET)) MITCOST(ISET) = MITCOST(ISET) +1 (CUT(ISET)-F1LL(ISET))*WASTCOSTIF (FILL(ISET).GT.CUT(ISET)) MITCOST(ISET) = MITCOST(ISET) +1 (FILL(ISET)-CUT(ISET))*ADFCOSTENDIFObject removal costs*IF (OREMOVE(ISE1).EQ.1) THENDO 50 1=1,3MITCOST(ISE1)=MITCOST(ISET)+NREMOVE(ISET,I)*1 CREMOVE(ISET,I)50 CONTINUEENDIFRight of way acquisitionIF (ROW(ISB1 ).EQ.1) MITCOST(ISET)=MITCOST(ISET)+ COSTROW(ISET)ENDIFMaintenance costsMITCOST(ISET) = MITCOST(ISET) + CFMAINT(ISET)*1 ((1+INTEREST/100)**PERIOD-1)/(INTEREST/100*2 (1 + INTEREST/100)**PERIOD)RETURNEND225SUBROUTINE DISPLAYThis subroutine displays results of RHSM on the screenINTEGER CHOICE,CONSQ,ECONTYPE,DOLLAR,ISET,NUMPTS(2),VANTAGEREAL MAXX,MAXY,MINX,MINY,X(100),Y(l00),Z(10O,10O)CHARACTER*1 CHCHARAC,1ER*9CHARACI'ER*17 XTITLE,YTITLECHARACIER*80 TILEINCLUDE 'RHSM.INS'COMMON / GRPH3D / NUMPTS,X,Y,ZATTILE,YTITLE,G1 I ILE,TTLE* Menu screensDOLLAR= 0IF (BC.EQ.1) THENECONTYPE= 0ELSEIF (CE.EQ.1) THENECONTYPE= 1ELSEECONTYPE= -1ENDIFWRITE (*,*) CHAR(255),CHAR(255),'DISPLAY1/'READ (*,10) CHOICE10 FORMAT (13)Load first display screenIF (CHOICE.EQ.1) THENCALL CURSOROFFIPAGE= 11 IF (I CHARCITILE(IPAGE)(1:1)).NE.O.ANDICHAKIIILE(IPAGE)(1:1)).1 NE.32) THENCALL CLRSCRWRITE (*,20) I I I LE(IPAGE)20 FORMAT (1X,A50)WRITE (*,*)WRITE (*,80)80 FORMAT (2X,'Simulation Results')WRITE (*,90) NCALLS(IPAGE)90 FORMAT (7X,'Total Number of Trajectories = ',I5)WRITE (*,100) NROLLS(IPAGE)100 FORMAT (7X,'Total Number of Rolls = ',I5)IF (NROLLS(IPAGE).GT.0) WRITE (*,105) REAL(NROLLS(IPAGE))/1 REAL(NCALLS(IPAGE))105 FORMAT (9X,'Probability of Vehicle Roll-Over = ',F5.2)WRITE (*,110) NIROL(IPAGE)110 FORMAT (7X,'Number of Rolls at Terrain Change = ',I5)IF (NROLLS(IPAGE).GT.0) WRITE (*,120) REAL(NIROL(IPAGE))/1 REAL(NCALLS(IPAGE))120 FORMAT (9X,'Probability of Rolls @ Terrain Change = ',F5.2)WRITE (*,130) NJROL(IPAGE)130 FORMAT (7X,'Number of Rolls on Slope = ',IS)IF (NROLLS(IPAGE).GT.0) WRITE (*,140) REAL(NJROL(IPAGE))/1 REAL(NCALLS(IPAGE))140 FORMAT (9X,'Probability of Roll-Over on Slope = ',F5.2)WRITE (*,*)WRITE (*,150)226 150 FORMAT (2X,'Aggregated Probability of Overall Accident ',1 'Consequence Classification')WRITE (*,160) DATA(IPAGE,1) 160 FORMAT (7X,'No Damage = ',F7.3)WRITE (*,170) DATA(IPAGE,2) 170 FORMAT (7X,'Property Damage Only = ',F7.3)WRITE (*,180) DATA(IPAGE,3) 180 FORMAT (7X,'Injury = ',F7.3)WRITE (*,190) DATA(IPAGE,4) 190 FORMAT (7X,'Fatality = ',F7.3)WRITE (**)WRITE (*,201) 201 FORMAT (2X,'Economic Evaluation Factors')IF (ECONTYPE.EQ.0) THENWRITE (*,203) ENCRATE 203 FORMAT (7X,'Encroachment Rate (events/km/y) = ',F10.2)ENDIFIF (DOLLAREQ.0) THENIF (ECONTYPE.EQ.0) THENWRITE (*,205) TACCOST(IPAGE) 205 FORMAT (7X,'Total Accident Costs (PV$/km) = ',F10.2)ELSEIF (ECONTYPE.EQ.1) THENWRITE (*,207) (SEVERITY(1)*DATA(IPAGE,1)+SEVERITY(2)*1 DATA(IPAGE,2)+SEVERITY(3)*DATA(IPAGE,3)+SEVERITY(4)*2 DATA(IPAGE,4))*ENCRATE 207 FORMAT (7X,'Total Severity (/km/year) = ',F12.0)ENDIFIF (ECONTYPE.EQ.0.ORECONTYPE.EQ.1) THENWRITE (*,210) MITCOST(IPAGE) 210 FORMAT (7X,'Total Mitigation Costs (PV$/km) = ',F10.2)CALL GOTOXY (1,23)WRITE (*,*) 'Press <PGUP> or <PGDN> to page through'// 1 ' results, <$> for annual costs'ELSECALL GOTOXY (1,23)WRITE (*,*) 'Press <PGUP> or <PGDN> to page through'// 1 ' results'ENDIFELSEIF (ECONTYPE.EQ.0) THENWRITE (*,206) TACCOST(IPAGE)*INTEREST/100* 1 (1 + INTEREST/100)**PERIOD/((1 +INTEREST/100)**PERIOD-1) 206 FORMAT (7X,'Total Accident Costs ($/km/yr) = ',F10.2)ELSEIF (ECONTYPE.EQ.1) THENWRITE (*,207) (SEVERITY(1)*DATA(IPAGE,1)+SEVERITY(2)* 1 DATA(IPAGE,2)+SEVERITY(3)*DATA(IPAGE,3)+SEVERITY(4)* 2 DATA(IPAGE,4))*ENCRATEENDIFIF (ECONTYPE.EQ.0.ORECONTYPE.EQ.1) THENWRITE (*,211) MITCOST(IPAGE)*INTEREST/100* 1 (1 + INTEREST/100)**PERIOD/((l +INTEREST/100)**PERIOD-1) 211 FORMAT (7X,'Total Mitigation Costs ($/km/yr) = 1 F10.2)CALL GOTOXY (1,23)WRITE (*,*) 'Press <PGUP> or <PGDN> to page through'// 1 ' results, < $ > for present value costs'ELSECALL GOTOXY (1,23)WRITE (*,*) 'Press <PGUP> or <PGDN> to page through'// 1 ' results'ENDIFENDIF227IF (ECONTYPE.EQ.O.AND.CE.EQ.1) THENWRITE (•,*) ' <CTRL> <C> for cost effect. results,'// 1 ' or <CTRL> <X> or <ESC> to exit.'ELSEIF (ECONTYPE.EQ.1 AND.BC.EQ.1) THENWRITE (*,*) ' <CTRL> <B> for benefit cost results,'// 1 ' or <CTRL> <X> or <ESC> to exit.'ELSEWRITE (*,*) ' or <CTRL> <X> or <ESC> to exit'ENDIF 195 CALL GETKEYBOARD(CH,II)IF (II.EQ.73) THENIPAGE= IPAGE-1IF (IPAGE.EQ.0) THENIF (ECONTYPE.EQ.O.ORECONTYPE.EQ.1) THENGOTO 496ELSEGOTO 396ENDIFENDIFGOTO 1ELSEIF (II.EQ.81) THENIPAGE= IPAGE+ 1IF (IPAGE.EQ.11) GOTO 196GOTO 1ELSEIF (II.EQ.1.ORII.EQ.45) THENCALL CURSORONRETURNELSEIF (ICHAR(CH).EQ.36) THENIF (DOLLAREQ.0) THENDOLLAR= 1ELSEDOLLAR= 0ENDIFGOTO 1ELSEIF (ILEQ.48.AND.ECONTYPE.EQ.LAND.BC.EQ.1) THENECONTYPE= 0GOTO 1ELSEIF (ILEQ.46.AND.ECONTYPE.EQ.O.AND.CE.EQ.1) THENECONTYPE=1GOTO 1ELSEGOTO 195ENDIFELSEIF (II.EQ.73) THENIPAGE= IPAGE-1GOTO 1ELSEIF (IPAGE.LE.10.AND.II.EQ.81) THENIPAGE= IPAGE+ 1GOTO 1ENDIF196 CALL CLRSCRWRITE (*,230) 1 230 FORMAT (1X,'Summary of Results (Page ',I1,' of 3)')WRITE (•,*)WRITE (*,233) 233 FORMAT (2x,'Summary of Accident Consequence Probabilities')WRITE (*,240) 1TTLE(1) 240 FORMAT (3X,'(and differences from ',A16,')')WRITE (* *)WRITE (*,250)228 250 FORMAT (6X,'Alternatives',7X,'No Damage',7X,'P.D.O.',8X,1 'Injury',7X,'Fatality')WRITE (*,255)255 FORMAT (6X,72(y))WRITE (*,*)WRITE (*,260) TITLE(1),DATA(1,1),DATA(1,2),DATA(1,3),DATA(1,4) 260 FORMAT (6X,A16,2X,F4.2,10X,F4.2,10X,F4.2,10X,F4.2)DO 270 1=2,10IF @CHARM ILE(I)(1:1)).NE.O.ANDICHAR(TITLE(I)(1:1)).NE.1 32) THENWRITE (*,280) TITLE(I),DATA(L1),DATA(L1)-DATA(1,1), 1 DATA(I,2),DATA(I,2)-DATA(1,2),DATA(I,3),DATA(I,3)-2 DATA(1,3),DATA(I,4),DATA(I,4)-DATA(1,4) 280 FORMAT (6X,A16,4(2X,F4.2,1X,'(',F5.2,')'))ENDIF270 CONTINUECALL GOTOXY (1,23)WRITE (*,*) 'Press <PGUP> or <PGDN> to page through results'WRITE (*,*) ' or <CTRL> <X> or <ESC> to exit.'320 CALL GETKEYBOARD(CH,II)IF (II.EQ.73) THENIPAGE=10GOTO 1ELSEIF (II.EQ.81) THENGOTO 396ELSEIF (II.EQ.1.ORII.EQ.45) THENCALL CURSORONRETURNELSEGOTO 320ENDIF396 CALL CLRSCRWRITE (*,230) 2WRITE (*,*)WRITE (s,282) 282 FORMAT (2X,'Summary of Vehicle Roll-Over Probabilities')WRITE (* *)WRITE (*,290) 290 FORMAT (25X,'Total Roll-Overs',3X,'Rolls on Slope',4X,1 'Roll @ Terrain Chg')WRITE (*,300) 300 FORMAT (6X,'Alternatives',7X,'Number',2X,'(Prob.)',4X,1 'Number',2X,'(Prob.)',4X,'Number',2X,'(Prob.)')WRITE (*,305) 305 FORMAT (6X,74('_'))WRITE (*,*)IF (NROLLS(1).GT.0) THENWRITE (*,301) TITLE(1),NROLLS(1),REAL(NROLLS(1))/1 REAL(NCALLS(1)),NJR0L(1),REAL(NJR0L(1))/REAL(NCALLS(1)),2 NIROL(1),REAL(NIROL(1))/REAL(NCALLS(1)) 301 FORMAT (6X,A16,3X,I5,3X,T,F5.2,')',2(4X,I5,3X,T,F5.2, 1 ')'))ELSEWRITE (*,306) TITLE(1) 306 FORMAT (6X,A16,3X,' 0',14X,' 0',14X,' 0')ENDIF229DO 310 1=2,10IF (ICHAR(1111,E(I)(1:1)).NE.O.ANDICHAR(1111,E(1)(1:1)).1 NE.32) THENIF (NROLLS(I).GT.0) THENIF (NROLLS(1).GT.0) THENWRITE ( 5 ,308) TITLE(I),NROLLS(I),REAL(NROLLS(I))/ 1 REAL(NCALLS(I)),NJROL(I),REAL(NJROL(I))/ 2 REAL(NCALLS(I)),NIROL(I),REAL(NIROL(I))/ 3 REAL(NCALLS(I)) 308 FORMAT (6X,A16,3X,15,3X,V,F5.2,7,2(4X,15,3X, 1 '(',F5.2,')'))ELSEWRITE (5 ,308) TTTLE(I),NROLLS(I),REAL(NROLLS(I))/ 1 REAL(NCALLS(I)),NJROL(I),REAL(NJROL(I))/ 2 REAL(NCALLS(I)),NIROL(I),REAL(NIROL(I))/ 3 REAL(NCALLS(I))ENDIFELSEWRITE (*,306) TITLE(I)ENDIFENDIF310 CONTINUECALL GOTOXY (1,23)WRITE (*,*) 'Press <PGUP> or <PGDN> to page through results'WRITE (*,*) ' or <CTRL> <X> or <ESC> to exit.'420 CALL GETKEYBOARD(CH,II)IF (II.EQ.73) THENGOTO 196ELSEIF (II.EQ.81) THENIPAGE= 1IF (ECONTYPE.EQ.0.OR.ECONTYPE.EQ.1) THENGOTO 496ELSEGOTO 1ENDIFELSEIF (II.E,Q.1.0R.II.EQA5) THENCALL CURSORONRETURNELSEGOTO 420ENDIF496 IF (ECONTYPE.EQ.0) THENCALL CLRSCRWRITE (*,230) 3WRITE (* 5)WRITE (*,500) 500 FORMAT(2X,'Economic Evaluation of Improvement Alternatives')WRITE (*,502) TITLE(1) 502 FORMAT (4X,'Relative Accident Savings & Relative Mitigatn', 1 ' costs are wrt: ',A16)WRITE ( 5 ,510) 510 FORMAT (42X,'Relative',2X,'Relative')WRITE ( 5 ,515) 515 FORMAT (22X,'Accident',2X,'Mitigatn',2X,'Accident',2X, 1 'Mitigatn',4X,'B-C',SX,'Net')WRITE ( 5 ,517) 517 FORMAT (24X,'Costs',5X,'Costs',4X,'Savings',4X,'Costs',4X, 1 'Ratio',2X,'Benefit')IF (DOLLAR.EQ.0) THENWRITE (*,520)230520 FORMAT (6X,'Alternatives',6X,3('(PV$)',SX),'(PV$)',12X,1 '(PV$)')ELSEWRITE (*,525)525 FORMAT (6X,'Alternatives',4X,4('($/year)',2X),8X,1 '($/year)')ENDIFWRITE (*,530)530 FORMAT (6X,72('_'))WRITE (*,*)IF (DOLLAREQ.0) THENWRITE (*,540) TITLE(1),TACCOST(1),MITCOST(1)540 FORMAT (6X,A16,2(F9.0,1X))ELSEWRITE (*,540) TITLE(1),TACCOST(1)*INTEREST/100*1 (1 + INTEREST/100)**PERIOD/((1 + INTEREST/100)**PERIOD-1),2 MITCOST(1)*INTERE_ST/100*(1+INTEREST/100)**PERIOD/3 ((1+INTEREST/100)**PERIOD-1)ENDIFDO 550 1=2,10IF (ICHAR(1TTLE(1)(1:1)).NE.O.ANDICHAR(111LE(1)(1:1)).1 NE.32) THENIF (DOLLAR.EQ.0) THENIF (MITCOST(I).NE.MITCOST(1)) THENWRITE (*,543) TITLE(I),TACCOST(I),MITCOST(I),1 TACCOST(1)-TACCOST(I),MITCOST(I)-MITCOST(1),2 (TACCOST(1)-TACCOST(I))/(MITCOST(D-MITCOST(1)),3 (TACCOST(1)-TACCOST(I))-(MITCOST()-MITCOST(1))543 FORMAT (6X,A16,4(F9.0,1X),1X,F5.2,1X,F9.0)ELSEWRITE (*,545) TITLE(I),TACCOST(I),MITCOST(I),1 TACCOST(1)-TACCOST(I),MITCOST(I)-MITCOST(1),2 (TACCOST(1)-TACCOST(0)-(MITCOST(1)-MITCOST(1))545 FORMAT (6X,A16,4(F9.0,1X),1X,'—',1X,F9.0)ENDIFELSEIF (MITCOST(I).NE.MITCOST(1)) THENWRITE (*,543) TITLE(1),TACCOST(1)*INTERE_ST/100*1 (1 +INTEREST/100)**PERIOD/2 ((1+INTEREST/100)**PERIOD-1),MITCOST(1)*3 INTEREST/100*(1+ INTEREST/100)**PERIOD/4 ((1 + INTEREST/100)**PERIOD-1),(TACCOST(1)-5 TACCOST(I))*INTEREST/100*6 (1+ INTEREST/100)**PERIOD/7 ((1 + INTEREST/100)**PERIOD-1),(MITCOST(I)-8 MITCOST(1))*INTEREST/100*9 (1 +INTEREST/100)"PERIOD/1 ((1 + INTERM/100)**PERIOD-1),(TACCOST(1)-2 TACCOST(I))/(MITCOST(I)-MITCOST(1)),3 ((TACCOST(1)-TACCOST(I))-(MITCOST(I)-4 MITCOST(1)))*INTEREST/100*5 (1+ INTEREST/100)**PERIOD/3 ((1+INTEREST/100)"PERIOD-1)ELSEWRITE (*,545) 111LE(1),TACCOST(1)*INTEREST/100*1 (1 + INTEREST/100)**PERIOD/2 .((1+ INTEREST/100)**PERIOD-1),MITCOST(I)*3 INTEREST/100*(1 + INTEREST/100)**PERIOD/4 ((1 + INTEREST/100)**PERIOD-1),(TACCOST(1)-5 TACCOST(I))*INTEREST/100*6 (1 + INTEREST/100)**PERIOD/7 ((1+INTEREST/100)**PERIOD-1),(MITCOST(1)-231 8 MITCOST(1))*INTEREST/100* 9 (1 + INTEREST/100)**PERIOD/ 1 ((1 + INTEREST/100)**PERIOD-1),((TACCOST(1)- 2 TACCOST(I))-(MITCOST(I)-MITCOST(1)))* 3 INTEREST/100*(1 +INTERFST/100)**PERIOD/ 4 ((1 + INTEREST/100)**PERIOD-1)ENDIFENDIFENDIF 550 CONTINUE** Display cost effectiveness summaryELSEIF (ECONTYPE.EQ.1) THENCALL SETSCREENMODE(16)** Determine graph scales*MAXY = (SEVERITY(1)*DATA(1,1)+ SEVERITY(2)*DATA(1,2)+1 SEVERTTY(3)*DATA(1,3)+ SEVERITY(4)*DATA(1,4))*ENCRATEMINY = (SEVERITY(1)*DATA(1,1)+SEVERITY(2)*DATA(1,2)+1 SEVERITY(3)*DATA(1,3)+SEVERITY(4)*DATA(1,4))*ENCRATEMAXX= MITCOST(1)MAXISET = 1MINX = MITCOST(1)MINISET= 1DO 600 1=1,10IF (ICHAR(TITLE(I)).NE.O.ANDICHAR(ITILE(I)).NE.32) THENIF OSEVERITY(1)*DATA(I,1)+SEVERITY(2)* 1 DATA(I,2)+ SEVERITY(3)*DATA(I,3)+SEVERITY(4)* 2 DATA(I,4))*ENCRATE.GT.MAXY) MAXY=(SEVERITY(1)* 3 DATA(I,1)+SEVERITY(2)*DATA(I,2)+SEVERITY(3)* 4 DATA(I,3)+ SEVERITY(4)*DATA(I,4))*ENCRATEIF ((SEVERITY(1)*DATA(I,1) + SEVERITY(2)* 1 DATA(I,2)+ SEVERITY(3)*DATA(I,3)+SEVERITY(4)* 2 DATA(I,4))*ENCRATE.LT.MINY) MINY=(SEVERITY(1)* 3 DATA(I,1)+ SEVERITY(2)*DATA(I,2)+ SEVERITY(3)* 4 DATA(I,3)+SEVERITY(4)*DATA(I,4))*ENCRATEIF (MITCOST(I).GT.MAXX) THENMAXX=MITCOST(I)MAXISET= IENDIFIF (MITCOST(I).LT.MINX) THENMINX = MITCOST(I)MINISET= IENDIFCALL GOTOXY (1,2+ I)WRITE (*,605) I,TITLE(I) 605 FORMAT (61X,I2,1X,A16)ENDIF 600 CONTINUEMAXY=MAXY*1.1MINY = MINY*0.9MALY= MAXX*1.1MINX = MINX*0.9IF (MAXX.EQ.MINX) MAXX= MINX +1IF (MAXY.EQ.MINY) MAXY = MINY +1232* Draw graph outline and axesCALL DRAW (40,40,40,250,7)CALL DRAW (40,250,480,250,7)CALL GOTOXY (1,2)WRITE (*,620) MAXY 620 FORMAT (F102)CALL GOTOXY (1,7)WRITE (*,635) 'S'635 FORMAT (1X,A1)WRITE (*,635) 'E'WRITE (*,635) 'V'WRITE (*,635) 'E'WRITE (*,635) 'R'WRITE (*,635) 'I'WRITE (*,635)WRITE (*,635) 'Y'CALL GOTOXY (1,19)WRITE (*,620) MINYCALL GOTOXY (1,20)IF (DOLLAREQ.0) THENWRITE (*,640) MINX,MAXX 640 FORMAT (4X,F10.3,5X,'MMGATION COST (PV$/lun)',6X,F10.3)ELSEWRITE (*,645) MINX*INTEREST/100*(1+INTEREST/100)**PERIOD/1 ((I +INTEREST/100)**PERIOD-1),MAXX*INTEREST/100*2 (1 + INTEREST/100)**PERIODA(1 + INTEREST/100)**PERIOD-1) 645 FORMAT (4X,F10.3,4X,'MMGATION COST ($/km/yr)',4X,F10.3)ENDIFCALL GOTOXY (1,1)WRITE (*,650) 650 FORMAT (1X,'COST EFFECTIVENESS EVALUATION',36X,1 'ALTERNATIVES')Plot points on graph*ICOLOUR= 9DO 660 1=1,10IF (ICHAR(1 1 ILE(1)).NE.O.ANDICHAR(111LE(I)).NE.32) THENIX=40+(MITCOST(I)-MINX)/(MAXX-MINX)*440IY =250-((SEVERTTY(1)*DATA(I,1)+SEVERITY(2)*1 DATA(I,2)+SEVERITY(3)*DATA(I,3)+SEVERITY(4)*2 DATA(1,4))*ENCRATE-MINY)/(MAXY-MINY)*210CALL CIRCLE (IX,IY,2,ICOLOUR)IX =IX*80/640 +1IY=IY*25/350CALL GOTOXY(IX,IY)WRITE (CH,670) I 670 FORMAT (11)CALL PUTCHA I 1 R(CH 2O,ICOLOUR, I)ICOLOUR= ICOLOUR+ 1IF (ICOLOUREQ.16) ICOLOUR =9ENDIF 660 CONTINUEENDIFCALL GOTOXY (1,23)IF (DOLLAREQ.0) THENWRITE (*,*) 'Press <PGUP> or <PGDN> to page through'// 1 ' results, <$> for an. costs & savings'233ELSEWRITE (*,*) 'Press <PGUP> or <PGDN> to page through'//' results, <$> for PV costs & savings'ENDIFIF (ECONTYPE.EQ.O.AND.CE.EQ.1) THENWRITE (*,*) ' <CTRL> <C> for cost effect. results,'// 1 ' or <CTRL> <X> or <ESC> to exit.'ELSEIF (BC.EQ.1) THENWRITE (*,*) ' <CTRL> <B> for benefit cost results,'// 1 ' or <CTRL> <X> or <ESC> to exit.'ENDIF560 CALL GETKEYBOARD(CH,II)CALL SETSCREENMODE(3)IF (II.EQ.73) THENGOTO 396ELSEIF (ILEQ.81) THENIPAGE= 1GOTO 1ELSEIF (ILEQ.LORII.EQ.45) THENCALL CURSORONRETURNELSEIF (ICHAR(CH).EQ.36) THENIF (DOLLAREQ.1) THENDOLLAR= 0ELSEDOLLAR=1ENDIFGOTO 496ELSEIF (ILEQ.48.AND.ECONTYPE.EQ.1.AND.BC.EQ.1) THENECONTYPE= 0GOTO 496ELSEIF (ILEQ.46.AND.ECONTYPE.EQ.O.AND.CE.EQ.1) THENECONTYPE=1GOTO 496ELSEGOTO 560ENDIFGOTO 496Graph resultsELSEIF (CHOICE.EQ.2) THENChoose input set 435 WRITE (*,*) CHAR(255),CHAR(255),'DISPLAY2/'DO 430 1=1,10DO 430 J=1,50CALL GOTOXY (21 +J,7+ I)CALL PUTCHAR(TITLE(I)(J:J),1)430 CONTINUE 440 WRITE (*,*) CHAR(255),CHAR(255),'DISPLAY4/'READ (*,10) ISETIF (ISET.EQ.11) RETURNIF (ICHAR(PrI'LE(ISET)(1:1)).EQ.0.OR.ICHAR(trI'LE(ISET)(1:1)).1 EQ.32) GOTO 440Choose consequence categoryWRITE (*,*) CHAR(255),CHAR(255),'DISPLAY3/'READ (*,10) CONSQIF (CONSQ.EQ.4) GOTO 435234*Choose vantage point*WRITE (*,*) CHAR(255),CHAR(255),'DISPLAY5/'READ (*,10) VANTAGEIF (VANTAGE.EQ.5) GOTO 435*Set graph variablesIF (VANTAGE.EQ.1) THENXTITLE= ' DIST. FROM ROAD'YTITLE='DIST. ALONG ROAD'NUMPTS(1)=10NUMPTS(2) =50DO 460 1=1,10X(I)=19-(I-1)*2DO 460 J=1,50Y(J)=99-(J-1)*2Z(I,J)=SPRES(ISET,50-J+1,104+1,CONSQ)*100 460 CONTINUEIF (CONSQ.EQ.1) WRITE (TTLE,450) ISET,'Top Left',1 'Property Damage Only' 450 FORMAT (1X,'Input Set ',I2,2X,A9,' Vantage Point',2X,A22)IF (CONSQ.EQ.2) WRITE (TTLE,450) ISET,'Top Left','Injuries'IF (CONSQ.EQ.3) WRITE (11LE,450) ISET,'Top Left',1 'Fatalities'ELSEIF (VANTAGE.EQ.2) THEN)(TITLE= 'DIST. ALONG ROAD'YTITLE=' DIST'. FROM ROAD'NUMPTS(1) =50NUMPTS(2)=10DO 470 1=1,50X(I)=99-(I-1)*2DO 470 J=1,10Y(J)=J*2-1Z(I,J) ='SPRES(ISET,504 + 1,J,CONSQ)*100 470 CONTINUEIF (CONSQ.EQ.1) WRITE (TTLE,450) ISET,'Bot Left', 1 'Property Damage Only'IF (CONSQ.EQ.2) WRITE (TTLE,450) ISET,'Bot Left','Injuries'IF (CONSQ.EQ.3) WRITE (11LE,450) ISET,'Bot Left', 1 'Fatalities'ELSEIF (VANTAGE.EQ.3) THENXTITLE= 'DIST. ALONG ROAD'YTITLE=' DIST. FROM ROAD'NUMPTS(1) =50NUMPTS(2)=10DO 480 1=1,50X(I)=I*2-1DO 480 J=1,10Y(J)=19-(J-1)*2Z(I,J)=SPRES(ISET,I,10-J+1,CONSQ)*100 480 CONTINUE •IF (CONSQ.EQ.1) WRITE (TTLE,450) ISET,'Top Right', 1 'Property Damage Only'IF (CONSQ.EQ.2) WRITE (1TLE,450) ISET,'Top Right','Injuries'IF (CONSQ.EQ.3) WRITE (TTLE,450) ISET,'Top Right', 1 'Fatalities'235ELSEXTITLE=' DIST. FROM ROAD'YTITLE= 'DIST. ALONG ROAD'NUMPTS(1)=10NUMPTS(2)=50DO 490 1=1,10X(I)=I*2-1DO 490 J=1,50Y(J) =J`2-1Z(I,J)=SPRES(ISET,J,I,CONSQ)*100490 CONTINUEIF (CONSQ.EQ.1) WRITE (TTLE,450) ISET,'Bot Right',1 'Property Damage Only'IF (CONSQ.EQ.2) WRITE (TTLE,450) ISET,'Bot Right','Injuries'IF (CONSQ.EQ.3) WRITE (TILE,450) ISET,'Bot Right',1 'Fatalities'ENDIFGI I ILE = 'PROB.(%)'Plot graphCALL GRAPH3DGOTO 435ELSERETURNENDIFEND236SUBROUTINE GRAPH3DThis subroutine is used to plot a three dimensional graph*INTEGER COLOUR,COUNTX,COUNTY,IX1,IX2,IX3,IX4,1Y1,IY2,IY3,IY4,1 NUMPTS(2)REAL GVAL1(20),GVAL2(20),MAXX,MAXY,MAXZ,MINX,MINY,MINZ,1 UT(20,20),X(100),XCR,Y(100),YCR,Z(100,100)CHARAC1ER*1 CHCHARACTER*9 El11LECHARACIER*17 XITrLE,YTITLECHARAC1ER*80 TITLELOGICAL KYPCOMMON / GRPH3D / NUMPTS,X,Y,Z,XTITLE,YTITLE,G1T1LE,ITTLEDetermine plot scales*MAXX = X(NUMPTS(1))MINX = X(1)MAXY = Y(NUMPTS(2))MINY =Y(1)MAXZ= Z(1,1)MINZ =Z(1,1)DO 10 I=1,NUMPTS(1)DO 10 J=1,NUMPTS(2)IF (Z(I,J).GT.MAXZ) MAXZ=Z(I,J)IF (Z(I,J).LT.MINZ) MINZ=Z(I,J)10 CONTINUECalculate plotted pointsDO 25 1=1,20GVAL1(I)=MINX+ (I-1)*(MAXX-MINX)/19DO 25 J=1,20GVAL2(J)=MINY+(J-1)*(MAXY-MINY)/1925 CONTINUECALL CLRSCRCALL CURSOROFFCALL GOTOXY (1,1)WRITE (*,*) 'Creating graph ...'WRITE (*,*) ' Percentage complete'WRITE (*,*)COUNTX =1DO 27 I =2,NUMPTS(1)26 COUNTY =1IF aGVAL1(COUNTX).GE.X(I-1).AND.GVAL1(COUNTX).LE.X(I)).0R.1 (GVAL1(COUNTX).LE.X(I-1).AND.GVALl(COUNTX).GE.X(1))) THENDO 28 J=2,NUMPTS(2)29 IF aGVAL2(COUNTY).GE.Y(J-1).AND.GVAL2(COUNTY).LE.Y(J)).1 OR.(GVAL2(COUNTY).LE.Y(J-1).AND.GVAL2(COUNTY).GE.Y(J)))2 THENUT(COUNTX,COUNTY)=Z(1,J)*(GVALl(COUNTX)-X(I-1))/1 (X(I)-X(I-1))*(GVAL2(COUNTY)-Y(J-1))/(Y(J)-Y(J-1))+2 Z(I-1,J)*(X(1)-GVALl(COUNTX))/(X(D-X(I-1))*3 (GVAL2(COUNTY)-Y(J-1))/(Y(J)-Y(J-1))+Z(I,J-1)*4 (GVAL1(COUNTX)-X(I-1))/(X(I)-X(I-1))*5 (Y(J)-GVAL2(COUNTY))/(Y(J)-Y(J-1))+ Z(1-14-1)*6 (X(I)-GVAL1(COUNTX))/(X(D-X(I-1))*(Y(J)-7 GVAL2(COUNTY))/(Y(J)-Y(J-1))237IF (COUNTY.LT.20) THENCOUNTY= COUNTY +1CALL GOTOXY(1,4)WRITE (*,*) ((COUNTX-1)*20+COUNTY)*100/400CALL KEYPRESSED(KYP)IF (KYP) THENCALL GETKEYBOARD(CH,I1)IF (II.EQ.1) RETURNENDIFGOTO 29ENDIFENDIF28 CONTINUEIF (COUNTX.LT.20) THENCOUNTX= COUNTX +1GOTO 26ENDIFENDIF27 CONTINUECALL CURSORONDraw axesCALL CLRSCRCALL SETSCREENMODE(16)CALL GOTOXY (1,7)WRITE (*,30) MAXI30 FORMAT (F10.3)CALL GOTOXY (1,9)DO 40 1=1,9WRITE (*,50) ZIIILE(11)50 FORMAT (1X,A1)40 CONTINUECALL GOTOXY (1,18)WRITE (*,30) MINZCALL GOTOXY (1,24)WRITE (*,60) MINY,MINX60 FORMAT (30X,F10.3,4X,F10.3)CALL GOTOXY (1,22)WRITE (*,70) YTITLE,XTITLE70 FORMAT (13X,A17,27X,A17)CALL GOTOXY (1,20)WRITE (*,80) MAXY,MAXX80 FORMAT (F10.3,57X,F10.3)CALL DRAW (40,108,40,242,7)CALL DRAW (40,242,340,310,7)CALL DRAW (340,310,640,242,7)Plot curvesDO 90 1=20,2,-1IY2 = 310-(GVAL1(I)-MINX)*68/(MAXX-MINX)-68-1 (UT(I,20)-MINZ)/(MAXZ-MINZ)*135IX2 = 340 + (GVAL1(I)-MINX)*300/(MAXX-MINX)-300IY4 = 310-(GVAL1(I-1)-MINX)*68/(MAXX-MINX)-68-1 (UT(I-1,20)-MINZ)/(MAXZ-MINZ)*135IX4 = 340 + (GVAL1(I-1)-MINX)*300/(MAXX-MINX)-300CALL DRAW (TX2,1Y2,1X4,IY4,5)DO 90 J=19,1,-1CALL KEYPRESSED(KYP)IF (KYP) THEN238CALL GETICEYBOARD(CH,II)IF (II.EQ.1) THENCALL SETSCREENMODE(3)RETURNENDIFENDIFIY1 =310-(GVAL1(I)-MINX)*68/(MAXX-MINX)-1 (GVAL2(.1)-MINY)*68/(MAXY-MINY)-(UT(I,J)-MINZ)/(MAXZ-MINI)*2 135IX1 =340+ (GVAL1(I)-MINX)*300/(MAXX-MINX)-1 (GVAL2(.1)-MINY)*300/(MAXY-MINY)IY3 = 310-(GVAL1(I-1)-MINX)*68/(MAXX-MINX)-1 (GVAL2(J)-MINY)*68/(MAXY-MINY)-(UT(I-1,J)-MINZ)/(MAXZ-MINI)*2 135IX3 = 340 + (GVAL1(I-1)-MINX)*300/(MAXX-MINX)-1 (GVAL2(J)-MINY)*300/(MAXY-MINY)CALL DRAW (1X1,1Y1,1X2,1Y2,5)CALL DRAW (1X3,1Y3,IX4,IY4,5)CALL DRAW (IX1,1Y1,1X3,1Y3,5)CALL DRAW (1X2,1Y2,IX4,IY4,5)Colour squaresIF (IY2.GT.IY3) THENCOLOUR= 1ELSECOLOUR= 15ENDIFXCR= 0YCR = 0IF (IX1-IX2.NE.O.AND.IX3-IX4.NE.0) THENIF ((lY1-1Y2)/(IX1-IX2)-(1Y3-1Y4)/(IX3-1X4).NE.0) THENXCR= (IY3-1Y1 + (IY1-1Y2)/(1X1-IX2)*IX1-(1Y3-1Y4)/1 (DC3-IX4)*IX3)/((lY1-1Y2)/(1X1-1X2)-(1Y3-1Y4)/2 (IX3-IX4))YCR= IY1 + (IY1-1Y2)/(IX1-DC2)*(XCR-IX1)ENDIFELSEIF (IX1-DC2.NE.0) THENXCR= IX3YCR= IY1 + (IY1-1Y2)/(IX1-1X2)*(XCR-IX1)ELSEIF (IX3-IX4.NE.0) THENXCR= IX1YCR = IY3 + (IY3-1Y4)/(1X3-IX4)*(XCR-IX3)ENDIFIF (((XCR.GT.IXLAND.XCR.LT .IX2).0R.(XCR.GT.IX2.AND.1 XCR.LT.IX1)).AND.((XCR.GT.IX3.AND.XCR.LT.IX4).0R.2 (XCR.GT.IX4AND.XCR.LT.IX3)).AND.((YCR.GT.IYLAND.YCR.3 LT.IY2).0R.(YCR.GT.IYIAND.YCR.LT .IY1)).AND.((YCRGT.4 IY3.AND.YCR.LT.IY4).0R.(YCR.GT.IY4AND.YCR.LT.IY3)))5 THENIF (ABS(IX1*IY3 +IX3*YCR+ XCR*IY1-IX3*IY1-XCR*IY3-1 IX1*YCR).GT.50) THENIF ((SQRT(REAL(IX1-1X3)**2+REAL(IY1-1Y3)**2)+1 SQRT(REAL(DC3-XCR)**2+ REAL(IY3-YCR)**2)+2 SQRT(REAL(IX1-XCR)**2 +REAL(IY1-YCR)**2))/3 ABS(IX1*IY3 +1X3*YCR+ XCR*IY1-IX3*IY1-XCR*IY3-4 IX1*YCR).LT.1) THENCALL FILLSHAPEOIX1+1X3+ XCR)/3,1 (IY1 + IY3 + YCR)/3,3,5)CALL FILLSHAPEOIX1+1X3+ XCR)/3,1 (nr1+1Y3+YCR)/3,COLOUR,5)239ENDIFENDIFIF (ABS(IX4*IY2+IX2*YCR+ XCR*IY4-1X2*IY4-XCR*IY2-1 IX4*YCR).GT.50) THENIF ((SQRT(REAL(IX4-1X2)**2+REAL(IY4-1Y2)**2)+1 SQRT(REAL(DC2-XCR)**2+ REAL(IY2-YCR)**2)+2 SQRT(REAL(IX4-XCR)**2+REAL(IY4-YCR)**2))/3 ABS(IX4*IY2 + DC2*YCR + XCR*IY4-1X2*IY4-XCR*IY2-4 IX4*YCR).LT.1) THENCALL FILLSHAPEaDC2+1X4+XCR)/3,1 (IY2 + 1Y4 + YCR)/3,3,5)CALL FILLSHAPEaDC2+1X4+XCR)/3,1 (IY2+1Y4+YCR)/3,COLOUR,5)ENDIFENDIFELSEXCR= 0YCR= 0IF (IX1-IX3.NE.OAND.IX2-IX4.NE.0) THENIF ((1Y1-1Y3)/(IX1-IX3)-(IY2-1Y4)/(DC2-IX4).1 NE.0) THENXCR= (1Y2-IY1 + (IY1-1Y3)/(IX1-1X3)*IX1-1 (IY2-1Y4)/(1X2-IX4)*IX2)/((1Y1-IY3)/2 (IX1-1X3)-(1Y2-1Y4)/(1X2-IX4))YCR=IY1+ (IY1-1Y3)/(1X1-IX3)*(XCR-IX1)ENDIFELSEIF (IX1-DC3.NE.0) THENXCR=IX2YCR= IY1 + (IY1-1Y3)/(1X1-1X3)*(XCR-IX1)ELSEIF (IX2-IX4.NE.0) THENXCR= IX1YCR=IY2+ (IY2-1Y4)/(DC2-IX4)*(XCR-IX2)ENDIFIF (((XCR.GT.IX1 AND.XCR.LT.IX3).0R.(XCR.GT.IX3.1 AND.XCR.LT.IX1))AND.((XCR.GT.IX2.AND.XCR.LT .2 IX4).0R(XCRGT.IX4.AND.XCRLT.IX2)).AND.((YCR.3 GT.IY1 AND.YCR.LT.IY3).0R.(YCR.GT.IY3.AND.YCR.4 LT.IY1)).AND.((YCR.GT.IY2.AND.YCR.LT .IY4).0R.5 (YCR.GT.IY4.AND.YCR.LT.IY2))) THENIF (ABS(IX1*IY2+1X2*YCR+ XCR*IY1-1X2*IY1-XCR*IY2-1 IX1*YCR).GT.50) THENIF ((SQRT(REAL(IX1-IX2)**2+ REAL(IY1-1Y2)"2)+1 SQRT(REAL(DC2-XCR)**2+REAL(IY2-YCR)**2)+2 SQRT(REAL(IX1-XCR)**2+REAL(IY1-YCR)**2))/3 ABS(IX1*IY2+IX2*YCR+ XCR*IY1-DC2*IY1-XCR*IY2-4 IX1*YCR).LT.1) THENCALL FILLSHAPE((IX1 + 1X2 + XCR)/3,1 (IY1+ IY2 + YCR)/3,3,5)CALL FILLSHAPEWX1+1X2+XCR)/3,1 (IY1+ IY2 + YCR)/3,COLOUR,5)ENDIFENDIFIF (ABS(IX4*IY3+1X3*YCR+ XCR*IY4-IX3*IY4-XCR*IY3-1 IX4*YCR).GT.50) THENIF ((SORT(REAL(IX4-IX3)**2+ REAL(IY4-1Y3)**2)+1 SQRT(REAL(DC3-XCR)**2+RFAL(IY3-YCR)**2)+2 SQRT(REAL(IX4-XCR)**2+REAL(IY4-YCR)**2))/3 ABS(IX4*IY3 + IX3*YCR + XCR*IY4-1X3`1Y4-XCR*IY3-4 IX4*YCR).LT.1) THENCALL FILISHAPEWX3+1X4 + XCR)/3,1 (IY3 + IY4 + YCR)/3,3,5)CALL FILLSHAPE((1X3+1X4 + XCR)/3,240 1 (IY3 + IY4+ YCR)/3,COLOUR,5)ENDIFENDIFELSEIF (ABS(IX1*IY2+1X2*IY4+1X4*IY3 + DC3*IY1- 1 IY1*IX2-1Y2*IX4-1Y4*IX3-1Y3*IX1).EQ. 2 Al3S(IX1*IY4+ IX4*IY3 + DC3*IY1-1Y1*IX4-1Y4*IX3- 3 IY3*IX1) + ABS(IX1*IY2 + IX2*IY4 + IX4*IY1-1Y1*IX2- 4 IY2*IX4-1Y4*IX1)) THENIF (ABS(IX1*IY4+1X4*IY3 + IX3*IY1-1Y1*IX4-1Y4*IX3- 1 IY3*IX1).GT30.ANDABS(IX1*IY2 + DC2*IY4 + IX4*IY1- 2 IY1*IX2-1Y2*IX4-1Y4*IX1).GT.50) THENIF ((SQRT(REAL(IX4-IX3)"2+ 1 REAL(IY4-1Y3)**2)+SQRT(REAL(DC3-IX1)**2+ 2 REAL(IY3-1Y1)**2)+SQRT(REAL(IX4-IX1)**2+ 3 REAL(IY4-1Y1)**2))/ABS(IX1*IY4+1X4*IY3+ 4 IX3*1111-1Y1*IX4-1Y4*IX3-1Y3*IX1).LT.1.AND. 5 (SQRT(REAL(IX4-IX2)**2+REAL(IY4-1Y2)**2)+ 6 SQRT(REAL(IX2-IX1)**2+REAL(IY2-1Y1)**2)+ 7 SQRT(REAL(IX4-IX1)**2+ REAL(IY4-1Y1)**2))/ 8 ABS(IX1*IY2+ IX2*IY4 + IX4*IY1-1Y1*IX2-1Y2*IX4- 9 IY4*IX1).LT.1) THENCALL FILLSHAPEOIX1+1X4)/2, 1 (IY1 +1Y4)/2,3,5)CALL FILLSHAPEWX1+1X4)/2, 1 (IY1+IY4)/2,COLOUR,5)GOTO 130ENDIFENDIFENDIFIF (ABS(IX2*IY3 + IX3*IY1 + IX1*IY2-1Y2*IX3-1Y3*IX1- 1 IY1*DC2).GT.50.AND.ABS(IX2*IY4+IX4*IY3 + IX3*1Y2- 2 IY2*IX4-1Y4*IX3-1Y3*DC2).GT.50) THENIF ((SQRT(REAL(IX3-IX1)**2+REAL(IY3-1Y1)**2)+ 1 SQRT(REAL(IX1-DC2)**2+REAL(IY1-1Y2)**2)+ 2 SQRT(REAL(IX3-IX2)**2+REAL(IY3-1Y2)**2))/ 3 ABS(DC2*IY3 + IX3*IY1 + IX1*IY2-1Y2*IX3-1Y3*IX1- 4 IY1*IX2).LTAAND.(SQRT(REAL(IX3-IX4)**2+ 5 REAL(IY3-1Y4)**2)+SQRT(REAL(IX4-1X2)**2+ 6 REAL(IY4-1Y2)**2)+SQRT(REAL(DC3-1X2)**2 + 7 REAL(IY3-1Y2)**2))/ABS(IX2*IY4+ IX4*IY3 + IX3*IY2- 8 IY2*IX4-1Y4*IX3-1Y3*IX2).LT.1) THENCALL FILLSHAPEaDC2+1X3)/2,(1Y2+1Y3)/2,3,5)CALL. FILLSHAPE((IX2 + IX3)/2,(1Y2 + IY3)/2, 1 COLOUR,5)ENDIFENDIFENDIF 130 CALL DRAW (1X1,1Y1,IX2,1Y2,10)CALL DRAW (IX3,IY3,IX4,IY4,10)CALL DRAW (IX1,1Y1,IX3,IY3,10)CALL DRAW (DC2,1Y2,IX4,IY4,10)IY2=IY1IX2=IX1IY4 = IY3IX4=IX390 CONTINUEWrite headingsWrite headingsCALL GOTOXY(1,1)WRITE (*,160) TITLE160 FORMAT (1X,A80)CALL GETICEYBOARD(CH,II)CALL SETSCREENMODE(3)RETURNEND241242SUBROUTINE PRINTThis subroutine prints input(s) and results to a file or to theprinterINTEGER CODE,CF,DAY,HOUR,LINENO,MINUTE,MONTH,POS,YEARCHARACIER*1 CHCHARAC1ER*12 FILNAMCHARACTER*76 FIELD(120)INCLUDE 'RHSM.INS'COMMON /SCRN/ FIELDOutput options screen1 WRITE (*,*) CHAR(255),CHAR(255),'PRINT/'FIELD(1) = OUTMODEFIELD(2) = PAUSEFIELD(3) = OUTPUTFDO 10I=1,10FIELD(I+3)=OPTION(1)10 CONTINUEFILNAM = 'PRINT'CODE= 0CF = 0POS=015 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.NE.LAND.CODE.NE .31) GOTO 15OUTMODE=F1ELD(1)PAUSE=F1ELD(2)OUTPUTF=FIELD(3)DO 20 I=1,10OPTION(I)=FIELD(I +3)20 CONTINUEIF (CODE.EQ.1) RETURNIF (OUTMODE.EQ.'P') THENOPEN (10,F1LE= 'LPT1',ERR= 1000)ELSEOPEN (10,F1LE=OUTPUTF,ERR=1500)ENDIFTitle on page 1IF (OUTMODE.EQ.'P') THENCALL CLRSCRDO 25 1=1;15WRITE (10;*)25 CONTINUEENDIFWRITE (10,29)29 FORMAT (20X,42('_'))WRITE (10,*)WRITE (10,30)30 FORMAT (24X,'ROADSIDE HAZARDS SIMULATION MODEL')WRITE (10,40)40 FORMAT (24X,' Transport Canada Road Safety')WRITE (10,*)WRITE (10,45)45 FORMAT (20X,42('_'))WRITE (10,*)WRITE (10,50)50 FORMAT (24X,' RHSM Version 9 (June 1992)')243WRITE (10,56)56 FORMAT (24X,' developed by')WRITE (10,51)51 FORMAT (20X,'BC Ministry of Transportation and Highways')WRITE (10,52)52 FORMAT (24X,' Highway Safety Branch')WRITE (10,53)53 FORMAT (24X,' and')WRITE (10,54)54 FORMAT (24X,' University of British Columbia')WRITE (10,55)55 FORMAT (24X,' Transportation Studies')WRITE (10,*)WRITE (10,57)57 FORMAT (20X,42('_'))WRITE (10,*)CALL DATE(YEAR,MONTH,DAY)CALL TIME(HOUR,MINUTE,II,U)WRITE (10,60) DAY,MONTH,YEAR60 FORMAT (33X,'Date: ',I2,'/',I2,'/',I4)IF (MINUTE.GE.10) THENWRITE (10,70) HOUR,MINUTE70 FORMAT (35X,'Time: ',I2,':',I2)ELSEWRITE (10,80) HOUR,MINUTE80 FORMAT (35X,'Time: ',I2,':0',I1)ENDIFWRITE (10,*)WRITE (10,83)83 FORMAT (20X,42('_'))IF (OUTMODE.EQ.'P') THENWRITE (10,85)85 FORMAT ('1')IF (PAUSE.EQ.'Y') THENWRITE (*,*) ' Press any key to continue printing ...'CALL GETKEYBOARD(CH,II)ENDIFENDIFLINENO =0WRITE (10,90)90 FORMAT (6X,'INPUT DATA ',60(''))WRITE (10,*)LINENO = LINENO +2Output operating dataDO 110 1=1,10IF (ICHAR(1111E(1)(1:1)).NE.O.ANDICHAR(TITLE(I)(1:1)).1 NE.32) THENWRITE (10,120) TITLE(I)120 FORMAT (7X,A50)WRITE (10,*)IF (OPTION(1).EQ.'Y') THENWRITE (10,100)100 FORMAT (8X,'Operational Data')WRITE (10,*)WRITE (10,130) 'Time Increment1 IDEF(I,1),TI(I),'s130 FORMAT (12X,A30,10X,A1,4X,F9.4,1X,A11)WRITE (10,130) 'Maximum Trajectory Time1 IDEF(I,2),TMAX(I),'s244WRITE (10,130) 'Minimum Halt Speed 1 IDEF(L3),VMIN(I),'mis 'WRITE (10,135) 'Number of Origin Points 1 IDEF(L4),MITER(I) 135 FORMAT (12X,A30,10X,A1,4X,I4)WRITE (10,130) 'Increment of Origin Shift 1 IDEF(I,5),XINCR(I),'mWRITE (10,130) 'Mean Speed 1 IDEF(I,7),VMEAN(I),'kph 'WRITE (10,130) 'Standard Deviation of Speed ', 1 IDEF(I,8),VSD(I),'kph 'WRITE (10,130) 'Speed Increment in S.Dev. 1 IDEF(I,9),VINCR(I),'s.d. 'WRITE (10,130) 'Angle Change Increment 1 IDEF(I,10),AINCR(I),'deg. 'WRITE (10,130) 'Minimum Probability Considered', 1 IDEF(I,11),PMIN(I),'WRITE (10,130) 'Brake Application 1 IDEF(I,12),BRAKE(I),'%WRITE (10,130) 'Percentage Seatbelt Use 1 IDEF(I,13),REST(I),'%WRITE (10,130) 'Steer Back Angle 1 IDEF(I,17),S1EER(I),'deg. 'IF (HCURVE(I).EQ.1) WRITE (10,150) '",'Straight'IF (HCURVE(I).EQ.2) WRITE (10,150) ",' Gentle'IF (HCURVE(I).EQ.3) WRITE (10,150) "Noderate'IF (HCURVE(I).EQ.4) WRITE (10,150) ",' Severe' 150 FORMAT (12X,'Horizontal Curvature',20X,A1,SX,A8)WRITE (10,135) 'Vehicle Model 1 IDEF(I,19),MODEL(I)WRITE (10,*)LINENO = LINENO +18ENDIFOutput terrain data*IF (OPTION(2).EQ.'Y') THENIF (LINENO + 7+ NT(I).GT.60) THENIF (OUTMODE.EQ.'P') THENWRITE (10,85)IF (PAUSE.EQ.'Y') THENWRITE (*,*) ' Press any key to continue ', 1 'printing ...'CALL GETKEYBOARD(CH,II)ENDIFENDIFLINENO =0ENDIFWRITE (10,155) 155 FORMAT (8X,'Terrain Data (Terrain Change Points)')WRITE (10, ․)WRITE (10,170) 170 FORMAT (12X,'Lateral',10X,'Slope',10X,'Terrain',9X, 1 'Rolling')WRITE (10,180) 180 FORMAT (12X,'Offset (m)',7X,'Angle (Deg)',4X, 1 'Resistance',6X,'Resistance')WRITE (10,190) 190 FORMAT (12X,58('_'))WRITE (10,*)245DO 200 J=1,NT(I)WRITE (10,210) TY(I,J),TA(I,J),TM(I,J),TR(I,J) 210 FORMAT (12X,F6.3,10X,F7.3,2(10X,F6.4)) 200 CONTINUEWRITE (10,*)LINENO = LINENO +7+ NT(I)ENDIF* Output object dataIF (OPTION(3).EQ.'Y') THENIF (LINEN° + 7 +NO(I).GT.60) THENIF (OUTMODE.EQ.'P') THENWRITE (10,85)IF (PAUSE.EQ.'Y') THENWRITE (*,*) ' Press any key to continue ', 1 'printing ...'CALL GETKEYBOARD(CH,II)ENDIFENDIFLINENO =0ENDIFWRITE (10,220) 220 FORMAT (8X,'Object Data')WRITE (10,*)WRITE (10,230) 230 FORMAT (12X,' End Point 1',6X,' End Point 2',5X, 1 'Object',4X,'Object',4X,'Friction')WRITE (10,240) 240 FORMAT (12X,2('X (m)',3X,'Y (m)',5X),'Width',4X, 1 ' Type ',4X,' Code ')WRITE (10,245) 245 FORMAT (12X,63('_'))WRITE (10,*)DO 250 J=1,NO(I)WRITE (10,260) THX1(I,J),THY1(I,J),THX2(I,J), 1 THY2(I,J),THWID(I,J),THTYP(I,J),THM(I,J) 260 FORMAT (12X,F5.1,3X,F5.1,5X,F5.1,3X,F5.1,5X, 1 F5.1,7X,A1,8X,F5.1) 250 CONTINUEWRITE (10,*)LINENO = LINENO + 7 + NO(I)ENDIFIF (OUTMODE.EQ.'P') THENWRITE (10,85)IF (PAUSE.EQ.'Y') THENWRITE (*,*) ' Press any key to continue ', 1 'printingCALL GETKEYBOARD(CH,II)ENDIFENDIFLINENO =0ENDIF110 CONTINUEOutput departure anglesIF (OPTION(4).EQ.'Y') THENWRITE (10,269)269 FORMAT (2X,'CALIBRATION DATA ',77(''))WRITE (10,*)246WRITE (10,270)270 FORMAT (3X,'Departure Angle Frequency Distributions')WRITE (10,*)WRITE (10,')DO 275 1=1,4IF (I.EQ.1) WRITE (10,276) 'Straight Section'276 FORMAT (5X,A16)IF (I.EQ.2) WRITE (10,276) 'Gentle Curve 'IF (I.EQ.3) WRITE (10,276) 'Moderate Curve 'IF (I.EQ.4) WRITE (10,276) 'Severe Curve 'WRITE (10,*)WRITE (10,280)280 FORMAT (6X,4('Angle',2X,'Freq.',3X),'Angle',2X,'Freq.')WRITE (10,283)283 FORMAT (6X,72('_'))DO 290 J=1,7WRITE (10,300) 2*((J-1)*5 +1),PP(I,(J-1)*5 +1),1 2' ((J-1)'5 + 2),PP(I,(J-1)'5 +2),2* ((J-1)'S +3),2 PP(I,(J-1)*5 + 3),2*((J-1)*5 +4),PP(I,(J-1)*5 +4),3 2*((J-1)*5 + 5),PP(I,(J-1)*5 +5)300 FORMAT (8X,4(I2,3X,F5.0,5X),I2,3X,F5.0)290 CONTINUEWRITE (10,')WRITE (10,*)IF (OUTMODE.EQ.'P'.AND.(I.EQ.4)) THENWRITE (10,85)IF (PAUSE.EQ.'Y') THENWRITE (',') ' Press any key to continue printing ...'CALL GETKEYBOARD(CH,II)ENDIFENDIF275 CONTINUEENDIF* Output Probability Consequence DistributionIF (OPTION(5).EQ.'Y') THENWRITE (10,310)310 FORMAT (7X,'Probability of Consequence Table')WRITE (10,')WRITE (10,320)320 FORMAT (21X,'Power',7X,'No',8X,'Unrestrained',8X,'Restrained')WRITE (10,330)330 FORMAT (21X,'(W/kg)',4X,'Damage',6X,'PDO',5X,'Fatal',1 7X,'PDO',SX,'Fatal')WRITE (10,333)333 FORMAT (12X,64('_'))WRITE (10,')DO 340 I = 1, NPLAWRITE (10,350) I, (PLA(I,J), J = 1, 6)350 FORMAT (12X,I4,F10.0,5(5X,F5.2))340 CONTINUEWRITE (10,')LINENO = LINENO + 7+ NPLAENDIF• Output Probability of Roll TableIF (OPTION(6).EQ.'Y') THENIF (LINENO + 7 + NVEL.GT.60) THENIF (OUTMODE.EQ.'P') THEN247WRITE (10,85)IF (PAUSE.EQ.'Y') THENWRITE (*,*) ' Press any key to continue ', 1 'printing ...'CALL GETKEYBOARD(CH,II)ENDIFENDIFLINENO =0ENDIFWRITE (10,360) 360 FORMAT (7X,'Roll Consequence Table')WRITE (10,*)WRITE (10,370) 370 FORMAT (31X,'Unrestrained',15X,'Restrained')WRITE (10,380) 380 FORMAT (14X,'Speed',2(10X,'PD0',5X,'Fatality'))WRITE (10,383) 383 FORMAT (12X,59('_'))WRITE (10,*)DO 390 I=1,NVELWRITE (10,400) VEL(I),RP1(I,1),RP1(I,2),RP2(I,1),RP2(I,2) 400 FORMAT (12X,F7.2,4(6X,F7.5))390 CONTINUEWRITE (10,*)LINENO = LINENO + 7+ NVELENDIFOutput Vehicle CharacteristicsIF (OPTION(7).EQ.'Y') THENIF (LINENO+15.GT.60) THENIF (OUTMODE.EQ.'P') THENWRITE (10,85)IF (PAUSE.EQ.'Y') THENWRITE (*,*) ' Press any key to continue ', 1 'printingCALL GETKEYBOARD(CH,II)ENDIFENDIFLINENO =0ENDIFWRITE (10,410) 410 FORMAT (7X,'Vehicle Characteristics')WRITE (10,*)WRITE (10,420) 420 FORMAT (12X,'Vehicle',6X,'Wheel',8X,'Track',8X,' Weight',6X,1 'Centre or)WRITE (10,430) 430 FORMAT (12X,'Type',9X,'Base (m)',SX,'Width (m)',4X,1 ' (kg)',7X,'Gravity (m)')WRITE (10,433) 433 FORMAT (12X,63('_'))WRITE (10,*)DO 440 1=1,8WRITE (10,450) I,WBASE(I),TRACK(I),VMASS(I),CG(I) 450 FORMAT (14X,I1,10X,F5.2,8X,F5.2,8X,F8.2,6X,F5.2)440 CONTINUEWRITE (10,*)LINENO = LINENO +15WRITE (10,451)451 FORMAT (7X,'Economic Evaluation Default Costs and Weights')WRITE (10,•)248WRITE (10,452) 452 FORMAT (10X,'Accident Costs (B/C Analysis)',4X,'Accident1 'Importance (C-E Analysis)')WRITE (10,453) 453 FORMAT (10X,29('_'),4X,34('_'))WRITE (10,*)TND= 0TPDO =0TINJ = 0TFAT= 0TND=TND +ACCOST(1,1) +ACCOST(2,1)TPDO =TPDO +ACCOST(1,2)+ACCOST(2,2)TINJ=TINJ+ACCOST(1,3)+ACCOST(2,3)TEAT= TEAT + ACCOST(1,4)+ACCOST(2,4)WRITE (10,454) TND,SEVERITY(1) 454 FORMAT (15X,'ND = ',F10.2,13X,'ND = ',I10)WRITE (10,455) TPDO,SEVERITY(2) 455 FORMAT (15X,'PDO = ',F10.2,13X,'PDO = ',I10)WRITE (10,456) TINJ,SEVERITY(3) 456 FORMAT (15X,'INJ = ',F10.2,13X,'INJ = ',HO)WRITE (10,457) TFAT,SEVERITY(4) 457 FORMAT (15X,'FAT = ',F10.2,13X,'FAT = ',HO)ENDIFOutput ResultsIF (OPTION(8).EQ.'Y'.0R.OPTION(9).EQ.'Y'.0R.OPTION(10).EQ.'Y')1 THENIF (LINENO.GT.0) THENWRITE (10,85)LINENO = 0ENDIFWRITE (10,465)465 FORMAT (6X,'RESULTSWRITE (10,*)ENDIFDO 460 I =1,10IF (ICHAR(TITLE(1)(1:1)).NE.O.ANDICHAR(TITLE(I)(1:1)).1 NE.32) THENWRITE (10,470) ITTLE(I) 470 FORMAT (6X,A50)WRITE (10,•)IF (OPTION(8).EQ.'Y') THENWRITE (10,480) 480 FORMAT (7X,'Simulation Results')WRITE (10,*)WRITE (10,490) NCALLS(I) 490 FORMAT (8X,'Total Number of Vehicle Trajectories = 1 I5)WRITE (10,500) NROLLS(I) 500 FORMAT (8X,'Total Number of Rolls = 1 15)IF (NROLLS(I).GT.0) WRITE (10,505) REAL(NROLLS(I))/ 1 REAL(NCALLS(I)) 505 FORMAT (10X,'Probability of Vehicle Roll-Over = 1 F5.2)WRITE (10,510) NIROL(I) 510 FORMAT (8X,'Number of Rolls at Terrain Change = 1 15)IF (NROLLS(I).GT.0) WRITE (10,520) REAL(NIROL(I))/ 1 REAL(NCALLS(I))249 520 FORMAT (10X,'Probability of Rolls at Terrain Change =1 F5.2)WRITE (10,530) NJROL(I) 530 FORMAT (8X,'Number of Rolls on Slope =1 15)IF (NROLLS(I).GT.0) WRITE (10,540) REAL(NJROL(I))/1 REAL(NCALLS(I)) 540 FORMAT (10X,'Probability of Rolls on Slope =1 F5.2)WRITE (10,*)WRITE (10,550) 550 FORMAT (7X,'Aggregated Probability of Overall Accident ',1 'Consequence Classification')WRITE (10,*)WRITE (10,560) DATA(I,1) 560 FORMAT (8X,'No Damage = ',F7.3)WRITE (10,570) DATA(I,2) 570 FORMAT (8X,'Property Damage Only = ',F7.3)WRITE (10,580) DATA(I,3) 580 FORMAT (8X,'Injury = ',F7.3)WRITE (10,590) DATA(I,4) 590 FORMAT (8X,'Fatality = ',F7.3)WRITE (10,*)ENDIFWRITE (10,802) 802 FORMAT (7X,'Economic Evaluation Factors')WRITE (10,*)IF (OPTION(9).EQ.'Y'.AND.BC.EQ.1) THENWRITE (10,800) ENCRATE 800 FORMAT (8X,'Encroachment Rate (/km/yr) = ',F10.4)WRITE (10,810) TACCOST(I),TACCOST(I)*INTEREST/100* 1 (1+ INTERFST/100)**PERIOD/((1 +INTEREST/100)**PERIOD-1) 810 FORMAT (8X,'Total Accident Costs = ',F10.2, 1 ' PV$/km',5X,F10.2,' $/km/year')ENDIFIF (OPTION(9).EQ.'Y'.0R.OPTION(10).EQ.'Y') THENWRITE (10,815) MITCOST(I),MITCOST(I)*INTEREST/100* 1 (1 + INTEREST/100)**PERIOD/((1 + INTEREST/100)**PERIOD-1) 815 FORMAT (8X,'Total Mitigation Costs = ',F10.2, 1 ' PV$/lun',5X,F10.2,' $/km/year')ENDIFIF (OPTION(10).EQ.'Y') THENWRITE (10,820) (SEVERITY(1)*DATA(1,1)+SEVERITY(2)* 1 DATA(1,2)+SEVERITY(3)*DATA(L3)+SEVERITY(4)* 2 DATA(I,4))*ENCRATE 820 FORMAT (8X,'Total Severity (/km/year) = ',F10.0)ENDIFIF (OUTMODE.EQ.'P') THENWRITE (10,85)IF (PAUSE.EQ.'Y') THENWRITE (*,*) ' Press any key to continue ', 1 'printing ...'CALL GETKEYBOARD(CH,II)ENDIFENDIFENDIF460 CONTINUEIF (OPTION(8).EQ.'Y'.0ROPTION(9).EQ.'Y'.0R.OPTION(10).EQ.'Y')1 THEN250IF (LINENO.GT.0) THENWRITE (10,85)LINENO =0ENDIFWRITE (10,629)629 FORMAT (3X,'SUMMARY OF RESULTS ',62('*'))WRITE (10,*)ENDIFIF (OPTION(8).EQ.'Y') THENWRITE (10,630) 630 FORMAT (4X,'Summary of Accident Consequence Probabilities')WRITE (10,640) TI1LE(1) 640 FORMAT (5X,'(and differences from: ',A16,')')WRITE (10,•)WRITE (10,650) 650 FORMAT (8X,'Alternatives',7X,'No Damage',7X,'P.D.O.',8X,1 'Injury',7X,'Fatality')WRITE (10,653) 653 FORMAT (8X,72('_'))WRITE (10,*)WRITE (10,660) TITLE(1),DATA(1,1),DATA(1,2),DATA(1,3),DATA(1,4) 660 FORMAT (8X,A16,2X,F4.2,10X,F4.2,10X,F4.2,10X,F4.2)DO 670 1=2,10IF (ICHAKIT TLE(1)(1:1)).NE.O.ANDICHAR( 111 LE(I)(1:1)).1 NE.32) THENWRITE (10,680) ITTLE(I),DATA(1,1),DATA(1,1)-DATA(1,1), 1 DATA(I,2),DATA(I,2)-DATA(1,2),DATA(I,3),DATA(I,3)-2 DATA(1,3),DATA(I,4),DATA(I,4)-DATA(1,4) 680 FORMAT (8X,A16,4(2X,F4.2,1X,'(',F5.2,')'))ENDIFLINENO = LINENO +1670 CONTINUEWRITE (10,*)WRITE (10,*)WRITE (10,689) 689 FORMAT (4X,'Summary of Vehicle Roll-Over Probabilities')WRITE (10,*)WRITE (10,690) 690 FORMAT (27X,'Total Rolls',8X,'Rolls on Slope',4X,1 'Roll @ Terrain Chg')WRITE (10,700) 700 FORMAT (8X,'Alternatives',7X,'Number',2X,'(Prob.)',4X,1 'Number',2X,'(Prob.)',4X,'Number',2X,'(Prob.)')WRITE (10,705) 705 FORMAT (8X,74('_'))WRITE (10,*)IF (NROLLS(1).GT.0) THENWRITE (10,707) TITLE(1),NROLLS(1),REAL(NROLLS(1))/1 REAL(NCALLS(1)),NJR0L(1),REAL(NJR0L(1))/REAL(NCALLS(1)),1 NIROL(1),REAL(NIROL(1)/NCALLS(1)) 707 FORMAT (8X,A16,3X,15,3X,'(',F5.2,')',2(4X,15,3X, 1 '(',F5.2,')'))ELSEWRITE (10,706) TITLE(1) 706 FORMAT (8X,A16,3X,' 0',14X,' 0',14X,' 0')ENDIFDO 710 1=2,10IF (ICHAR(1111E(I)(1:1)).NE.O.ANDICHAR(111 LE(I)(1:1)).1 NE.32) THENIF (NROLLS(I).GT.0) THENIF (NROLLS(1).GT.0) THEN251WRITE (10,708) ITTLE(1),NROLLS(I),REAL(NROLLS(I))/1 REAL(NCALLS(I)),NJROL(I),REAL(NJROL(I))/2 REAL(NCALLS(I)),NI ROL(1),REAL(NI ROLM)/3 REAL(NCALLS(I))708 FORMAT (8X,A16,3X,I5,3X,'(',F5.2,')',2(4X,I5,3X,1 '(',F5.2,')'))ELSEWRITE (10,708) TTTLE(I),NROLLS(I),REAL(NROLLS(I))/1 REAL(NCALLS(I)),NJROL(I),REAL(NJROL(I))/2 REAL(NCALLS(1)),NI ROL(I),REAL(NI ROLM)/3 REAL(NCALLS(I))C WRITE (10,680) TITLE(1),REAL(NIROL(1)*100/C 1 NROLLS(I)),REAL(NIROL(I)*100/NROLLS(I)-NIROL(1)*C 2 100/NROLLS(1)),REAL(NJROL(I)*100/NROLLS(I)),C 3 REAL(NJR0L(1)*100/NROLLS(I)-NJR0L(1)*100/NROLLS(1))C ELSEC WRITE (10,660) TITLE(I),REAL(NIROL(I)*100/C 1 NROLLS(1)),REAL(NJR0L(I)*100/NROLLS(I))ENDIFELSEWRITE (10,706) TITLE(I)ENDIFLINENO = LINENO +1ENDIF710 CONTINUEWRITE (10,*)WRITE (10,*)LINENO = LINENO +12ENDIF** Output benefit cost analysis summaryIF (OPTION(9).EQ.'Y') THENIF (LINEN° + 18 +NT(1).GT.60) THENIF (OUTMODE.EQ.'P') THENWRITE (10,85)IF (PAUSE.EQ.'Y') THENWRITE (*,*) ' Press any key to continue ',1 'printing ...'CALL GETICEYBOARD(CH,II)ENDIFENDIFLINENO =0ENDIFWRITE (10,900)900 FORMAT (4X,'Benefit Cost Ratio Economic Evaluation')WRITE (10,901)901 FORMAT (5X,'Relative Accident Savings and Relative Mitigatn',1 ' Costs are')WRITE (10,902) TITLE(1)902 FORMAT (5X,'with respect to: ',A16)WRITE (10,*)DO 905 J=1,2C WRITE (10,910)C910 FORMAT (38X,'Accident',3X,'Mitigation')WRITE (10,915)915 FORMAT (44X,'Relative',2X,'Relative')WRITE (10,917)917 FORMAT (24X,'Accident',2X,'Mitigatn',2X,'Accident',2X,1 'Mitigatn',4X,'B-C',SX,'Net')252WRITE (10,918) 918 FORMAT (26X,'Costs',SX,'Costs',4X,'Savings',4X,'Costs',4X,1 'Ratio',2X,'Benefit')IF (J.EQ.1) THENWRITE (10,920) 920 FORMAT (8X,'Alternatives',6X,3('(PVV,5X),'(PVV,12X,1 '(PV$)')ELSEWRITE (10,925) 925 FORMAT (8X,'Altematives',4X,4('($/year)',2X),8X,1 '($/year)')ENDIFWRITE (10,930) 930 FORMAT (8X,72('_'))WRITE (10,*)IF (J.EQ.1) THENWRITE (10,940) TITLE(1),TACCOST(1),MITCOST(1) 940 FORMAT (8X,A16,2(F9.0,1X))ELSEWRITE (10,940) 11 ILE(1),TACCOST(1)*INTEREST/100* 1 (1+ INTEREST/100)**PERIOD/((1 +INTEREST/100)**PERIOD-1), 2 MITCOST(1)*INTEREST/100*(1+INTEREST/100)**PERIOD/3 ((1 +INTEREST/100)**PERIOD-1)ENDIFDO 950 1=2,10IF (ICHAR(11,1:LE(1)(1:1)).NE.O.AND.ICHARCITFLE(I)(1:1)). 1 NE.32) THENIF (J.EQ.1) THENIF (MITCOST(I).NE.MITCOST(1)) THENWRITE (10,943) TITLE(I),TACCOST(I),MITCOST(I), 1 TACCOST(1)-TACCOST(I),MITCOST(I)-MITCOST(1), 2 (TACCOST(1)-TACCOST(I))/(MITCOST(I)-MITCOST(1)), 3 (TACCOST(1)-TACCOST(I))-(MITCOST(I)-MITCOST(1)) 943 FORMAT (8X,A16,4(F9.0,1X),1X,F5.2,1X,F9.0)ELSEWRITE (10,945) TITLE(I),TACCOST(I),MITCOST(I), 1 TACCOST(1)-TACCOST(I),MITCOST(D-MITCOST(1), 2 (TACCOST(1)-TACCOST(I))-(MITCOST(I)-MITCOST(1)) 945 FORMAT (8X,A16,4(F9.0,1X),1X,'—',1X,F9.0)ENDIFELSEIF (MITCOST(I).NE.MITCOST(1)) THENWRITE (10,943) TITLE(I),TACCOST(I)*INTEREST/100* 1 (1 +INTEREST/100)**PERIOD/ 2 ((I +INTEREST/100)**PERIOD-1),MITCOST(I)* 3 INTEREST/100*(1 +INTEREST/100)**PERIOD/ 4 ((I + INTEREST/100)**PERIOD-1),(TACCOST(1)- 5 TACCOST(I))*INTEREST/100* 6 (1 + INTEREST/100)**PERIOD/ 7 ((I + INTEREST/100)**PERIOD-1),(MITCOST(I)- 8 MITCOST(1))*INTEREST/100* 9 (1 + INTEREST/100)**PERIOD/ 1 ((1 + INTEREST/100)**PERIOD-1),(TACCOST(1)- 2 TACCOST(I))/(MITCOST(I)-MITCOST(1)), 3 OTACCOST(1)-TACCOST(1))-(MITCOST(1)- 4 MITCOST(1)))*INTERE,ST/100* 5 (1 +INTEREST/100)**PERIOD/ 3 ((1+INTEREST/100)**PERIOD-1)253ELSEWRITE (10,945) TITLE(I),TACCOST(I)*INTERFST/100* 1 (1 + INTEREST/100)"PERIOD/ 2 ((1+ INTEREST/100)**PERIOD-1),MITCOST(I)* 3 INTEREST/100'(1 +INTERFST/100)**PERIOD/ 4 ((1+ INTEREST/100)**PERIOD-1),(TACCOST(1)- 5 TACCOST(I))*INTEREST/100* 6 (1 + INTEREST/100)"PERIOD/ 7 ((1 + INTEREST/100)**PERIOD-1),(MITCOST(I)- 8 MITCOST(1))*INTEREST/100* 9 (1 + INTEREST/100)**PERIOD/ 1 ((1 + INTEREST/100)**PERIOD-1),((TACCOST(1)- 2 TACCOST(I))-(MITCOST(I)-MITCOST(1)))* 3 INTEREST/100*(1+ INTEREST/100)**PERIOD/ 4 ((1+INTEREST/100)**PERIOD-1)ENDIFENDIFLINENO = LINENO +1ENDIF 950 CONTINUEWRITE (10,*)WRITE (10,*)905 CONTINUELINENO = LINENO + 20ENDIF* Output cost effectiveness analysis summaryIF (OPTION(10).EQ.'Y') THENIF (LINENO +8+ NT(I).GT.60) THENIF (OUTMODE.EQ.'P') THENWRITE (10,85)IF (PAUSE.EQ.'Y') THENWRITE (*,*) ' Press any key to continue ', 1 'printing ...'CALL GETKEYBOARD(CH,I1)ENDIFENDIFLINENO = 0ENDIFWRITE (10,1001)1001 FORMAT(4X,'Cost Effectiveness Economic Evaluation')WRITE (10,*)WRITE (10,1010)1010 FORMAT (29X,'Mitigation Costs',7X,'Severity')WRITE (10,1015) 1015 FORMAT (8X,'Alternatives',6X,'(PV$/lun)',3X,'($/km/year)',1 3X,'(/km/year)' )WRITE (10,1030)1030 FORMAT (8X,53('_'))WRITE (10 9 ')DO 1050 1=1,10IF (ICIIAR( 111 LE(I)(1:1)).NE.O.AND CHAR( 111 LE(I)(1:1)).NE.32) THENWRITE (10,1040) ITTLE(I),MITCOST(I),MITCOST(I)* 1 INTEREST/100*(1 +INTEREST/100)**PERIOD/ 2 ((1+INTEREST/100)**PERIOD-1),(SEVERITY(1)*DATA(L1)+ 3 SEVERITY(2)*DATA(I,2)+SEVERTTY(3)*DATA(1,3)+SEVERITY(4)* 4 DATA(I,4))*ENCRATE 1040 FORMAT (8X,A16,2X,F9.0,3X,F9.0,3X,F12.0)ENDIF1050 CONTINUEENDIFCLOSE (10)RETURN* Error writing to printer*1000 WRITE (•,*) CHAR(7),CHAR(7)WRITE (*,*) CHAR(255),CHAR(255),'PRNTERR/'CALL GETKEYBOARD(CH,II)GOTO 1** Error opening file1500 WRITE (*,*) CHAR(7),CHAR(7)WRITE (*,*) CHAR(255),CHAR(255),'FILERR/'CALL GETKEYBOARD(CH,II)GOTO 1END254255SUBROUTINE SAVEThis subroutine saves input data to a fileINTEGER CODE, CF, POSCHARAC1ER*12 FILNAMCHARAC1ER*76 FIELD(120)INCLUDE 'RHSM.INS'COMMON /SCRN/ FIELDEnter name of file to save1 WRITE (*,*) CHAR(255), CHAR(255), 'IO/'FIELD(1) = INPUTFFILNAM =CODE = 0CF = 0POS = 1DO 5 1=1,36IF (ICHAR(INPUTF(I:I)).NE.32.AND.ICHAR(INPUTF(I:I)).NE.0) THENPOS = POS + 1ELSEGOTO 6ENDIF5 CONTINUE6 CALL SCREENIO (FILNAM, CODE, CF, POS)IF (CODE .EQ. 1) RETURNSAVE= 1INPUTF = FIELD(1)Save data to fileOPEN (10, FILE =INPUTF,ERR=1000)Save operating dataDO 20 1=1,10WRITE (10,30) TITLE(I)30 FORMAT (A50)DO 50 J=1,16IDEF(I,J)="50 CONTINUEWRITE (10,55) TI(I),TMAX(I),VMIN(I),MITER(I),XINCR(I)55 FORMAT (3F10.3,I4,F10.3)WRITE (10,57) VMEAN(I), VSD(I), VINCR(I), AINCR(I), PMIN(I),1 BRAKE(I), REST(I)57 FORMAT (7F10.3)WRITE (10,57) SlEER(I)WRITE (10,59) HCURVE(I), MODEL(I)59 FORMAT (213)Save terrain dataWRITE (10,61) NT(I)61 FORMAT (13)DO 60 J=1,NT(I)WRITE (10,65) TY(I,J), TA(I,J), TM(I,J), TR(I,J)65 FORMAT (F6.3,F6.2,2F6.4)60 CONTINUE256Save object dataWRITE (10,61) NO(I)DO 75 J=1,NO(I)WRITE (10,77) THX1(I,J),THX2(I,J),THY1(I,J),THY2(I,J),1 THM(I,J),THWID(I,J),THTYP(I,J)77 FORMAT (6F5.1,A1)75 CONTINUE20 CONTINUERoll consequence dataWRITE (10,61) NVELDO 80 I=1,NVELWRITE (10,90) RP1(I,1),RP1(I,2)WRITE (10,90) RP2(I,1),RP2(1,2)WRITE (10,90) VEL(I)90 FORMAT (2F10.3)80 CONTINUEAngle probability dataDO 100 1=1,4DO 100 J=1,35WRITE (10,110) PP(I,J)110 FORMAT (F10.3)100 CONTINUE* Vehicle characteristicsDO 120 I= 1,8WRITE (10,130) CG(I)WRITE (10,130) TRACK(I)WRITE (10,130) VMASS(I)WRITE (10,130) WBASE(I)130 FORMAT (F10.3)120 CONTINUE* Probability of consequence dataWRITE (10,61) NPLADO 140 I = 1,NPLAWRITE (10,150) (PLA(I,J),J=1,6)150 FORMAT (F7.1,5F7.5)140 CONTINUE* Economic dataDO 160 1=1,10WRITE (10,165) BARRIER(I),ROW(I),OREMOVE(I),NREMOVE(I,1),1 NREMOVE(1,2),NREMOVE(I,3)165 FORMAT (614)WRITE (10,170) BINSTALL(1),BMAINT(I),CFMAINT(I),COSTROW(I),1 CREMOVE(I,1),CREMOVE(I,2),CREMOVE(I,3)170 FORMAT (7F9.2)160 CONTINUEWRITE (10,170) CUTCOST,FILLCOST,WASTCOST,ADFCOSTWRITE (10,190) (ACCOST(1,I),I= 1,4)WRITE (10,190) (ACCOST(2,I),I =1,4)190 FORMAT (4F9.2)257WRITE (10,200) CLIMATE, DESSPD, HORCURVE, LANEWID, NUMLANE,1 RDCLASS, SHLDWID, SIGHT, SLOPE, TRAFFIC, VERCURVE200 FORMAT (1111)WRITE (10,210) ADT,ENCRATE,INTEREST,PERIOD210 FORMAT (I8,F8.4,F4.2,I4)WRITE (10,220) BC,CE220 FORMAT (2I1)WRITE (10,230) SEVERITY(1),SEVERITY(2),SEVERITY(3),SEVERITY(4)230 FORMAT (4I11)CLOSE (10)RETURNError opening file1000 WRITE (*,*) CHAR(7),CHAR(7)CALL CURSOROFFWRITE (•,*) CHAR(255),CHAR(255),'FILERR/'CALL GETKEYBOARD(CH,II)CALL CURSORONGOTO 1END258SUBROUTINE CALIBRATThis subroutine is used to edit calibration and operationaldefault input dataINTEGER CHOICE, CODE, COLUMN, CF, HC, MENU, NUMLIN, NUMPTS, POS,1 ROWWREAL GX(100),GY(16,100),HOLDCHARAC1ER*12 FILNAMCHARAC1ER*18 XTITLE, YTITLECHARACIER*36 PATHCHARAC1ER*76 FIELD(120)CHARACCER*80 TILEINCLUDE 'RHSM.INS'COMMON /SCRN/ FIELDCOMMON / GRPH2D / NUMLIN,NUMPTS,GX,GY,XTITLE,YTITLE,TTLELoad menu25 WRITE (*,*) CHAR(255),CHAR(255),'CALIBRAT/'READ (*,10) CHOICE10 FORMAT (13)Edit default operational dataIF (CHOICE.EQ.1) THENWRITE (*,*) CHAR(255),CHAR(255),'OPERATE/IF (DEF(14).EQ.1) FIELD(1)="IF (DEF(14).EQ.2) FIELD(1)='G'IF (DEF(14).EQ3) FIELD(1) ='M'IF (DEF(14).EQ.4) FIELD(1)='S'WRITE (FIELD(2),30) DEF(1)30 FORMAT (F10.3)WRITE (FIELD(3),30) DEF(2)IREAD=DEF(4)WRITE (FIELD(4),35) IREAD35 FORMAT (110)WRITE (FIELD(5),30) DEF(5)WRITE (FIELD(6),30) DEF(6)WRITE (FIELD(7),30) DEF(7)WRITE (FIELD(8),30) DEF(3)WRITE (FIELD(9),30) DEF(8)WRITE (FIELD(10),30) DEF(9)WRITE (FIELD(11),30) DEF(10)WRITE (FIELD(12),30) DEF(13)WRITE (FIELD(13),30) DEF(11)WRITE (FIELD(14),30) DEF(12)IREAD = DEF(15)WRITE (FIELD(15),40) IREAD40 FORMAT (I1)FILNAM = 'OPERATE'CODE=0CF=0POS =050 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45) GOTO 50IF (ICHAR(FIELD(1)(1:1)).EQ.O.ORICHAR(FTELD(1)(1:1)).EQ.32)1 THENDEF(14)= 1ELSEIF (FIELD(1).EQ.'G') THENDEF(14)=2259ELSEIF (FIELD(1) EQ.'M') THENDEF(14) = 3ELSEIF (FIELD(1).EQ.'S') THENDEF(14) =4ENDIFREAD (FIELD(2),30) DEF(1)READ (FIELD(3),30) DEF(2)READ (FIELD(4),35) IREADDEF(4) = IREADREAD (FIELD(5),30) DEF(5)READ (FIELD(6),30) DEF(6)READ (FIELD(7),30) DEF(7)READ (FIELD(8),30) DEF(3)READ (FIELD(9),30) DEF(8)READ (FIELD(10),30) DEF(9)READ (FIELD(11),30) DEF(10)READ (FIELD(12),30) DEF(13)READ (FIELD(13),30) DEF(11)READ (FIELD(14),30) DEF(12)READ (FIELD(15),40) IREADDEF(15) = IREADDeparture Angle DataELSEIF (CHOICE.EQ.2) THENHC= 1129 WRITE (*,*) CHAR(255),CHAR(255),'DEP-ANG/'IF (HC.EQ.1) FIELD(1) = 'Straight'IF (HC.EQ.2) FIELD(1)= 'Gentle Curve'IF (HC.EQ.3) FIELD(1) = 'Moderate Curve'IF (HC.EQ.4) FIELD(1)= 'Severe Curve'DO 131 1=1,35WRITE (FIELD(I+1),132) PP(HC,I) 132 FORMAT (F6.0)131 CONTINUEFILNAM='DEP-ANG'CODE= 0CF=OPOS= 0133 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45.AND.CODE.NE.34.AND.CODE.NE.73.AND.CODE.NE .81)1 GOTO 133NOBS(HC) = 0DO 134 1=1,35READ (FIELD(I+ 1),132) PP(HC,I)NOBS(HC) = NOBS(HC) + PP(HC,I)134 CONTINUEIF (CODE.EQ.34) THENNUMLIN = 4NUMPTS = 35DO 136 1=1,35GX(I) = I*2DO 136 J=1,4GY(J,I) = PP(J,I) 136 CONTINUEXTTTLE= ' Departure Angle'YTITLE= ' Frequency 'TILE= 'Departure Angle Freq. (Straight - W, Gentle Cv'// 1 ' - Y, Moderate - M, Severe - R)'260CALL GRAPH2DGOTO 129ELSEIF (CODE.EQ.73) THENHC = HG1IF (HC.EQ.0) HC=4GOTO 129ELSEIF (CODE.EQ.81) THENHC=HC+1IF (HC.EQ.5) HC= 1GOTO 129ENDIFProbability of Consequence DataELSEIF (CHOICE.EQ.3) THENIPAGE =1145 WRITE (*,*) CHAR(255),CHAR(255),'PROCON/DO 140 1=1,10WRITE (FIELD((1-1)*7+1),147) I+ 10*(IPAGE-1) 147 FORMAT (12)WRITE (FIELD((I-1)*7+ 2),150) PLA(I+10*(IPAGE-1),1) 150 FORMAT (F7.1)DO 140 J=2,6WRITE (FIELD((I-1)*7+J+ 1),160) PLA(I+10*(IPAGE-1),J) 160 FORMAT (F75)140 CONTINUEFILNAM = 'PROCON'CODE= 0CF=0POS = 0170 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45.AND.CODE.NE.73.AND.CODE.NE .81AND.1 CODE.NE.34) GOTO 170DO 180 1=1,10READ (FIELD((1-1)*7+ 2) 9150) PLA(I+10*(IPAGE-1),1)DO 180 J=2,6READ (FIELD((I-1)*7+J+ 1),160) PLA(I+10*(IPAGE-1),J)180 CONTINUEIF (CODE.EQ.73) THENIPAGE=IPAGE-1IF (IPAGE.EQ.0) IPAGE =5GOTO 145ELSEIF (CODE.EQ.81) THENIPAGE=IPAGE+ 1IF (IPAGE.EQ.6) IPAGE =1GOTO 145ENDIFSort Probability of Consequence DataDO 182 1=1,49DO 182 J=I+ 1,50IF ((PLA(I,1).GT.PLA(J,1).AND.PLA(J,1).NE.0) 1 .0R.(I.NE.1 AND.PLA(1,1).EQ.0)) THENDO 183 K=1,6HOLD = PLA(I,K)PLA(I,K) = PLA(J,K)PLA(J,K) = HOLD 183 CONTINUEENDIF261182 CONTINUENPLA =0DO 184 1=1,50IF (PLA(I,1).NE.0) NPLA=NPLA+1184 CONTINUEIF (CODE.EQ.34) THENNUMLIN =3NUMPTS = NPLAXTITLE=' Power Level 'YTITLE=' Prob of Conseq.'DO 186 I = 1,NPLAGX(I) = PLA(I,1)DO 186 J=1,3GY(J,I) = PLA(I,J + 1)186 CONTINUETTLE='Prob of Conseq. - Unrestrained (No Dmge - Wht,'//1 ' PDO - Yel, Fatality - Mag)'CALL GRAPH2DDO 187 I =1,NPLAGX(I) = PLA(I,1)GY(1,I) = PLA(I,2)GY(2,I) = PLA(1,4)GY(3,I)=PLA(1,5)187 CONTINUETTLE='Prob of Conseq. Restrained (No Dmge - Wht,'//1 ' PDO - Yel, Fatality - Mag)'CALL GRAPH2DGOTO 145ENDIFRoll ConsequencesELSEIF (CHOICE.EQ.4) THENIPAGE=1188 WRITE (*,*) CHAR(255),CHAR(255),'ROLCON/'DO 190 1=1,10WRITE (FIELD((1-1)*6+1),147) I+ 10*(IPAGE-1)WRITE (FIELD((1-1)*6+2),200) VEL(I+10*(IPAGE-1))200 FORMAT (F7.2)WRITE (FIELD((I-1)*6+3),160) RP1(I+10*(IPAGE-1),1)WRITE (FTELD((I-1)*6+4),160) RP1(I+10*(IPAGE-1),2)WRITE (FIELD((I-1)*6+5),160) RP2(I+10*(IPAGE-1),1)WRITE (FIELD((1-1)*6+6),160) RP2(I+10*(IPAGE-1),2)190 CONTINUEFILNAM = 'ROLCON'CODE= 0CF=0POS=0210 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45.AND.CODE.NE.73AND.CODE.NE.81.AND.CODE.NE .1 34) GOTO 210DO 220 1=1,10READ (FTELD((I-1)*6 + 2) 9 200) VEL(I+10*(IPAGE-1))READ (FIELD((I-1)*6+3),160) RP1(I+10*(IPAGE-1),1)READ (FIELD((1-1)*6+4),160) RP1(I+10*(IPAGE-1),2)READ (FIELD((I-1)*6 + 5) 9 160) RP2(I+10*(IPAGE-1),1)READ (FIELD((1-1)*6+6),160) RP2(I+10*(IPAGE-1),2)220 CONTINUE262IF (CODE.EQ.73) THENIPAGE =IPAGE-1IF (IPAGE.EQ.0) IPAGE=5GOTO 188ELSEIF (CODE.EQ.81) THENIPAGE=IPAGE+ 1IF (IPAGE.EQ.6) IPAGE=1GOTO 188ENDIFSort Roll Consequences dataDO 222 1=1,49DO 222 J=I +1,50IF ((VEL(I).GT.VEL(J).AND.VEL(J).NE.0) 1 .OR(I.NE.LAND.VEL(I).EQ.0)) THENHOLD =VEL(I)VEL(I)=VEL(J)VEL(J) = HOLDDO 223 K=1,2HOLD = RP1(I,K)RP1(I,K) = RP1(J,K)RP1(J,K) = HOLD 223 CONTINUEDO 224 K=1,2HOLD = RP1(I,K)RP1(I,K)=RP1(J,K)RP1(J,K)= HOLD 224 CONTINUEENDIF222 CONTINUENVEL =0DO 225 1=1,50IF (VEL(I).NE.0) NVEL = NVEL + 1225 CONTINUEIF (CODE.EQ.34) THENNUMLIN = 2NUMPTS=NVELXTITLE= ' Vehicle Speed'YTITLE= ' Roll Conseq.'DO 226 I=1,NVELGX(I)=VEL(I)DO 226 J=1,2GY(J,I) = RP1(I,J) 226 CONTINUETTLE='Roll Consequences - Unrestrained (PDO - Wht,'// 1 ' Fatality - Yel)'CALL GRAPH2DDO 227 I= 1,NVELGX(I)=VEL(I)DO 227 J=1,2GY(J,I) = RP2(I,J) 227 CONTINUETTLE='Roll Consequences - Restrained (PDO - Wht,'// 1 ' Fatality - Yel)'CALL GRAPH2DGOTO 188ENDIF263Vehicle CharacteristicsELSEIF (CHOICEEQ.5) THENWRITE (*,*) CHAR(255),CHAR(255),'VEH-CHAR/'DO 230 1=1,8WRITE (FIELD((1-1)*4+1),240) CG(I)240 FORMAT (F8.2)WRITE (FIELD((I-1)*4+2),240) TRACK(I)WRITE (FIELD((1-1)*4+3),240) VMASS(I)WRITE (FIELD((I-1)*4 +4),240) WBASE(I)230 CONTINUEFILNAM='VEH-CHAR'CODE=0CF= 0POS=0250 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45) GOTO 250DO 260 I=1,8READ (FIELD((I-1)*4+ 4240) CG(I)READ (FIELD((1-1)*4 +2) 9240) TRACK(I)READ (FIELD((I-1)*4+3),240) VMASS(I)READ (FIELD((I-1)*4+4),240) WBASE(I)260 CONTINUE* Encroachment Rate CalibrationELSEIF (CHOICE.EQ.6) THEN399 WRITE (*,*) CHAR(255),CHAR(255),'ENCRCAL1/'DO 410 1=1,5WRITE (FIELD(I),400) RCADJUST(I)400 FORMAT (F4.2)WRITE (FIELD(5+I),400) DSADJUST(I)WRITE (FIELD(10+I),400) LWADJUST(I)WRITE (FIELD(15 + 4400) NLADJUST(I)WRITE (FIELD(20 + I),400) SWADJUST(I)410 CONTINUECODE= 0CF = 0POS =0FILNAM='ENCRCAL1'420 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45.AND.CODE.NE.73.AND.CODE.NE .81) GOTO 420DO 430 1=1,5READ (FIELD(I),400) RCADJUST(I)READ (FIELD(5+I),400) DSADJUST(I)READ (FIELD(10+I),400) LWADJUST(I)READ (FIELD(15+I),400) NLADJUST(I)READ (FIELD(20+I),400) SWADJUST(I)430 CONTINUEIF (CODE.EQ.73.ORCODE.EQ.81) THENWRITE (*,*) CHAR(255),CHAR(255),'ENCRCAL2/'DO 440 1=1,6WRITE (FIELD(I),400) HCADJUST(I)WRITE (FIELD(6+ 4400) VCADJUST(I)WRITE (FTELD(12+I),400) CADJUST(I)WRITE (FTELD(18+ 4400) TADJUST(I)WRITE (FIELD(24+ 4400) SADJUST(I)264440 CONTINUECODE= 0CF=0POS=0FILNAM ='ENCRCAL2'450 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45.AND.CODE.NE.73.AND.CODE.NE.81) GOTO 450DO 460 1=1,6READ (FIELD(I),400) HCADJUST(I)READ (FIELD(6+I),400) VCADJUST(I)READ (FIELD(12+I),400) CADJUST(I)READ (FIELD(18 + I),400) TADJUST(I)READ (FIELD(24+I),400) SADJUST(I)460 CONTINUEIF (CODE.EQ.73.OR.CODE.EQ.81) THENGOTO 399ENDIFENDIFEncroachment Rate DefaultsELSEIF (CHOICE.EQ.7) THEN633 MENU =1WRITE (*,*) CHAR(255),CHAR(255),'ENCRCAL3/'CALL GOTOXY(19,10+RDCLASS)CALL PUTCHNITR(CHAR(17),1,2,1)CALL GOTOXY(35,10+DESSPD)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(47,10+LANEWID)CALL PUTCHATIR(CHAR(17),1,2,1)CALL GOTOXY(64,10+NUMLANE)CALL PUTCHNITR(CHAR(17),1,2,1)CALL GOTOXY(76,10+SHLDWID)CALL PUTCHATTR(CHAR(17) 9 1,2,1)CALL CURSOROFF635 IF (MENU.EQ.1) THENCHOICE= RD CLASSCOLUMN= 19ELSEIF (MENU.EQ.2) THENCHOICE= DESSPDCOLUMN= 35ELSEIF (MENU.EQ.3) THENCHOICE= LANEWIDCOLUMN =47ELSEIF (MENU.EQ.4) THENCHOICE= NUMLANECOLUMN= 64ELSECHOICE= SHLDWIDCOLUMN = 76ENDIF640 CALL GOTOXY(COLUMN,10+ CHOICE)CALL PUTCHATIR(CHAR(17),1,10,1)CALL GETKEYBOARD(CH,CODE)IF (CODE.EQ.1) GOTO 25IF (CODE.EQ.72) THENCALL PUTCHATIR(" 9 1,10,1)CHOICE= CHOICE-1IF (CHOICE.EQ.0) CHOICE=5265ELSEIF (CODE.EQ.80) THENCALL PUTCHATTR(",1,10,1)CHOICE = CHOICE+ 1IF (CHOICE.EQ.6) CHOICE= 1ELSEIF (CODE.EQ.75.ORCODE.EQ.77.ORCODE.EQ.73.ORCODE.EQ.81.1 ORCODE.EQ.45) THENCALL PUTCHATTR(CHAR(17),1,2,1)IF (MENU.EQ.1) THENRDCLASS= CHOICEELSEIF (MENU.EQ.2) THENDESSPD = CHOICEELSEIF (MENU.EQ.3) THENLANEWID= CHOICEELSEIF (MENU.EQ.4) THENNUMLANE= CHOICEELSESHLDWID = CHOICEENDIFIF (CODE.EQ.75) THENMENU = MENU-1IF (MENU.EQ.0) MENU = 5GOTO 635ELSEIF (CODE.EQ.77) THENMENU =MENU +1IF (MENU.EQ.6) MENU =1GOTO 635ELSEIF (CODE.EQ.45) THENGOTO 25ELSEPage 2*WRITE (*,*) CHAR(255),CHAR(255),'ENCRCH2/'MENU =1CALL GOTOXY(27,10+ HORCURVE)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY (45 ,10 + VERCURVE)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(79,10 + CLIMATE)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(27,18 +TRAFFIC)CALL PUTCHATTR(CHAR(17),1,2,1)CALL GOTOXY(55,18 + SIGHT)CALL PUTCHATTR(CHAR(17),1,2,1)CALL CURSOROFF650 IF (MENU.EQ.1) THENCHOICE= HORCURVECOLUMN= 27ROWW =10ELSEIF (MENU.EQ.2) THENCHOICE= VERCURVECOLUMN=45ROWW =10ELSEIF (MENU.EQ.3) THENCHOICE= CLIMATECOLUMN = 79ROWW= 10ELSEIF (MENU.EQ.4) THENCHOICE =TRAFFICCOLUMN= 27ROWW= 18266ELSECHOICE= SIGHTCOLUMN =55ROWW = 18ENDIF660 CALL GOTOXY(COLUMN,ROWW -i- CHOICE)CALL PUTCHATIR(CHAR(17),1,10,1)CALL GETKEYBOARD(CH,CODE)IF (CODE.EQ.1) GOTO 25IF (CODE.EQ.72) THENCALL PUTCHATIR(",1,10,1)CHOICE= CHOICE-1IF (CHOICE.EQ.0) CHOICE= 6GOTO 660ELSEIF (CODE.EQ.80) THENCALL PUTCHATIR(",1,10,1)CHOICE= CHOICE+ 1IF (CHOICE.EQ.7) CHOICE =1GOTO 660ELSEIF (CODE.EQ.75.0R.CODE.EQ.77.0R.CODE.EQ.73.0R.1 CODE.EQ.81.ORCODE.EQ.45) THENCALL PUTCHATTR(CHAR(17),1,2,1)IF (MENU.EQ.1) THENHORCURVE = CHOICEELSEIF (MENU.EQ.2) THENVERCURVE= CHOICEELSEIF (MENU.EQ.3) THENCLIMATE= CHOICEELSEIF (MENU.EQ.4) THENTRAFFIC = CHOICEELSESIGHT= CHOICEENDIFIF (CODE.EQ.75) THENMENU = MENU-1IF (MENU.EQ.0) MENU =5GOTO 650ELSEIF (CODE.EQ.77) THENMENU = MENU +1IF (MENU.EQ.6) MENU =1GOTO 650ELSEIF (CODE.EQ.45) THENGOTO 25ELSEGOTO 633ENDIFENDIFGOTO 650ENDIFENDIFGOTO 640• Unit costsELSEIF (CHOICE.EQ.8) THENWRITE (*,*) CHAR(255),CHAR(255),'UNITCOST/'WRITE (FIELD(1),470) DEFBINST470 FORMAT (F9.2)WRITE (FIELD(2),470) DEFBMAINWRITE (FIELD(3),470) DEFCUTCSWRITE (FIELD(4),470) DEFFILCSWRITE (FIELD(5),470) DEFWASCSWRITE (FIELD(6),470) DEFADFCSWRITE (FIELD(7),470) DEFCFMAIDO 480 1=1,3WRITE (FIELD(7+4470) DEFACCST(I)480 CONTINUEWRITE (FIELD(11),485) DEFACCST(4)485 FORMAT (F10.2)WRITE (FIELD(12),490) DEFINTRT490 FORMAT (F5.2)WRITE (FIELD(13),500) DEFPERD500 FORMAT (I4)CODE =0CF=0POS = 0FILNAM = 'UNITCOST'510 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45) GOTO 510READ (FIELD(1),470) DEFBINSTREAD (FIELD(2),470) DEFBMAINREAD (FIELD(3),470) DEFCUTCSREAD (FIELD(4),470) DEFFILCSREAD (FIELD(5),470) DEFWASCSREAD (FIELD(6),470) DEFADFCSREAD (FIELD(7),470) DEFCFMAIDO 520 1=1,3READ (FIELD(7+I),470) DEFACCST(I)520 CONTINUEREAD (FIELD(11),485) DEFACCST(I)READ (FIELD(12),490) DEFINTRTREAD (FIELD(13),500) DEFPERDCost Effectiveness Severity WeightingsELSEIF (CHOICE.EQ.9) THENWRITE (•,*) CHAR(255),CHAR(255),'COS I EFF/'DO 705 1=1,4WRITE (FIELD(I),710) DEFSEVER(I)710 FORMAT (Ill)705 CONTINUECODE= 0CF=0POS =0FILNAM = 'COSTEFF'706 CALL SCREENIO(FILNAM,CODE,CF,POS)IF (CODE.EQ.1) GOTO 25IF (CODE.NE.45) GOTO 706DO 720 I=1,4READ (FIELD(I),710) DEFSEVER(I)720 CONTINUE■ Save New DefaultsELSEIF (CHOICE.EQ.10) THENWRITE ( 5 , 5 ) CHAR(255),CHAR(255),'NEWDEF/'CALL GETKEYBOARD(CH,II)IF (II.EQ.21) THENOPEN (10,FILE = 'DEFAULTS')PATH= "ILEN = 0DO 276 1=1,36IF (INPUTF(11).EQ.'\') ILEN=I267268 276 CONTINUEPATH = INPUTF(:ILEN)WRITE (10,275) PATH 275 FORMAT (A36)DO 280 1=1,15WRITE (10,290) DEF(I) 290 FORMAT (F10.3) 280 CONTINUEWRITE (10,295) NVEL 295 FORMAT (13).DO 300 I=1,NVELWRITE (10,310) RP1(I,1),RP1(I,2)WRITE (10,310) RP2(I,1),RP2(I,2)WRITE (10,310) VEL(I) 310 FORMAT (2F10.3) 300 CONTINUEDO 320 1=1,4DO 320 J=1,35WRITE (10,330) PP(I,J) 330 FORMAT (F10.3) 320 CONTINUEDO 340 1=1,8WRITE (10,350) CG(I)WRITE (10,350) TRACK(I)WRITE (10,350) VMASS(I)WRITE (10,350) WBASE(I) 350 FORMAT (F10.3) 340 CONTINUEWRITE (10,295) NPLADO 370 I= 1,NPLAWRITE (10,380) (PLA(I,J),J=1,6) 380 FORMAT (F7.1,5F7.5) 370 CONTINUEDO 530 1=1,5WRITE (10,540) RCADJUST(I),DSADJUST(I),LWADJUST(I), 1 NLADJUST(I),SWADJUST(I) 540 FORMAT (5F4.2) 530 CONTINUEDO 550 I= 1,6WRITE (10,540) HCADJUST(I),VCADJUST(I),CADJUST(I), 1 TADJUST(I),SADJUST(I) 550 CONTINUEWRITE (10,560) DEFBINST,DEFBMAIN,DEFCUTCS,DEFFILCS,DEFWASCS,1 DEFADFCS,DEFCFMAI 560 FORMAT (7F10.2)WRITE (10,560) (DEFACCST(0,1=1,4)WRITE (10,570) DEFINTRT,DEFPERD 570 FORMAT (F4.2,14)WRITE (10,700) CLIMATE, DESSPD, HORCURVE, LANEWID,1 NUMLANE, RDCLASS, SHLDWID, SIGHT, SLOPE, TRAFFIC, VERCURVE 700 FORMAT (11I1)269WRITE (10,701) DEFSEVER(1),DEFSEVER(2),DEFSEVER(3),1 DEFSEVER(4)701 FORMAT (4111)CLOSE (10)ENDIFELSERETURNENDIFGOTO 25ENDSUBROUTINE DEFAULTSLOGICAL EXISTSINCLUDE 'RHSM.INS'INQUIRE (FILE= 'DEFAULTS',EXIST= EXISTS)IF (EXISTS) THENOPEN (10,F1LE= 'DEFAULTS', STATUS= 'OLD')READ (10,275) INPUTF275 FORMAT (A36)Operational dataDO 10I=1,15READ (10,20) DEF(I)20 FORMAT (F10.3)10 CONTINUEDO 25 I=1,1011(I) = DEF(1)TMAX(I) = DEF(2)VMIN(I) = DEF(3)MITER(I) = DEF(4)XINCR(I) = DEF(5)VMEAN(I) = DEF(6)VSD(I) = DEF(7)VINCR(I) = DEF(8)AINCR(I) = DEF(9)PMIN(I) = DEF(10)BRAKE(I) = DEF(11)REST(I) = DEF(12)SIIER(I)=DEF(13)HCURVE(I) = DEF(14)MODEL(I) = DEF(15)25 CONTINUERoll consequence dataREAD (10,26) NVEL26 FORMAT (13)DO 30 I= 1,NVELREAD (10,40) RP1(1,1),RP1(I,2)READ (10,40) RP2(I,1),RP2(1,2)READ (10,40) VEL(I)40 FORMAT (2F10.3)30 CONTINUEAngle probability dataDO 50 1=1,4NOBS(I) = 0DO 50 .1=1,35READ (10,60) PP(I,J)NOBS(I) = NOBS(I) + PP(I,J)60 FORMAT (F10.3)50 CONTINUE270271Vehicle characteristicsDO 70 I=1,8READ (10,80) CG(I)READ (10,80) TRACK(I)READ (10,80) VMASS(I)READ (10,80) WBASE(I)80 FORMAT (F10.3)70 CONTINUEProbability of consequence dataREAD (10,26) NPLADO 90 I = 1,NPLAREAD (10,100) (PLA(I,J),J = 1,6)100 FORMAT (F7.1,5F7.5)90 CONTINUEEconomic dataDO 530 I =1,5READ (10,540) RCADJUST(I),DSADJUST(I),LWADJUST(I),1 NLADJUST(I),SWADJUST(I)540 FORMAT (5F4.2)530 CONTINUEDO 550 1=1,6READ (10,540) HCADJUST(I),VCADJUST(I),CADJUST(I),1 TADJUST(I),SADJUST(I)550 CONTINUEREAD (10,560) DEFBINST,DEFBMAIN,DEFCUTCS,DEFFILCS,DEFWASCS,1 DEFADFCS,DEFCFMAI560 FORMAT (7F10.2)READ (10,560) (DEFACCST(I),I =1,4)READ (10,570) DEFINTRT,DEFPERD570 FORMAT (F4.2,I4)Set input sets to default valuesDO 575 1=1,10BINSTALL(I)=DEFBINSTBMAINT(I)=DEFBMAINCFMAINT(I)=DEFCFMAI575 CONTINUECUTCOST =DEFCUTCSFILLCOST = DEFFILCSWASTCOST= DEFWASCSADFCOST= DEFADFCSDO 576 1=1,4ACCOST(1,I) = DEFACCST(I)576 CONTINUEINTEREST = DEFINTRTPERIOD = DEFPERDREAD (10,700) CLIMATE, DESSPD, HORCURVE, LANEWID,1 NUMLANE, RDCLASS, SHLDWID, SIGHT, SLOPE, TRAFFIC, VERCURVE700 FORMAT (1111)READ (10,701) DEFSEVER(1),DEFSEVER(2),DEFSEVER(3),1 DEFSEVER(4)701 FORMAT (4111)DO 702 1=1,4SEVERITY(I)= DEFSEVER(I)702 CONTINUECLOSE (10)ENDIFOUTMODE= 'D'PAUSE= 'N'OPTION(1) = 'Y'OPTION(2)= 'Y'OPTION(3) = 'Y'OPTION(4) = 'N'OPTION(5) = 'N'OPTION(6) = 'N'OPTION(7) = 'N'OPTIONS) = 'Y'DONE= 0SAVED =1RETURNEND272
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- Evaluating hazardous roadside locations using the Roadside-Hazard-Simulation-Model...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
Evaluating hazardous roadside locations using the Roadside-Hazard-Simulation-Model Version 9 (1992) De Leur, Paul 1992
pdf
Page Metadata
Item Metadata
Title | Evaluating hazardous roadside locations using the Roadside-Hazard-Simulation-Model Version 9 (1992) |
Creator |
De Leur, Paul |
Date Issued | 1992 |
Description | Vehicles that "run-off-the-road" and crash into a hazardous roadside are a significant problem, accounting for 14.3 percent of all highway accidents in the Province of British Columbia. The computer tool developed in this project is designed to help evaluate hazardous roadside locations and evaluate various improvement alternatives proposed to reduce the level of hazard. The hazard level at any location may be reduced by: flattening the embankment slope, installing a roadside barrier, removing hazardous objects, or any combination of the three. The evaluation tool, a computer simulation model, identifies the "best" solution from a set of improvement alternatives simulated for a hazardous location. The computer simulation model is called the Roadside-Hazard-Simulation-Model Version 9.0 (RHSM.V9), and was developed after a great deal of effort was devoted to simply modifying and revising one of the previous versions of the model (RHSM.V5 (1978), RHSM.6-2 (1982), or RHSM.V7 (1986)). The new model was developed using the important components of the previous versions and anticipating the additional factors needed in the new model. Making the new-version user-friendly and flexible was important since previous versions were difficult to use, unforgiving in nature, and consequently rarely used. There are a number of objectives which RHSM.V9 satisfies. First, the model simulates an errant vehicle's trajectory upon leaving the roadway. Secondly, the model is capable of accurately simulating the hazards that exist in the roadside. Third, the model simulates the roadway conditions, as well as the errant vehicle's characteristics. The fourth objective, which is dependant upon the first three objectives, determines the consequence of the vehicle leaving the roadway and entering a hazardous roadside. Finally, the model does an economic evaluation of the improvement alternatives proposed for the location and identifies the best solution for the hazardous roadside location. The model's performance was illustrated by performing numerous program runs and then evaluating the results produced by the model. The evaluation included a results comparison with previous versions of the model, a results evaluation for various hazardous embankment slopes and roadside objects, and a sensitivity analysis of the operational parameters and economic factors used in the model. Also included in this evaluation were four typical examples from "real-life" applications. After preliminary testing of the model, the results, and the trends in the results, appear to be valid. The general conclusion of this thesis is that RHSM.V9 can be used to improve the engineering analysis process in evaluating hazardous roadside locations. The program is a user-friendly computer tool to assist highway safety professionals in making a decision regarding the implementation of roadside safety improvement alternatives. The final decision must be made in conjunction with sound engineering judgement. Further research and updating may be easily incorporated since the program has been structured such that as better calibration information becomes available, it can be immediately and easily included in the new model. |
Extent | 8550667 bytes |
Genre |
Thesis/Dissertation |
Type |
Text |
FileFormat | application/pdf |
Language | eng |
Date Available | 2008-12-16 |
Provider | Vancouver : University of British Columbia Library |
Rights | For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https://open.library.ubc.ca/terms_of_use. |
DOI | 10.14288/1.0050468 |
URI | http://hdl.handle.net/2429/2956 |
Degree |
Master of Applied Science - MASc |
Program |
Civil Engineering |
Affiliation |
Applied Science, Faculty of Civil Engineering, Department of |
Degree Grantor | University of British Columbia |
GraduationDate | 1992-11 |
Campus |
UBCV |
Scholarly Level | Graduate |
AggregatedSourceRepository | DSpace |
Download
- Media
- 831-ubc_1992_fall_deleur_paul_c.pdf [ 8.15MB ]
- Metadata
- JSON: 831-1.0050468.json
- JSON-LD: 831-1.0050468-ld.json
- RDF/XML (Pretty): 831-1.0050468-rdf.xml
- RDF/JSON: 831-1.0050468-rdf.json
- Turtle: 831-1.0050468-turtle.txt
- N-Triples: 831-1.0050468-rdf-ntriples.txt
- Original Record: 831-1.0050468-source.json
- Full Text
- 831-1.0050468-fulltext.txt
- Citation
- 831-1.0050468.ris
Full Text
Cite
Citation Scheme:
Usage Statistics
Share
Embed
Customize your widget with the following options, then copy and paste the code below into the HTML
of your page to embed this item in your website.
<div id="ubcOpenCollectionsWidgetDisplay">
<script id="ubcOpenCollectionsWidget"
src="{[{embed.src}]}"
data-item="{[{embed.item}]}"
data-collection="{[{embed.collection}]}"
data-metadata="{[{embed.showMetadata}]}"
data-width="{[{embed.width}]}"
async >
</script>
</div>
Our image viewer uses the IIIF 2.0 standard.
To load this item in other compatible viewers, use this url:
https://iiif.library.ubc.ca/presentation/dsp.831.1-0050468/manifest