A Study of
Mandatory Engine Maintenance
for Reducing Vehicle Exhaust Emissions
Volume VII. A User's Manual and Guide
to the Economic Effectiveness Computer Program
FINAL REPORT
July 1973
In Support of:
APRAC Project Number CAPE-13-68
for
Coordinating Research Council, Inc.
Thirty Rockefeller Plaza
New York, New York 10020
TRWk
TRANSPORTATION *
ENVIRONMENTAL
OfERATIONS
and
Environmental Protection Agency
Air Pollution Control Office
5600 Fishers Lane
Rockville, Maryland 20852
SCOTT RESEARCH LABORATORIES. INC
P. O. BOX X4K
AN BERNARDINO. CALIFORNIA
One SPACC PARK KfDONDO BCtCH CXllfOflNIt 90?'«
-------
A Study of
Mandatory Engine Maintenance
for Reducing Vehicle Exhaust Emissions
Volume VII. A Users Manual and Guide
to the Economic Effectiveness Computer Program
FINAL REPORT
July 1973
In Support of:
APRAC Project Number CAPE-13-68
for
Coordinating Research Council, Inc.
Thirty Rockefeller Plaza
New York, New York 10020
and
Environmental Protection Agency
Air Pollution Control Office
5600 Fishers Lane
Rockville, Maryland 20852
TRWk
TRANSPORTATION t
CNVIRONMfNTAL
Off RATIONS
SCOTT RESEARCH LABORATORIES, INC
'. O. BOX Ml*
AN BERNARDINO. CALIFORNIA M4O*
one SPACI 'tax HCOOHDO BCACH ctufoamA mis
-------
PREFACE
This report, "A Study of Mandatory Engine Maintenance for Reducing
Vehicle Exhaust Emissions," consists of eight volumes. The following are
the subtitles given for each volume:
. Executive Summary, Volume I
. Mandatory Inspection/Maintenance Systems Study, Volume II
. A Documentation Handbook for the Economic Effectiveness
Model, Volume III
. Experimental Characterization of Vehicle Emissions and
Maintenance States, Volume IV
. Experimental Characterization of Service Organization
Maintenance Performance, Volume V
. A Comparison of Oxides of Nitrogen Measurements Made With
Chemiluminescent and Non-Dispersive Radiation Analyzers,
Volume VI
. A User's Manual and Guide to the Economic Effectiveness
Computer Program, Volume VII
. Experimental Characterization of Vehicle Emission
Deterioration, Volume VIII
The first volume summarizes the general objectives, approach and
results of the study. The second volume presents the results of the
mandatory inspection/maintenance system study conducted with a computer-
ized system model which is described in Volume III. The experimental
programs conducted to develop input data for the model are described in
Volume IV (Interim Report of 1971-72 Test Effort) and V. Volume VI pre-
sents comparative measurements of NO and NO using chemiluminescence and
A
NDIR/NDUV instruments and differences in these measurements are examined.
A detailed description of the Economic Effectiveness Computer Program
along with a user's guide is presented in Volume VII. Volume VIII
contains a characterization of vehicle emission and engine parameter
deterioration rates.
The work presented herein is the product of a joint effort by TRW
Transportation and Environmental Operations and its subcontractor, Scott
Research Laboratories. TRW, as the prime contractor, was responsible for
overall program management, experimental design, data management and
analysis, and the economic effectiveness study. Scott acquired and tested
all of the study vehicles. Scott also provided technical assistance in
selecting emission test procedures and in evaluating the test results.
11
-------
TABLE OF CONTENTS
Page
1.0 INTRODUCTION 1-1
2.0 MATEMATICAL MODEL FRAMEWORK AND PROGRAM OVERVIEW ... 2-1
2.1 Model Framework 2-1
2.2 Program Overview 2-3
3.0 BASIC INPUT REQUIREMENTS AND CALCULATED OUTPUT .... 3-1
3.1 Input Options 3-1
3.1.1 Keyword Data Input 3-2
3.1.2 Namelist Data Input 3_7
3.2 Input Format 07
3.3 Output Specification and Options 3_15
4.0 OPERATING PROCEDURES 4_-|
4.1 The Programming System 4_-|
4.2 Control Cards Specification 4_-|
4.3 Deck Setup ,
4.4 Diagnostic and Trouble-Shooting Procedures ... 4 3
4.5 Library Routines Required 4_6
4.6 General Computer Requirements 4-6
4.7 Execution/Print Estimates 4-6
4.8 Program Limitations 4-9
5.0 DETAILED FLOW SCHEMATICS 5-1
5.1 Main Program 5-1
5.2 Subroutine INITIAL 5-1
5.3 Subroutine REGION - Demographic Data 5-19
5.3.1 Region 1 - L.A. Basin 5-31
5.3.2 Region 2 - New York/New Jersey .... 5-31
5.3.3 Region 3 - Washington D. C. 5-31
5.3.4 Region 4 - Denver 5-31
5.3.5 Region 5 - Detroit 5-31
5.4 Subroutine BLINE - Baseline Voluntary Program 5-31
5.5 Subroutine MICRO - Mandatory Program 5-39
m
-------
Page
5.6 Subroutine TEST - Inspection 5-48
5.7 Maintenance Routines 5-77
5.7.1 Subroutine MAI NT - CVS Emissions 5-77
5.7.2 Subroutine PMAINT - Engine Parameters 5-77
5.8 Deterioration Subroutines 5.34
5.8.1 Subroutine EDECAY - CFS Emissions 5.95
5.8.2 Subroutine MDECAY - Mode Emissions 5.95
5.8.3 Subroutine PDECAY - Engine Parameters 5.95
5.9 Subroutine COSTS - Economic Model 5-109
5.10 Subroutine STATS - Statistical Model 5-109
5.11 Utility Routines 5-139
5.11.1 Subroutine CONVOL - Convolution Routine 5-139
5.11.2 Function AREA - Rejection Rate Routine 5-152
5.11.3 Subroutine INTE6 - Trapezoidal Integration .... 5-163
5.11.4 Function FUN1 - Linear Interpolation . 5-163
5.11.5 Function FUN2 - Linear Interpolation 5-163
(2 Dimensional)
5.11.6 Subroutine FIT - Second Order Polynomial Curvefit . . 5-177
5.11.7 Function UNION - Logical Union Routine 5-177
5.11.8 Subroutine QUEUE - Queuing Model 5-177
5.11.9 Function IFACT - Factorial Routine 5-185
5.11.10 Subroutine STD - Mean and Standard Deviation Routine . 5-185
5.11.11 Subroutine STD2 - Weighted Mean and Standard Deviation 5-185
5.11.12 Subroutine NORM - Normalization Routine 5-192
5.11.13 Subroutine RESIZE - Distribution Resizing Routine . . 5-197
5.11.14 Function XPT - Computes Integration Limits to Match
Rejection Rates . . 5-197
5.11.15 Subroutine SWITCH - Distribution Reordering Routine . 5-203
5.11.16 Subroutine ADD - Adds Two Distributions 5-203
5.11.17 Function EINT - Computes Second Order Parameter . . . 5-203
Interactions
5.11.18 Subroutine PACKD - Packs a Distribution 5-208
5.12 Vehicle Population Model . 5-208
5.12.1 Subroutine PERMIL - Main Attrition Routine .... 5-214
iv
-------
Page
5.12.2 Subroutine PERCNT - Percent Distribution Manipulation
Routine 5-215
5.12.3 Subroutine NOMAD - Distribution Normalizing Routine 5-222
5.12.4 Subroutine MILAGE - Mileage Distribution Routine . 5-222
5.13 Linear Programming Model 5-222
5.13.1 Subroutine OPTMUM - Main Optimization Routine . . 5-229
5.13.2 Subroutine CUTPNT - Optimal Outpoint Calculations . 5-230
5.13.3 Subroutine LPAX - Linear Programming Algorithm . . 5-257
5.13.4 Subroutine PXCOEF - Engine Parameter Rejection . . 5-257
Rate Union Routine
5.14 Output Routines 5-257
5.14.1 Subroutine DISTPR - Convoluted Distribution . . . 5-257
Printout
5.14.2 Subroutine OUT - Scalar Output Routine .... 5-260
5.14.3 Subroutine GEEPER - Header Routine 5-260
5.14.4 Plot Routines 5-260
5.14.5 EPLOT - Emissions Distribution Plotting Routine . . 5-274
5.14.6 PLOTJK - Utility Discrete Plotter 5-274
5.14.7 PLOT - Emissions History Plotting Routine .... 5-274
5.14.8 PLOTXY - Utility Discrete Plotting Routine . . . 5.232
5.14.9 Array Output Routines 5-282
5.14.10 PRINT1 - Prints Two 10x15x3 Arrays 5_282
5.14.11 PRINT2 - Prints Three 15x3 Arrays 5-282
5.14.12 PRINTS - Prints Two 10x15 Arrays 5-282
5.14.13 PRINT4 - Prints Two 10x15x4 Arrays 5-282
5.14.14 PRINT5 - Prints Two 6x15 Arrays 5-290
5.14.15 PRINT6 - Attrition Data Output Routine .... 5-290
5.15 Block Data 5-290
APPENDIX A - NOMENCLATURE ..... A-l
APPENDIX B - SAMPLE PROBLEMS B-l
-------
LIST OF TABLES
Table Title Page
2-1 Subroutine HIERARCHY. .... 2-6
3-1 Available Keyword Input 3-3
3-2 Valid GEEP Namelist Variables 3-10
3-3 Engine Parameter Code Numbers 3-12
3-4 Mode Emission Code Numbers 3-12
3-5 Possible Namelist Variable Formats 3-14
3-6 Summary Output Options 3-17
3-7 Summary Output Results 3-18
4-1 Required Job Control Cards 4-2
4-2 Diagnostic Messages 4-5
4-3 System Library Function Called By GEEP 4-7
4-4 Execution/Print Estimates 4-8
5-0 Summary Level Subroutine Descriptions 5-2
5-1 Main Program Listing 5-12
5-2 Subroutine INITIAL Listing 5-23
5-3 Subroutine REGION Listing 5-30
5-4 Subroutine REGION1 Listing 5.33
5-5 Subroutine BLINE Listing 5.43
5-6 Subroutine MICRO Listing 5.55
5-7 Subroutine TEST Listing 5-71
vi
-------
LIST OF TABLES (cont.)
Table Title page
5-8 Subroutine MAINT Listing 5-81
5-9 Subroutine PMAINT Listing 5-90
5-10 Subroutine EDECAY Listing 5-97
5-11 Subroutine MDECAY Listing 5-105
5-12 Subroutine PDECAY Listing 5-116
5-13 Subroutine COSTS Listing 5-131
5-14 Subroutine STATS Listing 5-146
5-15 Subroutine CONVOL Listing 5-159
5-16 Function AREA Listing 5-169
5-17 Subroutine INTEG Listing 5-174
5-18 Function FUN! Listing 5-176
5-19 Function FUN2 Listing 5-179
5-20 Subroutine FIT Listing 5-181
5-21 Function UNION Listing 5-184
5-22 Subroutine QUEUE Listing 5-187
5-23 Function IFACT Listing 5-189
5-24 Subroutine STD Listing 5-191
5-25 Subroutine STD2 Listing 5-194
5-26 Subroutine NORM Listing 5-196
5-27 Subroutine RESIZE Listing 5-200
5-28 Function XPT Listing 5-202
5-29 Subroutine SWITCH Listing 5-205
5-30 Subroutine ADD Listing 5-207
vii
-------
LIST OF TABLES (cont.)
Table Title Page
5-31 Function HINT Listing 5-210
5-32 Subroutine PACKD Listing 5-213
5-33 Subroutine PERMIL Listing 5-217
5-34 Subroutine PERCNT Listing 5-220
5-35 Subroutine NOMAD Listing 5-224
5-36 Subroutine MILAGE Listing 5-227
5-37 Subroutine OPTMUM Listing 5-236
5-38 Subroutine CUTPNT Listing 5-250
5-39 Subroutine PXCOEF Listing 5-259
5-40 Subroutine DISTPR Listing 5-262
5-41 Subroutine OUT Listing 5-264
5-42 Subroutine GEEPER Listing 5-272
5-43 Subroutine EPLOT Listing 5-276
5-44 Subroutine PLOTJK Listing 5-278
5-45 Subroutine PLOT Listing 5-281
5-46 Subroutine PLOTXY Listing 5-284
5-47 Subroutine PRINT1 Listing 5-287
5-48 Subroutine PRINT6 Listing 5-293
5-49 Block Data Listing 5-295
A-l Program Nomenclature A-2
B-l Sample Problem #1
(Engine Inspection Extensive B Program) B-3
vi i i
-------
LIST OF TABLES (cont.)
Table Title Page
B-2 Input Data For First Case B-4
B-3 Summary Results For Case 1 B-5
B-4 Vehicle Population Characteristics B-6
B-5 Los Angeles Basin Data B-7
B-6 Pass/Fail Analysis For Engine Inspection B-8
B-7 Pass/Fail Inspection Criteria B-9
B-8 Engine Parameter Rejection Rates For First Time
Interval B-10
B-9 Emission History Summary B-14
B-10 Statistical Analysis of Predicted Emission Reductions . B-16
B-ll Sample Problem #2
(Emission Inspection Extensive B Program) B-17
B-12 Input Data For Second Case B-18
B-13 Inspection Lane System B-19
B-14 Summary Results For Case 2 B-20
IX
-------
LIST OF FIGURES
Title Page
2-1 Schematic Flowchart for the General Economic
Effectiveness Program ................. 2-5
2-2 Flowcharts for INITIAL and REGION ........... 2-7
2-3 Flowcharts for the ATTRITION and BLINE ......... 2-8
2-4 Flowchart for MICRO .................. 2-9
2-5 Flowcharts for EDECAY, PDECAY and MDECAY ........ 2-10
2-6 Flowcharts for TEST and MAINT ............. 2-11
2-7 Flowchart for STATS .................. 2-12
2-8 Flowchart for COSTS .................. 2-13
3-1 Keyword Card Order ................... 3-8
3-2 Namelist Input Card Order ............... 3-9
4-1 Example Card Configuration For Object Deck Run ..... 4-4
5-1 Main Program Flowchart ................. 5-6
5-2 Subroutine INITIAL Flowchart .............. 5-20
5-3 Subroutine REGION Flowchart .............. 5-29
5-4 Subroutine REGION1 Flowchart .............. 5-32
5-5 Subroutine BLINE Flowchart ............... 5-40
5-6 Subroutine MICRO Flowchart ............... 5-49
5-7 Subroutine TEST Flowchart ............... 5-60
5-8 Subroutine MAINT Flowchart ............... 5-78
5-9 Subroutine PMAINT Flowchart .............. 5-85
-------
LIST OF FIGURES (cont.)
Figure Title Page
5-10 Subroutine EDECAY Flowchart 5.95
5-11 Subroutine MDECAY Flowchart 5.99
5-12 Subroutine PDECAY Flowchart 5_HO
5-13 Subroutine COSTS Flowchart 5-120
5-14 Subroutine STATS Flowchart 5-140
5-15 Subroutine CONVOL Flowchart 5-153
5-16 Function AREA Flowchart 5-164
5-17 Subroutine INTE6 Flowchart 5-173
5-18 Function FUN1 Flowchart 5-175
5-19 Function FUN2 Flowchart 5-178
5-20 Subroutine FIT Flowchart 5-180
5-21 Function UNION Flowchart 5-182
5-22 Subroutine QUEUE Flowchart 5-186
5-23 Function IFACT Flowchart 5-188
5-24 Subroutine STD Flowchart 5-190
5-25 Subroutine STD2 Flowchart 5-193
5-26 Subroutine NORM Flowchart 5-195
5-27 Subroutine RESIZE Flowchart 5-198
5-28 Function XPT Flowchart 5-201
5-29 Subroutine SWITCH Flowchart 5-204
5-30 Subroutine ADD Flowchart 5-206
5-31 Function EINT Flowchart 5-209
5-32 Subroutine PACKD Flowchart 5-212
xi
-------
LIST OF FIGURES (cont.)
Figure Title Page
5-33 Subroutine PERMIL Flowchart 5-216
5-34 Subroutine PERCNT Flowchart 5-218
5-35 Subroutine NOMAD Flowchart 5-223
5-36 Subroutine MILAGE Flowchart 5-225
5-37 Subroutine OPTMUM Flowchart 5-231
5-38 Subroutine CUTPNT Flowchart 5-241
5-39 Subroutine PXCOEF Flowchart 5-258
5-40 Subroutine DISTPR Flowchart 5-261
5-41 Subroutine OUT Flowchart 5-263
5-42 Subroutine GEEPER Flowchart 5_27i
5-43 Subroutine EPLOT Flowchart 5-275
5-44 Subroutine PLOTJK Flowchart 5-277
5-45 Subroutine PLOT Flowchart 5-280
5-46 Subroutine PLOTXY Flowchart 5-283
5-47 Subroutine PRINT! Flowchart 5-286
5-48 Subroutine PRINT6 Flowchart 5-291
B-l HC Emission Time History Plot B-ll
B-2 CO Emission Time History Plot B-12
B-3 NO Emission Time History Plot B-13
-------
1.0 INTRODUCTION
The General Economic Effectiveness Program (GEEP) is a computer
model which simulates the dynamic behavior of alternative vehicle
inspection/maintenance systems. It is completely general in design
and can be used to assess a wide range of inspection/maintenance
strategies. GEEP has been coded in Fortran IV and is presently
operating on a CDC 6500 System.
The greatest potential uses of GEEP are: 1) Assessing the overall
feasibility of vehicle inspection/maintenance, 2) measuring the impact
of regional effects on program performance, 3) designing the optimal
system configuration, and 4) contrasting the cost-effectiveness of a
mandatory program with other control concepts.
GEEP was developed primarily for assessing the feasibility,both
performance wise and economically, of a mandatory program of vehicle
inspection/maintenance. Since its inception (circa 1969) it has been
expanded to include other basic strategies; e.g. mandatory maintenance,
voluntary maintenance, and to account for the influx of new vehicles with
differing emission levels. These added features have greatly enhanced
the program in terms of its effectiveness as a research tool.
The program has been constructed on a hierarchal input-output
concept. Simplicity and flexibility are the salient characteristics of
the input language. As such, the input system greatly reduces the time
required to set up and execute a computer run. The program also
provides several levels of output depending on user needs. For standard
cases, it outputs computer generated plots of emission time histories,
program figures of merit, estimated emission reductions and numerous cost
accounting data. For more detailed information, a debug option is
1-1
-------
available which prints the basic calculations from each of the major
subroutines.
This manual describes for the programmer/user the operating
instructions and input formats for the program. It is composed of
five sections and two appendices. The present section summarizes
the purpose and general uses of the program. Section 2.0 presents a
brief discussion on the mathematical framework used in developing
the basic model and provides a concise overview of the program's
structure. Section 3.0 outlines the input requirements and formats
for undertaking a computer simulation run. Included are tables of
the available input and output options. Detailed information on the
deck setup, computer resource requirements and program debugging
options are given in Section 4.0. Finally, in Section 5.0 a
complete set of flow schematics and listings is presented for each of
the 55 subroutines contained in GEEP.
1-2
-------
2.0 MATHEMATICAL MODEL FRAMEWORK AND PROGRAM OVERVIEW
2.1 MODEL FRAMEWORK
The primary purpose of the Economic Effectiveness Model is to serve
as a research and design tool for assessing the various implications of
a mandatory program of vehicle inspection/maintenance. As such, it has
been constructed with the capability of investigating a wide range of
possible procedure and design alternatives. The model has been constructed
to analyze the regional feasibility of vehicle inspection/maintenance as
well as specify an optimal system design. Input data for several regional
areas have been incorporated directly into the model.
The model by its design is procedure oriented. That is, it is best
used for evaluating the attractiveness of alternative procedures, e.g.,
engine inspection or emission inspection, which govern and control the
operation of an inspection/maintenance system. Actually, there exists
a hierarchy of decision variables within the structure of the model.
The model analyzes these decision variables by simulating the behavior
of the inspection/maintenance process over time. Here, the economic-
effectiveness of various strategies can be measured in terms of emission
reductions and program costs. A statistical analysis of these forecasted
emission reductions is performed to determine their actual significance.
This analysis includes an estimate of the overall variance for each
emission species (i.e., HC, CO, NO ).
A
In addition to these functions, the model can also be used to
analyze the sensitivity of system performance to various assumptions
and basic data inputs. Used in this way the model provides a mechanism
for identifying areas requiring further analytical and empirical
2-1
-------
definition. Finally, the model generates a description of the designed
system including: total number of inspection lanes required, equipment
specification and facilities configuration.
The methodological approach adopted for constructing the Economic
Effectiveness Model involved a blending of theoretical and empirical
relationships. The theory provided the conceptual framework for des-
cribing the inspection/maintenance process whereas the experimental data
yielded the specific transformations needed to define and interconnect
the various model elements.
The development of the model required a detailed specification of
the various relationships characterizing the Inspection/Maintenance
Process. Three main components -- engineering design, economic analysis
and regional characterization -- form the core or nucleus of the model.
Each of these components describes or delineates one fundamental aspect
of the total process. How these interact must be clearly understood so
that system design factors are selected in combinations to yield optimal
cost and performance.
Attempting to describe a physical process with an abstract mathematical
model raises a number of technical problems. One important issue involves
the level of aggregation used in the model to characterize the actual
process. Use of a simulation model yields an effective vehicle for
coping with many of these questions. Here, basic study grounds and
model assumptions, e.g., level of aggregation, can be isolated and
examined in detail. As such, a simulation model strikes a good balance
between a strictly theoretical model and an empirical model. The simu-
lation model used in describing the inspection/maintenance process
2-2
-------
provides a powerful tool not only for assessing the feasibility of this
control approach but also in developing an optimal system design specifi-
cation. One phase of such a feasibility assessment involves the evaluatior,
of potential procedure strategies, e.g. engine inspection. Within this
context, the simulation model can be used to measure the performance of
these strategies over time and under varying system constraints. The
resultant model design provides a great deal of flexibility yet contains
sufficient depth to describe the process in intimate detail.
A detailed description of the basic model structure and flow processes
is contained in Volume 3 of this series entitled, A Documentation Handbook for
tf\e Economic Effectiveness Model. Descriptions contained in this volume
are designed for use by the user and/or the computer programmer engaged
in exercising the GEEP computer program.
2.2 PROGRAM OVERVIEW
The General Economic Effectiveness Program embodies a set of mathe-
matical algorithms and techniques which have been developed to simulate
a mandatory program of vehicle inspection and maintenance (I/M). The
program contains the necessary data and logic to evaluate a variety of
inspection/maintenance alternatives. Figure 2-1 presents a schematic
overview of the program's structure.
The program is nominally under the control of an executive system (GX)
which checks for input errors and controls output. GX also initiates
the computational process by calling subroutines INITIAL and REGION.
INITIAL moves starting valves into each storage array, expands, normalizes
and determines mean valves and variances for all engine parameters and
mode emission distributions. Subroutine REGION calls one of five existing
2-3
-------
regional sets which contain pass/fail criteria, regional emission
weighting factors, initial emission levels, and vehicle population data
(e.g., engine parameter distributions). Next, GX calls subroutine
ATTRITION which estimates the change in the vehicle population due to
the introduction of new cars on the attrition of older ones. This data
is inputted directly into both MICRO and BLINE.
Subroutine MICRO embodies the actual Inspection/Maintenance Model.
Here, the effects of deterioration, testing and maintenance are
measured based on the specific procedure under investigation. Simulta-
neously, the same effects based on a voluntary program are computed in
subroutine BLINE. The estimated emission reduced potential from the
mandatory program is then contrasted with the results developed
vis-a-vis the figure of merit.
Subroutine COSTS determines the costs of the mandatory program
and develops the appropriate figures of merit. Cost of equipment,
facilities and training are alsp estimated. Finally, subroutine OUT
produces a concise summary of the calculated results.
Table 2-1 presents an overview of the subroutine hierarchy
within 6EEP. As can be seen, there exists six functional levels. The
discussion thus far, has only covered the first two levels. A complete
description of the remaining subroutines are found in Section 5.0.
The circled letters (A-G) shown in Figure 2-1 refer to access
points associated with the second level hierarchy. A more detailed
flow schematic for these subroutines is presented in Figures 2-2 through
2.8, respectively.
2-4
-------
EXECUTIVE SYSTEM
a DATA INPUT SYNTHESIS
> PROGRAM EXECUTION AND
CONTROL
DATA SET INPUT
o POLICY OPTIONS
o INSPECTION PROCEDURE
o METHOD OF OPERATION
o OPERATIONAL VARIABLES
o REGION
o VEHICLE CONTROL TYPE
INTERNAL DATA SET
o DESIGN CRITERIA
o EMISSION FACTORS
o ECONOMIC FACTORS
o TIME CONSTIAINTS
o TOTAL PROGRAM TIME a)
o INSPECTION INTERVAL (il)
ro
01
ATTRITION
sVEHICLE DISTRIBUTION BY CONTROL
TYPE AND POWER TRAIN
>MILEAGE DURING INSPECTION
PERIOD (Ai-J BY CONTROL TYPE
AND POWER TRAIN
BLINE
(VOLUNTARY MAINTENANCE)
o EMISSION LEVELS
AT TIME t = T
'f BASEilNE, o-BASELINE)
P DECAY
PARAMETER DECAY MODEL
E DECAY
. EMISSION DECAY MODEL
M DECAY
MODE DECAY MODEL
[EMISSION SIGNATURE ONLY)
[/ mTTTTTTT-
COSTS
o MANDATORY PROGRAM COSTS
o VOLUNTARY PROGRAM COSTS
o PROGRAM FIGURE OF MERIT
FIGURE OF MERIT
EMISSION TIME HISTORIES
TOTAL EMISSION REDUCTION PER SPECIE
EMISSION SPECIE PERCENTAGE REDUCTION
REJECTION FRACTION TIME HISTORIES
VEHICLE POPULATION DISTRIBUTION TIME
HISTORIES
PROGRAM EXIT AND TERMINATION I
MA | NT
i MAINTENANCE MODEL
o EFFECT OF MAINTENANCE
ON EMISSIONS
STATS
STATISTICAL MODEL
o ESTIMATE CONFIDENCE LIMITS
ON PREDICTED EMISSION LEVELS
o STATISTICAL COMPARISON OF
TEST VERSUS BASELINE EMISSION:
Figure 2-1 Schematic Flowchart for the General Economic Effectiveness Program
-------
Table 2-1 SUBROUTINE HIERARCHY
GEEP
r\>
REGION 1 4
REGION 2 5
3 6
INITIAL PRINT (1)(2)(3)
PRINT (4)(5)(S)
BLINE
PRINT 2
FIT
FUN 1
/ PDECAY
MICRO
MDECAY
EDECAY
TEST
STATS
PLOT
COSTS j QUEUE
FIT
FUN 1
STD 2
AREA
FUN 1
UNION
TABLE
DISTPR
CONVOL
NORM
STD 2
FUN 1
XPT
PLOTXY
I FACT
NORM
NORM
FUN 1
NORM
SWITCH
RESIZE NORM
STD 2 NORM
NORM
FUN 1
NORM
OUT
-------
GENERATE NUMBER OF TEST
INTERVALS NEEDED FOR
BASELINE AND TEST FLEET ANALYSIS
ro
i
INITIALIZE/RE-INITIALIZE
OPTIONAL DATA
INPUT VARIABLES
SPECIFICATION OF INTERNAL
PRINTOUT OPTIONS
INITIALIZE DATA
FOR FOLLOWING REGIONS:
1) LOS ANGELES
2) NEW YORK/NEW JERSEY
3) DENVER
4) WASHINGTON, D.C.
5) DETROIT
Figure 2-2 Flowcharts for Subroutines INITIAL and REGION
-------
BLINE
START WITH INITIAL VEHICLE
DISTRIBUTION AND GIVEN
GROWTH RATE
COMPUTE VEHICLE
ATTRITION RATES FOR
EACH CONTROL TYPE
ESTIMATE VEHICLE
POPULATION
DISTRIBUTION FOR
EACH YEAR OF
INSPECTION PROCESS
PRINT INTERNAL
ATTRITION CALCULATIONS
1 YES
©
SET INITIAL VALUES
FOR VEHICLE EMISSION
LEVELS (E.)
DECAY EMISSION LEVELS
USING DETERIORATION DATA
VOLUNTARY MAINTENANCE
TREATMENT
C E,
M
cl
RESULTANT BASELINE EMISSION
LEVEL AT tj
PRINT INTERNAL
BLINE CALCULATIONS
CALL FIT:
CURVE FIT BASE LINE
EMISSION TIME HISTORY
CALL INTEGRATION:
COMPUTE TOTAL BASE LINE
EMISSION TONNAGE
ADJUST BASELINE EMISSION
INTERVALS TO BE CONSISTENT
WITH MANDATORY TEST
INTERVAL.
Figure 2-3 Flowcharts for Subroutines ATTRITION and BLINE
2-8
-------
MICRO
SET INITIAL VALUES
OF THIST TO START
VALUES
CALL PDECAY
(DECAY PARAMETER)
CALL MDECAY
(DECAY MODE
EMISSION)
CALL EDECAY
EMISSION DECAY
CALL TEST
CALL MAINT
NO
PRINT INTERNAL
CALCULATIONS
FROM MICRO
M2
(f5\
STATISTICAL
ANALYSIS
DESIRED
TESTING
DURATION
FINISHED
©
CALL PLOT:
o BHIST (VOLUNTARY)
o THIST (MANDATORY)
Figure 2-4 Flowchart for Subroutine MICRO
2-9
-------
DECAY EMISSION
LEVELS
OUTPUT \. NO
OPTION >-H Fl
(E DEBUG)
CONSTRUCT TABULAR
DESCRIPTIONS OF MODE
EMISSION. DISTRIBUTIONS
AND ESTIMATE SHIFT IN
MEAN VALUE AFTER
MAINTENANCE/DETERIORATION
Ael =f (eLI' Aem' TIME)
PRINT INTERNAL
CALCULATIONS
FROM E DECAY
CONSTRUCT TABULAR DESCRIPTIONS
OF ENGINE PARAMETER DISTRIBUTIONS
AND ESTIMATE SHIFT IN MEAN VALUE
AFTER MAINTENANCE/DETERIORATION
A P = f (P , time)
COMPUTE MEAN OF MODE
EMISSION DISTRIBUTION
AF^ER MAINTENANCE/
DETERIORATION
e!L +
Ae,
ro
i
1
COMPUTE MEAN OF
PARAMETER SETTINGS
AFTER MAINTENANCE/
DETERIORATION
PFM = PIM + A PM
RECOMPUTE TABULAR DESCRIPTION
FOR EACH MODE EMISSION DISTRIBUTION
AFTER MAINTENANCE/DETERIORATION
RECOMPUTE TABULAR DESCRIPTIONS
FOR EACH ENGINE PARAMETER
DISTRIBUTION AFTER DETERIORATION/
MAINTENANCE.
OUTPUT
OPTION
(Q DEBUG)
OUTPUT
OPTION
(PDEBUG)
PRINT INTERNAL
CALCULATIONS
FROM MDECAY
PRINTOUT INTERNAL
CALCULATIONS
P DECAY
Figure 2-5 Flowcharts for Subroutines EDECAY, MDECAY and PDECAY
-------
EMISSION
INSPECTION
ENGINE
INSPECTION
COMPUTE REJECTED FRACTION (PS)
USING TABULAR MODE EMISSION
DISTRIBUTIONS FOR GIVEN
CUTPOINT (e.g., ICO = 4°$
COMPUTE FAILED FRACTION (PP)
AND EXPECTED VALUE OF A Pi USING
TABULAR PARAMETER DISTRIBUTIONS
FOR GIVEN CUTPOINT
(e.g., RPM = 600)
ESTIMATE PARAMETER FAILED
FUNCTION AND EXPECTED VALUE
OF APj:
PPi = G(PSL)
DETERMINE TOTAL
NUMBER OF CARS
REJECTED:
COMPUTE EXPECTED EMISSION
REDUCTION BY MAINTAINING
(MANDATORY) SELECTED PARAMETERS-
DETERMINE TOTAL
NUMBER OF VEHICLES
FAILED:
UPPi
APPLY CONSERVATION OF
MAINTENANCE TO ACCEPTED
AND REJECTED VEHICLE
ESTIMATE TIME REQUIRED
FOR MAINTAINING REJECTED
VEHICLES AND ERRORS OF
COMMISSION
PRINT INTERNAL CALCULATIONS FROM
FROM MA I NT
PRINT INTERNAL CALCULATIONS
FROM TEST
2-6 Flowcharts for Subroutines TEST and MAINT
-------
MANDATORY FLEET EMISSION
VARIANCE DATA, DEVELOPED
FROM BASIC ERROR SOURCES.
VOLUNTARY FLEET EMISSION
VARIANCE DATA DERIVED
FROM EXPERIMENTAL RAM
EMISSION
VARIANCE DATA; DtRIVEO
FROM EXPERIMENTAL
PROGRAMS FOR BOTH
VOLUNTARY AND
MANDATORY FLEETS
MEAN EMISSION LEVELS:
DERIVED FROM PROGRAM
FOR BOTH VOLUNTARY
AND MANDATORY FLEETS
COMPUTE ^STATISTIC
AND LtVEL OF CONFIDENCE
FOR EACH EMISSION SPECIE
xT-xa
' a d!ff
INTEGRATE OVER TIME
THE STATISTICALLY
SIGNIFICANT EMISSION
REDUCTIONS
Figure 2-7 Flowchart for Subroutine STATS
2-12
-------
COMPUTE AMORTIZATION RATES
AND NUMBER OF TOTAL FLEET
INSPECTED AND MAINTAINED
STATE LANE
FRANCHISED
1 V. UK SIAIE LANE ^ 1
f \ iKKPFrrinw ^r 4
COMPUTE CAPITAL
EQUIPMENT AND
FACILITIES COSTS
1
COMPUTE INSPECTION
AND MAINTENANCE
OPERATING COSTS
1
\. ^^ COMPUTE INSPECTION
^^ AND MAINTENANCE
OPERATING COSTS
ESTIMATE ANNULARIZED
AND DISCOUNTED CUTS
FOR BOTH VOLUNTARY
AND MANDATORY
PROGRAMS
APPLY WEIGHTING
FACTORS TOPREDICTED
EMISSION REDUCTIONS
DEVELOP FIGURE
OF MERIT (UNADJUSTED)
AND STATISTICALLY
ADJUSTED)
=- s
PRINTOUT INTERNAL
CALCULATIONS OF
CUTS
Figure 2-8 Flowchart for Subroutine COSTS
2-13
-------
3.0 BASIC INPUT REQUIREMENTS AND CALCULATED OUTPUT
3.1 INPUT OPTIONS
Presented herein is a description of the salient input/output features
of the program. The program's input/output system has been designed to
accommodate a wide range of inspection/maintenance options. Basically,
the input options can be separated as follows -- inspection procedure,
maintenance treatment and regional area.
The inspection procedure refers to the type of diagnostic evaluation
used in identifying engine maladjustments and malfunctions. There are
two basic types of inspection strategies:
(1) Engine Parameter Inspection
(2) Exhaust Emission Inspection
Within each of these two approaches lies a number of different alternatives
(e.g., idle). Based on a specific inspection strategy, the model determines
the optimum pass/fail criteria for the various engine parameters and/or
exhaust mode emissions.
The model partitions the engine block into three major subsystems --
idle, ignition and induction each of which can be maintained either
singularly or in combination. The three maintenance treatments currently
available are:
(1) Idle Adjustment
(2) Idle Adjustment with an Ignition Tuneup (Extensive A)
(3) Idle Adjustment with an Ignition and Induction Tuneup
(Extensive B)
Thus the model is capable of examining a total of six different and unique
inspection/maintenance alternatives. Furthermore, the user can elect to
3-1
-------
examine the impact of maintenance only strategies by merely rejecting
the total vehicle population.
In addition to the various procedural options, the model requires
descriptive information on the demographic and air quality characteristics
of the candidate regional area. The essential regional data includes:
(1) vehicle population distributions, (2) vehicle emission levels and
engine state, and (3) a quantitative estimate of existing air quality.
The last item is used in formulating an emission species weighting function.
This function integrates the three exhaust emissions (HC, CO and NO )
A
into a composite figure which can be used directly in contrasting various
alternatives. To date, vehicular demographic and emissions data has been
collected for the following regions:
Los Angeles Basin
Detroit Metropolitan Area
Denver Metropolitan Area
t New York/New Jersey Metropolitan Area
District of Columbia Metropolitan Area
Selection of one of these regions for analysis is made by merely
specifying its key word name in the input file.
3.1.1 Keyword Data Input
The Keyword input consists of a series of input cards each containing
a "keyword" from the list of valid entries (The 0PTS array). Each key-
word activates an appropriate portion of GEEP code. Table 3rl presents
a list of all valid keywords with a description of the variables affected.
For a detailed description of the consequences of a particular input,
consult the flowcharts and listing in Section 5.1 (Main program).
3-2
-------
Table 3-1 AVAILABLE KEYWORD INPUT
KEYWORD
PARAMETER
SIGNATURE
UNCONTROL
CONTROL
POST 70
IDLE
IGNITION
INDUCTION
LOADED
HYBRID
CODE
NUMBER
8
9
10
25
27
DESCRIPTION
Parameter inspection in franchisee! garages
(unloaded)
Mode emission signature inspection in
state facilities (unloaded)
Include uncontrolled vehicles (pre 1968)
in fleet being modeled. (K=l)
Include controlled vehicles (1968 - 1970)
in fleet being modeled. (K=2)
Include post 70 vehicles (post 1970) in
fleet being modeled. (K=3)
Include Idle parameters in those being
tested.
Include Ignition parameters in those
being tested.
Include Induction parameters in those
being tested
Flag indicating test run in loaded con-
dition.
Flag indicating hybrid test. Part run
loaded, part unloaded.
VARIABLES AFFECTED
RTYPE = PM0DEL, LIDLE=1, SLANE="GARAGE"
RTYPE = SM0DEL, LIDLE=1, SLANE="STATE"
KSTART=1, KST0P=at least 1. Model
uses control types KSTART through
KST0P
KSTART=at most 2, KST0P=at least 2
KSTART=at most 3, KST0P=3
MSTART=1, MST0P=at least 3. Model
uses parameters MSTART through MST0P.
(See Table 4.1.1.2)
MSTART=at most 4, MST0P=at least 5
OPTI=at least 2
MSTART=at most 6, MST0P=10
OPTI=at least 3
LIDLE=2
LIDLE=3
-------
Table 3-1 AVAILABLE KEYWORD INPUT (con't.)
co
i
KEYWORD
DEBUG
BLINE
MICRO
TEST
COSTS
AREA
CUTPTS
PDECAY
DATA
MDECAY
STATS
STOP
CODE
NUMBER
1
11
12
13
14
15
16
17
18
19
20
DESCRIPTION
OLD debug flag
BLINE debug flag.
MICRO debug flag.
TEST debug flag.
COSTS debug flag.
AREA debug flag.
CUTPTS debug flag.
PDECAY debug flag.
DATA debug flag.
MDECAY debug flag.
STATS debug flag.
Indicates last case in a job.
VARIABLES AFFECTED
None
Turns on Bline debug output.BDEBU6=YES
Turns on MICRO debug output.MDEBUG=YES
Turns on TEST debug output. TDEBUG=YES
Turns on COSTS debug output.CDEBUG=YES
Turns on AREA debug output. ADEBUG=YES
Turns on CUTPTS debug output.LDEBUG=YES
Turns on PDECAY debug output.PDEBUG=YES
Turns on DATA debug output.DDEBUG=YES
Turns on MDECAY debug output.QDEBUG=YES
Turns on STATS debug output.SDEBUG=YES
RST0P = YES
-------
Table 3-1 AVAILABLE KEYWORD INPUT (con't )
KEYWORD
LA
NY
WASH
DENVER
DETROIT
IHC
IC0
IN0
HC45
C045
N045
CODE
NUMBER
21
22
23
24
35
31
30
36
32
33
37
DESCRIPTION
Los Angeles regional data flag.
New York regional data flag.
Washington, D.C. regional data
flag.
Denver regional data flag.
Detroit regional data flag.
Include IHC in mode emissions
being tested.
Include IC0 in mode emissions
being tested.
Include IN0 in mode emissions
being tested.
Include HC 45 in mode emissions
being tested.
Include C0 45 in mode emissions
being tested.
Include N0 45 in mode emissions
being tested.
VARIABLES AFFECTED
RNAME=1
RNAME=2
RNAME=3
RNAME=4
RNAME=5
LSTART=at most 1 , LST0P=at
least 1. Model uses mode
emission LSTART through LST0P,
See Table 4.1.1.3.
LSTART=at
least 2.
LSTART=at
least 3 .
LSTART=at
least 4.
LSTART=at
least 5.
LSTART=at
least 6.
most 2, LST0P=at
most 3, LST0P=at
most 4, LST0P=at
most 5, LST0P=at
most 6, LST0P=at
oo
in
-------
Table 3-1 AVAILABLE KEYWORD INPUT (con't.)
KEYWORD
STATE
GARAGE
MISFIRE
CODE
NUMBER
28
29
34
DESCRIPTION
Flag indicating maintenance in
State owned facilities.
Flag indicating franchised garage
maintenance.
Use misfire in simulation. (Mis-
fire is normally not used.)
VARIABLES AFFECTED
SLANE="STATE"
SL AN E=" GARAGE"
MISFIRE=YES
CO
-------
Figure 3-1 shows the sequential order for the Keyword card setup.
3.1.2 Namelist Data Input
Many inputs to the General Economic Effectiveness Program have
numeric values and therefore do not lend themselves to a simple keyword
input scheme. These parameters are specified in a namelist input data
section. Table 3-2 contains a complete list of all valid namelist
variables along with a description of their role in the Inspection/Main-
tenance model. Figure 3-2 illustrates the card order setup for the
Namelist input. Section 3.2 describes the exact card formats and deck
setup required for a namelist input record.
The bulk of the input data is normally invariant (e.g., influence
coefficients) and accordingly resides within the program. This approach
greatly simplifies the task of executing multiple computer runs and
minimizes potential sources of error. A complete listing of all initial
data is available through the use of the DATA option. Tables 3-3 and 3-4
have been prepared to assist the user in relating code internal numbers
with input descriptions for engine parameters and mode emissions, respect-
ively. These tables should be of specific value when attempting to
introduce additional parameters and/or mode emissions.
3.2 INPUT FORMAT
Input to the General Economic Effectiveness Program is given by case.
Each case, consisting of two sections, constitutes a complete inspection/
maintenance program description. Keyword data input, the first section
of each case, defines the inspection procedures, the inspection parameters
or mode emissions, the region to be modeled and the debug options (See
Table 3-1 for a complete list of keyword options). Namelist input data,
3-7
-------
r
KEYWORD N
o
0°
Q
KEYWORD 3
co
00
^KEYWORD 2
KEYWORD 1
Figure 3-1 Keyword Card Order
-------
A VARN = VALUE N
/ AVAR 2 = VALUE 2
co
to
/ A VAR 1 = VALUE
P$NAM1
Figure 3-2 Name!1st Input Card Order
-------
Table 3-2 VALID GEEP NAMELIST VARIABLES
VARIABLE
DIMENSION
DESCRIPTION
COEFBP
EFF
EMW
FPERC
HORZN
LPICK
NPICK
PARM
PCONF
PPICK
PSTAR
SCALEBM
START
10 x 15
10
3
10 x 3
scalar
10
10
3x3
scalar
15 x 10
10
scalar
3
15 x 3
Parameter decay rates. May be altered
for sensitivity analysis.
Parameter maintenance efficiency for
AE calculation.
Emission weighting function. Expresses
relative importance of emission re-
ductions by species.
Voluntary maintenance by parameter and
control type. May be altered for sen-
sitivity analysis.
Time horizon of I/M program in months.
Array of time periods for linear pro-
gramming cutpoint optimization
Array of time periods for statistical
analysis of results of the current
time interval.
Emission decay rate not attributable
to parameter deterioration.
Confidence level for statistical
analysis.
Successful inspection percentage for
each parameter and control-power train
type.
Array of time periods for plot
generation under various debug options.
Constant rejection rate.
Miscellaneous fudge factor input.
Currently does nothing.
Initial emission rates for each species,
control type and power train type.
Initialized in REGION.
3-10
-------
Table 3-2 VALID 6EEP NAMELIST VARIABLES (Con't )
VARIABLE
STAT
SXCUT
TDIST
TINT
XCUT
XLANE
Z2
Z9
Z16
DIMENSION
scalar
6x3
10 x 3
scalar
10 x 3
scalar
scalar
scalar
scalar
DESCRIPTION
Number of inspection stations.
Mode emission cutpoints.
Parameter usage vector. Used for
deleting certain parameters from
consideration.
Time interval for mandatory in-
spection.
Parameter cutpoints.
Number of inspection lanes per
station.
Mechanics hourly rate.
User inconvenience rate.
Attendant hourly rate.
3-11
-------
Table 3-3. ENGINE PARAMETER CODE NUMBERS
Parameter Number
1
2
3
4
5
6
7
8
9
10
Subsystem
Idle
Idle
Idle
Ignition
Ignition
Induction
Induction
Induction
Induction
Induction
Parameter
Idle C0
RPM
Timing
Misfire
N0 Control
A
Air Pump
PCV
Air Cleaner
Vacuum Choke
Kick
Choke Heat Riser
Table 3-4 MODE EMISSION CODE NUMBERS
MODE EMISSION
NUMBER
1
2
3
4
5
6
MODE EMISSION
IHC
IC0
IN0
HC 45
C0 45
N0 45
DESCRIPTION
Idle HC
Idle C0
Idle NO
A
Cruise 45 HC
Cruise 45 C0
Cruise 45 N0
A
3-12
-------
the second section of each case, includes specification of all numeric
data for a GEEP simulation. These data include the inspection time inter-
val, emission weighting factors, cutpoints for parameter and mode emission
inspections, and miscellaneous cost data.
Keyword data is specified by listing one keyword per card starting
in card column 1. Only the first ten characters of the data card are
read, and therefore columns 11 through 80 are available for comments or
case descriptions. The order of the keyword cards is insignificant as
the model treats each entry separately, setting the appropriate para-
meters depending on the keyword. An invalid entry, that is, one which
does not apppear in the OPTS array, is flagged and printed out along with
a non-fatal error message. At the end of each case the keyword "THAT'S
ALL" signals an end of section one data for the case being processed.
A "STOP" keyword input, anywhere in a case, signals that the case being
processed is the last one in the data deck.
Namelist input data, Section 2, is more strictly formatted than the
keyword input, The card following the "THAT'S ALL" end of keyword data
flag, must be a P$NAM1 card starting in column 1. Following this card
are the actual input data starting in card column 2. Possible variable
input formats are described in Table 3-5. Each variable name must be
a valid namelist NAM1 variable and must not start in column 1. The end
of all namelist parameters is indicated by a $END card in card column 2.
Following the $END card would be the first keyword input of the next
case or a (I | EOR (END OF RECORD) card if this was the last case.
\9/
3-13
-------
Table 3-5- POSSIBLE NAMELIST VARIABLE FORMATS
SCALAR INPUT
©= card column 2
VARNAME = value
ARRAY INPUT - SINGLE CELL
VARNAME (index) = value
ARRAY INPUT - MULTICELL STARTING AT BEGINNING OF ARRAY
VARNAME = value, value, value, value value
t ARRAY INPUT - MULTICELL STARTING AT ARBITRARY CELL
VARNAME (index) = value, value, value, value value
NOTE
Matrix input is by columns.
Example:
If A is dimensioned 3x2, then the order of input should be
A - A A A A A A
11 ' ?1 ' ^1 ' 1 ? ' ??' ^?
3-14
-------
Appendix B contains, several complete sample cases, including listings
of the input setup as well as produced output. Section 4.0 describes
the operating procedures for running GEEP including all control cards
required in the control card deck.
3.3 OUTPUT SPECIFICATIONS AND OPTIONS
GEEP has been designed to provide a wealth of information on the
calculated emission reductions and associated costs of each inspection/
maintenance program. Table 3-6 summarizes the basic output options.
The program also generates the following ancillary information:
1) Mass emission time histories.
Aggregated
Control type
Power train
2) Vehicle population distributions and attrition rates over time.
3) Summary of input data.
4) Engine parameter and mode emission distribution plots and
statistics.
5) Pass/fail criteria and vehicle rejection probabilities by year.
6) Engine parameter rejection rates and average parameter adjust-
ments.
7) Summary of regional and operational design results.
8) Statistical confidence limits on predicted emission reductions.
A debug option has been incorporated into each major system routine
to assist in interpreting program output and in checking out new policy
alternatives. This option yields a complete diagnostic analysis on all
fundamental calculations within the model.
Printed and plotted output from GEEP are designed to display to the
3-15
-------
user a maximum amount of information. Output from the program consists
of three types: standard output, debug output and plots. The standard
output includes emission rates, reduction percentages, figures of merit,
and cost data. The debug printout is generally in the form of tables
presenting the values of intermediate variables in the model's calcu-
lations. Plotted output consists of parameter frequency plots and
emission time history plots.
Table 3-7 exhibits a printout summary of typical results. This
printout features estimates for several figures of merit, computed
emission reductions, and a variety of accounting costs. Additional
examples of GEEP output are found in Appendix B.
3-16
-------
Table 3-6 SUMMARY OUTPUT OPTIONS
OPTION INPUTS RESULTING OUTPUT
BASIC None
Summary Results
Emission Time History Plots
Vehicle Population Characteristics
Regional Data Summary
t STATS Results (if executed)
CUTPOINT Data
t Emission Rate and Failure Rate Tables
PPICK PPICK ] Engine Parameter Distribution Plots
DEBUG BLINE
MICRO
TEST
COSTS
AREA
CUTPTS
PDECAY
DATA
STATS
4 Debug information for Subroutine BLINE
t Debug information for Subroutine MICRO
Debug information for Subroutine TEST
Debug information for Subroutine COSTS
t Debug information for Function AREA
t Debug information for Subroutine CUTPTS
Debug information for Subroutine PDECAY
Debug information for DATA BLOCK
Debug information for Subroutine STATS
GJ
t
-------
Table 3-7 SUMMARY OUTPUT RESULTS
***************** ** *** * *** * ** *****
* TRW INSPECTION/MAINTENANCE *
_* SYSTEM MODEL *
**********************************
SUMMARY INFORMATION
ENGINE PARAMETER STRATEGY EXTENSIVE B
INSPECTION PERIOD IS 12.0 MONTHS
PAYOFF FUNCTION UNADJUSTED (DOLLARS/WEIGHTED EMISSION) 5736.21
PAYOFF FUNCTION STATISTICALLY ADJUSTED (DOLLARS/WEIGHTED EMISSION) 4412.06
PAYOFF FUNCTION AT END OF LAST YEAR
-------
4.0 OPERATING PROCEDURES
4.1 THE PROGRAMMING SYSTEM
The General Economic Effectiveness Program is a Fortran IV program
operational on the Control Data (CDC) 6000 series computers. The CDC
machines are third generation multiprogrammable computers capable of
processing approximately 1,000,000 instructions per second with up to
19 different jobs concurrently running in central memory. The TRW Time
Sharing System (TRW/TSS) uses a CDC 6400-6500 combination with intercom-
munication between user disk files and the three CPU's with Batch and
Remote Batch capabilities. The combined storage space on the two machines
is in excess of 660,000g words (60 bit) central memory and 800 million
words on disk.
The GEEP source and object decks reside on the permanent file
storage disk of the TRW/TSS. As a file on this disk they are accessible
in either Remote or Remote Batch mode. Since the control cards and deck
setup are essentially identical, a Remote mode submittion will be
assumed in the following discussions.
4.2 CONTROL CARD SPECIFICATION
The TRW/TSS CDC machines run under the KRONOS operating
system, the control cards of which are simple and self explanatory.
Table 4-1 details the job control cards and contains a short explanation
of each card. This control card setup assumes an object deck run.
4.3 DECK SETUP
The input deck setup required for the execution of the program
consists of the job control cards (JCC), the program deck and the data
4-1
-------
Table 4-1 REQUIRED JOB CONTROL CARDS
CARD
DESCRIPTION
$ SEQUENCE, E284. Operator supplied sequence card
$ ACCOUNT, RB56415, ROBE564. Program account and password
$ NAME, 142001, 56415, BADDORF, R. User Name card
$ PROBLEM, 289010. Charge number
$ PRIORITY, N. Nominal Priority
$ FLENGTH, 150000. 150gK Field length request
$ MAXTIM, 300. 5 minute max/time request
GET, GEEP. Retrieve object deck
GEEP (TAPE 5=INPUT) Execute Program (Data Follows)
'7\E0R End of Record card.
8
4-2
-------
cards set. Figure 4-1 illustrates the deck setup for a standard run.
This example demonstrates the card setup for executing several cases
during the same run.
4.4 DIAGNOSTIC AND TROUBLESHOOTING PROCEDURES
Basically, three types of errors can occur during a GEEP run:
program detected errors, system detected error, and the elusive computer
error. The last is a very rare, non-recoverable problem which can be
solved by resubmitting either the entire run or just those cases not
yet executed. Program detected errors are those inconsistencies which
trigger an error branch in the GEEP code. These include input errors
detected by the check routine in the main program. The diagnostics are
self explanatory, and the problems are generally not fatal to the
execution of a case. The linear programming package for cutpoint
optimization is the second routine containing program data error flags.
The diagnostic messages possible are listed in Table 4-2 with a des-
cription of the problem and the solution.
The other common diagnostic message results from a system detected
error. These errors include dividing by zero, square roots of negative
numbers, and raising negative numbers to non-integer powers. These
occur most often in the routines which interpolate or manipulate dis-
tributions and are usually the result of bad input. A description of
the various possible diagnostic messages can be found in Appendix K of
the CDC Fortran Manual. The load map can be used with the help of a
GEEP listing to pinpoint the location and exact nature of the data
discrepancy. But probably the most likely system detected error
will be associated with the NAMELIST input data.
4-3
-------
END OF IMFORMATION
i
-F*
$ ACCOUNT, RB56415, ROBE 564
$ SEQUENCE, E284
Figure 4-1 Example Card Configuration for Object Deck Run
-------
Table 4-2 DIAGNOSTIC MESSAGES
en
DIAGNOSTIC MESSAGE
A MATCH WAS NOT FOUND FOR XXXXXXX
TOO MANY ITERATIONS IN LINPRO
NO FEASIBLE SOLUTION LOWERING CONSTRAINTS
SOLUTION UNBOUNDED - RUN TERMINATED
TOO MANY ITERATIONS - RUN TERMINATED
PROBLEM INFEASIBLE - RUN TERMINATED
INSUFFICIENT DIMENSTION IN XPT CALLED
STATS
INSUFFICIENT DIMENSTION SIZE IN RESIZE
CALLED FROM CONVOL
MEANING AND SOLUTION
The key word input XXXXXXX is either mis-
spelled or not a valid GEEP option. The
program ignores that card.
The iteration loop to match cutpoints with
rejected fractions is not converging. Change
the emission reduction constraints a few
percent to move the problem away from the
unstable point. Fatal error.
The linear program has no feasible solution
The constraints are being lowered automati-
cally by 10%. Program will continue until
the constraints have been reduced by 70% at
which point the case aborts.
LPRO error message.
solution.
LPRO error message.
solution.
LPRO error message.
solution.
Treated as no feasible
Treated as no feasible
Treated as no feasible
More than 50 points required to characterize
a distribution. Contact programmer. Fatal
error.
More than 50 points required to characterize
a distribution. Contact programmer. Fatal
error.
-------
In attempting to understand any problem with the processor, the
debug flags for the affected routines should be activated (See Table 3-1).
4.5 LIBRARY ROUTINES REQUIRED
The GEEP computer program uses several standard Fortran functions
from the CDC system library. These routines, with a brief description
of each are tabulated in Table 4-3. If an error should occur within one of
the library programs the system back-track printout will locate the
calling subroutine for debugging purposes.
4.6 GENERAL COMPUTER REQUIREMENTS
Although GEEP was designed for the use on the CDC 6500 system it
can be made to operate on other computing systems. Listed below are
minimum requirements, both Hardware and Software, for possible conversion
to an alternative system.
Software support of Fortran IV (Fortran G).
Computing Hardware equivalent to a CDC 6400 with at
least 200,000 words of core storage (2 million bytes).
t A full operating system capable of supporting the above
hardware system.
A card reader/punch and high-speed line printer.
4.7 EXECUTION/PRINT ESTIMATES
The execution time, required field length, and number of pages
printed by GEEP depend entirely on the number of cases and debug options
chosen. Estimates for these figures appear in Table 4-4. It should be
noted that, for a standard run, no compilation time or print-out is
necessary. These values are,all estimates and vary according to desired
option.
4-6
-------
Table 4-3 SYSTEM LIBRARY FUNCTIONS CALLED BY GEEP
FUNCTION DESCRIPTION
SQRT (X) Square root of X
MINO (I,J) Minimum of I and J
MAXO (I,J) Maximum of I and J
EXP (X) ex
AL0G (X) Inx
AMIN1 (X,Y) Minimum of X and Y
AMAX1 (X,Y) Maximum of X and Y
ABS (X) Absolute value of X
IABS (I) Absolute value of I
INT (X) Largest integer less
than X
4-7
-------
Table 4-4 EXECUTION/PRINT ESTIMATES
Compilation of GEEP processor:
One Case - No debug output:
One Case - PDECAY debug:
One Case - Full debug:
200 seconds CPU time
llOOOOg Words Storage
250 Pages (10000 lines) output
30 seconds CPU time
1710000 Words Storage
o
20 Pages (600 lines) output
30 seconds CPU time
1710000 Words Storage
8
150 Pages (5000 lines) output
35 seconds CPU time
1710000 Words Storage
o
250 Pages (10000 lines) output
4-8
-------
4.8 PROGRAM LIMITATIONS
The program is basically limited in terms of the programmed in-
spection/maintenance alternatives. The most important of these is the
input inspection type and control fleet specification limitation. The
GEEP computer program expects as input a series of inspection specifi-
cations such as idle, ignition and induction which are consecutive in
the parameters affected. For instance, acceptable inspection type
specifications include IDLE-IGNITION, IGNITION-INDUCTION, IDLE,
IDLE-IGNITION-INDUCTION. The only non-permissible combination is
IDLE-INDUCTION which would involve the inspection of parameters one
through three and six through ten, a non-connected set. The same
principle applies to the control subfleet specification limitation
which states that any combination of control fleets except the UNCON-
TROLED-POST 70 icombination is acceptable.
The only other program limitations on the program are obvious con-
straints on the input data such as 0
-------
5.0 DETAILED FLOW SCHEMATICS
Presented in the following sections are descriptions, detailed flow-
charts and computer listings of each of the fifty-five subroutines in
GEEP. Each contains a description of the input variables and output
results. Also included are brief summaries of the main equations and
techniques for the routine.
This section has been prepared primarily for use by FORTRAN program-
mers in adopting or modifying the program's structure. Therefore, heavy
emphasis is placed on the flowcharts and listings with only cursory des-
criptions of analytical techniques or data values, details of which are
available in Volume III. The user is refered to Table 5.0 which provides
a descriptive overview of the program's subroutines.
5.1 MAIN PROGRAM
The main routine of the General Economic Effectiveness Program con-
tains the overall logic for evaluating a mandatory vehicle inspection/
maintenance program. The basic input is read and decoded in the main
routine, which then intiates the flow through the major routines of GEEP.
The following sections contain complete descriptions of each GEEP routine
which explain both the input and output as well as the execution flow
paths.
Table 5-1 contains a listing of the main routine and Figure 5-1 a
flowchart.
5.2 SUBROUTINE INITIAL
Subroutine INITIAL of the General Economic Effectiveness Program
initializes various parameters and averages several large input matrices
5-1
-------
Name
GEEP
Table 5-0 SUMMARY LEVEL SUBROUTINE DESCRIPTIONS
LEVEL I
Description
The executive program; provides main linkage for
major component subroutines.
Subroutine
Name
REGION
INITIAL
BLINE
MICRO
COSTS
OUT
LEVEL 2
Description
Suoplies region data (location, size, population,
emission levels, etc.) for a specific demographic
region.
Initializes program variables. Certain variables
change throughout the program execution but must be
re-initialized at the start of each run. Also
pertinent arrays are filled or "zeroed out."
The emission study for the baseline fleet is performed
at this time. Strictly voluntary maintenance.
">.e emission study for the test fleet is controlled
here. Mandatory insoections and-maintenances.
The program costs are calculated for parts, labor,
land, etc.
The output of the entire program summaries (emission
histories, rejection histories,.percentage emission
reductions, etc.).
5-2
-------
Subroutine
Name
PRINT 1
PRINT 2
PRINT 3
PRINT 4
PRINT 5
FIT
FUN 1
PDECAY
MDECAY
EDECAY
TEST
MA I NT
STATS
Table 5-0 SUMMARY LEVEL SUBROUTINE DESCRIPTIONS (cont.)
LEVEL 3
Description
Output of the argument variable with the dimension
size of (10, 15, 3).
Output of the argument variable with the dimension
size of (15, 3).
Output of the argument variable with the dimension
size of (10'5 15).
Output of the argument variable with the dimension
size of (10, 15, 4).
Output of the argument variable with the dimension
size of (4, 15).
Each emission history must be represented in terms
of a polynomial for integration purposes. This
subroutine is a 2nd order curve fit.
A single table linear interpolation, with extra-
polation beyond end points.
Particular parameter distributions must undergo specific
decay processes between inspection periods.
Similar to PDECAY, particular mode distributions
undergo decay.
Similar to PDECAY, emission levels are decayed.
This subroutine controls the estimations of that
portion of a specific parameter or mode distribution
that is rejected; i.e., that portion of the distribution
which exceeds the allowable emission standards.
Emission levels must be corrected for maintenance due
to both the baseline and the test programs.
At the conclusion of any test interval, a statistical
analysis may be performed on the baseline vs test program
reductions.
5-3
-------
Table 5-0 SUMMARY LEVEL SUBROUTINE DESCRIPTIONS (cont.)
Subroutine
Name
PLOT
QUEUE
Description
Provides a graphical plot of the emission histories.
Provides a queue model for user inconvenience
estimations.
Name
STD 2
AREA
LEVEL 4
Description
Using a frequency distribution, calculates the
corresponding mean and siqma.
(XOPT = 0) Estimates the normalized area of a parameter dis-
tribution, nominally from the end point to the cutpoint,
(XOPT = I) Returns the expected value of the rejected portion
of the distribution.
UNION
TABLE
CONVOL
/xf(x)dx = expected value
Provides the union of n number of probabilities;
namely, the rejection fractions.
Generates a frequency distribution (table) from a
representative mean and sigma. Generates:
(1) Normal
(2) Lognormal
(3) Hyperbolic
Generates the convolution of two distributions:
OO
C = /f(t) g (x-t) dt
^oo
e.g., for two standard normal -distributions;
Mc =
5-4
-------
Table 5-0 SUMMARY LEVEL SUBROUTINE DESCRIPTIONS (cont.)
Subroutine
Name
DISTPR
NORM
XPT
PLOTXY
I FACT
Description
Used in conjunction with CONVOL. Outputs the two
input distributions along with the resultant dis-
tribution with their respective means and sigmas.
Normalizes a distribution so that
f(x) dx = 1
Given a distribution and an area, integrates until
the input area is achieved and outputs the respective
X-axis coordinate.
Supports subroutine plot by outputting the actual
grid pattern.
Calculates N factorial for integer N.
Name
SWITCH
RESIZE
LEVEL 5
Description
For most purposes, a representative distribution's
X-axis must be monotonically increasing. If not,
the order of the X-axis values along with their
respective Y values are reordered.
Given a distribution and a cell width, AX, a new
array, is generated to represent the input distri-
bution as a function of the new AX.
5-5
-------
MAIN PROGRAM
START
J
SAVE OLD STAT VALUE
PRINT MAIN HEADING
10000
INCREMENT RUN NUMBER
PRINT RUN HEADING
100
rREAD INPUT OPTIONS
INTO IN ARRAY.
NINS = "NUMBER OF
OPTIONS INPUT.
WAS THERE
ANY INPUT
MATCH UP INPUT OPTIONS
WITH VALID OPTION CODES.
STORE OPTION NUMBERS IN
MATCH.
EDIT DATA FOR INVALID
OPTIONS.
350
Figure 5-1 Main Program Flowchart
5-6
-------
0
INITIALIZE OPTION
PARAMETERS
MSTART = 11
MSTOP = 0
LSTART = 7
LSTOP = 0
OPTI = 0
MISFIRE = NO
FOR EACH OPTION
INPUT CARD
BRANCH TO D.
WHERE D. IS '
THE OPTION NUMBER
(D36
0
DEBUG OPTION (DOES NOTHING)
SET RUN TYPE TO PARAMETER
(NOMINALLY UNLOADED)
SET FLAG FOR GARAGE INSPECTION
PARAMETER OPTION
SET RUN TYPE TO SIGNATURE
(NOMINALLY UNLOADED)
SET FLAG FOR STATE LANE INSPECTION
SIGNATURE OPTION
SET STOP FLAG TO INDICATE LAST CASE
SET K LIMITS TO INCLUDE UNCONTROLLED
VEHICLES (K = 1)
F I STOP OPTION
UNCONTROLLED OPTION
Figure 5-1 Main Program Flowchart (cont.)
5-7
-------
K LIMITS TO INCLUDE CONTROLLED
VEHICLES (K=2)
- *\FJ
K LIMITS TO INCLUDE POST 1970
VEHICLES (K=3)
SET M LIMITS TO INCLUDE IDLE
PARAMETERS (1-3)
SET OPTION FLAG (OPTI) TO 1
- *\FJ
SET M LIMITS TO INCLUDE IGNITION
PARAMETERS (4-5)
SET OPTION FLAG (OPTI) TO 2
SET M LIMITS TO INCLUDE INDUCTION
PARAMETERS (6-10)
SET OPTION FLAG (OPTI) TO 3
TURN ON BLINE DEBUG
TURN ON MICRO DEBUG
TURN ON TEST DEBUG
TURN ONCOSTS DEBUG
TURN ON AREA DEBUG
TURN ON CUTPTS DEBUG
TURN ON PDECAY DEBUG
TURN ON DATA DEBUG
TURN ON MDECAY DEBUG
^0
1-0
CONTROLLED OPTION
POST '70 OPTION
IDLE OPT ION
IGNITION OPTION
INDUCTION OPTION
BLINE OPTION
MICRO OPTION
TEST OPTION
COSTSOPTION
AREA OPT ION
H©
^0
CUTPTS OPTION
PDECAY OPT ION
DATA OPTION
MDECAY OPTION
Figure 5-1 Main Program Flowchart (cont.)
5-8
-------
TURN ON STATS DEBUG
SET REGION FLAG FOR LA
SET REGION FLAG FOR NY
SET REGION FLAG FOR WASHINGTON
h-0
-©
-©
SET REGION FLAG FOR DENVER
SET LOADED FLAG TO ON
SET LOADED FLAG TO OFF
SET FLAG FOR HYBRID INSPECTION
SET FLAG FOR STATE LANE INSPECTION
SET FLAG FOR GARAGE INSPECTION
SET L LIMITS TO INCLUDE ICO
(L = l) INSPECTION
SET L LIMITS TO INCLUDE IHC
(1=2) INSPECTION
SET L LIMITS TO INCLUDE HC45
(L = 3) INSPECTION
-©
©
©
SET L LIMITS TO INCLUDE CO45
(1 = 4) INSPECTION
TURN ON MISFIRE FLAG
SET REGION FLAG FOR DETROIT
SET L LIMITS TO INCLUDE INO
(L = 5) INSPECTION
©
SET L LIMITS TO INCLUDE NO45
(L=6) INSPECTION
STATS OPT ION
LA OPTION
NY OPTION
WASH OPTION
DENVER OPTION
LOADED OPTION
UNLOADED OPTION
HYBRID OFT ION
STATE OPT ION
GARAGE OPT ION
ICO OPTION
IHC OPTION
HG45OPTION
CO45 OPTION
MISFIRE OPT ION
DETROIT OPTION
INO OPTION
NO45OPTION
Figure 5-1 Main Program Flowchart (cont.)
5-9
-------
LAST INPUT
CARD
IS THIS A
PARAMETER RUN
WITH IDLE INSPECTION
ONLY AND THE
MISFIRE FLAG
ON
YES
CHANGE THE UPPER M LIMIT
TO INCLUDE MISFIRE (M = 4)
SET LPSPP = 1 FOR MISFIRE
450
PRINT OUT SUMMARY
OF INPUT OPTIONS
6000
CALL REGION TO GET
REGIONAL DATA
REPLACE OLD VALUE OF
STAT INSTAT
READ NAME LIST
INPUT DATA
Figure 5-1 Main Program Flowchart (cont.)
5-10
-------
STORE NEW STAT
VALUE AND SCALE
FOR TINT 12 MONTHS
CALL INITIAL
CALLBLINE
SET KILL = 0
CALL MICRO
NO
YES
CALL PRINT6
(ATTRITION MODEL PRINTOUT)
CALL COSTS
CALL OUT
(OUTPUT ROUTINE)
7000
NO
Figure 5-1 Main Program Flowchart (cont.)
5-11
-------
Table 5-1 MAIN PROGRAM LISTING
ro
t
00100
00110
00120
00130
00140
00150
00160
00170
00180
00190
00200
00210
00220
00230
00240
00250
00.260
00270
00280
00290
00300
00310
00320
00330
00340
00350
00360
00370
00380
00390
00400
00410
00420
00430
00440
. 00450
00460
00470
00480
00490
00500
PROGRAM GX(
C ECONUMIC/EF
DIMENSION I
INPUT, OUTPUT
FECTIVENESS
N(50) ,MATCH(
COMMON /COM01/ AMB
* BAREA<3), BL01,
+ BHIST(3,16),
+ ATABLEX(9,10,3)
COMMON /COM02/
+ CARSY, CBSUM
+ CINCON,
+ CN115.3
+ CPARTd
CPCB,
,16),
0,15)
CC ADD2
COMMON /COM03/
+ EMW(3) , EPdO
+ FREOA,
+ HORZN,
* HPC(15,
+ HPS(6,1
+ HPTOTS(
CC ADD3
(3),
.TAPE5,
PROCESS
50)
ALAB,
6LD2,
,ATABLEY(9,
CARA,
, CCOEFl
CP
,15)
FREOB,
HORZNY,
16),
5,16) ,
16)
COMMON /COM04/
+ KSTART, KSTOP
+ LIOLE, LINT<
+ MBASE,
+ MU(10,3
CC ADD4
MPH,
) , MMS
16),
(10,
COMMON /COM05/
-t- NINTR, NINTRB,
+ NPTRN, NPTS,
+ OCIY, OCMY,
CC ADDS
COMMON /COM06/
* PCU5),
+ PP(10,1
+ PARdO,
+ PM(10,1
-i- PSA(15)
+ .PAYFIN
PCS(15),
5),PS(6,15),
15,3),
5),
, PTA(5),
COMMON /COM07/
+ RTYPE,
I,
COEFB1
DELPCV
,EFF(10
TAP
OR
0
1
I
1
,1
0,
0)
E6 = OU
AW,
3SIG
5,3),
3) ,AS
CAR I
,CCOS
CPVPY,
5,3) ,
TPUT)
BINT
(3),
TA3LX
Y,
TI,
BXTRA
,
(9,6,3),
CAR MY,
CCOSTM,
CSUM,
COEFBPl
, DP(10,15)
), DELIT<3),
FPERCd
HPCS(15
HPT(5,
ITE,
LOPT,
LPSPP(
MSPEC(
15),
NMODE,
NSTEPS
QPTI,
PARM(3
1
0,
,1
6)
LPI
10)
1
0
,
PHK14)
PT(5) ,
PARH10
PPICK(
PCONF,
REINSP
0)
3) ,
6),
'
,OELEM
(3
HPPdO,
ITL,
CK(10),LLP
,LSTART,
,MSTART,
MVPR( 10
), NCNTR,
NO,
NTR,
3)
t
,3
10)
OPTM
,PART
PLOC
PTOT
,3),
,PPPI
PAR I
HPTOT
ITP,
ICK,
LSTOP
MSTOP
,15)
NEMIS
NOPTS
NTRB,
(1
,
,
,
»
,OPTS(50) ,OV^
, PAYNEW,
14),
,
CK,PS
NT(10
, RNAME,
PLTMAX(
PTS(5),
PLUS( 10
TAR, PI
,10,9)
RSIZE
<1
,
BSIZE,
ASTABLY( 9,6,3)
CARPOP116) ,
CGTT,
CARAY,
10,15) ,
,16) ,DEL I (3),
15,16),
6),
ITIME(16>,
NEMP, ^
NPAR, ^^ t
HK3) ,0\/CHM(3)
PAYOFF(3),
3),PMOD6L,
PAYADJ,
t!5) ,
5,10),
RSTOP,
-------
en
*' do5lt!; *"
00520
00530
00540
! 00550
00560
,_ 00570
00580
00590
00600
00610
00620
00630
00640
00650
00660
i 0067O
j 00680
00690
00700
00710
00720
00730
00740
00750
00760
00770
00780
0079O
00800
00810
00820
00830
00840
00850
00860
00870
00880
00890
00900
00910
00920
%- lable b-1
' + SAtE, SALL,
4- SMODEL, START115
* SCALEBM(3),
4- SXCUT(6,3),
4- SIGMEUO),
4- SI GRATE, SIST,
4- STABLEX(33,6,15),
COMMON /CJM10/
4- TINT, TQbE(3),
4- TXTRA, TSIZE,
» THIST(5,3,16),
4- TIMEM(10,15) ,
CC ADD10
COMMON /COM11/
4- X1BP(3,3,6), XINT,
4- XTM(16), XBASE19,
CC AOD11
COMMON /COM12/
4- YES, YSUMf
4- Zl, Z2,
4- Z7, Z8,
4- Z13, Z14,
4- ZCARI, ZCARM,
+ ZZ<3,3)
CC A0012
COMMON /DEBUG/
4- LDEBUG, MOEBUG,
CC ADDD
REAL ITE,
4- MMS, MPH,
4- NAME, NO,
4- IN, MISFIRE
INTEGER RNAME,
4- TDIST, XLANE,
MAIN PROGRAM LISTING (cont.)
SALP, SITE I,
,3) , STAT, STIME
SM(6,15),
S1G(10,3) ,
SIGMNEJ 10),
SIGS(6*15),
STA6LEY(33,6,15)
TAREA(3), TDISTdO
TONX, TOTE13),
TSIGC3), TPER(16
THISTT(3,16),
TA8LEX{33,10,15),
kJFUO),
XINTB, XLANE
3),YBASE(9,3)
Y1BP13,3,10),
YTM(16) , Y1DBP
Z3, Z4,
Z9, Z10,
Z15, Z16,
ZIC, ZSUM,
ADEBUG, BDEBUG,
PDEBUG, goEBuc,
ITL, ITP,
MSPEC, MU,
LDEBUG, MDEBUG,
SITEI, SITEM,
OPTI, PPICK,
SITEM, SLANE,
(3), SUMBM(3),
SPAR( 10,15,6),
SIGCE(3) ,
SIGP(10,15),
SIGSOE(3),
,3) ,TIOLE,TIMEI(3,16),
TPDB(3), TPDT13),
,15), TMIL(16,15),
TIMEC(10,15),
TABLEY(33, 10,15)
, XSUM, XCUT(10,3),
Y2BP(3,3,10),
(4,4,10),Y2QSP14,4,10) ,
Z5, Z6,
Zllt Z12,
Z17,
CDEBUG, DDEBUG,
SDEBUG, TDEBUG
ITIME,
MVP8,
STAT,
PPPICK
NAMELIST /NAM1/ XCUT,COEFBP ,EM«,T INT, BMMl , START ,HORZN,
4- SCALEBM, MMS, SXCUT , Z2,Z9, Z16, STAT ,X LANE, NPICK ,PCONF , EFF ,FPERC,
+ PARM, TOIST ,LPICK,PPICK,?I ,PSTAR
DATA KSTART,KSTOP/4,0/
STATSV=STAT
NRUN=0
CALL GEEPER
10000 CONTINUE
-------
00931
00940
00950
00960
00970
C0980
, 00990
01000
01010
01020
01030
01040
01050
01060
01070
01080
01090
01100
0111"
01120
01130
01140
01150
01160
01170
01180
01190
01200
01210
01220
01230
01240
01250
01260
01270
01230
01290
01300
01310
01320
01330
01340
Table 5-1 MAIN PROGRAM LISTING (cont.)
.. NRUN=NRUN+1
rtRITE (6,190) NKJN
190 FGRMAK 1H1, 5( / ) , 25X ,*GENFRALI ZED ECONOMIC EFFECT I Vfc NESS* t
+ * PROGRAM*,////
1 40X,*R U .M NO .*I3/)
CC INPUT OF PROGRAM OPTIONS
NINS=1
100 READ (5,200) INdMNS)
200 FORMAT(AIO)
IF ( IN(NINS) .E0.10HTHAT S ALL) GO TO 250
NINS=NINS+1
GO TO 100
250 CONTINUE
NINS=NINS-1
IF(NINS.Fu.O) GO TO 6000
DO 350 I=1,NINS
MATCH( I)=l
no 300 J=I,NOPTS
IF( IN( I ).NE.OPTS(J) ) GO TO 300
MATCH( I )=J
GO TO 350
3CO CONTINUE
IF( I.EO.NINS) bO TO 350
WRITE (6,310) IN(I)
310 FORMAT<5X,5( 1H*) ,* A MATCH ^AS NOT FOUND FOR*,
+ * THE INPUT *,A10/1
?50 CONTINUE
MSTART=11
MSTOP=0
LSTART=7
LSTOP=0
OPTI=0
MISFIRE^NO
CC OATA INITIALIZATION FOR PROGRAM OPTIONS
DO 400 I=1,NINS
IGU=MATCH(I )
GO TO (400,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,
+ 20, 2 1, 22, 23, 24, 25, 26, 2 7, 28,^9, 30, 3 1,32,33, 34,35, 3t> , 37) , I GO
2 RTYPE=PMODEL
LIULE=1
SLAN£=10HGARAGE
GO TO 400
-------
Table 5-1 MAIN PROGRAM LISTING (cont.)
01350
JUYPE=S MODEL
en
en
01360
01370
01380
01390
01400
01410
01420
01430
01440
01450
01460
01470
01480
01490
01500
01510
01520
01530
01540
01550
01560
! 01570
; 01580
01590
01600
01610
01620
01630
01640
01650
01660
01670
01680
01690
01700
01710
01720
01730
01740
01750
01760
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
LIDLE=1
SLANE=10HSTATE
GO TO 400
RSTOP=YES
GO TO 400
KSTART=1
KSTOP=MAXO< KSTOP.l)
GO TO 400
KSTART = MINO
-------
Table 5-1 MAIN PROGRAM LISTING (cont.)
C71
: 01770
01780
01790
01800
! 01810
01820
01830
01840
01850
01860
01870
01880
01890
01900
01910
01920
, 01930
01940
01950
01960
01970
01980
01990
02000
02010
02020
02030
02040
02050
02060
i 02070
02080
02090
02100
: 02110
02120
02130
02140
02150
02160
02170
02180
19
2^
21
22
2?
24
25
26
?7
23
29
30
31
32
33
34
35
36
on in 40Q_
ODEBUG=YES
GO TU 400
SDEBUG=YES
GU in 400
RNAWE=1
GO TO 400
RNJAyC = 2
GO TO 400
PlNJ4MF = 3
GO TO 400
RNAME=4
GO TO 400
LIULE=2
GO TO 400
LIOLE=1
GO TO 400
LIOLC=3
GO TO 400
SLANE=10HSTATE
GO TO 400
SLANE=13HGARAGE
GO TO 400
LSTART=1
LSTOP=MAXO( ItLSTOP)
GO TO 8
LSTART=MINO<2tL START)
LSTOP=.MAXO(2,LSTOP)
GO TO 8
LSTART=MINO<3,LSTART)
LSTOP=MAXO(3,LSTOP)
GO TU 9
LSTART=MINO(LSTART,4)
ISTOP=MAXO( LSTOP,4)
GO TO 10
MISFIRE=YES
GO TO 400
RNAME=5
GO TO 400
LSTART=MINO(LSTART,5)
LSTOP = MAXO< LSTOP,5)
GOTO 400
-------
liable 5-1 MAIN.-PROGRAM LISTING (cont.)
02190
37 LSTART=MINO(LSTARTt6J
en
02200
02210
02220
02230
0224-0
02250
02260
02270
02280
02290
02300
02310
02320
02330
02340
02350
02360
02370
02380
02390
02400
02410
02420
; 02430
02440
02450
02460
02470
1 02480
: 02490
02500
02510
02520
02530
02540
I 02550
02560
02570
02530
| 02590
02600
LSTC)P = 6
GOTO 400
400 CONTINUE
IF(RTYPE.EQ,PMODEL) GO TO 450
IF( MSTOP.NE.J) GO TO 450
IF(MISFIRE.EU.NO) GO TO 450
MSTOP=4
LPSPP(4) = 1
450 CONTINUE
WRITE (6,500) < INI I),I=1,NINS)
500 FORMAT<5(/) ,20X,*INPUTS ARE:*//30
NN=2*RNAME-1
WRITE (6,1000) KTYPE,IM4ME(NN + 20),
+ (NAMEIK + 3) ,K=KSTART,KST(JP)
1000 FORMAT* 1H1, //,5X,*RUN TYPE *,T
(21X.A10/) )
NAME(NN*-21),
50.A10,* MODEL*,/
+ 5X,*AREA CONSIDERED *,T50,2A10/
+ 5X,*CAR POPULATION TYPE *, 3 ( T49, A8/) )
WRITE (6,1100) ( M,NAME(M*-30),M=MSTART,MSTOP)
HOC FORMAT(/5X,*PARAMETERS CONSIDERED
IF(RTYPE.EO.SMODEL) I"/RITE (o,1150
+ LSTART.LSTOP)
1150 FORMAT(/,5X,*SIGNATUPE MODES CONS
+ 6(T49,I2,5X,A10/J )
IF(MISFIRE.EO.YES)
*,10(T49,I2,5X,A10/) )
) ( L, NAME( L+40),L=
IDEREO *,
+WRITE (6,1200) OPTSl LIDLE+24) ,SLANE
1200 FORMAT(/20X,*MISFIRE UNDER *A10,* CONDITIONS*/
+ 20X,A10,* INSPECTION STATIONS*/)
WRITE (6,1300) BDEBJG,MDE8UG,TOEBUG,CDEBUG,ADEBUG,
+ LDEBUG,POE8UG,DDEBUG,SDEBUG
1300 FORMAT ( // ,20X, *DE8UG OPTIONS FOR THE FOLLOWING*,
+ * SUBROUTINES:*//
+ 10X,*BLINE*,T50,A10/10X,*MICRO*,
+ 10X,*TEST*,T50, A10/10X ,*COSTS* ,T
+ 10Xt*AREA*,T50,AlO/10X,*LINPRO*,
-i- 10X,*PDECAY*,T50,A10/10X,*OATA*,
- 10X,*STATS*,T50,A10/)
6000 CONTINUE
CALL REGION(RNAME)
STAT=STATSV
READ (5,NAM1)
STATSV=STAT
T50,A10/
50.A10/
T50,A10/
T50,A10/,
-------
Table 5-1 MAIN PROGRAM LISTING (cont.)
en
oo
02610
02620
02630
02640
02650
02660
02670
02680
02690
02700
02710
02720
02730
STAT=STAT*12
CALL INITIAL
CALL BLINE
KILL=0
CALL yiCRO(K
IF(KILL.EO. 1
CALL PRINT6(
CALL COSTS
CALL OUT
7000 IF(RSTUP.EQ.
GO TO 10000
999 FORMAT(lHl)
END
./TINT
ILL)
) GOTO 7000
CN,TPER,TMIL,NTR,CARPOP)
YES) STOP
-------
for later use in the model. INITIAL computes the inspection time
intervals for the test and base (mandatory and voluntary) cases and
estimates the vehicle population size over the time horizon using an
input linear regression. The Vehicle Population Model is called from
INITIAL to evaluate the dynamic character of the age percentage and
vehicle miles travelled distributions for the various subpopulations
being modeled. Average partial derivatives and deterioration coefficients
are computed along with certain average cost information. The parameter
and mode emission distributions are expanded and their means and standard
deviations computed. These means and sigmas are averaged and stored for
later printout. Figure 5-2 contains a flowchart of INITIAL and Table 5-2
a computejr listing
5.3 SUBROUTINE REGION - DEMOGRAPHIC DATA
Subroutine REGION contains the control logic for the regional data
initialization routines. It shifts control to one of the regional
data routines based on the value of RNAME.
RNAME SUBROUTINE CALLED REGION
1 REGION1 Los Angeles
2 REGION2 New York City
3 REGIONS Washington, D. C.
4 REGION4 Denver
5 REGIONS Detroit
Input to REGION consists solely of RNAME, the region flag. The
output from REGION travels through the common blocks found in the REGION
subroutines and the MAIN program from which REGION is called. Figure 5-3
presents a flowchart for subroutine REGION while Table 5-3 lists the code.
5-19
-------
c
SUBROUTINE INITIAL
SET BASELINE SIMULATION INTERVAL
= TEST INSPECTION INTERVAL
CONVERT TIME HORIZON TO YEARS
COMPUTE NUMBER OF INSPECTION
INTERVALS IN THE TIME HORIZON
COMPUTE FRACTION OF A TEST
INTERVAL LEFT OVER
INITIALIZE TIME I (3, NTR) TO 0
COMPUTE CAR POPULATION
OVER THE TIME HORIZON
CARPOP = KQ + K] X TIME
900
CALL PERMIL
(ATTRITION ROUTINE)
FILL PAR1 ARRAY BY
COMPUTING AVERAGE
OF PAR WEIGHTED BY
VEHICLE DISTRIBUTION
IN YEAR 1
1500
Figure 5-2 Subroutine INITIAL Flowchart
5-20
-------
1500
FILL COEFB AND COEFS ARRAYS
BY TRANSFORMING SPAR AND
PAR RESPECTIVELY USING THE
COEFBP MATRIX. (EMISSION
DECAY RATES)
1700
COMPUTE TIMEI MATRIX = THE
AVERAGE OF THE SUMS OF
PARAMETER INSPECTION TIMES
WEIGHTED BY CAR DISTRIBUTION.
EXPAND AT ABLE ARRAYS FROM 9
TO 33 POINTS. STORE IN TABLE
ARRAYS AND COMPUTE MEANS
AND SIGMAS. (PARAMETER
DISTRIBUTIONS)
EXPAND ASTABL ARRAYS FROM 9
TO 33 POINTS. STORE IN STABLE
ARRAYS AND COMPUTE MEANS
AND SIGMAS. (MODE EMISSION
DISTRIBUTIONS)
2000
AVERAGE MEANS AND SIGMAS FOR
PARAMETER DISTRIBUTIONS OVER
POWER TRAIN TYPE. STORE IN MU
AND SIG (M, K) ARRAYS.
3000
AVERAGE MEANS AND SIGMAS FOR
MODE EMISSION DISTRIBUTION OVER
POWER TRAIN TYPE. STORE IN SMS
AND SSIG(L, K) ARRAYS.
4000
Figure 5-2 Subroutine INITIAL Flowchart (cont.)
5-21
-------
INITIAL
DEBUG FLAG
ON?
PRINT OUT MEANS,
STANDARD DEVIATIONS,
AND CUTPOINTS
FOR PARAMETERS
NO
YES
PRINT OUT MEANS,
STANDARD DEVIATIONS,
AND CUTPOINTS FOR
MODE EMISSIONS
2100
I PRINT OUT PARTIALS,
DETERIORATION RATES,
MANUFACTURER'S SPECS,
MODE EMISSION CO-
EFFICIENTS, MEANS AND
SIGMAS
(RETURN)
Figure 5-2 Subroutine INITIAL Flowchart (cont.)
5-22
-------
Table 5-2 SUBROUTINE INITIAL LISTING
in
ro
co
L v iv';'.:;jv;;;*» 5*'
07770
07780
07790
07800
07810
07820
07830
07840
07850
07860
07870
07880
07890
07900
07910
07920
07930
07940
07950
07960
07970
07980
07990
08000
08010
08020
08030
08040
08050
08060
08070
08080
08090
08100
08110
08120
08130
08140
08150
1 08160
i 08170
VO ' '" f\^ <;;' "
** ' -i, " *N^.'V%
SUBROUTINE INITIAL
DIMENSICN SMS(6,3J ,SSIG
DIMENSION XBP(9) ,YBP(9)
DIMENSICN DUMX(33) , DUMY
COMMON /COM01/ AM8(3),
* BAREA(3), BLD1,
(6,3)
(33)
ALAB,
BLD2,
+ BHIST(3,16), BMMK10,!
+ ATABLEX(9,10,3) , ATABL EY (9, 10,
COMMON /COM02/ CARA,
+ CARSY, C8SUM,
+ CINCQN, CPCB, CP
+ CN(15,3,16),
+ CPART(10,15)
CC ADD2
COMMON /COM03/
+ EMW(3), EP(10,15)
+ FREOA, FREQB,
+ HORZN, HORZNY,
+ HPCd5,16),
+ HPS(6,15,16) ,
+ HPTOTSdb)
CC ADD3
COMMON /COM04/
+ KSTART, KSTOPt
+ LIDLE, LIMT(16I*
+ MBASE, MPH,
+ MU(10,3), MMSdO,
CC ADD4
COMMON /COM05/
«- NINTR, C4INTRB,
+ NPTRN, NPTS,
+ OCIY, OCMY,
CC ADDS
COMMON /COM06/PARM(3,3
+ PC(15), PCS(15),
+ PP( 10,15), PS<6, 15),
+ PARdO, 15,3) ,
+ PM(10,15),
+ PSA(15), PTA(5),
+ ,PAYFIN
COMMON /COM07/
AW, BINT
BSIGC3) ,
5,3),
3) .ASTABLX
CARIY,
BXTRA,
(9,6,3),
CARMY,
CCOEF(10"),CCOSTI, CCOSTM,
I, CPVPY, CSUM,
COEFBd5,3), COEF8P(
DELPCV,
,EFF(10) ,
FPERCdO,
DPdO.15)
OELITO),
3) ,
HPCS( 15,16) ,
HPT(5,16) ,
ITE,
LOPT, LPI
LPSPP( 10)
MSPEC(IO)
15),
NAM£<50),
NMODE,
NSTEPS,
OPTI,
), PART,
PHH14) ,
PT(5),
PARK10.3
PPICKdO)
PCONF,
REINSP,
,DELEM(3
BSIZE,
ASTABLY(9,6,3)
CARPOP(16) ,
CGTT,
CARAY,
10,15),
,16) ,DELI(3),
HPPdO, 15,16),
HPTOT116) ,
ITL, ITP,
CK(10),LLPICK,
,LSTART,
,MSTART,
MVPR( 10
NCNTR,
NO,
NTR,
OPTM,OPTS
PAYNEW
PLO( 14) ,
PTOT,
LSTOP,
MSTOP,
,15)
NEMIS,
NOPTS,
NTRB,
(50) ,OVC
ITIME(16),
NEMP,
NPAR,
NPICKd6),
HI(3),OVCHM(3)
, PAYOFFO),
PLTMAX(3),PMODEL,
PTS(5), PAYADJ,
,3), PLUSdO
,PPPICK,PSTAR, PI (1
PARINT(10,10,9)
RNAME,
RSIZE,
,15) ,
5,10) ,
RSTOP, "'.
-------
Table 5-2 SUBROUTINE INITIAL LISTING (cont.)
01
i
ro
08180
08190
08200
08210
08220
08230
08240
08250
C8260
08270
08280
08290
08300
08310
08320
03330
; 08340
i 08350
| 08360
08370
08380
08390
j 08400
08410
08420
08430
08440
08450
08460
08470
08400
08490
08500
08510
08520
08530
08540
08550
08560
08570
! 08580
08590
+ RTYPF.
+ SALE, SALL,
+ SMuOEL, START(15
+ SCALEB.M(3),
+ SXCUT(6,3),
+ SIGME(IO),
+ SIGRATE, SIST,
+ STABLEX(33,6 ,15) ,
COMMON /CUM10/
+ TINT, TQBF(3),
+ TXTRA, TSIZE,
+ THIST(5,3,1&),
+ TIMEMJ 10,16) ,
CC ADD10
COMMON /COM11/
+ XlBP(3,3,o), XI NT,
+ XTM(16), XBASE(9,
CC ADD11
COMMON /CCM12/
+ YES, YSUM,
+ Zl, Z2,
+ Z7, za.
+ Z13, Z14,
+ ZCARI, ZCARM,
* ZZ(3,3)
CC ADD12
COMMON /DEBUG/
+ LUEBUG, MOEBUG,
CC ADOD
REAL ITE,
+ MMS, MPH,
+ NAME, NO,
+ IN, MISFIRE
INTEGER RNAME,
+ TOIST, XLANE,
CC
CC ANY DATA APPEARING IN
SALP, SITF I ,
,3) , bTAT, STIMt.C
SM(6,15) ,
SIG( 10,3) ,
SIGMNE(IO),
SIGS(6,15) ,
STA3LEY( 3j> ,b, 15)
TAREA(3), TDISTdO,
TJNX, TOTE( 3) ,
TSIG(3), TPER<16,
THISTT(3,16) ,
TABLEX( 33, 10, 15) ,
WF( 10) ,
XINTB, XLANE,
3) , YbASb( 9,3)
YliiP(3,3,10) ,
YTM(IO), Y1DBPI
Z 3 , Z 4 ,
Z9, Z10,
Z15, Z16,
ZIC, ZSUM,
ADEBUG, / BDEBUG,
PDEBUG, QDEBUG,
ITL, ITP,
MSPEC, MU,
LDEBUG, MDEBUG,
SITEI, SITEM,
SITEM,
3), SUMb
SPAR( 10
SIGCE
SIGP( 10
SIGSDE
3) ,T1DLE
TPOB( 3)
15), TH
TIMECd
TABLEY
XSUM
Y2BP( 3,
4,4, 10),
Z5,
Zll,
Z17,
CDEBUG,
S DEBUG,
I TIME,
MVPR,
STAT,
SLANE,
M(3) ,
. 15,6) ,
(3) ,
,15) ,
(3),
,TIME1 (3 , 16) ,
, TPDT(3),
IL(16,15),
0,15),
(33, 10, 15)
, XC UT(10,3),
3,10),
Y2DBP(4,4,10) ,
Z6,
Z12,
DDEBUG,
TDEBUG
OPTI, PPICK, PPPICK
THIS SUBROUTINE IS FOR
CC kE-INTIALIZATION PURPOSES FOR MULTIPLE RUNS
BINT=TINT
HORZNY = HGPvZN/12
XINT=HORZN/TlNT-*-l.E-10
INT=XINT
-------
en
ro
ui
jsrar*" ^$sn& ^'/r1 Tab! e 5-2
*;' ft**.--"/1 :», ,.
firifoV* >v
08610
08620
08630
08640
08650
08660
08670
08680
08690
08700
08710
08720
08730
08740
08750
08760
08770
08780
08790
08800
08810
08820
08830
08840
08850
08860
08870
08880
1 08890
« 08900
08910
08920
08930
08940
' 08950
08960
08970
08980
08990
09OOO
09010
SUBROUTINE INITIAL LISTING (cont.)
' ""' NINTR = XINT+.99
NTR=NINTR-H
MID=NTR
TXTRA=XINT-INT
XINTB=HORZN/BINT+1.E-10
INTB=XINTB
NINTRB=XINTB+.99
NTRB=NINTRB+1
BXTRA=XINTB-INTB
SIGRATE=1.
CARAV=CARPOP( 1)
TIMEI(1,1) = TIMEH2,1) = TIMEI(3,1) = 0,
DO 900 N=2,NTR
TIMEl
-------
Table 5-2 SUBROUTINE INITIAL LISTING (cont.)
Ol
I
ro
09020
Q9C30
0^040
09050
09060
09070
09080
09090
09100
09110
09120
09130
1600
1650
1700
1750
SUM=SUM+PAR(M, J, I ) *COEF 3P ( M . J )
COEFd( J, I )=SUM+PARM(K, I J
CONTINUE
CONTINUE
00 2000 JJ=lfNPTRN
DO 2000 K=KSTART .KSTOP
J-J J+5*(K-1 )
DO 1900 M=MSTART,MSTOP
DO 1750 N=l,15
TIME I (OPTI,N) = TIMEI ( CPT I
IFtM.E J.5.0R.M.E0.6) GO
IF
-------
en
i
ro
i :'>"' :;',/. ,
09440 "''"' '
09450
09460
09470
09480
09490
09500
09510
09520
09530
09540
09550
09560
09570
09580
09590
09600
09610
09620
09630
09640
09650
09660
09670
09680
09690
09700
09710
09720
09730
09740
09750
09760
09770
09780
09790
09800
09810
09820
09830
09840
09850
i Table 5-2 SUBROUTINE INITIAL LISTING (cont.)
I STABL£X(L,LL,J) = DUMX(U
STABLEY(L,LL,J)=DUMY(L)
1960 CONTINUE
L=LL
1975 CONTINUE
2000 CONTINUE
DO 3000 M=MSTART,MSTOP
DO 3000 K=KSTART,KSTOP
TT=0.
00 2500 JJ=1,NPTRN
J=JJ+5*(K-1)
MUIM,K)=MU(M,K)+PM(M, J)#TPER(N,J )
SIG
-------
ro
CD
C9R6Q
09370
39fi80
0^.90
09900
09910
09920
09930
0"940
_09950_
09960
09970
09980
C~9 QQ 0
10000
10010_
"10020
10030
Table 5-2 SUBROUTINE INITIAL LISTING (cont.)
. -JllLLI E (6,2020) _N A^e_(_M_+_3 3_)_, X CjJ I < MTKl TMU(M,K) TSI G(M.K)
2020 FORMAT( IX,A 10,3X,3X,2X,3c 10.2, 15X.3E13.4/)
2025 CONTINUF
IF(RTYPE.EQ.PMGUEL)
WRITfc (6,2030)
TO 2100
2_03p FORMAT
MODE *//J_
__
J=+5*(K-l)
UO 2050 L=LSTART,LSTOP
WRITE (6,2040) NAME(L+40)
2040 FORMAT(1X,A10,3X,3X,2X,3E10
2050 CONTINUE _ _
"21C-5" CONTI NUE
WRITE <6,999)
CALL PRINTK
,SXCUT(L,K),SMS(L,K),SSIG(L.K)
+ PAR.50HPAR
«-,PAR, 50HPAR
PARTIALS
PARTIALS -
DE/OP
10C50
10060
_10_07Q_
10080
10090
1P_1QO_
ib lib
10123
10130
10140"
10150
10_160_
10170
10180
IQ190_
10200
10210
10220
'1G23Q"
10240
10P50
Y32oG
IF(RTYHE.LQ.SMODEL) *RITE (6,9^9)
IF (KTYPE.EQ.SMOOEL) CALL PRI\1T4(
SPAR.50HSPAR - _SI.GNATJRF PA^TMLS
, SPAR,50H .......
CALL PRINT21
+ COEFB,50HtMISSION DETER I 0* AT UN RATES
+ .CGEFB.50H _ ____
~+ ,COEFB,50H
+ COF.FBP,50HCOEFBP PARAMETER DECAY COEFFICIENTS
+ ,MMS,50HMMS - MANUFACTURtR SPECI F ICAT IUIMS
t ) _____ _____ _ _____ . __________ _______
IF (PTYPE.EO.SMODEL) CALL PRINT5(
+ SM,50HSM INITIAL SIGNATURE MEAN VALUES
+ . SIGS,50HSIGS _ --_ INIT I_AL_ IL^ilAT^i- SI GM AS _ _
" . - . - - - -
999 FORMAT(1H1)
_ j?j:T_yf_N_
END
-------
c
SUBROUTINE REGION
BRANCH TO THE
APPROPRIATE
REGION ROUTINE
en
i
ro
vo
CALL REGION 1
(LOS ANGELES)
CALL REGION 2
(NEW YORK)
CALL REGION 3
(WASHINGTON D.C.)
CALL REGION 4
(DENVER)
CALL REGION 5
(DETROIT)
Figure 5-3 Subroutine REGION Flowchart
-------
Table 5-3 SUBROUTINE REGION LISTING
01
I
10270
10P80
10290
10300
10310
10320
10330
10340
10350
10360
10370
10380
10390
10400
10
20
30
40
50
SU^P-fiUTINF REGION! KNAME )
INTtCEK RNAME
GOTH ( 10,20 , 30, 40,50) t RNAM_E
CALL RFGION1
RETURN
CALL REGION2
RETURN
CALL REGION3
RETURN
CALL REGION*
RETURN
CALL REGIONS
RETURN
END
-------
5.3.1 Subroutine REGION!
Subroutine REGION! contains the data for the Los Angeles Basin.
The data is stored in internal arrays and matrices and is moved into the
main storage during the initialization phase.
There is no input to REGION!. It is called from REGION only when the
LA data card has been included in the keyword input. Figure 5-4 shows the
flowchart for this subroutine and Table 5-4 a listing. The data require-
ments for the other modeled regions is similar to that of REGION1.
5.3.2 Subroutine REGION2
(See 5.3.1)
5.3.3 Subroutine REGIONS
(See 5.3.1)
5.3.4 Subroutine REGION4
(See 5.3.1)
5.3.5 Subroutine REGIONS
(See 5.3.1)
5.4 SUBROUTINE BLINE
Subroutine BLINE contains the algorithms for simulating the impact
of a voluntary maintenance program. The emission deterioration data,
voluntary maintenance data and starting emission levels are all identical
to those used in the mandatory model, and enter BLINE through the common
blocks. Other than the common blocks there is no input to BLINE. Out-
put consists of the baseline emission time history stored in BHIST and
5-31
-------
SUBROUTINE REGION
MOVE THE FOLLOWING REGIONAL
DATA INTO THE APPROPRIATE ARRAYS:
PARAMETER OUTPOINTS
PARAMETER USAGE FLAGS
PARAMETER DISTRIBUTIONS
MODE EMISSION CUTPOINTS
MODE EMISSION DISTRIBUTIONS
ANNUAL VMT
VEHICLE AGE DISTRIBUTION
10
INITIALIZE THE FOLLOWING REGIONAL
PARAMETERS (AND SMALL ARRAYS)
REGION SIZE
CAR POPULATION
AVERAGE SPEED
SIT EM
EMISSION WEIGHTING FACTORS
MINIMUM REDUCTION
^RETURN J
Figure 5-4 Subroutine REGION1 Flowchart
5-32
-------
Table 5-4 SUBROUTINE REGION! LISTING
CO
CO
10410
10420
10430
10440
10450
10460
10470
10430
10490
10500
10510
10520
10530
10540
10550
10560
10570
10580
10590
10600
10610
L0620
10630
10640
"10650
10660
10670
10680
10690
SUBROUTINE REGION1
DIMENSION XCUTH10,3),SXCUTK6,3),ATABX(9,10,3),ATABY(9,10,3)
DIMENSION ASTABX(9,6,3),ASTABY(9,6,3)
DIMENSION TDST(10,3)
INTEGER TDST
CC___ DISTRIBUTION £UTPqj_NTS
')ATA XCUTI/1.0,- 50., 2.,0. ,0.,0.,-1.0,30.,-0.05,0. ,
* 1.0,-5.,1.0,0.,0.,0.,-1.0,25.,-0.05,0.,
+ 1.0,-500., 2.,0.,0.,0.,-1.0,10.,-0.05,0./
DATA SXCUTI/3000.,6.,400D.,450. ,3.5,4000.,250,,4.0, 5000.,250.,1.5,
+ 5000.,2000.,3.0,4000.,230. ,1.0,4000.7
DATA (ATA6X (_I_) ,_I_=_1_»JLBjDT/
+ -7.,-3T75~,-~2~".25"~,-1.2"5", 0. 25', 1. 25 , 2. 2 5~, 5.2 3 , 8 .",
+ -200.,-90.,-70.,-30.,10. ,70.,110.,130.,330.,
+ -10.,-3.75,-2.75,0.25,2.25,4.25,6.25,7.25,10.,
* 27*0.,
+ -4.0,-2.75, -1.25,-0.75,0.25,0.75,1.25,2.25,5.,
±. ~ 70. ,-55. ,-25. , 5_. , _25_._, 50._,_75.^1^0 ._, 1 80_._,
"-«- -0.22,-0.1,-'o.of,-0.01 ,0.01,0.03,0.07 ,0. 12,0.26,
+ 9*0.,
+ -8.,-t.75,-3.25,-1.25,.25,.75,2.25,4.75,3.,
-250.,-190.,-130.,-50. , 10.,30.,50. , 110.,340.,
-10,,-7.75,-4.75,-3.0,-1.75,0.25,2.25,4.25,10.,
.
10710"
10720
10730
+-2. 7 5, -1.75, -1.25, -0.75, 0.25, 0.75, 1.25, 2. 2 5, 4.0,
+ - 70. ,-55. ,-25. ,5. ,25. ,90. ,115. , 135. , 170.,
-* -0.14,-0 . 1 1 , - 0 . 07 , - Q . 0 5 , - 0 .01 ,0.0 1_'_P_-.P ? , 0 ._0_5 ,0.2 1 ,
+ 9*0. /
DATA (ATA3X ( I ) , 1= 1 81 , 27 0 ) /
_+_ -8 ._,ji4_.5 , - 2 . , - L . 2 Sjr^? _5 , . ,75 _*l_._T5, 5_.__2_ 5_,_ 7^5, _____
__ __ _
+ -350. ,-190.7-140. ,-70. ,- 50 . , 30 . , 70 . , 1 50 . ,440.,
+ -10., -5.75, -1.75, 0.25, 2. 23, 4. 25, 5. 25, 8. 25, 10.,
+ 27*0.,
10740
10750
10760
10770
10780
10790
+ -2.75,-2.25,-1.25,-0.75,0.25,0.75,1.25,3.,3.5,
+ -30.,-10.,5.,20.,35.,45.,105.,130.,170.,
-*- -Q . 2 l_,j-_0 «_1 , -0 . P7_f_-0 . 03_, - p_._0.1.,_0 -.01, 0 -_03, 0 . U_P ?_2. _8J
"+ 9*b".'/
DATA IATA3Y ( I) ,1 = 1,130) /
+ .0203, .0405, .0541, .0743, .0873,0.0743, . 0405 ,. 0_270 ,. 00t>7 ,_
10800
10810
+ 0". 006, 0/026, 0.04, 0.06,0. 141,0. 107,0,081,0.045, 0.007,
+ 0. 02,0.034, 0.0t»,0.228, 0. 087,0. 08,0.02,0.013,0.00 7,
-------
in
i
10_3.20...
10840
10850
10860
10870
108RO
10890
10900
109K)
Table 5-4 SUBROUTINE REGION! LISTING (cont.)
+ O.C37~9\J.^37^,~bTl J2TO. 15 ,0'.~29~1 ,6Yl33, 0.071 , 0.01to,0.00H
+ .0075,.0149,.0299,.Z*bbi.0896,.05^7,.0373,.0299,.0075,
+ 0.0175 , 0.035, O.C88, 0. 2 98 , 0_. 175_,_0_.J 0^,JL..O_7_,_0_._01.8_,_0
9*0. ,
10930
10940
10950"
10960
10970
10980
10990
J LQPJL
Tioio
11020
1103JL
"11040
11050
11060
11070
11080
1 1_0_90_
11100
11110
1 1J20_
11130
11140
_1_1 1_50_
H~160
11170
11180
^"u. »
.0067,.0133,.0267,.0733,.0933,.1200,.0667,.033?,.0067,
*_ 0.0133,0.02 6_7,0.066,0. 133_, 0. 126,0. 093 ,0. 086 , 0. 04 ,0_.007_,
+ 0.013,0.027,0.036, 0 .04 7~, 0 . C5 3 ,0.2^7,0.06,0. 04t> ,0.007,
+ 27*0.,
+ 0.014,0.043,0.06 5 ,_0_. 15 8, ._3 450, .137,0.036,0.021, 0.007,
6 .0074, .0148, .029V, ,36~30, .0963, .0370,. 0222, .0148, .0074,
« 0. 00 S,0.02 5,0.05, 0.108,0.358,0.1 92,0.075,0.033,0.017,
DATA (ATABY (I),I=181,2T0)/
+ .0067,.0134,.0336,. 1007, .1409,.1208,.0872,.0268,.0067,
t ° « QO_?_iP .02,0 . 04 , 0_.J ° 3, 0 . J. 5 3, O.JJ ,_0 . Oo7,0.033,0. JOo,
+ 0.01 3 5,"0.02 7, ~6~. 108,0.37"8,"6.101 ,0.067,0.02,0.0135,0.013,
. ^ -t +, r.
27*0.,
0.015,0.022,0
-_z. ^.^.- - - -_^_^ t_P_il J 5j_0_._529,0.096.0 .044,0.008,0.007,
* . 0155", .02 33, .5659", .069"8, .0465, .0310, . 0155, .0078, .0077,
+ 0.008,0.016,0.032,0.142,0.44^, 0. 20o,0.047, 0. 008, 0. 007,
' 9*0./
DATA (ASTABX (i) ,1 = 1,162)/
*50.,150.,350.,450.,550.,750.,850.,1650.,1800.,
* _1_. ,2.25,2.75,3. 7 5 , 5 . 2 5 ,6 .J 5, 7 ._75_,J_._2 5_, 10_^25_,
"*10. ,70. ,90. , 110. ,130. ,~lT6. ,Y9~D. ,270. ,400. ,
*50.,125.,175.,225.,275.,325.,375.,875.,1000.,
* .5..75.1.25,1.7 5, 2. 75,3. 75,4.25.8.25, 9.25,
"*90. ,700., 1100. ,1500. ,1900. ,2100. ,23 DO.\2800. ,3000.,
*50.,73. ,125.,175.,275.,325.,375.,675.,775.,
* .5.1.25,2,25,2.75,3.25,4.75,5.75,7.25,10..
*10. ,30.,50. ,70.,90.,110.,130.,150.,290.,
*10. .75.,125.,175.,225.,275.,325.,425.,775.,
* .5,.75.1.25.1.75,2.25.3.25,3.75,4.25,6.75,
* 40C.,700.,1500.,2100.,2500.,2700.,2900.,3500.,4000.,
*10.,50. ,90.,110.,130.,170.,210.,330.,390.,
* .5,1.5,3.5,5.5,6.5,8.5.9.5,10.5,12.
11200
11210
-^T*»^T-^»-'T-^»-'»**W-'»*-'»-'T ' »-^T .fc V ^ T ^ *- __T
~* 10 . ,50 . ,70. , 90. , 1507,19bYY2 l"0 . , 29"o"7, 390. ,
*10. ,30. ,50. ,70.,90.,110.,130.,190.,300.,
* .1.0.3,0.5..7,.9,1.3.2.1,2.3,3.0,
11220
11230
* 60C. ,1300. , 1700., 2 lOO". ,270C. ,2900. ,3100. ,3300. ,36OO./
DATA ASTA8Y /
-------
OJ
Ul
1 1 240
11250
11260
11270
11280
11290
11300
11310
11320
11330
11340
11350
11360
11370
11380
11390
11400
11410
11420
11430
11440
11450
11460
11470
11480
1 1490
11500
11510
11520
; 11530
11540
11550
11560
1 1 570
11580
11590
11600
11610
11620
1 1 63 0
Tl64"0"
11650
Table 5-4 SUBROUTINE REGION1 LISTING (cont.)
* .0140, .0280, .1189, .1399, .1119, .0769, .0490, .0280, .0810,
* .0208, ,0?t 7, .0486, .0556, .0625, .C 83 3, .0625, .0486, .0347,
* .0069, .208 3,. 29 86, . 1597, .0625, .04 8 6,. 0347, .0139, .0409,
* .0000,. 04 17,. 0903, . 1 306, . 2083 , . 1 73 6 , . 1042, .0139, .04,
* .027d,.07t>4,.0833, .1319,. 1111, .0903, . 0486, . 0108, .0469,
* .0417,.0t>25,.0764, .1181, .0972, .076 4,. 062 5, .0486, .J100,
* .0000,. 02 70,. 0946, .1959, .1622, .094 6,. 060 8, .0275, .1000,
* .0336, .0671, .0805, .1275, .Ob 04, .0470,. 0403, .0268, .0200,
* .0000, .006 7,. 0940, . 1544, . 1940, .1678,. 1409, .3805, .0400,
* .OODO, .0473, .2297, .3514, .2365, .07^-3, .0135, .0068, .0167,
* .3557, .1879,, 1800, . 1745, . 0470, . 0268 ,. 0267, .0070, .0160,
* .0134,. 0268,. 0537,. 073 8, .0805 ,. 1 14 1 ,. 1275, .0604, .1203,
* .0000, .0144,. 02 88,. 064 7, . 1079, .1151, ,071 9, .0504, .1088,
* .2300, .2370,. 12 20,. 0650, .0530, .0250,. 0080, .0075, .0070,
* .0000,. 01 44,. 0935,. 1799, .1511, .071 9,. 0432, .0216, .0272,
* . 0000,. 0072,. 03 60,. 1151, . 1511, . 16^5,. 1223, .0791, .0144,
* .1799, .2158, .1439, . 1079, . 0863, .03oO ,. 0216, .0 144, .0302,
* .02 16,. 043 2,. 0576,. 0863, . 1 e>55, .1079, . 0863, .0504, .03607
DATA TOST/ 1,1,1, 1,0,0, 1,1, 1,1, 1,1, 1,1, 0,1, 1,1, 1,1,1, 0,1, 1,1, 0,1,"
+ 1 ,1,07
COMMON /BADDOR7 X ( 1 5 ) , A MMU AL ( 15 )
L> I MEN SIGN XI (15) , ANN'JAl (15)-,START1(15,3)
DATA Xl/10. 8, 10. 5, 10. 2, 9. 8, 9. 3, 3. 8, 8.1, 7. 2, 6, 2, 5.1,
+ 4. 1,3.0,2. 0,0.9,4.07
DATA AMNUA1/15000., 13000. , 110QO.,9bOO. ,8400 ., 7000 ., 5300.,
+ 50 00. ,<*400. ,4200. ,4000., 3800. , 3700 . , 3 550 . , 3000 .7
DATA START 17 5* 11.94, 5*7. 26, 5* '+.43, 5*129.8,5*86.6,5*63.4,
COMMON 7COM017 AM3(3),ALA8, AVV, BINT,
* BAREA(3), BLD1, BL02, 3SIG(3), BXTRA, BSIZE,
+ BrilST(3,16j, EiMMH 10,15, 3) ,
+ ATAt>LEX(9,10,3) ,ATArfLEY{9, 10,3) , AST A6LX < 9 ,6 ,3 ) , AST AbLY{ 9 ,6 , 3 )
COMMON 7COM027 CARA, CARIY, CARMY, CARPOP(16),
+ CARSY, CBSUM, CCQEF ( 1 0 ) , CCOS TI , CCUSTM, CGTT,
+ CINCON, CPC3, CPI, CPVPY, CSUM, CARAY,
+ CM 15,3, lo), CUEFbU5,3), COEFBPt 10, 1 5 ) ,
+ CP ART ii 0,15)
CC AD02
COWiQM 7COM037 OtLPCV, 0 P ( 1 0, 15) , DEL E-A ( 3 , 16) , DEL I { 3 ) ,
+ E,'iW(3>, EP110,15) ,EFF{10) , l)tLlT(3),
"+~~ F""R"EOA", "F REG'S, FPE*RC( "10,3)", "" "~ " "'
+ HORZN, HORZNY,
-------
Table 5-4 SUBROUTINE REGION! LISTING (cont.)
en
i
"l
1
1
~1
1
1
1
1
1
1
1
1
1
1
]
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
I6o3
1673
1630
lt>90
1 700
1710
1720
1 730
1 740
1750
1763
1770
1780
1790
1800
1310
1820
1830
1840
1850
1860
1870
1880
1890
1900
1910
1920
1930
1950
1960
1970
1980
2003
2010
2020
2033
2040
2050
12060
* H ° C d 5 , 1 6 }_,
* HPS( j,15,16) »
+ HPTOTSt 16)
CC AIJ03
COMMON /COM04/
+ KSTART, KSTCP,
+ LIJLF, LI NT (16),
+ MBASE, MPH,
+ hO( 10,3} , MMS( 1C,
CC ADJ4
COMMuN /COM05/
+ NINTR, NINTRB,
_ ___^ ___ uc MY f~
CC ADDS
COMMON /C'H36/PA~ M (3, 3
+ VC(~15),~" PCS(l'j),
+ PP( 10,15) ,PS(o,15) ,
+ PM( 10,15) ,
+ PSA(15) , PTA( 5) ,
+ ,PAYF1N
COMNCN /COM07/
+ RTYPE,
+ SALE, SALL,
+ SMODEL, STAP,T<15,
+ SCALEiiM(3),
+ SIGME(IO),
+ SIGRATE, SIST,
* STABLEXt 33,6,15) ,
CuMMON /COM10/
+ TINT, T0bt(3),
+ TXTRA, TSIZE,
+ THIST(5,3,16),
J- TIMEM( 10,15) ,
CC AJJ1C
COMMON /CO Ml I/
+ X16P(3,3,6), XINT,
CC AOU11
MPCS(
HPT(5
ITE,
LOPT,
LPSPP
MSPEC
15) ,
La_»J,
,16)
LPI
(10)
(
1
NJAMF( 50
!|STEPS_,
), PA'?T
PHK 14)
PT(5) ,
PARK 10
0)
J ,
i
,
,3
PCOi\F,
RE"fNSP,"~
SALP,
3) , ST
SM(6,
AT
15
S IGMNL
SIGS(
STA6L
(
6
c
T AREA (3
TOfMX,
rsi&<3
THIiTT(
TA6LEX(
XI
) , YriAS
) ,
^T
E(
,
) ,
10
,1
Y(
),
) ,
3,
33
B,
6_U
f
ITL,
CK( 10J.LLP
.LSTART,
,,-ISTART,
MVPX{ 10
NCNTR,
"fpTM.OPTS
PAYNE/J
PLOY l"4) , "
PTOT,
,3) ,
HPPdO,
HPTOTd
ITP,
ICK,
LSTOP ,
, 15)
NEMIS ,
, PAYO
>LTMAX(
PTS (5),
PLUS( 10
,PPPICK,PSTAR,PI (1
PARINT(10,10,9)
~~RN"AM"E", " RSI'ZE", "
SITEI, SITEM,
iTIME(
),
5) ,
33,6, 15)
TDISTdO,
TOTE13) ,
TPERU6,
16),
,10,15),
XLANE,
3), SUMb
SPAR( 10
S IGCE
SIGP( 10
SIGSDE
5) ,T IDLE
TPDB( 3)
15), TM
TIMECd
TABLEY
XSOM
I
o
F
3
t
5
M
,
<
t
(
5jl
),
I
_Li
TIMt(16),
NEMP,
NPAR,
HP ICK ( 16) ,
"i (3) ,OVCHM("3
F( J ) ,
7, P MODEL,
PAYADJ,
15) ,
,10
_.__
S
(3)
15,
3) ,
15)
3),
,TIM
, T
IL( 1
0
(
,
,15
33,
XC
),
"STOP",
LANE ,
,
6) ,
»
EK3, 16),
POT( 3) ,
6,15),
10,15)
UT( 10,3) ,
-------
oo
!
t J
i
12070
12080
12090
12100
12110
12120
12140
12150
12160
; 12170
12180
12190
12200
12210
12220
! 12230
12240
12250
12260
12270
12280
i 12290
; 12300
; 12310
12320
12330
12340
12350
12360
12370
12380
12390
12400
12410
12420
12430
12440
12450
12460
12470
12480
Table 5-4 SUBROUTINE REGION1 LISTING (cont.)
COMMON /CQM12/ Y1BP( 3,3,10) , Y2B P( 3, 3 ,10 ) ,
+ YES, YSUiM,
+ Zl, Z2,
+ Z7, za,
+ Z13, Z14,
* ZCARI, ZCARM,
+ ZZ(3,3)
CC AOD12
COMMON /DP BUG/
+ LDLBUG, MDE8UG,
CC ADDO
REAL ITE,
+ NAME, NO,
+ IN, MISFIRE
INTEGER RNA'-1E,
+ TDIST, XLANE,
CC DATA INITIALIZATION FOR
DO 1 M=!,10
XCUT(M,K)=XCUTKM, K)
DO 1 L = l,9
ATABLEX(L,M ,K)=ATA8X(L,
1 ATABLEY(L,M,K)=ATABY(L,
DO 2 M=l,o
DO 2 K=l,3
DO 2 L=l,9
ASTA8LX(L,M,K)=ASTABX(
2 ASTA6LY( L, M,K)=ASTA3Y(
DC 3 1=1,15
X( I ) = X1(I)
ANNUAL I I ) = ANNUA1 ( I )
DO 3 J=l,3
STARK 1 , J) = START1( I ,J)
3 CONTINUE
CC L. A. BASIN
RSIZE=1250.
MPH=30.
CARPOP( 1)=4.E6
-SITEM=1000
YTM(lj), YlDBP(4,4,10),Y?DbP(4,4,10),
Z3, Z4, Z5, Z6,
Z15, Z16, Z17,
ZIC, ZSUM,
ADEBUG, ^DEBUG, CDEBUG, DDEBUG,
PDEBUG, JDL^UG, SDEBUG, T DEBUG
ITL, ITP, ITIME,
MS PEC, MU, MVPR,
LDEBUG, MDEBUG,
5 ITE I, SITE'S STAT,
UPTI, PPICK, PPPICK
LOS ANGELES
M,K)
M,K)
L,M,K)
L,M,K)
-------
Table 5-4 SUBROUTINE REGION1 LISTING (contJ
*' l*24*0'fc/ ' '
12500
12510
12520
12530^
12540
12550
12560
' "r" '" * /"'Jl'^ **
EMW(2)=.l
EMW(3)=.3
AMB(1>=0.01
RETURN
END
CO
00
-------
the total integrated yearly emission located in BAREA and TOBE .
All emission rates are stored in A, B and C matrices as differences
from the starting values, START. Therefore, the A matrix is initialized
to zero, representing the emission delta at the start of the first
simulation time period. Emission rates are weighted by the vehicle
population percentages generated in the attrition routines to obtain the
total emission rates by species.
The major equations of BLINE are:
(1) B = A + ^| x 4| x At M is mileage, t is time.
Where: Emission rate at the end of the simulation period (B) equals
that at the beginning (A) plus the deterioration rates times At.
(2) C = B - APD x || x At
D dU
Where: The post maintenance emission rate (C) equals B minus the
effects of voluntary maintenance AE. AE is computed by summarizing the
change in the parameter setting (APn) due to voluntary maintenance times
the appropriate influence coefficient. Figure 5-5 presents the flowchart
for subroutine BLINE and Table 5-5 the listing.
5.5 SUBROUTINE MICRO
Subroutine MICRO contains the logic for the inspection/maintenance
model. MICRO contains the calling sequence to the supporting subroutines
and generates a set of time histories and integrated averages for each
emission species. MICRO sets up in the CN array the starting emission
values and initializes the THIST and the THISTT arrays in which the
emission time histories are eventually stored. The A matrix is initialized
5-39
-------
c
SUBROUTINE BLINE
INITIALIZE A ARRAY TO ZERO
MOVE START INTO BHIST (I, 1)
AVERAGED BYTPER
YES
PRINTOUT HEADER
SET UPTIME
LOOP (N =2)
SET UP EMISSION
LOOP (1 = 1)
NO
7
SET UP POWER
TRAIN (J = l)
AND CONTROL
TYPE(K = 1) LOOPS
©
-------
©
DECAY EMISSION
RATES
B = A + COEFB*TMIL*BINT
COMPUTE VOLUNTARY
MAINTENANCE DIFFERENCE
DELB = T~ FPERC X PAR X BINT
SUBTRACT VOLUNTARY MAINTENANCE
C = B-DELB
COMPUTE AVERAGE EMISSION RATES
WEIGHTED BY VEHICLE DISTRIBUTION
20
30
LAST POWER
TRAIN-CONTROL
TYPE
NO
MOVE AVERAGE EMISSION
RATE INTO BHIST
40
LAST EMISSION
TYPE
NO
Figure 5-5 Subroutine BLINE Flowchart (cont.)
5-41
-------
/
PRINT OUT EMISSION RATES
A, B, AND C
43
MOVE ENDING EMISSION
RATES FOR THIS PERIOD
INTO STARTING RATES FOR
NEXT PERIOD (C -A)
CALL FIT TO CURVE
FIT EMISSION RATES
INTEGRATE THE RESULTING
POLYNOMIAL TO GET TOTAL
EMISSIONS IN GRAMS PER
VEHICLE AND TONS PER YEAR
C
RETURN
J
Figure 5-5 Subroutine BLINE Flowchart (cont.)
5-42
-------
Table 5-5 SUBROUTINE BLINE LISTING
en
i
CO
17C80
17C9C
171CC
17110
1712C
17130
17140
17150
17160
17170
17180
17190
172CO
17210
17220
17230
17240
17250
17260
1727C
17280
17290
17300
17310
17320
1733C
17340
17350
17360
1737C
17380
17390
17400
17410
17420
17430
1744C
17450
1746C
17470
1748C
SiePCLTIlvE ELINE
CIPEISSICN A(15,3),E (15,3) ,C( 15,3
CCPPCN /CCKC1/ Af-E (3) ,ALAB,
4
4
4
4
4
4
CC ACC2
4
4
4
4
CC ACC3
4
4
4
CC ACC4
4
4-
4
EAREA(3), BLD1,
EHIST(3,16),
ATA6LEX(9,10,3),ATA
CCI^CN /CCMC2/
CARSY, CBSLN,
CINCON, CPCE, CP
CN(15,3,16),
CPART (10,15)
CGfftN /CCNC3/
EMK(3), EP(10,15)
FREtA, FPEGE,
HCRZN, HGRZNY,
t-PC(15f 16)t
HPS(6,15,lt),
HFTCTS(16)
CC^MCN /C0^04/
KSTART, KSTCF,
LICLE, L1NT(16),
MEASE, MPH,
M(1C,3), ^^S,
CCKfCN /CCV05/
NIMR, MMKK,
NFTRN, NPTS,
CCIY, CCMY,
CC ACC5
CCJ-NCN /COH06/PARM(3,3
4 PC(15), PCS115),
+
4
4-
4
4
4
PP(10,15) ,PS(6,lt>),
PAR(10,15,3) ,
P$A(15), P1A(5),
,PAYF IN
CCfl'CN /CCNC7/
SALE, SALL,
BLD2,
BLEY(9,10
CAR'A,
CCCSTI,
I, C
CCEFEC15
CELPCV,
,EFF(1C),
FPERCdO
hPCS(15,
HPT(5,16
HE,
LCPT, LP
LPSPPdO
NSTART,
MVP
M*E(50)
^^ctlE,
NSTEPS,
CPTI,
), PART,
PHK14),
PT(5),
PARK10,
PPICKUC
FCCTviF,
PEINSP,
SALP,
)
BINT,
Bsicnrr
,3) ,ASTABLX
CARIY,
CCCSTI",
PVPV, CS
,3),
C'PtlOt 15)
DELIT(3) ,
t3),
16),
) ,
EXTRA,
(9, 6, 3), A
CARI^Y,
CGTT,
Lt , C
CGTFBPU
.CFLFMS,
HPP(10,1
HPTCT (16
ITL, ITP,
ICKdOnLLFTCK,
),LSTART, LSTCP,
NSTCP,
, NCNTR, NEMIS,
NL,
NTR,
CFT^.OPTS
PAYIVEW
PLC(l^) ,
PTCT,
3,3),
),PPP1CK,PS
PATTNTdC
RNAVE,
SITEI,
MJHlbt
MTR8,
(50) ,CVCI-
, PAYGF
PLTKAX(3
pTsrsrr
PLL'SdO,
TAR,PI(15
1 10,^)
RSIZE,
SITEM,
B3I"Z^,'
STAfaLY(9,6,3)
CARPOP(16) ,
ARAY,
0,15),
16),CTELr{3r,
5, It),
),
ITIME(16) ,
NEMP,
NPAR,
NPICK(IO) ,
K3),cvchy(3)
F(3),
) ,P^CDEL,
"PAYACJ,
15),
.10),
RSTGP,
SLANE,
-------
Table 5-5 SUBROUTINE BLINE LISTING (cont.)
en
i
1749C
175CC
17510
17520
17530
17540
1755C
17560
17570
17580
17590
176CC CC
; 1761C
1762C
1763C
1764C CC
17650
17660
; 1767C
1768C
176SC
177CC
1771C
1772C CC
1773C
1774C
1775C CC
1776C
1777C
1778C
177SC
178CC
1781C
1782C CC
17830 CC
1784C
1785C
1786C
1767C
1789C
17SCO
4 SPCCEL, SlAPTdS
4 SCALhBM3),
4 SXCLK6.3),
4 SIGPE(IO),
4 SIGRATE, S1ST,
4 S7AELEX(33,6 ,15 ) ,
COPMCN /CCM10/
4 TINT, TCEE 13) ,
4 TXTRA, TSIZE,
4 THIS! (5,3,16) ,
4 TIMEX 10, 15) ,
AOC10
CCPPCN /CCM11/
4 X16P(3,3,t), >II\T,
4 XTM(16), XEASE(9,
ACCH
CCPPCN /CCM12/
4 YES, YStf,
4 21* Z2,
4 Z7, Z8,
4 Z13, Z14,
4 ZCARI, ZCAPW,
4 2213,3)
ACC12
CCPMCN /CEBLG/
4 LCEBUG, MCEEUG,
ACCC
REAL ITE,
4 PCS, PPH,,
4 NAPE, NC,
4 IN, MSFIRE
INTEGER RNOE,
4 TCIST, XLANE,
,3) , STAT
SN (6, 15
S 1 G ( 1 0 ,
S1GMNE(
SIGS(6
STABLE
T £R£A (3
TCNX,
TSIG(3
Tt-ISTT(
TAELEXt
VtF (10) ,
XINT
3 ) , YE ASE (
V 1BP(3,
YIP ( 16)
Z3,
zs,
Z15,
ZIC,
ACEEUC,
PCEEUG,
HL,
MU ,
LCEBUG,
SITE!,
CFTI,
, STIfE
) ,
3),
1C),
,15),
Y(33,6,15)
), TC IST( 10
TQTE(3) ,
), TPERU6
3,16),
33,10,15) ,
B, XLANE
9,3)
3,10),
, Y108P
Z4 ,
Z10,
Z16,
ZSUP ,
BCEBUG,
QCEEUG ,
ITP,
PVPR
MCEBLG,
SITEP,
PPICK,
(3),
SPARdO
SIGCE
SIGP( 1C
SIGSDE
«3)f TIOLE
TPCB(3)
,15), TM
,15,6) ,
(3),
,15) ,
(3) ,
,TIPEI (3,16) ,
, TPDT'(3)f
IL ( 16 , 15 ) ,
TIHEC( 10, 15 )»
TABLEY
, XSUM
Y2BP(3,
(4,4,10) ,
Z5,
Zll ,
Z17,
CCEEUG,
SDEEL'Gf
ITIPE,
»
STAT,
PPPICK
(33,10,15)
, XCLT ( 10 ,3) ,
3,10) ,
Y20BP(4,4,10)
Z6,
212,
CCEOUG,
TDEBUG
*** EASEL1NE EMSSICNS
EMSSICN SPECIE
CC 5 I=1,NENIS
BhlST( If 1)=0
CC "4 oJ=l,NPTRN
CC 4 K=1,NCNTR
f ( J,I)=C.
fiHIST( 1,1 )=BHIST( I, 1)4
HC,CC,NO
STAHT(J, I
NEMISU)
)*TPE^(1,J)
-------
Table 5-5
Ul
tn
179 1C
17920
17930
17940
17950
1796C
17970
1798C
17990
18CCC
18010
18C2C
18C3C
18040
18050
18060
j 1807C
i 1808C
| 18090
18100
18110
18120
18130
1£14C
1615C
18160
18170
1818C
18190
18200
18210
1822C
18230
18240
1825C
18260
1827C
18280
18290
163CC
18310
18320
4 CCNTIME
5 CCNTIMJE
IF(ECEEljG.EG.YES) KRITE (£,500)
500 FORMAT (lHl,lC(/),35X,5C(l(-*)//,45X,
+ *START CF THE E AS EL IME*/ 5CX , *FL£ET ANALYSIS*//
* 35X,5C(lh«) )
CC 50 N=2,NTP8
C:
C: ACJLST EMSSICN ^fcANS FCR INCOMING NEK CtRS.
C: 10.8 PERCENT CF THE FLEET IS NEK EACH YEAR.
C:
IFtN.EC-2) GCTQ 24
CC 23 oJ=l,NFTRN
J=JJ+10
CC 23 1=1,3
IF(TPEK(N,J) .LT.C.1C8/5. ) GCTC 23
IF(M J, I) .LE.O. ) GOTC 23
C:
C: THE A ARRJY IS A CELTA E ARRAY. ThEPFCRE, THE
C: STARTING VALUE IS ZERU.
C:
A(J,I)=A(J,I)*(TFER(N-l,J)-.108/5-)/7PEP(N-l,J)
23 CCNTINUE
24 CCNTIME
CC 40 I=1^EMS
CO 30 JJ=1,NPTRN
CC 20 K^KSTART ,KSTOP
CELB=C.
CC 1C N=1,NPAR
CELe=CELR+FPERClf,K)*PAH|N,J,I)*BINT/12.
10 CCNTINLE
CiJ,I) = E( J, I)-CEL£
SLMJ=SUf J+(B{ J, I)+C(J,I)+2.*START{J,I))/2.*TPER(K,J)
20 CCNTINUE
30 CCNTIME
EH IST( I ,N ) = SLNJ
4G CCNTIME
IF(E£tELC-.EC.NC) GC TC 43
fcRITE (6,42) N
-------
Table 5-5 SUBROUTINE BLINE LISTING (cont.)
en
4^
CTl
18330 * s
18340
18350
18360
18370
16380
18390
184CC
18410
18420
18430
18440
18450
18460
18470
18480
18490
18500
18510
18520
18530
*-'»««" 4|«- FORNA7Ilhl,4CX,*TIME HISTCRY PCIM *t!3t* *t
+ 2X,*EASELIKE*,/)
CALL PRINT2U,
* 5CFEKISSICN DELTA BEFORE DECAY
* ?6,5ChEMI$$lCN DELTA AFTER DECAY
4 .CfSChEMISSlCN CELTA AFTER MAINTENANCE
* J
43 CC 45 I = 1,NEMS
CC 45 JJ=1,NPTRN
CC 45 K=1,NCNTR
45 / (J,I)=C( J,I)
50 CCNTIMJE
CO IOC I=lfNEHIS
CALL FIT(BHIST,NTRe,AAl,/A2tAA3f I)
EAREAU )=(AAi*XINTB^AA2*XINTB**2/2.4AA3*XINTB**3/3. )*
+ M£AS£*BINT
TCBEU l = BAREA(I)*CAPFCPtl6)/CGTT
100 CCMINUE
RETLRN
EKC
-------
to zero then represents the starting emission values (emission values
in the A, B and C arrays are stored as differences from the starting
value). Next, MICRO initializes the N loop, from 2 to NTR, where NTR is
the number of inspection intervals. If the LPICK flag A is "turned on",
MICRO calls OPTMUM to compute the optimal parameter cutpoints for an
inspection/maintenance program. MICRO then adjusts the average emission
rates to reflect new cars entering the population and starts the actual
inspection/maintenance simulation.
Simulation of the inspection/maintenance process begins with the
parameter deterioration routine which adjusts the engine parameters
distributions based on parameter deterioration over time. MICRO then
calls EDECAY to similarly deteriorate the vehicle emission levels.
Subroutine TEST, which simulates the actual inspection process, is
called next. TEST computes rejection rates and mean value of rejected
parameters for each subfleet in the population. Subroutine TEST also
calls the PMAINT routine which adjusts parameter distributions to
account for mandatory maintenance. MICRO next calls MAINT which computes
the actual emission reduction achieved due to the maintenance treatment.
MICRO then outputs these calculations, based on appropriate flags
and updates the emission arrays. This is done by moving the BM array
which represents the post maintenance emission rates back into the A
array. The time value is incremented and, if the NPICT flag is set, the
statistical routines are executed and MICRO proceeds to the next
inspection interval.
After simulating the inspection/maintenance process over its entire
time horizon, MICRO calls FIT to curve fit the emission time histories
5-47
-------
using a second degree polynomial. This polynomial is integrated to obtain
total yearly emissions for the program. The mandatory and voluntary
emission time histories are plotted by calling subroutine PLOT. Figure 5-6
contains a flowchart of MICRO and Table 5-6 a listing.
5.6 SUBROUTINE TEST
Subroutine TEST contains the logic and algorithms for performing a
mandatory inspection on a vehicle population. Input to TEST are indicies
JO and N, where JJ is the parameter power train type and N is the in-
spection interval number. TEST initializes the appropriate variables
to zero and branches on inspection type. For a parameter inspection,
TEST computes the expected value of rejected parameters by calling AREA
with the first argument equal to one and the expected rejection rates by
calling AREA with the first argument equal to zero. TEST also calls
PMAINT which updates the parameter distributions. For an Emission
Inspection, TEST computes the rejection rate based on the mode emission
distributions and specified cutpoints. These values are then used to
adjust the parameter distributions. Subroutine TEST then computes, for
both parameter and emission cases ,the total overall rejection rate for the
vehicle population (i.e., number of cars that failed). Subroutine TEST
also computes various cost information and prints out all computations
when the TDEBUG flag is set to YES. TEST returns control to subroutine
MICRO.
Output from subroutine TEST consists of the average rejection rates,
mean value of the rejected parameters, and new post maintenance parameter
distributions for each of the six distributed parameters. Figure 5-7
contains a flowchart of TEST and Table 5-7 a Listing.
5-48
-------
(SUBROUTINE MICRO)
MOVE START INTO CN(1)
AVERAGE START BY TPER AND
STORE INTHIST
AVERAGE ALL STARTS INTO
THIST
ZERO OUT THE A ARRAY
INITIALIZE LI, LLPIC,
PPPICTOONE
INIALIZETIME
COUNTER (N= 2).
LOOP UNTIL N = NTR
©
Figure 5-6 Subroutine MICRO Flowchart
5-49
-------
INITIALIZE ARRAYS
TO ZERO
YES
HAS CUTPOINT
OPTIMIZATION BEEN
REQUESTED FOR
JHIS TIME
YES
INCREMENT LLPIC
K = 1
COST = 1
CALL OPTMUM
CONST
= CONST
X.9
NO
YES
PRINTOUT MESSAGE
'"R LOWERING CONSTRAINTS'
YES
0
s -x * THIS IS AN ERROR RETURN (KILL = 1) WHICH SIGNIFIES
(RETURT*) NO FEASIBLE SOLUTION IN THE LINEAR PROGRAM
Figure 5-6 Subroutine MICRO Flowchart (cont.)
5-50
-------
22
,
CHECK PPICK INPUT
TO MAKE SURE PPICK (1)^1
LOOP ON POWER
TRAIN TYPE AND
EMISSION TYPE
STARTING
EMISSION RATES FOR
THIS TIME PERIOD <0 ?
(IE: LESS THAN
NEW CAR
RATES
ADJUST CONTROLLED VEHICLE
EMISSION RATES TO REFLECT
NEW CARS ENTERING POPULATION
AT AN INCREMENTAL EMISSION RATE
LAST
POWER TRAIN
AND EMISSION
TYPE
Figure 5-6 Subroutine MICRO Flowchart (cont.)
5-51
-------
?"
START THE MAIN
POWER TRAIN LOOP
COMPUTE PART = FRACTION
OF CARS TREATED SO FAR
(USED FOR SPREADING l/M
OVER TINT)
Figure 5-6 Subroutine MICRO Flowchart (cont.)
5-52
-------
9.
50
MOVE BM - A
(FOR NEXT PERIOD)
55
COMPUTE TIME AT
END OF PERIOD
STATS REQUESTED
FOR THIS TIME
PERIOD
END OF
TIME HORIZON
Figure 5-6 Subroutine MICRO Flowchart (cont.)
5-53
-------
©
START EMISSIONS LOOP
CALL FIT
TO CURVE FIT
EMISSION HISTORY
INTEGRATE EMISSION HISTORY
CALL FIT
TO INTEGRATE EMISSION RATE
DIFFERENCES BETWEEN BASE
AND TEST RUNS
INTEGRATE DIFFERENCE CURVE
TO GET TOTAL DIFFERENCE IN
EMISSIONS BETWEEN TEST AND
BASELINE PROGRAM
NO
YES
COMPUTE INTEGRATED DIFFERENCE
BASED ON LAST TIME PERIOD ONLY
CONVERT DELTA TO TONS/YEAR
CALL PLOT
TO PLOT EMISSION HISTORIES
c
RETURN
Figure 5-6 Subroutine MICRO Flowchart (cont.)
5-54
-------
Table 5-6 SUBROUTINE MICRO LISTING
en
en
en
18420
18430
18440
18450
18460
18470
18480
18490
18500
18510
18520
18530
18540
13550
18560
| 18570
18580
; 18590
18600
18610
18620
i 18630
18640
18650
18660
18670
18680
; 18690
i 18700
18710
13720
18730
18740
18750
18760
18770
18780
18790
18800
i 18910
: 18820
SUBROUTINE MiCRG (KILL
DIMENSION A(lb,3),B( 15,
COMMON /C'JMOl/ AM3
3) ,13 *M1 5,3
(3 ) , ALA3,
+ BAREA(3), 3LD1, BLD2,
+ BHIST(3,16), BMMIdO.l
+ ATABLEX(9,10,3) , AT ABLE Y (9, 10 ,
COMMON /COV02/
+ LARSY, C3SUM,
+ CINCON, CPCB, CP
+ CN(15,3,16),
+ CPART(10,15)
CC AD02
COMMON /COM03/
+ EMW( 3) , EP(10, 15)
+ FREOA, FRE06,
+ HORZM, HORZNY,
+ HPCd5,16),
+ HPS(6,15,16) ,
+ hPTCTS(16)
CC ADD3
COMMON /COM04/
- KSTART, KSTOP,
+ LIDLE, LINT(16),
+ MBASE, MPH,
+ MU( 10,3) , MMSdO,
CC AOD4
COMMON /COM05/
+ NINTR, NINTRB,
+ NPTRN, NPTS,
+ OCIY, OCMY,
CC AOD5
COMMON /CCM06/PARM(3,3
+ PC(15), PCS(IS),
+ PP{ 10,15), PS(6, 15),
+ PARdO,15,3),
+ PMl 10,15) ,
+ PSAd5) , PTA(5) ,
+ ,PAYFIN
COMMON /COM07/
+ RTYPE,
+ SALE, SALL,
AW, L)I
BSIG(3) ,
5,3),
3) , ASTABLXl
NT,
BXTRA,
9,6,3 ),
CA.^A, CARIY, CAP MY,
CCOEFdO) tCCOSTI, CCOSTM,
I, CPVPY, CSUM,
COEFB( 15,
DELPCV,
,EFF(13) ,
FPERC( 10,
HPCSd5,l
HPT(5,16)
ITE,
LOPT, LP
LPSPP( 10)
MSPEC(IO)
15) ,
NAME(50),
NMODE,
NSTEPS,
OPTI,
), PART,
PHK14) ,
PT(5),
PARl(iO,3
PPICKdO)
PCONF,
REINSP,
SALP,
3) ,
0 P ( 1 0 , 1 5 ) ,
OELITO),
3) ,
6) ,
ITL,
ICKdO),LLP
,LSTART,
,MSTART,
MVPR( 10,
NCNTR,
NO,
NTR,
OPTM.GPTS (
PAYNES,
PLOt 14) ,
COEFBPt
DEL EM (3
HPPdO,
HPTOT (1
ICK,
LSTOP,
MSTOP,
15)
NEMIS,
NOPTS,
NTRB,
50) ,OVC
PAYU
PLTMAXt
PTUT, PTS(5),
.3), PLUS<10
,PPPICK,PSTAR, PI (1
PAR I NT ( 10,
RNAME,
SITEI,
10,9)
RSIZE,
SIT EM,
BSIZE,
AST ABLY (9, 6, 3}
CARPQP(16) ,
CGTT,
CA»AY,
10,15),
,16) ,OELI (3) ,
15,16),
6),
ITIV,E( 16),
NEMP,
NPAR,
;MPICK( 16) ,
HI(3),OVCHM(3)
FF(3) ,
?) , PMUDEL,
PAYADJ »
,15) ,
5,10) ,
RSTOP,
SLANE,
-------
Table 5-6 SUBROUTINE MICRO LISTING (cont.)
en
in
en
18830
18h40
IP850
1PP60
18B70
18880
18890
18900
18910
18920
18930
18940
18950
16960
18970
18980
18990
19000
19010
19020
19030
19040
19050
19060
19070
19030
19Q90
19100
19110
19120
19130
19143
19150
19160
19170
19180
19190
19200
19210
19220
19230
19240
__ . ._ + SM'JOEL, START(15
* SCALtb'M 3) ,
+ SXoUT(6,3),
+ SIGKE(IO),
+ SIGRAT5, SIST,
+ STABLEX(33,6,15) ,
COMMON /COM1CV
+ TINT, TOoP(3),
+ TXTRA, TSIZE,
+ THI ST(5 ,3,16) ,
+ TIMEM( 10,15) ,
CC ADD10
COMVCN /COM11/
"+"" x'lBP(3, 3,6) ,' x'lNT,"
* XTM(16) , XiiASE(9,
CC AOD11
COMKCJN /COM12/
+ YES, YSUM,
+ 21, Z2f
+ Z7, 28,
«- ,7 1 3 , 714,
+ ZCAKI, ZLARM,
+ 72(3,3)
CC ADD12
COMMON /DEBUG/
+ LDEBUG, MDE3UG,
CC ADDO
R E AL I T E ,
+ MMSt MPH,
+ NAME, MO,
+ IN, MISFIRE
INTEGER RNAME,
+ TDIST, XLAMEt
THISTT( l,l)=THISTT(2tl
DO 20 I=1,NEMIS
DU 20 JJ=1,NPTRN
TH=0
T=0
DO 10 K=1.NCNTR
J=JJ+5*(K-1 )
CN( J, I , 1) = START( J,I )
TH=TH+START(J,I )*TPER(
, 3) , STAT
S "i<5,l 5
SIG( ID,
SIG^^El
SIGS(i.
STABLE
T AREA13
TDNX,
T S I G ( 3
THloTK
TAdLEX(
J K 1 3 ) ,
xi"a
j) , Y3ASEI
Y1BP(3,
YTM(lt>)
23,
Z9,
215,
Z 1C,
AUEBUG,
PDEBUG,
ITL,
MSPEC,
LDEBUG,
SITEI ,
QPTI,
)=THISTT(
1, J )
, s T i M e (
) .
3) ,
13),
,15) ,
Y( 33 ,6, IS)
) , T D I S T ( 1 0 ,
TOTt (3) ,
), TPER(16,
3 , 1 o ) ,
33,10,15) ,
§T" "~XLANE,
9,3)
J , 1 0 ) ,
Y1D6P(
Z4,
Z10,
Z16,
ZSUM,
BDEBUG,
JDE6UG,
ITP,
MU,
MDE6UG,
S ITEM,
PPICK,
3, 1)=0.
3J , SUMR
SPAR( 13
SIGCL
SIGP( 10
S1GSOE
3) .T lULt
TPUB( 3)
15), TM
TIMECU
TABLEY
XSUM
Y2BP( 3,
4,4, 10)t
25,
211 ,
Z17,
CDEBUG,
S DEBUG,
ITIME,
MVPR,
STAT,
PPPICK
,-1(3), . __
,15,6),
(3) ,
, 15) ,
(3),
,TIMEI ( 3 , 16) ,
, TPOT13),
11(16,15),
0,15),
(33, 10,1 5)
/"x'CJTffo'f 3~f,
3,10),
Y2DBP(4,4,10) T
26,
212,
DDE8UG,
TDEBJG
-------
en
en
1
;.... '"' 19250
19260
19270
19280
19290
19300
19310
19320
19330
19340
19350
19360
19370
19380
19390
19400
19410
19420
19430
19440
19450
19460
19470
19480
19490
19500
19510
1952G
19530
19540
1955C
19560
19570
19530
19590
19600
19610
'19620
19630
19640
19650
19660
Table 5-6 SUBROUTINE MICRO LISTING (cont. )
T=T+TPERll, J)
10 CONTINUE
TH1ST( JJ,I,1)=TH/T
THISTT(I,l)=THISTT(I,l)+ThIST(JJ,I,l)*(TPER(l,JJ)
+ +TPER (l,JJ+5)+TPEK(l,JJ+10))
DO 20 K=IT(\JCNTR
J = J J+5*(K-1 )
A( J,I )=0.
20 CONTINUE
TF(MDEBUG.FQ.YES) WRITE (6,505)
505 FORMAT! 1H1, 10(7) f35X,50
-------
Table 5-6 SUBROUTINE MICRO LISTING (cont.)
19630
19o90
19700
19710 C:
10720 C:
19730 C:
19740 C:
10750
19^60 23
10770 24
19780
19790 C:
19800 C. :
19810 C:
19R20
19830
19840
19850
19860
19870
19980
19890 25
19900
19910
19920
19930 30
19940
1 9950
1P960
19970
19983
19990
20000
20010 35
20020
20030
20040 4D
20050
20060
20070
20080
no 23 1=1,3
IF(TPER(N,J) .LT. 0.108/5.) GOTO 23
IF{ A( J, IJ.LF.O. ) GOTO ?3 . .. ...
THE A ARRAY IS A DELTA E ARRAY. THERFORE, THE
STARTING VALUE IS ZERO.
A(J,I)=A(J,I)*(TPER(N-l,J)-.108/b.)/TPER(N-l,J)
CONTINUE
CONTINUE
DO 50 JJ=1,NPTRN
START THE POWER TRAIN LOOP.
PART=PART + TPE°. (1,JJ)+TPER(1,JJ*5)+TPER(1,JJ-HO)
IF(MDEBUG.EJ.YES) WRITE (t>,25) TIME
CALL PDECAY(JJ.N)
CALL EDECAY( A.fl, JJ.N)
CALL TFST(JJ,N)
CALL MA I NT (6, DM, J J , N )
FORMAT < 1H1,40X,*CEBUG MICRO*// 38X ,*T IME DURATION IS *,
+ F5.1* MONTHS*)
IFd-1DE8UG.EO.Nlj) GO TO 50
LvRITE (6,30) NAML(JJ-HO)
FORMAT ( 1H1,40X,AS// ,
+ /,35X,*A EMISSION DELTA BEFORE DECAY*/
+ 35X,*B EMISSION DELT4 AFTER DECAY*/, 35X,
+ *C EMISSION DELTA AFTER DECAY AND MAINTENANCE*/)
DO 40 I=1,NE-IIS
VnRITt (6,35) NAMEt I ) ,NAME(4) , ^IAME(5 ) ,NAME(o) ,
+ AIJJ, I),A(JJ + 5, I } , A( JJ-HO, I) ,3(JJ, I),8(JJ+5,I) ,
+ B( JJ + 1C, I) ,BM< JJ, I ) ,Bi1( J J + 5,I i ,BM{ JJ-HO, I)
FORMAT (/,40X,A2t* cMISSION DELTA*,/,
+ / ,26X,A8,12X,A8 ,12X ,A8 , / / , 18X, *A * , 3 { 5X, El 5.4) ,
+ /,16X,*b *,3(i)X,E15.4)/, 18X,*C * , 3 ( 5X, El 5. 4) / )
CJNTINUC
IF (RTYPE.EO. SHOOED CALL PR1NT5(
f SM.50HMEAN VALUE OF THE MODE EMISSIONS
+ ,S IGS.50HSIGMA VALUES OF THE MODE EMISSIONS
-------
Table 5-6 SUBROUTINE MICRO LISTING (cont.)
01
vo
20090
20103
20110
20120
20130
20140
! 20150
20160
20170
20180
20190
i 20200
20210
20220
20230
20240
20250
20260
20270
20280
20290
20300
! 20310
20320
20330
20340
20350
20360
50 CGNTINUF
,NN = 3*NPTRN
00 55 J=1,NN
00 55 I=1,NEMIS
55 A( J,I ) = BM( J,I)
TIME=TINT*(N-1)
ISil=N-l
IF(MDEBUG.EO.YES) CALL PRINT3(
+ PM.50HPM - PARAMTER MEAN VALUES AFTER PDECAY
+ , PLUS.50HPLUS PARAMETER CHANGE DECAY AND MAINT
+ )
IF{N,NE.NPICK(L1M GO TO 100
L1=L1+1
CALL STATS(N.l)
100 CONTINUE
00 150 I=1,NEMIS
CALL FIT(THISTT,NTRtCCl,CC2»CC3,I )
T AREA (I )=(CCl*XINH-CC2*XINT**2/2.+CC3*XINT**3/3.) *
*TINT*M8ASE
CALL FIT(DELEM,NTR,D01,OD2,D03, 1)
DELHI } = (001*XINT+DD2*XINT**2/2.+
+ DD3*XINT**3/3. ) *TI NT*MBASE*CARPOP( 16)
IFCNPICK(l) . EO.NTR) DEL I ( I )=OELEMt I ,NTR)*MBASE*TINT*CARPOP{ NTR)
DELITd ) = DELHI)/CGTT
CALL PLOT(THISTT,8HIST»NTR,TXTRA,7t 0, T INT,0. » PLTMAX ( 1 ) , I)
150 CONTINUE
999 FORMAT(lHl)
RETURN
20370
END
-------
G>
(^SUBROUTINETEsf)
INITIALIZE ALL
STORAGE AND
SUMATION
ARRAYS TO ZERO
PTOT=PTOTS = PTOTA
PARAMETER MODEL)
INITIALIZE K DO
LOOP FROM KSTART
TO KSTOP
(CONTROL TYPE)
= JJ +5x (K-l)
INITIALIZE M
LOOP FROM
MSTART TO MSTOP
(PARAMETER)
©
Figure 5-7 Subroutine TEST Flowchart
5-60
-------
TDIST(M,J) -
THIS PARAMETER
USED
EP=AREA (1)
COMPUTE PARAMETER XP(X)
i
PP = AREA
COMPUTE
FRACTION
(0)
REJECTED
(PARAMETER)
CALL PMAINT
PERFORM MAINTENANCE
ON THE PARAMETER
DISTRIBUTION
PP
NO
>>S YES
fr
pp = l
-------
220
NO
-©
NO
Figure 5-7 Subroutine TEST Flowchart (cont.)
5-62
-------
300
SIGNATURE MODEL
INITIALIZE K LOOP
FROM KSTART TO KSTOP
(CONTROL TYPE)
J = JJ +5* (K-l)
INITIALIZE L LOOP
FROM LSTART TO LSTOP
(MODE EMISSION TYPE)
= L + 10
PS - AREA (0)
REJECTED FRACTION
OF MODE EMISSION DISTRIBUTION!
350
INITIALIZE M LOOP
FROM MSTART TO MSTOP
(PARAMETER)
Figure 5-7 Subroutine TEST Flowchart (cont.)
5-63
-------
TDIST (M,J) =
THIS PARAMETER
USED
NO
YES
L = LPSPP (M)
L IS THE MODE EMISSION
ASSOCIATED WITH THE
M'TH PARAMETER
NO MODE EMISSION
ASSOCIATED WITH THE
M'TH PARAMETER
MOVE: XIBP (K, L) - XDM
YIBP (K,M)-YIDUM
Y2BP (K,M)-*Y2DUM
360
PP = FUNI (PS, XDUM, YIDUM)
LOOK UP PARAMETER REJECTION PERCENTAGE
BASED ON EMISSION REJECTION PERCENTAGE
PP = min (PP, PS)
CHECK PP > 0
Figure 5-7 Subroutine TEST Flowchart (cont.)
5-64
-------
0
MVPR = FUNI (PS, XDUM, YDUM)
LOOK UP PARAMETER MEAN REJECTED
VALUE BASED ON MODE EMISSION
REJECTION PERCENTAGE
NO
YES
EP = AREA (1)
COMPUTE EXP XFOR
THE ICO PARAMETER
pp = ps = AREA (0)
RECOMPUTE REJECTION FRACTION
BASED ON ICO PARAMETER
DISTRIBUTION
RECOMPUTE
MVPR = EP/PP
Figure 5-7 Subroutine TEST Flowchart (cont.)
5-65
-------
NO
EP = AREA (1)
RECOMPUTE EXPECTED
REJECTED VALUE FOR
MISFIRE PARAMETER
PP = AREA (0)
RECOMPUTE REJECTION
FRACTION BASED ON
MISFIRE ALGORITHM
NO
RECOMPUTE
MVPR = EP/PP
COMPUTE
EP = MVPRxPP
FOR ALL PARAMETERS
DP = PS - PP
Figure 5-7 Subroutine TEST Flowchart (cont.)
5-66
-------
CALL PMAINT
TO PERFORM PARAMETER
MAINTENANCE
PARAMETER AND
SIGNATURE MODELS
SET DUM 1 AND
DUM 2 ARRAYS TO
ZERO
107
MOVE PP - HPP (N)
PC = UNION (PP)
COMPUTE UNION OF PP'S
OVER M
MOVE PC (J) (THE OVERALL
REJECTION RATE) INTO HPC (J, N)
AND DUM 2(K)
120
Figure 5-7 Subroutine TEST Flowchart (cont.)
5-67
-------
0
AVERAGE PC OVER CONTROL
TYPES, STORE IN HPT (JJ, N)
PTOT = PTOT + HPT x TTTTT
SUMMING FOR TOTAL REJECTED RATE
HPTA = 0
HPTOT (N) = PTOT FOR PRINTOUT
G>
101
INITIALIZE K LOOP
FROM KSTART TO KSTOP
= JJ+5x(K-l)
INfTIALIZE M LOOP
FROM MSTART TO MSTOP
XTM = XTM + TIMEM x PP x TPER
+ TIMECx PS x TPER
COMPUTE AVERAGE USER TIME
REQUIREMENT BASED ON
APPROPRIATE REJECTION RATES
(PS = PP + DP). TIME=TIME +
MAINTENANCE TIME +
INSPECTION TIME
XTM = XTM + TIMEM x PP x TPER
COMPUTE AVERAGE USER TIME
REQUIREMENT BASED ON THE
REJECTION RATES AND MAIN-
TENANCE TIME FOR EACH
PARAMETER
Figure 5-7 Subroutine TEST Flowchart (cont.)
5-68
-------
YES
MOVE PS - HPS (N)
MOVE PS DUM1
PSA = UNION (DUM1)
COMPUTE UNION OF PS'S OVER L
AFFIRM PSA* 0
STORE PSA HPCS (N)
475
AVERAGE PSA OVER CONTROL
TYPES. STORE IN PTS (JJ)
PTOTS = PTOTS + PTS x TTTTT
SUMMING FOR TOTAL MODE EMISSION
REJECTED PERCENTAGE
STORE PTOTS IN HPTOTS FOR PRINTOUT
0
Figure 5-7 Subroutine TEST Flowchart (cont.)
5-69
-------
PRINTOUT TEST DEBUG
DATA INCLUDING ALL
REJECTION RATES, MVPR'S
UNIONS, ANDTDIST
RETURN
RETURN
Figure 5-7 Subroutine TEST Flowchart (cont.)
5-70
-------
Table 5-7 SUBROUTINE TEST LISTING
20380
2C390
20400
20410
20420
20430
""" 20440
20450
20460
20470
20480
20490
20500
20510
20520
20530
2054C
20560
20570
20580
20590
20600
20610
20620
20630
20640
20650
20660
20670
20680
20690
20700
20710
20720
20730
20740
20750
20760
20770
20780
SUBROUTINE TESHJJ,N)
DIMENSION! DUMK 10) ,UIK2
DIXENSICM XDUM(3) ,Y10UM
(3 I ,011
(3) ,Y2
COMMON /CL.M01/ AMB(3),AL
+ BAREA(3), BL01, BL02,
+ RH 1ST (3, 16), 3f-MI(
" " + AT A6L>T(9,ToY3)", ATABLEY(9
COMMON /COM02/ CAKA,
+ CARSY, CBSUM, CCOEF
-»- CINCGN, CPC3, CP
+ CN(15,3,lo),
+ CPART(10,15)
CC ADD2
COMMON /CQM03/
+ E M W ( 3 ) , E P ( 1 0 , 1 5 )
+ FRECA, FREQ8,
+ HORZN, HORZNY,
+ HPC(15,16),
+ HPS (o, 15,16) ,
+ HPTOTS(16)
CC ATD3
COMMON /COM04/
+ KSTART, KSTGP,
+ LIDLE, LINT(16),
+ MBASE, MPH,
+ MU(10,3), MMSdO,
CC AOD4
COMMON /COM05/
+ NINTR, NINTRB,
+ NPTRN, NPTS,
CC ADDS
COMMON /CQM06/PARM{3,3
+ PCJ15), PCS115),
+ PP( 10,15), PS(6, 15),
+ PAR (10, 15,?) ,
+ PSA ( 15) , PTA(5),
* .PAYFIN
COMMON /COM07/
+ RTYPE,
It
COEFB
1i(3
JUM(
Aij
10
,1
(1
(
UELPCV
,EFF( 10
HPCS(
HPT (5
ITE,
LHPT,
LPS°P
15) ,
NA.MEt
NMOOE
NSTEP
) , PA
1
,
(
(
1
,
)
5
i
i.
i
~
50
,
5 ,
RT
PHH14)
PT{5) ,
PARK 10
PPICK
PCONF
{
»
REINSP
1
,
,
,1
0,
0)
CP
5,
,
)
3) ,Y1DUUM(
AW, B
B S I G ( 3 ) ,
5, 3) ,
3) ,ASTABLX
CARI Y,
,CCOSTI,
3,3)
,Y
INT,
BATRA
(9,0,3
CAKMY
CCOST
VPY, CSUM,
3) , COE
0 P < ! 0 , 1 5 )
JELIT(3),
,16) ,
o)
LP
0)
0)
),
t
f
,3
0)
,
,DEL
HPP
HPT
ITL, IIP
IC!«10),LLPICK
,LSTART, LST
, v»ST ART,
N'VPR( 10
NCNTR,
NO,
NTR,
GPTM,OPTS
PAYNEW
PLU( 14),
PTOT,
,3) ,
,15)
NEM
NQP
(50)
T
2'JUU/H
,
) ,
FBP(
EM
(3
6
ASIA
C
C
3,3)
SIZE,
BLY< 9,o,3 )
ARPQPU6) ,
GTT,
CARAY,
10, 15) ,
,16}
,DEL H3),
(10, 15,16) ,
OT
f
»
OP
OP
IS
TS
U
'
,
,
,nvc
PAYO
PLTMAXf
PTS(5),
PLUS( 10
, "PPICK, PSTAR,
PARINT{ 10,10,
KNAME,
RSI
PI
9)
ZE
(1
,
6),
I
TIME( 16),
NEMP,
NPAR,
NPICM 16),
HH3
FF(3
),OVCHM(3)
),
3),PMODEL,
PAYAOJ ,
,15) ,
5,10
R
) ,
STOP ,
-------
Table 5-7 SUBROUTINE TEST LISTING (cont.)
20790
01
i
»j
ro
20800
20810
2C8_2p_
"20830
20H40
20850_
20860
20870
_2J°_?JP_
20890
20900
20910
"20920"
20930
20940
20950"
20960
_20_970_
2~0980
20990
J1000
2*1016"
21020
J5-J30
21040"
21050
210?Q
YioTo"
21080
21_090
" 211OO"
211 n
_2_112_0
21130
21140
2_1_15Q_
"21160
21170
21180
21190
21200
SALE
S MODEL,
SCALEBM(3),
SXCUT(6,3),
SALLi
START
CC
+ SIGME(IO),
+ SIGRATE, S1ST,
* STAflLEXt33,6,15
COMMON "/CUMIO/
* TINT, TOBcl
* T_X TJRA_»___ T_S IZ E
+ THIST(5,3Tl6)Y
+ TIMEM(10,15),
A0pj.0_
COMMUN /CGM11/
+ XlflP(3,3,o),
±_ ^JL^U-^LL XUASE
"cc"Abo"ii " "" " "
COMMON /COM12/
+ YES, JSUM,
12,
Z8,
Zl.^«
ZC ARM
(15
L»
3),
_SlJ_E_I_i
STIMEC
SALP,
3) , STAT,
5^(6,15),
S 1^(10,3), _
"SIGMNEl 10) ,
SIGS(6,15) ,
STA3LEY(33,6. 15) _
TAREA(3), TDISTt10,
SITEM,
.SLANE,
3) , SUM6M(3) ,
SPAR(13,15,6),
5 IGCE(3) ,
SIGP( 10,15) ,
SIGSOE(3),
TONX,
JSJGJJ.)^.
~THI STT(3 ,:
TAoLEX(33
3) ,T IDLE.TIMEI(3,16),
fOTE(3), TPDB(3), TPDT(3 ),
TPER ( 16^L5J_, TMIL( 16,15) ,
6), TIMEC(10,15),
10,15), TABL£Y(33,10,15)
XINT,
wF( 10),
XINTb,
),Y3ASc(9,3)
XLANE
XSUM, XCUT(10,3),
Zlt
Z7,
_Z 1_3 ,_ _
Z'CARI,"
ZZ(3,3)
YlbPt 3,3,10), Y2BP( 3, 3,10) ,
YTM(lo) , YlDBP(4,4,10).Y2DBP(4,4t10)
Z6,
Z3,
J. 1 b_»-
ZIC,
Z4,
Z10,
Z_IA? _
ZSUM,
Z5,
Zll,
Z17,
Z12
CC A0012
CC
+
4DOD
COMMON /DEBUG/
LDEBUG, MOE6UG,
'REAL
+ MMS,
_+_ NAME,
< " I~N,
INTEGER
+ __TDI_ST,_
" PA'RAMETQR MODEL
DO 5 I=1,NEMIS
DO 5 K^l.NCNJR
TTE',~"
MPH',
NO,
'MlSfik'E"
RNAME,
XLANE_,
ADE3UG,
P L) E 8U G,
TIL,"
MSP EC,
L_D_E_BUG_,_
SITEI,
OPTI,
liDEBUG,
QDEBUG,
CDEBUG,
SDEBUG,
ODEBUG,
TDEBUG
ITP,
,«iU,
MDEttUG,
ITIME,
MVPR,
SITEM,
PPICK,
STAT,
PPPICK
DO A_!'=JL!_N_PAR
uUMl(M)=6."
OP(M,J)=0.
-------
Table 5-7 SUBROUTINE TEST LISTING (cont.)
FP(M.J)=0.
OJ
21220
21230
21240
21250
21260
21270
21280
2129Q
21300
21310
21320
21330
21340
21350
21360
21370
21380
2 1 39 0
21400
21410
21420
21430
21440
21450
21460
21470
21480
21490
21500
21510
21520
21530
21540
21550
21560
21570
21580
21590
21600
21610
21620
5
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
CC
100
220
PPIM, J)=0.
PCU)=0.
MVPR(M, J)=0.
DO 5 L=1,NMQDE
PS( L, J)=0.
CONTINUE
PTt JJ)=C.
IF(JJ.EO.l) PTOT=PTOTS=PTOTA=0.
IF(RTYPE.EQ.SMODEL) GO TO 300
ENGINE PARAMETERS
M=l DELTA CO
M=2 DELTA RPM
M=3 DELTA TIMING
«=4 MISFIRE
M-5 NOX CUNTRQL
M=6 AlftPUMP
M=7 PCV
M=8 AIR CLEANER
M=9 VACCUUM CHOKE KICK
M=10 CHCKE BLADE SETTING
L = 1 HC - IDLE
L = 2 CO - IDLE
L = 3 NO - IDLE
L = 4 HC CRUISE (45)
L = 5 CO CRUISE (45)
L = 6 NO CRUISE (45)
OPT] - 1 INSPECT PARAMETERS 123
- -2 INSPECT PARAMETERS 12345
- 3 INSPECT PARAMETERS 123456789 10
DO 220 K=KSTART,KSTOP
J=J J+5=MK-1 )
DO 100 M=MSTART,PSTOP
IF( TDIST(M,K) . NE.l > GOTO 100
EP(M, J)=AREA(ltMtJ«KTN)*PI ( J,M)
PP(M, J)=AREA(0,M,J,K,N)*?I ( J,M)
CALL PMAINT(0,M, J,K,N)
PP(M, J)=AMIN1(PP
-------
Table 5-7 SUBROUTINE TEST LISTING (cont.)
01
21630
21640
21650
2 I 663
21670
21680
21690
21700
21710
21720
21730
21740
21750
21760
21770
21780
21790
21800
. 21810
21820
21830
21840
' 21850
21860
21870
21880
21890
21900
21910
21920
21930
21940
21950
21960
21970
21980
21990
22000
22010
22020
22030
22040
GLJ TO 250
300 CONTINUE
DC 400 K=KSTART,KSTOP
J=JJ+5*(K-1)
DO 350 L=LSTART,LSTOP
LL=L+10
PS(L,J)=AREA(0,LL, J,K,N)
PS(L,J)=AMAXKPS(L,J),0.)
PS(Lt J)=AMIN1(PS(L,J) ,1.)
353 CONTINUE
DO 375 M=MSTART,I«STOP
IF(TDIST(M,K).NE.l ) GOTU 375
L=LPSPP(M)
IF(L.EJ.O) GO TO 375
DO 3oO 11=1,3
XDUM( I 1J=X1BP( I 1 ,K,L)
Y1DUMC I1)=YIBP( I 1,K,M)
Y2DUM( I1)=Y28P( I 1,K,M)
360 CONTINUE
PP( M, J)=FUM(PS(L, J) ,XJUM ,Y1UUVI,3)
PP(M, J)=AMIN1(PP(M, J),PSl L, J) )
IF(PP(M,J).LT.O.) PP(M,j;=0.
MVPR(M,J)=FUN1(PS(L,J) , XDUM, Y2DUM, 3 )
IF(M.EO.l) EP(M, J)=AREA(1 ,M,J,K,N)*PI(J,M)
IF(M.EQ.l) PP(M,J)=PS(2,J)=AREA(0,ltJ»K,N)*PI(J,M)
IF(M.E0.1.AND.PP(M,J).GT.l.t-5) MVPR (M, J) =E P{ M, J) /PP ( M, J )
' IF(M.E0.4) EP(M, J)=AREA(1 ,M, J ,K ,N)*P I ( J,M)
IF(M.E0.4) PP(M,J)=AREA{0,MfJ,K,N)*PI(JfM)
IF(M.E0.4.AND.PP(M, J).GT.l.E-5) MVPR{ M, J) =EP( M, J J /PP (M, J )
EP(M,J)=PP(M,J)*MVPR(M, J)
DP(M,J)=PS(UJ)-PP
-------
Table 5-7 SUBROUTINE TEST LISTING (cont.)
22050
22060
22070
22080
107
22090
22100
22 np_
'22120
22130
22140
110
120
NL)_=0.,
CONTINUE
DO 120 K=KSTART,KSTOP
J=JJ+5*(K-1 )
DO 110 M=1,NPAR
HPP(M,J,N)=PP(M»J)
_PUM1 (_M ) = P_£iM ,J )
PC(J)=u₯lON(DUM1,NPAR,1)
HPC(J,N)=PC(J)
DUM2(K)=PC(J)
22150
22160
_22_17_0_
22180
22190
22200
tn
i
vl
en
22210
22220
22230
22240
22250
_2_2260_
22270
22280
2_2290_
"22300
22310
22320
22330
22340
22350
22360
22370
22380
22390
22400
_2_241_0_
22420
22430
22440
22450
22460
HPT{JJ,N)=PCUJ)*TPER(N,JJ)+PC( J J + 5 ) *TPER(N,
*,JJ-«-10)
TUIIflPJ R (J1»_J J >_±IfLiEiil'_JjJ + 5.LtI PER(NtJJ-HO)
IF( TTfTT.GT.lO.E-10) HPT( j"j,N ) =HPT ( J J , N) /TTTT T
PTOT=PTOT+HPT( JJ,N)*TTTTT
HPTOT (N)=PTOT
JJ + 10) *TPER(N
DO 55 K=KSTART»KSTOP
00 55 M=MSTART,MSTQP
IF(RTYPE.EQ.SMODEL)
XTM
-------
Table 5-7 SUBROUTINE TEST LISTING (cont.)
tn
i
.i2.47_CL . eUJjLJAijro] _ _.
22430 510 FiTR^AT (40X,*DE!5UJ -- TEST*)
774=10 wRITE (6,520)
77500 _ j>20_f_J_RMA_T I//,40X,*V AK I_AcLE - A_ - P£ ' > A D I L I T Y_ *
22510 -» VptK PARA'VETER " PP*/ 4: X , *V A4 I A8L t - o - EXPECTED *
22523 + , *VALUE PER PARAMETER -- EP*/40X,*VARAIbLE - C - *
22531 + ,_*.V^A_N VALUE OF THE _KQ.J ECT ED JARAMETER MVPR*t/
22540 ' " *- 40A,*VAR I A3LE" - J - P:S '- J'P ( S I GNA TURE ONLY)*)
22550 /JRITE (6,530) J J ,NAME( J J* 10 ) , ( J , J=l , 10 )
22560 _ ___ 53 J. .FCJ^VATjy ,4 OX , *P_J>i KT.\A I \* , I 3,* .-^ _1». ^lO.//
27580 Ou 550 K = Kb TAR T , K.STOP
22590 J = JU+5* (K-l ) _ _
22600 " "" WRITE (6,540) ': AXE ( K -t-b ) , (PP (^ , J )", M'= 1 ,1fc ) ,
22610 * ( EP( M, J) ,;^1,10) , MVPKC-1, J ) , 1=1, lu ) , ( UPM, J) ,M = 1,10)
22620 54C:±ORMAT ( /j A 3,* A* , 1 OE 1 3. Z/8X , * }* , 1 3 E 1 0 . 2 / 8X ,_* C * , JO E
72630 " "+ XrfxT* U*.10E10.2/)'
22640 550 CONTINUE
22650 __ IF_(_JJ.EC._5_) WHITE (5,570) tHC(J),J=lt15)t(PT(Jj),JJ =
226t>0 + ,XTM(N) ,YTM(.s) , PTQTS "
22670 l;70 FORMAT(/,* PC = */ 10X , 5 El 2 . 5/ J.OX, 5E 12. 5/10X , 5E1 2. 5/ /
72680 _+ * PT _= */ 10X, 5E1^. 5/* PToT = *E12.5/,* XTM = *,
226QQ" " """« ti'5".~5,5xV*YTM = *E15.^/,* PT JTS~="*E1 S'Vs')""""
22700 vVRI TF (6,580) TO 1ST
72710 __ _ 560 FORMAT (// , 3_OX, *TDI ST*,/_3( _5.X_t 101 5/)_,_/_/_)
72770"' " "" 99v"FORMAT( 1H1) " - - - -- - ----- -
22730 KETUkN
2274^ EN)
-------
5.7 MAINTENANCE ROUTINES
The maintenance routines estimate the effects of a specific main-
tenance treatment on the emission and parameter distributions. Estimates
of the emission reduction achieved from maintenance are based on the
influence coefficients and garage efficiency factors. Subroutine MAINT
computes the adjustment in average emission rates based on maintenance,
while subroutine PMAINT updates the parameter distributions.
5.7.1 Subroutine MAINT
Subroutine MAINT computes the reduction in the average vehicle
emission rate based on the maintenance of parameters which were rejected
by inspection. MAINT computes, for each control type, DELB, the effect
of voluntary maintenance on emission rates and DELT the effect of
mandatory maintenance. DDI, developed in Function EINT computes the
impact of engine parameter on emission rates. MAINT subtracts DELB,
DELT and DDI from the average emission rate A to compute AM, the post
maintenance emission rate. MAINT then averages and summarizes the
emission rates in the CN array for later use in MICRO. The THIST and
THISTT matrices are updated and averaged for printout, curve fitting
and plotting in MICRO.
Table 5-8 contains a complete listing of subroutine MAINT while
Figure 5-8 documents its techniques and variables in an extensive flow-
chart.
5.7.2 Subroutine PMAINT
Subroutine PMAINT updates the parameter distributions based on
maintenance treatment. Input to subroutine PMAINT are XOPT, M, the
parameter number, J the control-power train type, K the control type
5-77
-------
(
SUBROUTINE MAI NT
INITIATE I DO LOOP
FROM ONE TO THE
NUMBER OF EMISSION
SPECIE
SUMI -0
INITIATE K DO LOOP
FROM KSTART TO FSTOP
J = JJ+5 * (K-l)
DELT = DELB=0
INITIATE M LOOP
FROM 1 TO NPAR
DELB = DELB + TINT X PAR X FPERC X (1-PP)/12
VOLUTARY MAINTENANCE CONTRIBUTION TO
EMISSION REDUCTION. FPERC * TINT/12 IS
THE AMOUNT OF VOLUNTARY MAINTENANCE
NORMALLY TO PARAMETER M IN THE TIME PERIOD
BDEL(M) =DELB FOR PRINTOUT
DELT = DELT + PAR X MVPR X EFF X PP
MANDATORY MAINTENANCE CONTRIBUTION
TO EMMISSION REDUCTION
TDEL (M) = DELT FOR PRINTOUT
END
OF PARAMETER
LOOP (M)
Figure 5-8 Subroutine MAINT Flowchart
5-78
-------
DDDI=0
NO
YES
DDDI = EINT (I)
SECOND ORDER PARTIAL
CONTRIBUTION TO EMISSION
REDUCTION
AM = A - DELB - DELT - DDDI
POST MAINTENANCE EMISSION LEVEL
(AM)( EQUALS PRE-MAINTENANCE LEVEL (A)
MINUS THE EFFECTS OF MAINTENANCE
AVERAGE AM AND A AND DECAY
THE RESULT TO THE END OF THE
TIME PERIOD USING THE APPROPRIATE
DECAY RATE (COEFB (J, I) ).STORE IN S
AVERAGE S OVER CONTROL AND
POWER TRAIN TYPE. SUM IN SUMI
STORE ACTUAL EMISSION LEVEL AT
END OF PERIOD (S + START) IN CN
Figure 5-8 Subroutine MAINT Flowchart (cont.)
5-79
-------
'PRINTOUT MAINTENANCE
FACTORS FOR EMISSION
SPECIES I
7
NO
-©
YES
FILL PERMENANT EMISSION
PROFILE ARRAYS BY NORMALIZING
SUMI AND STORING IN THIST (JJ, I, N)
THISTT = THISTT + SUMI
FOR OVERALL EMISSION RATES
LAST
TIME PERIOD
AND LAST POWER
TRAIN AND
TXTRA
>.05,
YES
NO
INTERPOLATE BETWEEN LAST TWO
THISTT POINTS TO GET CORRECT EMISSION
LEVEL AT THE END OF THE TIME HORIZON
IN CASE THE SIMULATION DOES NOT END AT
THE END OF AN INSPECTION INTERVAL
END
OF I LOOP
(EMISSION
TYPE)
NO
Figure 5-8 Subroutine MAINT Flowchart (cont.)
5-80
-------
Table 5-8 SUBROUTINE MAINT LISTING
tn
oo
22750
22760
2277JL
22780
22790
_228qO_
228TO
22820
22830
"22840
22350
2 2J 6_0_
22870
22880
22890
"22900"
22910
22920
22930"
22940
_22950
22960"
22970
_2_2980_
'22990
23000
?_30iq
23020"
23030
SUBROUTINE ilAIMT (A, AM, JJ, N )
OIMEHSICN A( 15,3 ) , AM 15,3 ) , BOEL ( 1 0) , TO EL ( 10)
_ C J Mf'i J N / C0 M 0 1 / AM a ( 3 ) , A^AB ,_ A VJ^ , _ 6 I f1iv_U>\l /C_JM04/
Y KSTART, KSTQP,
+ LIOLE, LINK16),
+ (MBASE, MPH,
HPCSt 15,16) ,
HPT(5,16) ,
HPPdO,
HPTOTd
15,lo),
6),
_._
23050
23060
23070_
"2 30 8 6
23090
23iqp_
"23"llO
23120
_23130
23140 '
23150
CC ADD4
+
_ "*" _
"cc"~Abb"5~
MU (10 , 3 ) ,
_
MN'fk,"
f-.PTRN,
LCIY,
ny s'io , is ),
I IE, ILL, _IIP_t
LOPT, LPICK(IO),LLPICK,
LPSPP(IO).LSTAKT, LSTOP,
"1S_P- § Q tlO) ' !§ T_A_R T , _ MSTJj P ,
MVPRTlb,~15)
I TIME(16),
;^"lNf Rd,"
NPTS,
OCMY,
"NMODE,"
NSTEPS,
CPTI,
NCJNTTK,
"NO, "" '
MTR, NTR8,
OPTM.OPTS(50),OVC
NEMP,
N P AP ,
NPICM16),
HI(3),OVCHM(3)
COMXiON /COM06/PARM(3,3
+ PC(15), PCS(15),
+
+
PP( 10,15) ,PS(6
PAR (10, 15, 3),
P S A { 1 5 ) , P T A (
,15) ,
b) ,
), PART
PT(5)
PARK
PPICK
PCGMF
,
1
(
»
»
D,
10
PAYisiEW, PAY OF
PLQ( 14) , PLTMAX(
3
)
PTOT,
,3) ,
,P PPICK
PAR I NT
PTS(5
PLUS(
,PSTAR, PI
( 10, 10, 9}
),
10
(1
F(3) ,
3) ,P MODEL,
PA
,15)
5,10
YADJ,
,
) ,
+ .PAYFIN
__COM^G_N /CtJMOTV REINSP, RNAME, RSJZE , RSTuP ,
"+ R'TYPE, ~" " """" " "" "" " ""
+ SALE, SALLr SALP, SITEI, SITEM, SLANE,
-------
Table 5-8 SUBROUTINE MAINT LISTING (cont.)
0°
r\>
2316D
23170
23180
23190
23200
23210
23220
23230
232^0
23250
23260
23270
23280
23290
23300
23310
23320
23330
23340
23350
23360
23370
23380
: 23390
23400
23410
23420
23430
23440
23450
23460
23470
23480
23490
23500
23510
23520
23530
23540
23550
23560
23570
+ SMJOEL. START (_1 5. 3). STAT. <;TIMF<^)t MJMBMfU,
+ SCALEBM<3),
+ SXCUT(6,3),
* SIGRATE, SIST,
+ STARLEX(33,6,15),
COMMON /CQM10/
+ TINT, TOBE(3),
+ TXTRA, TSIZE,
+ TH1ST(5,3,16),
+ TIMEM( 10,15) ,
CC ADD10
COMMON /COM11/
+ X1BP(3,3,6), XI NT,
+ XTM116), XBASE(9,3i
CC 40011
COMMON /COM12/
+ YES, YSUM,
+ Z 1 1 Z 2 ,
+ Z7, Z9,
+ 713, Z14,
+ ZCARI, ZCARM,
+ 7Z(3,3)
CC AD012
COMMON /DEBUG/
+ LDEBUG, MDEBUG,
CC AODD
REAL ITE,
-I- MMS, MPH,
+ NAME, NO,
+ IN, MISFIRF
INTEGER RNAME,
+ TDIST, XLANE,
00 50 I=1,NEMIS
SUM 1 = 0.
DO 40 K=KSTART,KSTOP
J=JJ-»-5*(K-l)
D£LT=UtL3=0.
00 30 M=1,NPAR
UELB=DELB + TINT/12.*PARd''
S M ( 6 , 1 5 ) ,
SIG(13,3) ,
S IGM^c (ID),
SIGS(o,15) ,
STA8LEY(33,6, 15)
TA^tA(3), TO 1ST (10
TONX, TOTE(3) ,
THISTT( 3,15) ,
TABLEX( 33,10,15),
HF( 10) ,
XI.MTB, XLANE
) , YBASE(9,3)
Y13P(3,3,10) ,
YTM(16), Y10BP
Z3, Z4,
Z9, Z10,
Z15, Z16,
ZIC, ZSUM,
AOEBUG, 60EBUG,
PDE3UG, QDE8UG,
ITL, ITP,
MSPEC, MU,
LDEbUG, MDEBUG,
SITEI, SITEM,
OPTI, PPICK,
«, J, I)*FPERC(M,K)*(
8DELIM)=DELB
DELT=DELT+PAR«M, J, I ) *MVPR i M , J ) *EFF ( M) *PP( M
SPAR( 10
SIGCE
SIGP( n
SIGSOE
,3) ,TIDLE
TPDB( 3)
,15), TM
TIMECd
TARLEY
, XSUM
Y2BP( 3,
(4,4, 10),
Z5,
Zll.
Z17,
CDEBUG,
SDEBUG,
ITIME,
MVPR,
STAT,
PPPICK
l.-PP(M,J
t J)
, 15, o) ,
(3) ,
,15),
(3) ,
,TIMEI(3 ,16) ,
, TPUT(3),
1L( 16, Ib) ,
0,15 ),
(33, 10,15)
, XCUT(10,3),
3,10)t
Y20BP<4,4,10) ,
Z6,
Z12,
ODEBUG,
TOEBUG
-?:-;
) )
-------
en
00
CO
23580
23590
23600
23610
23620
23630
23650
23660
23670
; 23680
23690
i 23700
23710
23720
23730
1 23740
23750
23760
23770
23780
23790
23800
23810
23820
23830
23840
23850
23860
23870
Table 5-8 SUBROUTINE MAINT LISTING (cont.)
TDEL(M)=DELT
30 CONTINUE
DDDI=0,
IF(LOPT.E0.2) DDUI = EINT( I ,K ,J)
AM{ J, I ) = A(J, I)-DELB-DELT-ODOI
91 FCRMAT( 1X.F10.6)
SUM 1= SUM I -K S-t-STARTt J,I) )*TPfcR(N,J)
CN( J, I ,N) = S + START< J, I)
IF(MDEBUG.EQ.lMU) GO TO 40
WRITE(6,1234) ODD I
1234 FOPMAT(1X,E20.10)
WRITE (6,90)
90 FORMAT(/,50X,*DEBUG - MAINT EFFECTS SUMMED*)
WRITE (6, 100) NAME( I ) ,NAME(K + 3) , ( BOE L ( M ) ,M=1 , NPAR) ,
+ (TDEL(M) ,M=1,NPAR)
100 FORMAT(2X,A2,2X, A8 , * BASE*, 10E9. 2/ , 14X ,* TEST*, 10E9 .2)
40 CONTINUE
C:
C: FILL PERMENANT EMISSION PROFILE ARRAYS.
C: (INSIDE I LOCP)
C:
THISTf JJ,I,N)=SUMI/ (TPER(N,JJ)+TPER
-------
and N the inspection interval. Also input to PMAINT (via the common
block) are the parameter or mode emission distributions stored in
TABLEX, TABLEY, or STABLEX or STABLEY, respectively. Output from PMAINT
is returned through the TABLEX, TABLEY and STABLEX, STABLEY matrices.
Subroutine PMAINT first branches on parmeter or emission inspection
type. For parameter inspection the limits of the rejected population
are computed by reference to the LINT array which specifies upper and or
lower end rejection. The TABLEX and TABLEY arrays are moved into the
XBP and YBP working storage. For the emission case, since, for mode
emissions, the upper end is always rejected, the rejection limits are
set at the cutpoint and highest value in the STABLEX array, and the
STABLEX and the STABLEY data is moved into XBP and YBP.
For both the emission and the parameter case subroutine PMAINT
normalizes the parameter or mode emission distribution and calls AREA
to compute the rejected fraction. The portion of the distribution which
was rejected is then reduced by a factor of PI, the inspection efficiency
parameter. The vehicles that were rejected and, therefore, maintained
are then added back into the population at the manufacturer's specifi-
cation point. The distribution is then packed to discard long tail
ends and moved back into STABLEX or STABLEY or TABLEX, TABLEY.
Subroutine PMAINT provides debug output when the ADEBUG flag is
turned on.
Table 5-9 contains a complete listing of subroutine PMAINT while
Figure 5-9 displays graphically the PMAINT coding technique in a des-
criptive flowchart.
5.8 DETERIORATION SUBROUTINES
The Decay subroutines model the deterioration of emission rates,
5-84
-------
(^SUBROUTINE PMAINT J
NN = NSTEPS + 1
BRANCH TO A BLOCK OF CODE
DEPENDING ON PARAMETER NUMBER.
MODE EMISSIONS USE A PARAMETER
NUMBER EQUAL TO THE MODE EMISSION
NUMBER PLUS TEN
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
RPM
TIMING
MISFIRE
NOX CONTROL
AIR PUMP
PCV
AIR CLEANER
VACUUM KICK
HEAT RISER
HC-IDLE (MODE EMISSION
CO-IDLE (MODE EMISSION
NO-IDLE (MODE EMISSION
HC-45 (MODE EMISSION
CO-45 (MODE EMISSION
NO-45 (MODE EMISSION
NO.l)
NO. 2)
NO. 3)
NO. 4)
NO. 5)
NO. 6)
RETURN
RETURN
RETURN J
RETURN J
LOWER PAR
OF DISTRIBUTION
FAILED
Figure 5-9 Subroutine PMAINT Flowchart
5-85
-------
10
©
LOWER
PART
FAILED
50
UPPER
PART
FAILED
XLOR = TABLEX(1)
XHIR = XCUT
REJECTED INTERGRATION LIMITS
XLOA = XCUT
XHIA = TABLEX (NN)
ACCEPTED INTEGRATION LIMITS
XLOR = XCUT
XHIR=TABLEX(NN)
REJECTED INTEGRATION LIMITS
XLOA = TAB LEX (1)
XHIA = XCUT
ACCEPTED INTEGRATION LIMITS
TOO
MOVE TABLE ARRAYS
INTO BX, BY AND XBP,YBP
SIGNATURE
MODEL
LL = M- 10
XLOA = STAB LEX (1)
XHIA = SXCUT
ACCEPTED INTEGRATION LIMITS
XLOR = SXCUT
XHIR = STABLES (NN)
REJECTED INTEGRATION LIMITS
MOVE STABLE ARRAYS
INTO BX, BY AND XBP, YBP
170
©
Figure 5-9 Subroutine PMAINT Flowchart (cont.)
5-86
-------
190
SIGNATURE AND
PARAMETER MODELS
CALL NORM
TO NORMALIZE THE DISTRIBUTION
CALL INTEG
TO COMPUTE THE REJECTION PERCENTAGE
XHI = XHIA
XLO = XLOA
DELXH = (XHI - XLO)/NSTEPS
FIND LOCATION OF MANUFACTURES
SPECIFICATION (ZERO) IN DISTRIBUTION
STORE THE INDEX IN MID. MOVE XBP AND YBP INTO X AND
Y WITH AX = DELXH.
AFFIRM Y*0 FOR EACH POINT
400
NO
YES
PRINTOUT ACCEPTED POPULATION
Figure 5-9 Subroutine PMAINT Flowchart (cont.)
5-87
-------
NO MAINTAINED
VEHICLES ADDED
MOVE X AND Y BACK
INTO THE APPROPRIATE
ARRAYS (TABLE OR STABLE)
2000
c
RETURN
©
3000
COMPUTE HEIGHT OF MAINTAINED
VEHICLE SPIKE AT MANUFACTURERS
SPEC TO BE THE PERCENTAGE
REJECTED DIVIDED BY A X.
IF MID IS AN END POINT THE SPIKE
MUST BE TWICE AS HIGH TO HAVE
THE SAME AREA (A).
ADD ON THE SPIKE AT MID.
CALLSTD2
TO NORMALIZE AND COMPUTE
POST MAINTENANCE MEAN (PM)
Figure 5-9 Subroutine PMAINT Flowchart (cont.)
5-88
-------
o
PRINTOUT POST MAINTENANCE
DISTRIBUTION
7
490
MOVE X AND Y BACK
INTO TABLEX AND TABLEY
AND INTO AX AND AY
500
f RETURN J
Figure 5-9 Subroutine PMAINT Flowchart (cont.)
5-89
-------
Table 5-9 SUBROUTINE PMAINT LISTING
36070
360-0
36090
36100
36120
3ol 30
36140
^6150
3cloO
36170
JolOO
3ol90
36200
36210
36220
36230
36243
36260
362HO
36790
36303
36310
36320
36330
36340
36350
36300
36370
36390"
36400
36410
36430
36450
3o460
SJBRGUT iMt Pf-,AI \T( XGPT , M, J, * , J )
JlXiEfsS IL\ X(15),Y(35),X3:M35l,YdP(35)
_ COMMC^_/C_UM01/ _ A/J m , A_L_Ao, AW, _fll_l
+ B AREA! *} , BLOI , 3LQ2, SSIG(3),
* BHIST(3,16), BVMK 13,15,3) ,
*_ _ ATA8LFX(9, 10,3) ,ATAdl_EY(9, 10,3) , AbTAbLX
COMMON /COM02/ CA-sA, OAR1Y,
+ CAKSY, CBSUM, CLUEFdO) .CCOSTI,
+ CI.MCCK, CPCB, CPI, CPVPY, CSi
» CN( 15,3, lo) ,
+ CPARTf 10,15)
CC AJ3D2
COMMGiM /CGM03/
- E.-I'^O) , EPdO,
+ __} KE_OA_, _ FKF'.OB,
<- HORZN, HOKZNY
+ hPC(15,16i,
+ HPS(6,15,16) ,
+ HPTnTS(16)
CC ADD 3
C(JM,v,Gr-J /CC: 404/
+ "KS'TART", ~" KSTOP,
* LIDLE, LINTd
* . .Niri.A_S_£_!. _.'^PH-'^
CC AOD4
CflMKON /CJM05/
+ MNTx, NINTRB
+ .MPTRN, NPTS,
+ L.CIY, OCKY,
CC *DC>5
COMKON /Cf'M J6/PAR*'' (
+ PC(15), PCS(15
~+" ~ PPdO", 15) , PS (6,1
* PAK ( 10, 15,3) ,
+ PM( 10,15) ,
+ PSA( 15) , PTA( 5)
+ ''TYPE,
* SALb, SALL,
CL-EKBI is
OtLPCV,
15) ,Ef-F ( 10) ,
F P-f RC( i 0
riPCS(15,
Mr1 Tip, 16
1 TE,
LUPT, LP
6), LPSPPdO
.-,SPEC( 10
10,13),
, NKuvE,
NSTEPS,
OPT I,
3,3), PART,
), PHI (IV),
5), PT(5) ,
PARK 10,
PPICM 10
, PCG^F,
KB INS?,
SAL!',
,3) ,
JP( 10,15)
JEL IT(3) ,
,3) ,
16) ,
I TL,
ICK ( 10),LLP
) ,L6TART,
) ,M START,
MVPKt 10
, N C N T R ,
M 0 ,
MTR,
PAYNtEW,
PLC( 14) ,
NT, .. .__
6XTRA, BS1ZE,
(9,o,3), ASTABLY( 9,6,3)
CARMY, C APPQP( lo) ,
CCUSTM, CGTT,
JM, CARAY,
CGEFiiP( 10,15) ,
,DtLEM(3 ,lo; ,DEL 1(3),
HPP( 10, 15,16) ,
HPTOT(16) ,
1TP, ITIMF(16),
ICK,
LSTOP,
MSTUP,
',15) " " "" ~"
NtMIS, NEMP,
i\OPTS, i-.PAR,
(50) ,DVCHI(3) ,OVCHM(3)
PAYOf:F(3) ,
PLTMAXt 3) , P'lUOEL ,
PTOT, PTS(5), PAYAOJ,
3,3), PLUS(10,15),
),PPPICK,PSTAR, PI (15,10),
P AKlMt ID
i 1TE I,
,10,9)
RSIZF, 9 STOP,
ilTFM, bLAi^E,
-------
CJl
1
1
36470
36480
36490
36500
36510
36520
36530
36540
36550
36560
36570
36580
36590
36600
36610
36620
36630
36640
36650
36660
36670
36680
36690
36700
36710
36720
36730
36740
36750
36760
36770
36780
36790
36800
36810
36820
36830
36840
36850
36860
36870
36880
Table 5-9 SUBROUTINE PMAINT LISTING (cont.)
+ SMODEL, "
+ SCALEBM13
+ SXCUT(6,3
+ SIGME(IO)
STAR'tt 15,3) . STAT, STIME13), SUM8M(3),
), SM(6,15), SPAR( 10,15,6) ,
), SIG(!0,3), SIGCEO),
, SIG^E( 10) , SIGP( 10,15) ,
+ SIGRATE, SIST, SIGS(6,15), SIGSDE(3),
+ STA6LEX(33,6,15) , STABLEY < 33 , 6, 15 )
COMMON /COM10/ TAREA(3), TD IS T( 10, 3) , T IDLE ,TIMEI ( 3 , 16) ,
+ TINT,
+ TXTRA,
+ THIST(5,3
+ II
CC ADD10
COMMO
MEM( 10,
N /COM1
+ X 1 3 P ( 3 , 3 ,
+ XTMJ16),
CC ADD11
TOBE(3), TU.-JX, TOTE(3), TPOB<3), TPDT(3),
TSIZE, TSIG(3), TPER(16,15), TM IL ( 16, 15 ) ,
,16), THIc>TT(3,16) , TIMEC(10,15),
15), TA8LEX(33,10,15) , TABLEY < 33, 10, 15 )
I/ rt'F(lO),
i>) , XINT, XINTB, XLANE, XSUM, XCUT(10,3),
XbASE(9,3 ) , Yt5ASE(9,3)
COMMON /COM12/ Y1BP( j,3, 10 ) , Y 2BP( 3, 3, 10 ) ,
+ YES, YSUM, YTMU6), Y 10BP ( 4 , 4, 10 ) , Y20b P (4, 4 , 1C ) ,
+ lit Z2, Z3, Z4, Z5, Z6t
+ Z7
t- Zl
+ zc
t
3,
ARI ,
ZS, Z9, Z10, Zll, Z12,
Zl^t, Z15, Z16, Z17,
ZCARM, ZIC, ZSUM,
+ ZZC3.3)
CC AD012
COMMON /DEBUG/ ADEBuu, 3DEBUG, CDEBUG, DDEBUG,
+ LDE3UG,
CC AODD
REAL
+ MMS.
+ NAME,
+ IN,-
INTEGER
+ TDIST,
li'-iTtGFR XHPT
CC LINT
CC
CC
N.\ = NST
GO TO
2 RETURN
1 IGG=LI
GO TO
- L I M I
- 1 -
- 2 -
EPS+1
(1,1,1
NT(M)
( 10,50)
MOEBUG, PDEBUG, ^DE8UG, SDEBUG, TDEBUG
ITE, ITL, ITP, ITIME,
>1PH, MSPEC, MU, MVPR,
NO, L DEBUG, M DEBUG,
MISFIRE
RiMAME, SITEI, SITE^, STAT,
XLAME, UPTI, PPICK, PPPICK
TS OF INTEGERAT10N CRITERIA (REJECTED)
- XLO TO XCJT
- XCUT TO XHI
, 2, 2, 2, 1, 1 , 1,2, 160, loO, 160,153, 160, 160) ,M
, I GO
-------
Wl
I
vo
ro
-' """... , Table 5-9 SUBROUTINE PMAINT LISTING (cont. )
36890 "
36900
36910
36920
36930
36940
36950
36960
36970
36980
36990
37000
37010
37020
37030
37040
37050
37060
37070
37080
37090
37100
37110
37120
37130
37140
37150
37160
37170
37180
I 37190
37200
37210
37220
37230
37240
37250
37260
37270
37280
37290
! 37300
10 CONTINUE
CC CUT LOWER POKTIUN
XLOR=TABLEX ( If M, J)
XHIR=XCUT(M, K)
XLOA=XCUT
-------
Table 5-9 SUBROUTINE PMAINT LISTING (cont.)
tn
ID
CO
37310
37320
37330
37340
37350
37360
37370
37380
37390
37400
37410
37420
37440
37450
37460
37470
37430
37490
37500
37510
37520
37530
37540
37550
37560
37570
37580
37590
37600
37610
37620
37630
37640
| 37650
1 37660
j 37670
37680
37690
37700
1 37710
I 37720
YU) = FUN1(X(I), XBP, YRP.NN )
IF( AW SI X( I ) -MMS( M, J ) ) ,LE. :)LLXH/2. ) MID = I
IF( Y( I ) .LT.O. ) Y< I ) = C.
CC MAINTENANCE REMOVAL OF HAD CARS
F(X(I).GE.XLOR.AND.X(I).Lt.XHIR) YlI)-Y»lJ#ll«~PltJ»M)
400 CONTINUE
IF ( AOEOUG.EO.NO) GO TO 450
WRITE (o,410) ( I,X( I ),Y( I ) , I=1,NN)
410 FORMAT! //,5X,* POPULATION 3CFORE ADDING MAINTENANCE*
+ //,3(3X,*N*,8X,*X*tl5X,*Y*,5X)//
+ 13(I4,2E15.4,I4,2E15.4,I4,2E15.4/} )
450 CONTINUE
IF(XCPT-NE.2) GO TO 3000
CC STORAGE OF ACCEPTED PURTION
CALL PACKD
-------
Table 5-9 SUBROUTINE PMAINT LISTING (cont.)
CONTINUE
37740 999 FORMAT(1H1)
37750 RETURN
37760 END
-------
mode emissions, and parameters over time. The deterioration rates for
each of these three dimensions of the vehicle have been developed
empirically and are used to update emission levels between maintenance
treatments. The three decay routines are called EDECAY, MDECAY and
PDECAY.
5.8.1 Subroutine EDECAY
Subroutine EDECAY computes the deterioration in average vehicle
emission rates over the inspection interval TINT. Input to EDECAY are
A, the pre-decay emission rates, JJ the power train type and N the
inspection interval number. Output from EDECAY consists of the array
B representing the average emission rates of the vehicle population
after deterioration. The emission rate of decay, COEFB, which was
computed in subroutine INITIAL, is multiplied by the appropriate time
interval and added to the emission level for determining the post
deterioration value.
Figure 5-10 presents a flow chart and Table 5-10 contains a listing of
subroutine EDECAY.
5.8.2 Subroutine MDECAY
Subroutine MDECAY deteriorates the mode emission levels based on
estimated changes in the engine parameters. MDECAY uses a technique
similar to that used in PDECAY in adjusting the mode emission distributions,
Table 5-11 contains a listing of MDECAY and Figure 5-11 a flow chart.
5.8.3 Subroutine PDECAY
Subroutine PDECAY is used to estimate the rate of parameter deterio-
ration between inspection intervals. Figure 5-12 contains a complete
5-95
-------
SUBROUTINE EDECAY
INITIATE I LOOP
FROM 1 TO NEMIS
INITIATE K LOOP
FROM KSTART TO
KSTOP
J= JJ+5*(K-I)
ADD= COEFB*TMIL
TINT* PART
ADD=COEFB*riNT*
*(TMIL*PART +
TMI L -KI-PART)
B = A + ADD
(RETURN)
Figure 5-10 Subroutine EDECAY Flowchart
5-96
-------
Table 5-10 SUBROUTINE EDECAY LISTING
en
i
10
23880
23890
23900
23910
23920
23930
23940
23950
23960
23970
23980
23990
24000
24010
24020
! 24030
1 24040
! 24050
24060
24070
24080
; 24090
24100
24110
24120
24130
24140
24150
24160
24170
24180
24190
24200
24210
24220
24230
24240
24250
24260
: 24270
! 24280
SUBROUTINE EDECAY(A,B,J
DIMENSION A( 15,3) ,B( 15,
COMMON /COM01/ AMB
J,N)
3)
(3 ) , ALA.J, AW, B
+ BAREA{3), BLD1, BLD2, rfSIGIB),
+ BHIST(3,16), liMMK 10,15, 3) ,
+ ATABLEX(9,10,3),ATA8LEY(9,10,3) ,ASTABLX
COMMON /COM02/
+ CARSY, CBSUM,
+ CINCON, CPC4, CP
+ CN(15,3,16),
+ C PART (10, 15)
CC AD02
COM'MCN /COM03/
+ EMM 3) , tP( 10, 15)
+ FREGA, FREUB,
+ HORZN, HORZNY,
+ HPCd5,16),
+ HPS(6,i5,16) ,
+ HPTOTSC16)
CC ADD3
COMMON /COM04/
+ KSTART, KSTOP,
+ LIDLE, LINT(16),
+ H8ASE, MPH,
CC ADD4
COMMON /CuMOS/
* NINTR, NINTR3,
+ NPTRN, NPJS,
+ UCIY, OCMY,
CC ADDS
COMMON /COM06/PARM(3,3
+ PC(15), PCS(15),
+ PP( 10,15), PS(6, 15),
+- PARdO, 15,3) ,
+ PMdOtlS),
+ PSAdS) , PTA<5) ,
+ , PAYFIN
COMMON /CQM07/
+ RTYPE,
+ SALE, SALL,
INT,
BXTRA,
<9,6,3),
CARA, CARIY, CARMY,
CCOEFf 10) ,CCOSTI, CCOSTM,
I, CPVPY, CSUM,
COEFB( 15,3) ,
OELPCV, OPdO,15)
,EFF(10), 0£LIT(3),
FPERCdO,3) ,
HPCS( 15,16) ,
riPT(5,16) ,
ITE, ITL,
LOPT, LPICK(10),LL
LPSPP( 10) .LSTART,
MSPECdO) ,MSTART,
15), MVPRdO
NAME(bO), NCNTR,
NMOD'E, NO,
N STEPS, NTR,
OPTI, OPTMtOPTS
), PART, PAYiMEW
PHK14), PLO(14),
CQEFBP<
,UELEM(3
HPPdO,
HPTOTd
ITP,
PICK,
LSTOP,
MSTOP,
,15)
NEMIS,
NOPTS,
NTRB,
(50),OVC
BSIZE,
ASTA6LY(9,6,3)
CARPOP(16) ,
CGTT,
CAPAY,
10,15),
,16) ,UELI(3),
15,16) ,
6),
ITIME( 16),
NEMP,
NPAR,
N PICK (16) ,
HI(3),OVCHM<3)
, PAYOFF(3),
PLTMAX(3),PMODEL,
PT(5), PTOT, PTSJ5),
PAR1(1Q,3,3) , PLUSdO
PPICKt 10) ,PPPICK,PSTAR,PI (1
PCGNF, PAR I NT (10
REINSP, RNAME,
SALP, SITEI,
RSIZE,
SIT EM,
PAYAOJ,
,15) ,
5,10) ,
RSTUP ,
SLAKE,
-------
Table 5-10 SUBROUTINE EDECAY LISTING (cont.)
en
£
24290
24300
.'4310
24 -s?0
243oO
24370
24380
24390
24400
24410
24420
24430
?4440
24450
24460
24470
24480
P4490
24500
24510
24520
24530
24540
?4550
245c,0
24570
24580
24590
24600
24610
24620
24630
24640
24650
24660
24670
24630
24690
74700
7*710
+ SMLOEL. STAHTf
+ SCALER.-K 3) ,
+ SXCUT(6,3),
+ SIGME(IO),
+ SIGRATc, SIST,
* STAiiLEX( 33,6,15)
CGMMUN /COM10/
+ TINT, TO BE (3
+ TXTPA, TSIZE,
+ THISK5, ?,16) ,
+ TIMEM( 10,15) ,
CC AuUlO
COMMON /COM! I/
15.3), STAT. STIMt{3), SUM,\ML3Jj .
SM(6,15) ,
S IG( 13, 3) ,
SIGXNEf 10) ,
SIoS(o, 15) ,
STAbLEY(33,to, 15)
TAREA(3), TDISTdO
), TONX, TOTE(3),
TSIG(3), TPER(16
THISTK 3 ,lo) ,
TABLEX( 33, 10, li) ,
WF< 10),
+ XlbP(3,3,6), XINT, XI\TB, XLANE
+ XTM(16), XBASE(9,3) ,YdASE(9,3)
CC ADD 11
COMMON /COM12/
+ YES, YSUM,
* 21, Z2,
+ 27, 28,
* Z13, Z14,
+ ZCARI, ZCARM,
+ 22(3,3)
CC ADD12
COMMON /DEBUG/
+ LDEBUG, i-'iOEBUG
CC ADDD
REAL ITE,
+ MMS, MPH,
+ NAME, NO,
+ IN, MISFIR
INTEGER RNAME,
+ TDIST, XLANE,
DO 50 I=1,NEMIS
DO 40 K=KSTART,KSTQP
J=JJ+5*(K-1)
ADD=COEFB( J, I)*TINT*
IFIN.E0.2) ADO=COEFB
o( J.I )=A( J, I J+ADO
43 CONTINUE
50 CONTINUE
RETURN
END
Y1BP(3,3,10),
YTM(lo), Y1DBP
23, Z4,
29, Z10,
Z15, Z16,
ZIC, ZSUM,
ADEBUG, bDEBUG,
, PDEBUG, JDEBUG,
ITL, ITP,
MSPEC, MU,
LDEBUG, MDEBUG,
E
SITEI, SITEM,
JPTI, PPICK,
(TMIL (N,J)*PART-i-TMIL(N
iPAK( 10 , 1 5 , 6) ,
S IGCr ( 3) ,
SIGP( 1J, 15) ,
SIGSDE (3) ,
,3) ,T IDLE ,TIMEI(3 ,16) ,
TPDB( 3) , TPDT( 3) ,
,15), T.v|IL( lo, 13) ,
TIMEC (10,15 ),
TA6LEY(33, 10, 15)
, XSUM, XCUT(10,3) ,
Y2BP( 3,3,10), '
(4,4, 10), Y2UBP(4,4,10) ,
25, 26,
Zll, 212,
217,
CDEBUG, ODEBUG,
SDEBUG, TDEBUG
ITIME,
MVPR,
STAT,
PPP ICK
-1,J)*(1.-PART))
(J,I)*TMIL(N,J) *TINT*PART
-------
c
SUBROUTINE MDECAY
0-
SUM = 0
INITIATE L LOOP
FROM 1 TO NMODE
SUMI =0
INITIATE K LOOP
FROM KSTART TO KSTOP
J = JJ +5 « (K-l)
SUMP = 0
INITIATE M LOOP
FROM 1 TO NPAR
ADD = COEFBP X TMIL X TINT X SCALEBM
COMPUTE PARAMETER DECAY
YES
ADD = ADD X (PART-TPER)
SCALE ADD FOR INCOMPLETE INTERVAL
Figure 5-11 Subroutine MDECAY Flowchart
5-99
-------
©
SDMI = FPERC X TINT/12 X (1-PP)
COMPUTE VOLUNTARY MAINTENANCE
NO
YES
/PRINTOUT BHIST, M,/
ADD, SUM, SUM /
SUMP = SUMP + SPAR X (ADD-SUMI)
COMPUTING L^|AP = AE
NO
YES
NN = NSTEPS + 1
Fi re 5-11 Subroutine MDECAY Flowchart (cont.)
5-100
-------
NO
YES
PRINTOUT SUMP, XBP, YBP
7
MOVE STABLES INTO
BX AND BY, AND
XBP AND YBP
IS L BET WEEN
LSTART AND LSTOP
YBP (NN + 2) = YBP (NN) + YRATE
XBP (NN + 2) = XBP (NN) + SUMP X XRATE
ADD TAIL TO DISTRIBUTION
YBP(NN + 1) = (YBP(NN) +2 X YBP(NN +2)/3
XBP (NN + 1) = (XBP (NN) + XBP(NN +2)/2
ADD A POINT HALF WAY TO NN + 2 WITH
THE Y VALUE 2/3 THE WAY DOWN.
THIS GIVES THE DISTRIBUTION A NORMAL
LOOKING TAIL
Figure 5-11 Subroutine MDECAY Flowchart (cont.)
5-101
-------
0
ADDI = DELXDX (LL-1)
ADDI RUNS FROM 0 TO 2
ADDI = (e DDI -l)/e2 X SUMP
DECAY ALGORITHM
STABLEX = X + ADDI
LL LOOP
FINISHED?
DECAYED.DISTRIBUTION
CONSTRUCTED
YES
MOVE STABLE'S INTO
AX,AY,XBP, AND YBP
450
CALL STD2
TO NORMALYZE THE DISTRIBUTION
AND COMPUTE MEAN AND
VARIANCE
Figure 5-11 Subroutine W)ECAY Flowchart (cont.)
5-102
-------
XBP(NN + 1) =XBP(NN)X 1.01
YBP (NN+2) =XBP(NN) X 1.02
DO ESSENTIALLY NOTHING TO
THE SHAPE OF A NON-TESTED
MODE EMISSION DISTRIBUTION
350
DELX = (XBP(NN +2) - XBP(1)/NSTEPS
DELXD=2/NSTEPS
DELX IS THE X INCREMENT REQUIRED TO
FIT THE DISTRIBUTION INTO THE
STANDARD 33 POINTS. DELXD IS A
DUMMY VARIABLE USED FOR DECAY
INITIATE LL LOOP
FROM 1 TO NN (33)
(DISTRIBUTION POINT NUMBER)
0>
X = XBP(1) + DELX(LL-1)
COMPUTE CORRECTED X VALUE
STABLEY = FUNI (X, XBP, YBP)
LOOK UP Y VALUE AT THAT X
Figure 5-11 Subroutine MDECAY Flowchart (cont.)
5-103
-------
YES
CALL EPLOT
TO PLOT BEFORE AND AFTER
DECAY DISTRIBUTIONS
Figure 5-11 Subroutine MDECAY Flowchart (cont.)
5-104
-------
Table 5-11 SUBROUTINE MDECAY LISTING
o
CJl
iBr ' " :w-.--. -. ., v 'A
24720
24730
24740
24750
24760
24770
24780
24790
24800
! 24810
24820
24830
24840
24850
24860
24870
24880
j 24890
24900
24910
24920
i 24930
i 24940
i 24950
24960
24970
24980
24990
25000
25010
25020
25030
25040
25050
25060
25070
25080
25090
25100
i 25110
25120
SUBROUTINE MDECAY(JJ,N)
DIMENSION YRATE16)
DIMENSION XRATE(6)
DIMENSION XBP(35),YBP(35)
COMMON /COM01/ AMBC3),ALAB
* BAREA13), BLD1, BLD2,
+ BHIST(3,16), BMMIdO
+ ATABLEX(9,10,3) ,ATABLEY(9,1
COMMON /COM02/ CARA,
+ CARSY, CBSUM,
+ CINCCN, CPCB, CP
+ CN(15,3,16),
-t- CPART(10,15)
CC ADD2
COMMON /COM03/
+ EMW(3) , EP(10,15)
I- FREOA, FREOB,
+ HORZN, HORZNY,
+ HPCd5,16),
-i- HPS16,15,16) ,
+ HPTOTS(16)
CC ADD3
COMMON /COM04/
+ KSTART, KSTOP,
+ LIDLE, LINT(ld),
+ MBASE, MPH,
+ MUC10,3), MMSdO,
CC AOD4
COMMON /COM05/
+ NINTR, NINTRB,
+ NPTRN, NPTS,
+ OCIY, OCMY,
CC ADDS
COMMON /COM06/PARM(3,3
+ PC(15), PCS(15),
+ PP(10,15J,PS(6,15J ,
+ PARdO,15,3),
+ P,MC10,15),
+ PSA(15), PTA(5),
+ .PAYFIN
COMMON /COM07/
CCOEFd
I,
COEF3{ 1
DELPCV,
,EFF(10)
FPERCd
, AW,
BSIG(3)
BINT,
, 6XTRAf
,15,3),
0,3) ,ASTABLX(9,6,3),
CARIY, CARMY,
0) ,CCOSTI,
CPVPY,
5,3) ,
DP( 10,1
, DELIT(3
0,3) ,
HPCS( 15,16) ,
HPT(5,16) ,
ITE,
LOPT,
LPSPPd
MSPECd
15),
NAME150
NMQDE,
NSTEPS,
OPTi,
>, PART,
PHId-V)
PT<5),
PARH10
PPICKt 1
PCONF,
REINSP,
ITL,
LPICK(IO) ,
0) ,LSTART,
0) ,MSTART,
MVPRC
), NCNTR,
NO,
CCOSTM,
CSUM,
COEFBPl
5),OELEM(3
**
HPPdO,
HPTOTd
ITP,
LLPICK,
LSTOP,
MSTOP,
10,15)
NEMIS,
NOPTS,
NTR, NTRB,
-------
Table 5-11 SUBROUTINE MDECAY LISTING (cont.)
Wl
I
75130
25140
75150
25160
25170
25180
25190
25200
25210
25220
25230
25240
75250
25260
25270
25280
25290
j 25300
i 25310
25320
25330
25340
25350
25360
25370
25380
75390
25400
25410
25420
25430
25440
25450
25460
25470
25480
25490
25500
25510
25520
1 25530
25540
+ RTYPE,
* SALE, SALL,
+ SMCOEL, STARK 15
+ SCALcBM(3),
+ SXCUT(6,3I,
+ SIGME(IO),
+ SIGRATE, SIST,
* STABLEX( 33,6,15) ,
COMMON /CQM10/
* TINT, TOBE<3),
+ TXTRA, TSIZE,
* THIST<5,3,16),
+ TIMEM( 10,15) ,
CC ADD1Q
COMMON /CGM11/
* X10P{3,3,6), XINT,
+ XTM(16), XbASE(9,
CC AD011
COMMON /COM12/
+ YES, YSUM,
+ Zl, Z2,
+ Z7, Z8,
+ Z13, Z14,
+ ZCARI, ZCARM,
+ ZZ(3,3)
CC AOD12
COMMON /DEBUG/
+ LbEBUG, MDE8UG,
CC ADOO
REAL ITE,
+ MMS, MPH,
+ NAME, NO,
+ IN, MISFIRE
INTEGER RNAME,
+ TOIST» XLANE,
DATA XRATE/3.,3. ,3. ,3.
DATA YRATE/6*0,i5/
SUM=0.
DO 1000 L=l ,NMODE
SUM1=0.
DO 500 K=KSTART,KSTOP
J=JJ+5*(K-1 )
SALP,
,3) , STAT
SM16.15
SIGllOt
SIGMNE(
SIGS(6
STAbLE
TAREA(3
TONX,
TSIG(3
THISTT(
TA8LEX(
WF( 10),
XINT
3) ,YBASE(
Y1BP(3,
YTM(16)
Z3,
Z9,
Z15,
ZIC,
AUEbUG,
P DEBUG,
ITL,
MSPEC,
LDEBUG,
SITEI,
OPTI,
,8. ,3./
SITEI,
, STIME<
) ,
3) ,
10)»
,15) ,
Y(33,6, 15)
), TOISTdOt
TOTE(3) ,
), TPER(16,
3,16),
33,10,15) ,
B, XLANE,
9,3)
3,10),
, Y1DBP(
Z4,
Z10,
Z16,
ZSUM,
dDEBUG,
3DEBUG,
ITP,
MU,
MOEBUG,
SITEM,
PPICK,
SITFM,
3), SUMb
SPAR( 10
SIGCE
SIGP( 10
SIGSDE
3) ,TIDLE
TPUB(3)
SLANE ,
M(3) ,
,15,6),
(3),
,15) ,
(3) ,
,TIMEI (3 , 16),
, TPDT(3),
15), TMIL(16,15)t
TIMEC(10,15),
TABLEY(33, 10,15)
XSUM
Y2BP13,
4,4, 10),
Z5,
Zll ,
Z17,
CDEBUG,
SDEBUG,
ITIME,
MVPR,
STAT,
PPPICK
, XCUT(10,3),
3,10) ,
Y2UBP14,4,10) ,
Z6,
Z12,
DDEBUG,
TDEBUG
': / '
-------
Table 5-11 SUBROUTINE MDECAY LISTING (cont.)
SUMErl
25560
25570
25580
25590
25600
25610
25620
25630
25640
25650
25660
DO 300 M=1,NPAR
ADO=COEFBPt MiJ)*TINT*(PART*TMIL(NtJ H( l.-PART )*TMIL 1 N- 1 , J) )
IF5,5X,* SUM = *E15.ii,
+ 5Xt*SUMl = *E15.5J
_2_567Q
25680*
25690
en
i
_.
25710"
25720
25730
S UW P= S UMP.+ S P^.R (JitJ tJ- i * 1 A Dp _ j^SUM U.
300 'CONTINUE
NN=NSTEPS-H
I FJ 0_D EBJJ G ._EQ . Y E S 1 WRITE ( 6 , 30 5J_ SJJ MP_tX BP_( NIM j , YoP (_NN .
305 FORMA'f (* SUM"? "="*Ei'5.4,5X",*X = *E15.4,5X,*Y = *E15.'
DO 325 LL=ltNN
XBP(LL)=STABLEX{LL,L,J)
25740
25750
25J60
"25770"
25780
25790
25800
25810
25820
25830
25840
25850
25860
25870
_2_5_880.
25890"
25900
_25_91_0
25920"
25930
_25_940
25950"
25960
525
YflP(LL)=STABLEY(LL,L,J)
CONTINUE
I f_( L._L T_.JLS_J_ART_^0R. L ._GT_.JLS TGP ) G
IF(SUMP.LT.O.) SUMP=0.6i"
YBP
-------
o
00
Table 5-11 SUBROUTINE MDECAY LISTING (cont.)
P5970
26010
26020
26030
26050
YoP(LL)=STAbLEY(LL,L,J)
<+j9 CONTINUE
CALL STD2tXyP,Y6P,NN,S1tL,JJ,SIGS(L,J))
jjc ***»!(-( Qpe BUG. EQ. YES. AND. N. E3.P PICNtPPPICKI.ANO.JJ. E Q . 1 J_
,*"**** CALL EPLOT (BX.bY, AX,AY,NN,LI-MT(M))
SCO CONTINUE
1000 CUNTINUF
RET UF N
b I'J 0
-------
flowchart of PDECAY which documents the programming techniques used.
Table 5-12 gives the program listings.
5.9 SUBROUTINE COSTS
The General Economic Effectiveness Program contains data and
algorithms for estimating the economic impact of a mandatory vehicle
inspection and maintenance program. Subroutine COSTS contains the
equations for estimating user inconvenience costs, inspection station
land, building, and management costs and labor training costs. COSTS
also computes the various figures-of-merit and average emission re-
ductions. The listing and flowcharts contained in Table 5-13 and
Figure 5-13 respectively describe in detail the techniques and data
assumptions used.
5.10 SUBROUTINE STATS
Subroutine STATS contains the algorithms for conducting a statis-
tical analysis of the predicted emission reduction results. The model
makes two basic assumptions: 1) all distribution functions can be
adequately described by tables regardless of their shape, and 2) these
distribution functions are independent of each other.
The model begins with a set of engine parameter distributions that
characterize the state of vehicles as they now exist.in the population.
These distributions are modified to reflect the maintenance treatment
and various system errors. There are basically three classes of errors --
inspection, maintenance, and model generated. The resulting distribution
yields an estimate of the emission variance for a fleet of vehicles that
has passed through the inspection/maintenance process. The final distribution
5-109
-------
SUBROUTINE PDECAY^)
SUM1 = 0
INITIATE K LOOP
FROM KSTART TO KSTOP
PDEBUG \. NO
ON
PRINTOUT HEADINGS
INITIATE M LOOP
FRM MSTART TO MSTOP
PARAMETER
DISTRIBUTED
Figure 5-12 Subroutine PDECAY Flowchart
5-110
-------
THIS PARAMETER
USED.TDIST =
YES
ADD = COEFBP x TMIL x TINT x SCALEBM
AMOUNT OF DETERIATION
PLUS =ADDx PRATE-FPERCx TINT/12 x (1-PP)
COMPUTE DETERIORATION MINUS VOLUNTARY
MAINTENANCE
N =2?
FIRST TIME
PERIOD
9
NO
RECOMPUTE DECAY BASED ON LESS THAN
COMPLETE TIME PERIOD . AND NO TESTING
PLUS = ADD x PRATE-FPERC x TINT/12 x PART
SUM = O
NN = NSTEPS + 1
LPLUS=O
Figure 5-12 Subroutine PDECAY Flowchart (cont.)
5-111
-------
MOVE TABLE ARRAYS
INTO BX, BY AND XBP, YBP
SHIFT ARRAYS BY LPLUS IN XBP, YBP
LOWER END REJECTED
XBP(l) = XBP(3) + PLUS
XBP(l) =YBP(3) x QRATE
XBP (2) = (XBP (1) + 3 x XBP (3) )/4
YBP (2) «(3 x YBP(l) +YBP(1) )/4
FILL IN POINTS TO PUT A TRAIL
ON THE DISTRIBUTION
Figure 5-12 Subroutine PDECAY Flowchart (cont.)
5-112
-------
LINT =
HIGH END
REJECTED
NO
YES
ADD = (e2 -l)/e2 x PLUS-ADD
RECOMPUTE ADD TO BE:
XDUM(L) = X+ADD
NO
400
YES
CALL STD2
TO COMPUTE SIGMA AND MEANS
AND NORMALIZE DISTRIBUTIONS
MOVE XDUM AND YDUM INTO
AX, AY AND TABLEX,TABLEY
PRINT PLOT HEADINGS
7
CALL EPLOT TO
PLOT PARAMETER DISTRIBUTIONS
Figure 5-12 Subroutine PDECAY Flowchart (cont.)
5-113
-------
©
UPPER END REJECT ION
300
AFFIRM PLUS * O
XBP(NN +2) = XBP(NN) + PLUS
YBP(NN + 2) = YBP(NN) x QRATE
XBP(NN + 1) = (3 x XBP(NN) XBP(NN +2) )/4
YBP(NN + 1) = YBP(NN) +3x YBP(NN +2) )/4
FILL IN POINTS TO PUT A TAIL
ON THE DISTRIBUTION
350
UPPER OR LOWER
END REJECTION
DELX = (XBP(NN + 2) + XBP(1 )/NSTEPS
DELXD =2/NSTEPS
INITIATE L LOOP FROM
ONE TO NN (33)
X = XBP(1) + DELXx (L-l)
YDUM (L) =FUNI(X, XBP,YBP)
LOOK UP YDUM (L) IN XBP-YBP
TABLE AS A FUNCTION OF X
ADD = DELXD x (L-l)
ADD RUNS FROM 0 TO 2
ADD = (eADD -l)/e2x PLUS
O
Figure 5-12 Subroutine PDECAY Flowchart (cont.)
5-114
-------
10
PRINTOUT DECAY DATA
RETURN J
Figure 5-12 Subroutine PDECAY Flowchart (cont.)
5-115
-------
Table 5-12 SUBROUTINE PDECAY LISTING
1
260oO
7 6 n 7 o
76090
26130
76110
76120
26130
76140
76150
26160
26170
26180
26190
26200
i 26210
26220
26230
26740
26250
26260
76270
26280
26290
26300
26310
26320
26330
26340
26350
26360
26370
26380
26390
26400
26410
26420
26430
26440
26450
26460
SJHP.rjllTlNE POECAY(JJ,N)
DlM^NSICr; XSP(50) , YBP( 50)
ul MEN SICK }.,ATE< 10, 3 ) , PRAT^l 13, 3)
L'IMENSIC'\ BX(35) ,HY(35) ,AX(35) , AY
COMMON /COM01/ AM3<3 ) , ALAS,
___+ t3APFA( 3) , BLD1 , BL02,
+ ATABLFM 9,10,3) ,ATAdLEY( 3,10,
COMMON /COM02/ CAKA,
+ CARSY, CBSUM,
+ CINCON, CPCB, CP
..___+ CN( 15,3,16) ,
+ L PART (10, 15)
CC ADD2
COMMON /COM03/
+ EMW(3) , EP(10,15)
+ FKECA, FRE08,
+ HORZN, HURZNY,
+ HPC(15,16),
+ HPS(6,15,16) ,
+ HPTOTS(16)
CC AOD3
COMMON /COM04/
+ KSTART, KSTUP,
+ LIOLC, LINT(16),
+ MBASE, MPH,
CC ADD4
COMMON /COM05/
+ NINTR, NINTR8,
+ NPTRN, NPTS,
+ GCIY, OCMY,
CC ADDS
COMMON /COM06/PARM(3,3
+ PC(15), PCS(15),
+ PP( 10,15) ,PS(6,15) ,
+ PAR(10,15,3),
+ PMdO.15),
+ PSA115), PTA(5),
+ .PAYFIN
COMMON /COM07/
(35) ~
AVV, B
3 S I G ( 3 ) ,
5,3),
3) , AST ABLX
CARI Y,
INT,
6XTRA,
(^,c,3 ),
CAR MY,
CCOtFdO) tCCOSTI, CCOSTM,
I, CPVPY, CSUM,
.._COEFL<( 15, 3) , ._ . COEFBP(_
DELPCV, DPI 10, 15) ,D6LEM(3
tEFF(lO) ,
FPFRCl 10,
HPCS( 15,1
HPT(5, 16)
ITE,
LUPT, LP
LPSPP( 10)
i^SPEC( 10J
15) ,
iNAME{50),
NMGDE,
JSTEPS,
OPTI,
), PART,
PHI (14) ,
PT(5) ,
PAKl(10,3
PPICK(IC)
PCJi\F,
REINSP,
OELIT13),
3) ,
u) ,
t
ITL,
ICKdO) ,LL
,LSTAKT,
.MSTART,
MVPR( 10
.\1CNTR,
NO,
\TR,
OPTM,QPTS
PAYNEW,
PLO( 14),
PTOT,
,3) ,
, PPPICK.PS
PARIKT( 10
RNAME,
HPPdO,
HPTOT (1
ITP,
PICK,
LSTOP,
MSTOP,
, 15)
NEMIS,
NOPTS,
NTKB,
(50) ,OVC
PAY OF
PLTMAXC
PTS(5),
PLUS( 10
TAR, PI (1
,10,9)
RSIZE,
.BSIZF,
ASTABLYt 9,6, * )
C ARPOP( 16) ,
GGTT,
CARAY,
l.Q_,J 5)_,_
, lo) ,DfcLT (3) ,
15, 16),
6),
I TIME( 16),
NEMP,
N P AP ,
NPICM 16) ,
HK3 ) ,OVCHM(3)
F(3) ,
?),PMOOEL,
PAYADJ,
,15) ,
5,10),
RSTOP,
-------
26470
26480
26490
26500
26510
26520
26530
26540
26550
26560
! 26570
' 26580
26590
26600
26610
26620
26630
26640
1 26650
26660
26670
26680
26690
26700
26710
26720
26730
26740
26750
26760
26770
26780
26790
26800
26810
26820
26830
26840
26850
26860
| 26870
' 26880
Table 5-12 SUBROUTINE PDECAY LISTING (cont.)
+ RTYPE.
+ SALE, SALL,
+ SMODEL, STARTdS
+ SCALEGM(3),
+ SXCUT<6,3),
+ SIGME(IO),
+ SIGRATE, SIST,
+ STABLEX(33,6,15) ,
COMMON /COM10/
+ TINT, TOBE(3),
-»- TXTRA, TSIZEt
+ THIST(5,3,16) ,
+ TIMEMt lOtlii),
CC ADD10
COMMON /COM11/
+ X1BP( 3",3,6) , XINT,
+ XTMU6), XBASE(9,
CC ADD11
COMMON /COM12/
+ YES, YSUM,
+ Zl, Z2,
-t- Z7, Z8,
4- Z13, Z14,
+ ZCARI, ZCARM,
+ ZZ(3,3)
CC AOD12
COMMON /DEBUG/
+ LDEBUG, MDEBUG,
CC ADOD
REAL ITE,
+ MMS, MPH,
+ NAME, NO,
+ IN, MISFIRE
INTEGER RNAME,
+ TDIST, XLANE,
DATA ORATE/ .33,9*. 16,.
DATA PRATE/2.,1.,9.,0.
+ 2. ,1. ,0. ,2. ,1. ,9. ,0.,
DO 20 K=KSTART,KSTOP
J = JJ-»-5*(K-l)
IF(PDEBUG.EO.NO) GO TO
SALP,
,.3>, STAT,
SM(6,15 ),
SIGC10.3)
SIGMNEJ 10
SIGS(6,1
STA3LEY(
TAREA(3) ,
TONX,
TSIG13),
THISTTi 3,
TABLEXt 33
WF( 10) ,
XIMTB,
3), YBASE(9,
Y18P(3,3,
YTM(16) ,
Z3,
Z9,
Z15,
Z 1C,
ADEBUG,
POE8UG,
ITL,
MSPEC,
LDEBUG,
SITEI,
SITEI,
STIME(
,
),
5) ,
33,6, 15)
TDISTl 10,
TCTE(3) ,
TP6R(16,
16) ,
,10,15),
XLANE,
3)
10) ,
Y10BPI
Z4,
Z10,
Z16,
ZSUM,
QDE8UG,
JDEBUG,
ITP,
MU,
MOE8UG,
SITEM,
OPTI, PPICK,
33, 9*. 16, .33,9*. 16/
tO. ,0., 1. ,2. , 1. »0. ,2.
0., 0. ,1. ,2.
5
,1. ,0./
SITEM,
3), SUMBM
SPAR( 10,
SIGCEt
SIGP( 10,
SIGSOE,{
3) ,TIDLE ,
TPDB(3) ,
SLANE,
(3) ,
15,6),
3) ,
15) ,
3),
TIMEI(3,16) ,
TPDT( 3),
15), TMIL(16tl5)f
TIMEC(10,15 ),
TABLEY(33, 10,15)
XSUM,
Y2BP(3, 3
XCUT(10,3),
,10),
4,4, 10), Y2DBP<4,4,10) ,
Z5, Z6,
Zll, Z12,
Z17,
CDEBUG,
SDEBUG,
ITIME,
MVPR,
STAT,
PPPICK
, l.t 12. ,0
DDEBUG,
TDE3UG
»»0«,0. ,1.,
-------
Table 5-12 SUBROUTINE PDECAY LISTING (cont.)
00
26903
26910
2 6 92 G
26930
26^0
26930
?6970
26^0
26990"
27000
27010
27020
^7030
27050
27060
_270_70
2"70BO"
27090
27100
2 7 UO
27120
27130_
"27140
27150
2 716 3_
27170
27180
27_19_0_
27200
27210
27220
"27230
27240
2 7250
27260"
27270
272SO
_Lf
IF(PPICK(PPPICK) .NE.M GCTO 5
fcRITE- (6,3D)
+ <~PM~ ~ (> , jTrM=T,"l6T7 ( S"l GP"(":i, J / , M=Tt"N~PA~R')
DO 10 M=MSTART,MSTOP
JfJjM. F:0._5._gR_._M._EQ.6) Gu TU lj
IF( TDISKM, K).KE .1) GOTO 10
_ApjD=Cl£EJ_BP ( M_,_J_) * T I fsIT* < P A_R T*T_M_I_L ( U . J ) + ( l.-PART ) *Ttt IL ( N-1
IF'(N."E0.2)~ADO=COEFBP"(-.-l", J )"*TINf *TMI L(N, J)
PLUSJ.'I, J)=ADD*PRATE(M,,<) -FPERC ( X , K ) *T INT/ 1 2. * ( 1. -P P ( M,
t J J )
J ))
)»PART
NN=NSTEPS+1
LPLUS = 0 _
IF( LINfYy).EQ.l)
DO 2CO L=1,NN
,M, J
200
CONTINUE
IGO=L INT(M)
250
CC_
GU TP (250,300) t IGO
CONTINUE
REJECT LJ^iFR POKTILN _ ______
IF( PLUS(M,J ) .GT.O. T PLJSCV, J)=-0.01
X3P(1) =X8P( 3)* PLUSU",J)
YBPd )=
D-t-3.VxBP(3))/V.
Y8P(2) = (YBP( j)-»-3.*Y8P( l))/4.
GO TO 350
300
CC
CONTINUE
IF(PLUS |