********************************
.Model
********************************

:MACRO: 
PINK_NOISE( mean ,std dev ,tao ,dt )

pink noise = INTEG( ( mean + white - pink noise ) / tao , mean ) Pink Noise generator. Mean and std dev describe the parameters of the distribution. Tao the time constant of the autocorrelation coefficient.

white = std dev * SQRT ( 24 * tao / dt ) * ( RANDOM_0_1 ( ) - 0.5)

The sustraction of 0.5 to the random number generator is to center the distribution around 0 as the DYNAMO generator used by Richardson & Pugh.

:END OF MACRO:

********************************
.Delivery
********************************
The sector models the order-processing system and the construct of work pressure - the normalized gap between required and actual service capacity. The main constructs is the notion of Service Backlog, i.e., outstanding customer orders.

Service_Backlog = INTEG ( ( customer_orders - order_fulfillment ) , DESIRED_DELIVERY_DELAY * customer_orders )

Units: Order
Service Backlog. Initialized in equilibrium based on the incoming customer orders.
Uses:
avg_delivery_delay - The average delivery delay in the service center (Little's law).
case_load - Cases in backlog per number of employees.
desired_service_capacity - Estimated from the underlying desired time per order.
order_fulfillment - The potential order fulfillment rate limited by the orders that can be processed from the backlog.

order_fulfillment = MIN ( potential_order_fulfillment , Service_Backlog / MIN_RESIDENCE_T_FOR_AN_ORDER )

Units: Order/Week
The potential order fulfillment rate limited by the orders that can be processed from the backlog.
Uses:
Service_Backlog - Service Backlog. Initialized in equilibrium based on the incoming customer orders.
avg_delivery_delay - The average delivery delay in the service center (Little's law).
production_ratio - Ratio of incoming orders to outgoing orders.

MIN_RESIDENCE_T_FOR_AN_ORDER = 0.1

Units: Week
Represents the physical constraints of the flow of an order through the service center. Set based on observations.
Uses:
order_fulfillment - The potential order fulfillment rate limited by the orders that can be processed from the backlog.

potential_order_fulfillment = service_capacity * work_intensity / time_per_order

Units: Order/Week
Number of orders that could be processed given the current service capacity and the corrections to work pressure and time per order.
Uses:
order_fulfillment - The potential order fulfillment rate limited by the orders that can be processed from the backlog.

service_capacity = on_office_service_capacity * effective_labor_fraction * effect_of_fatigue_on_prod

Units: Hours/Week
The effective service capacity. Calculated by correcting the on office service capacity by the skill of employees and the effects of fatigue on productivity.
Uses:
Perceived_Labor_Productivity - Perceived Labor Productivity. Labor productivity is estimated by comparing the service capacity to the nominal service capacity.
average_productivity_of_labor - Average Productivity of Labor. Includes the effects of fatigue and experience.
potential_order_fulfillment - Number of orders that could be processed given the current service capacity and the corrections to work pressure and time per order.
work_pressure - The normalized gap between desired service capacity and effective service capacity.

on_office_service_capacity = total_labor * HWE * ( 1 - absenteeism )

Units: Hours/Week
Number of person hours available to work (Total labor * hours per week per employee). The formulation reflects the effects of absenteeism not considered in the original model but of significant impact in the NH Lending Center.
Uses:
service_capacity - The effective service capacity. Calculated by correcting the on office service capacity by the skill of employees and the effects of fatigue on productivity.

desired_service_capacity = ( Service_Backlog / DESIRED_DELIVERY_DELAY ) * Desired_To

Units: Hours/Week
Estimated from the underlying desired time per order.
Uses:
Desired_Labor - Smoothing of the instantaneous labor requirements based on desired service capacity and perceived labor productivity.
work_pressure - The normalized gap between desired service capacity and effective service capacity.

DESIRED_DELIVERY_DELAY = 0.1

Units: Week
Management's stated goal for delivery delay. Set based on interviews and stated goals.
Uses:
Service_Backlog - Service Backlog. Initialized in equilibrium based on the incoming customer orders.
desired_service_capacity - Estimated from the underlying desired time per order.

work_pressure = ( desired_service_capacity - service_capacity ) / desired_service_capacity

Units: Dimensionless
The normalized gap between desired service capacity and effective service capacity.
Uses:
effect_of_wp_on_to - Effect of work pressure on time per order. The employees' response as modification of time per order to work pressure. This should be formulated as table function. The present formulation reflects the equation used for estimation.
work_intensity - Work intensity. The employees' response as overtime to work pressure. This should be formulated as table function. The present formulation reflects the equation used for estimation.

********************************
.Responses
********************************
This sector models the responses to work pressure: employees increase their work intensity and reduce the allocation of time per order; management adjusts service capacity. Consequences of employees responses (burnout and erosion of service standards) are also captured in this sector.

work_intensity = EXP ( BETA * work_pressure )

Units: Dimensionless
Work intensity. The employees' response as overtime to work pressure. This should be formulated as table function. The present formulation reflects the equation used for estimation.
Uses:
Fatigue_A - Fatigue to affect turnover. The accumulation of fatigue over the t to acumm WI t period.
Fatigue_E - Fatigue to affect productivity. The accumulation of fatigue over the t to acumm WI p period.
net_overtime_gain - Net effect of extended work intensity.
potential_order_fulfillment - Number of orders that could be processed given the current service capacity and the corrections to work pressure and time per order.

BETA = 0.370546

Units: Dimensionless
Slope of the table function that reflects the effect of work pressure on work intensity. Estimated to fit past data on time per order.
Uses:
work_intensity - Work intensity. The employees' response as overtime to work pressure. This should be formulated as table function. The present formulation reflects the equation used for estimation.

Fatigue_E = INTEG( ( work_intensity - Fatigue_E ) / T_TO_ACUMM_WI_E , INITIAL_FE )

Units: Dimensionless
Fatigue to affect productivity. The accumulation of fatigue over the t to acumm WI p period.
Uses:
effect_of_fatigue_on_prod - Effect of fatigue on Productivity

INITIAL_FE = 1

Units: Dimensionless
Initial accumulation of fatigue to affect productivity. Initialized at the normal operating value (1) based on historical data.
Uses:
Fatigue_E - Fatigue to affect productivity. The accumulation of fatigue over the t to acumm WI p period.

T_TO_ACUMM_WI_E = 3

Units: Week
Time to accumulate work intensity to affect productivity. Time constant for the accumulation of work intensity to become fatigue that affects productivity. Set based on previous studies.
Uses:
Fatigue_E - Fatigue to affect productivity. The accumulation of fatigue over the t to acumm WI p period.

effect_of_fatigue_on_prod = FP_ON_PRD_GRAPH ( Fatigue_E )

Units: Dimensionless
Effect of fatigue on Productivity.
Uses:
net_overtime_gain - Net effect of extended work intensity.
service_capacity - The effective service capacity. Calculated by correcting the on office service capacity by the skill of employees and the effects of fatigue on productivity.

FP_ON_PRD_GRAPH ( [(0,0)-(2,1)], (0.8,1),(1,1),(1.1429,1),(1.2857,0.92),(1.428,0.785),(1.5714,0.695),(1.7143,0.64),(1.8571,0.6),(2,0.57))

Units: Dimensionless
Table function of the Effect of Fatigue on Productivity. Set based on previous studies.
Uses:
effect_of_fatigue_on_prod - Effect of fatigue on Productivity

Fatigue_A = INTEG( ( work_intensity - Fatigue_A ) / T_TO_ACUMM_WI_A , INITIAL_FA )

Units: Dimensionless
Fatigue to affect turnover. The accumulation of fatigue over the t to acumm WI t period.
Uses:
effect_of_fatigue_on_turnover - Effect of fatigue on Turnover.

INITIAL_FA = 1

Units: Dimensionless
Initial accumulation of fatigue to affect turnover. Initialized at the normal operating value (1) based on historical data.
Uses:
Fatigue_A - Fatigue to affect turnover. The accumulation of fatigue over the t to acumm WI t period.

T_TO_ACUMM_WI_A = 52

Units: Week
Time to accumulate work intensity to affect turnover. Time constant for the accumulation of work intensity to become fatigue that affects turnover. Set based on previous studies.
Uses:
Fatigue_A - Fatigue to affect turnover. The accumulation of fatigue over the t to acumm WI t period.

effect_of_fatigue_on_turnover = FT_ON_TO_GRAPH ( Fatigue_A )

Units: Dimensionless
Effect of fatigue on Turnover.
Uses:
turnover_rate - Rate of people voluntarily leaving the firm.

FT_ON_TO_GRAPH ( [(0,0)-(2,1)],(0.8,1),(1,1),(2,0.593) )

Units: Dimensionless
Table function of the Effect of Fatigue on Turnover. Set based on previous studies.
Uses:
effect_of_fatigue_on_turnover - Effect of fatigue on Turnover.

time_per_order = MAX ( Desired_To * effect_of_wp_on_to * effect_of_qp_on_to , MIN_PROCESSING_TPO )

Units: Hours/Order
Time to process each order. This time is calculated based on the underlying time per order (anchor value) and adjusted by the effects of work pressure and quality on turnover. The response is limited in the lower bound to reflect process constraints.
Uses:
delivered_quality - Quality delivered as perceived by customer. It is a function of the normalized gap between time allocated to customer order and the expectation that customer had.
dto_chg - Rate of change of the underlying desired time per order. An exponential smoothing
to past performance.
indicated_customer_service_expectations - Instantaneous customer service expectations. Anchored to the service provided by other suppliers in the industry and adapts to current service experienced.
potential_order_fulfillment - Number of orders that could be processed given the current service capacity and the corrections to work pressure and time per order.
t_to_adjust_dto - Time to adjust Desired Time per Order. Time constant for the adjustment of Desired time per Order to past performance.

MIN_PROCESSING_TPO = 0.1

Units: Hours/Order
Minimum processing time per order. Reflects the physical constraints of the processing of an order in terms of time allocated to process the order.
Uses:
time_per_order - Time to process each order. This time is calculated based on the underlying time per order (anchor value) and adjusted by the effects of work pressure and quality on turnover. The response is limited in the lower bound to reflect process constraints.

effect_of_wp_on_to = EXP ( ALPHA * work_pressure )

Units: Dimensionless
Effect of work pressure on time per order. The employees' response as modification of time per order to work pressure. This should be formulated as table function. The present formulation reflects the equation used for estimation.
Uses:
time_per_order - Time to process each order. This time is calculated based on the underlying time per order (anchor value) and adjusted by the effects of work pressure and quality on turnover. The response is limited in the lower bound to reflect process constraints.

ALPHA = -0.63934

Units: Dimensionless
Slope of the table function that reflects the effect of work pressure on time per order. Estimated to fit past data on time per order.
Uses:
effect_of_wp_on_to - Effect of work pressure on time per order. The employees' response as modification of time per order to work pressure. This should be formulated as table function. The present formulation reflects the equation used for estimation.

effect_of_qp_on_to = EXP ( GAMMA * quality_pressure )

Units: Dimensionless
Effect of quality pressure on time per order. The employees' response as modification of time per order to quality pressure. This should be formulated as table function. The present formulation reflects the substution done to estimated parameter.
Uses:
time_per_order - Time to process each order. This time is calculated based on the underlying time per order (anchor value) and adjusted by the effects of work pressure and quality on turnover. The response is limited in the lower bound to reflect process constraints.

GAMMA = 0

Units: Dimensionless
Slope of the table function that reflects the effect of quality pressure on time per order. Estimated to fit past data on time per order.
Uses:
effect_of_qp_on_to - Effect of quality pressure on time per order. The employees' response as modification of time per order to quality pressure. This should be formulated as table function. The present formulation reflects the equation used for estimation.

Desired_To = INTEG( dto_chg , INITIAL_DTO )

Units: Hours/Order
Underlying desired time per order. Reflects the anchor value for the time pr order estimation.
Uses:
desired_service_capacity - Estimated from the underlying desired time per order.
dto_chg - Rate of change of the underlying desired time per order. An exponential smoothing to past performance.
t_to_adjust_dto - Time to adjust Desired Time per Order. Time constant for the adjustment of Desired time per Order to past performance.
time_per_order - Time to process each order. This time is calculated based on the underlying time per order (anchor value) and adjusted by the effects of work pressure and quality on turnover. The response is limited in the lower bound to reflect process constraints.

INITIAL_DTO = 1.0758

Units: Hours/Order
Initial Desired Time per Order. Estimated to fit past data on time per order.
Uses:
Desired_To - Underlying desired time per order. Reflects the anchor value for the time per order estimation.
initial_perception_of_quality - Initial level of quality. Used to initialize quality perceptions in equilibrium.

dto_chg = ( time_per_order - Desired_To ) / t_to_adjust_dto

Units: Hours/(Order*Week)
Rate of change of the underlying desired time per order. An exponential smoothing to past performance.
Uses:
Desired_To - Underlying desired time per order. Reflects the anchor value for the time per order estimation.

t_to_adjust_dto = IF_THEN_ELSE ( time_per_order > Desired_To , TTUP , TTDN )

Units: Week
Time to adjust Desired Time per Order. Time constant for the adjustment of Desired time per Order to past performance.
Uses:
dto_chg - Rate of change of the underlying desired time per order. An exponential smoothing to past performance.

TTDN = 18.7321

Units: Week
Time constant for the downward adjustment of Desired TO. Estimated to fit past data on time per order.
Uses:
t_to_adjust_dto - Time to adjust Desired Time per Order. Time constant for the adjustment of Desired time per Order to past performance.

TTUP = 813564

Units: Week
Time constant for the upward adjustment of Desired TO. Estimated to fit past data on time per order.
Uses:
t_to_adjust_dto - Time to adjust Desired Time per Order. Time constant for the adjustment of Desired time per Order to past performance.

Perceived_Labor_Productivity = INTEG( ( ( service_capacity / ( total_labor * HWE ) ) - Perceived_Labor_Productivity ) / T_TO_PERCEIVE_LP , INITIAL_P_ELF )

Units: Dimensionless
Perceived Labor Productivity. Labor productivity is estimated by comparing the service capacity to the nominal service capacity.
Uses:
Desired_Labor - Smoothing of the instantaneous labor requirements based on desired service capacity and perceived labor productivity

INITIAL_P_ELF = 0.77907

Units: Dimensionless
Initial Perceived labor productivity. Estimated to fit past data on desired labor.
Uses:
Perceived_Labor_Productivity - Perceived Labor Productivity. Labor productivity is estimated by comparing the service capacity to the nominal service capacity.

T_TO_PERCEIVE_LP = 6.70261

Units: Week
Time to perceive labor productivity. Estimated to fit past data on desired labor.
Uses:
Perceived_Labor_Productivity - Perceived Labor Productivity. Labor productivity is estimated by comparing the service capacity to the nominal service capacity.

Desired_Labor = INTEG( ( desired_service_capacity / ( HWE * Perceived_Labor_Productivity ) - Desired_Labor ) / T_TO_ADJUST_DL , desired_service_capacity / ( HWE * Perceived_Labor_Productivity ) )

Units: Employee
Smoothing of the instantaneous labor requirements based on desired service capacity and perceived labor productivity
Uses:
labor_correction - The adjustment to close the gap between total labor and desired total labor.
replacement_rate - Replacement of turnover is only active when Desired labor is greater than existing labor. When the firm is trying to downsize it does not replace turnover.

T_TO_ADJUST_DL = 18.762

Units: Week
Time to Adjust desired labor. Estimated to fit past data on desired labor.
Uses:
Desired_Labor - Smoothing of the instantaneous labor requirements based on desired service capacity and perceived labor productivity

********************************
.Service_capacity
********************************
This sector models the acquisition, training and turnover of the labor force. It estimates labor's net productivity considering the level of experience and its training process. It also model the employees' decision to leave the firm based on their perceptions of quality and burnout.

total_labor = Rookies + Experienced_Personnel

Units: Employee
Total labor force (headcount).
Uses:
Perceived_Labor_Productivity - Perceived Labor Productivity. Labor productivity is estimated by comparing the service capacity to the nominal service capacity.
average_productivity_of_labor - Average Productivity of Labor. Includes the effects of fatigue and experience.
case_load - Cases in backlog per number of employees labor_correction - The adjustment to close the gap between total labor and desired total labor.
on_office_service_capacity - Number of person hours available to work (Total labor * hours per week per employee). The formulation reflects the effects of absenteeism not considered in the original model but of significant impact in the NH Lending Center.
replacement_rate - Replacement of turnover is only active when Desired labor is greater than existing labor. When the firm is trying to downsize it does not replace turnover.
turnover_fraction - Fractional turnover per week.

effective_labor_fraction = MAX ( 0, ( Experienced_Personnel + Rookies * ( ROOKIES'_EFFECTIVENESS - FRAC_EP_FOR_TRAINING ) ) / ( Experienced_Personnel + Rookies ) )

Units: Dimensionless
Effectiveness of labor force (based on the skill combination).
Uses:
service_capacity - The effective service capacity. Calculated by correcting the on office service capacity by the skill of employees and the effects of fatigue on productivity.

ROOKIES'_EFFECTIVENESS = 0.35

Units: Dimensionless
Effectiveness of Rookies relative to that of Experienced Personnel. Judgmentally set based on interviews.
Uses:
effective_labor_fraction - Effectiveness of labor force (based on the skill combination).

FRAC_EP_FOR_TRAINING = 0.05

Units: Dimensionless
Fraction of Sr Personnel's time required to train and supervise a Rookie. Judgmentally set based on interviews.
Uses:
effective_labor_fraction - Effectiveness of labor force (based on the skill combination).

Experienced_Personnel = INTEG( experience_rate - turnover_rate , INITIAL_EXPERIENCED_PERSONNEL )

Units: Employee
Employees that have reached full productivity.
Uses:
effective_labor_fraction - Effectiveness of labor force (based on the skill combination).
total_labor - Total labor force (headcount).
turnover_rate - Rate of people voluntarily leaving the firm.

INITIAL_EXPERIENCED_PERSONNEL = 64.099

Units: Employee
Initial number of Experienced personnel. Set based on historical data.
Uses:
Experienced_Personnel - Employees that have reached full productivity.

Rookies = INTEG( hiring_rate - experience_rate , INITIAL_ROOKIES )

Units: Employee
Employees that have been recently hired and have not yet achieved full productivity.
Uses:
effective_labor_fraction - Effectiveness of labor force (based on the skill combination).
experience_rate - Rate at which employees are becoming experienced.
total_labor - Total labor force (headcount).

INITIAL_ROOKIES = 14.06

Units: Employee
Initial number of rookies. Set based on historical data.
Uses:
Rookies - Employees that have been recently hired and have not yet achieved full productivity.

experience_rate = Rookies / T_FOR_EXPERIENCE

Units: Employee/Week
Rate at which employees are becoming experienced.
Uses:
Experienced_Personnel - Employees that have reached full productivity.
Rookies - Employees that have been recently hired and have not yet achieved full productivity.

T_FOR_EXPERIENCE = 12

Units: Week
Average amount of time it takes a Rookie to become fully effective.
Uses:
experience_rate - Rate at which employees are becoming experienced.

turnover_rate = Experienced_Personnel / ( T_FOR_TURNOVER * effect_of_fatigue_on_turnover * effect_of_qp_on_turnover )

Units: Employee/Week
Rate of people voluntarily leaving the firm.
Uses:
Experienced_Personnel - Employees that have reached full productivity.
replacement_rate - Replacement of turnover is only active when Desired labor is greater than existing labor. When the firm is trying to downsize it does not replace turnover.
turnover_fraction - Fractional turnover per week.

T_FOR_TURNOVER = 400.784

Units: Week
Average job tenure
Uses:
turnover_rate - Rate of people voluntarily leaving the firm.

hiring_rate = Vacancies / HIRING_DELAY

Units: Employee/Week
Rate at which employees are joining the service center.
Uses:
Rookies - Employees that have been recently hired and have not yet achieved full productivity.
Vacancies - Unfilled openings in the service center.

HIRING_DELAY = 29.9836

Units: Week
Time it takes to fill a vacancy one it has been declared. Estimated to fit past data on labor hiring.
Uses:
desired_vacancies - By Little's law, desired vacancies are based on the desired hiring rate and the time it takes to fill a vacancy.
hiring_rate - Rate at which employees are joining the service center.

Vacancies = INTEG( ( labor_order_rate - hiring_rate ) , INITIAL_VACANCIES )

Units: Employee
Unfilled openings in the service center
Uses:
hiring_rate - Rate at which employees are joining the service center.
labor_order_rate - The indicated labor order rate is constrained by the number of vacancies that is possible to cancel.
vacancies_correction - The adjustment to close the gap between vacancies and desired vacancies.

INITIAL_VACANCIES = 0.0008

Units: Employee
Initialized in equilibrium.
Uses:
Vacancies - Unfilled openings in the service center

desired_vacancies = desired_hiring * HIRING_DELAY

Units: Employee
By Little's law, desired vacancies are based on the desired hiring rate and the time it takes to fill a vacancy.
Uses:
vacancies_correction - The adjustment to close the gap between vacancies and desired vacancies.

indicated_labor_order_rate = desired_hiring + vacancies_correction

Units: Employee/Week
The overall desired correction in the labor stocks and supply line.
Uses:
labor_order_rate - The indicated labor order rate is constrained by the number of vacancies that is possible to cancel.

vacancies_correction = ( desired_vacancies - Vacancies ) / T_TO_ADJUST_LABOR

Units: Employee/Week
The adjustment to close the gap between vacancies and desired vacancies.
Uses:
indicated_labor_order_rate - The overall desired correction in the labor stocks and supply line.

T_TO_ADJUST_LABOR = 11.5442

Units: Week
Time that management takes between recognizing a need to adjust labor and acting on that information. Estimated to fit past data on labor hiring.
Uses:
labor_correction - The adjustment to close the gap between total labor and desired total labor.
vacancies_correction - The adjustment to close the gap between vacancies and desired vacancies.

desired_hiring = replacement_rate + labor_correction

Units: Employee/Week
Replacement of turnover (when appropriate) plus correction of discrepancies between desired and existing labor.
Uses:
desired_vacancies - By Little's law, desired vacancies are based on the desired hiring rate and the time it takes to fill a vacancy.
indicated_labor_order_rate - The overall desired correction in the labor stocks and supply line.

replacement_rate = IF_THEN_ELSE ( Desired_Labor >= total_labor , turnover_rate , 0)

Units: Employee/Week
Replacement of turnover is only active when Desired labor is greater than existing labor. When the firm is trying to downsize it does not replace turnover.
Uses:
desired_hiring - Replacement of turnover (when appropriate) plus correction of discrepancies between desired and existing labor.

labor_correction = ( Desired_Labor - total_labor ) / T_TO_ADJUST_LABOR

Units: Employee/Week
The adjustment to close the gap between total labor and desired total labor.
Uses:
desired_hiring - Replacement of turnover (when appropriate) plus correction of discrepancies between desired and existing labor.

labor_order_rate = MAX ( - Vacancies / T_TO_CANCEL_VACANCIES , indicated_labor_order_rate )

Units: Employee/Week
The indicated labor order rate is constrained by the number of vacancies that is possible to cancel.
Uses:
Vacancies - Unfilled openings in the service center

T_TO_CANCEL_VACANCIES = 1

Units: Week
Time to cancel vacancies. Used to control for the non-negativity of the vacancies stock. Judgmentally set based on interviews.
Uses:
labor_order_rate - The indicated labor order rate is constrained by the number of vacancies that is possible to cancel.

********************************
.Quality
********************************
This sector models the perceptions and expectations of quality for the three main agents involved in the service delivery process -- employees, managers and customers .Perception is modeled as exponential adjusting processes, while expectations are modeled as levels of aspirations with exogenous anchoring to represent the intrinsic biases of each agent.

delivered_quality = TPO_ON_DQ_GRAPH ( ( time_per_order - Cust_Service_Expectations ) / Cust_Service_Expectations)

Units: Quality
Quality delivered as perceived by customer. It is a function of the normalized gap between time allocated to customer order and the expectation that customer had.
Uses:
Cust_Perception_Of_Quality - Customers' perception of Quality delivered. Initialized in equilibrium from know parameters.
Emp_Perception_Of_Quality - Employees' perception of Quality delivered. Initialized in equilibrium from know parameters.
Mgmt_Perception_Of_Quality - Management's perception of Quality delivered. Initialized in equilibrium from know parameters.

TPO_ON_DQ_GRAPH ( [(-0.5,0)-(0.5,2)], (-0.5,0.2),(-0.4,0.45),(-0.3,0.65),(-0.2,0.8),(-0.1,0.95),(0,1),(0.1,1.05),(0.2,1.2),(0.3,1.35),(0.4,1.55),(0.5,1.8) )

Units: Quality
Effect of Time per order on Delivered Quality. Table function formulated to reflect a 'tolerance zone' and Kano's classification of attributes.
Uses:
delivered_quality - Quality delivered as perceived by customer. It is a function of the normalized gap between time allocated to customer order and the expectation that customer had.
initial_perception_of_quality - Initial level of quality. Used to initialize quality perceptions in equilibrium.

Emp_Perception_Of_Quality = INTEG( ( delivered_quality - Emp_Perception_Of_Quality ) / T_FOR_EMP_TO_PERCEIVE , initial_perception_of_quality )

Units: Quality
Employees' perception of Quality delivered. Initialized in equilibrium from know parameters.
Uses:
effect_of_qp_on_turnover - Effect of quality pressure on turnover. Set based on previous studies.
indicated_quality_standard - Instantaneous Quality Standard. Anchored t oemployees' perception of delivered quality and adapts to management desired quality goal.
quality_pressure - The dissonance created in employees by the gap between what they perceive to be the delivered quality and an internally held quality standard.

initial_perception_of_quality = TPO_ON_DQ_GRAPH ( ( INITIAL_DTO - CUST_EXPECTATION_REFERENCE ) / CUST_EXPECTATION_REFERENCE )

Units: Quality
Initial level of quality. Used to initialize quality perceptions in equilibrium.
Uses:
Cust_Perception_Of_Quality - Customers' perception of Quality delivered. Initialized in equilibrium from know parameters.
Emp_Perception_Of_Quality - Employees' perception of Quality delivered. Initialized in equilibrium from know parameters.
Mgmt_Perception_Of_Quality - Management's perception of Quality delivered. Initialized in equilibrium from know parameters.

T_FOR_EMP_TO_PERCEIVE = 4

Units: Week
Time for employees to perceive delivered quality. Judgmentally set based on interviews.
Uses:
Emp_Perception_Of_Quality - Employees' perception of Quality delivered. Initialized in equilibrium from know parameters.

Mgmt_Perception_Of_Quality = INTEG( ( delivered_quality - Mgmt_Perception_Of_Quality ) / T_FOR_MGMT_TO_PERCEIVE , initial_perception_of_quality )

Units: Quality
Management's perception of Quality delivered. Initialized in equilibrium from know parameters.

T_FOR_MGMT_TO_PERCEIVE = 12

Units: Week
Time for management to perceive service quality. Parameter not active in base simulation.
Uses:
Mgmt_Perception_Of_Quality - Management's perception of Quality delivered. Initialized in equilibrium from know parameters.

Cust_Perception_Of_Quality = INTEG( ( delivered_quality - Cust_Perception_Of_Quality ) / T_TO_PERCEIVE_CUST_REPORT_ON_QUALITY , initial_perception_of_quality )

Units: Quality
Customers' perception of Quality delivered. Initialized in equilibrium from know parameters.

T_TO_PERCEIVE_CUST_REPORT_ON_QUALITY = 52

Units: Week
Time for customers to adjust their reports of perceived service quality. Parameter not active in base simulation.
Uses:
Cust_Perception_Of_Quality - Customers' perception of Quality delivered. Initialized in equilibrium from know parameters.

Emp_Quality_Expectation = INTEG( ( indicated_quality_standard - Emp_Quality_Expectation ) / T_TO_ADJUST_QS , INITIAL_QS )

Units: Quality
Quality Standard. Employees' desired level of service delivery.
Uses:
quality_pressure - The dissonance created in employees by the gap between what they perceive to be the delivered quality and an internally held quality standard.

INITIAL_QS = 0.95538

Units: Quality
Initial Quality Standard. Estimated to fit past data on time per order.
Uses:
Emp_Quality_Expectation - Quality Standard. Employees' desired level of service delivery.

T_TO_ADJUST_QS = 26

Units: Week
Time to adjust quality standard. Judgmentally set based on interviews.
Uses:
Emp_Quality_Expectation - Quality Standard. Employees' desired level of service delivery.

indicated_quality_standard = OMEGA_E * Emp_Perception_Of_Quality + ( 1 - OMEGA_E ) * MGMT_QUALITY_GOAL

Units: Quality
Instantaneous Quality Standard. Anchored t oemployees' perception of delivered quality and adapts to management desired quality goa.
Uses:
Emp_Quality_Expectation - Quality Standard. Employees' desired level of service delivery.

OMEGA_E = 1

Units: Dimensionless
Weight of employees' perception in the formation of quality standard.
Uses:
indicated_quality_standard - Instantaneous Quality Standard. Anchored t oemployees' perception of delivered quality and adapts to management desired quality goa.

MGMT_QUALITY_GOAL = 1.0

Units: Quality
Management's desired level of service (1.0 = no complaints).
Uses:
indicated_quality_standard - Instantaneous Quality Standard. Anchored t oemployees' perception of delivered quality and adapts to management desired quality goa.

Cust_Service_Expectations = INTEG( ( indicated_customer_service_expectations - Cust_Service_Expectations ) / T_TO_ADJUST_CE , indicated_customer_service_expectations )

Units: Hours/Order
Expectation of time per order that customers have.
Uses:
delivered_quality - Quality delivered as perceived by customer. It is a function of the normalized gap between time allocated to customer order and the expectation that customer had.

CUST_EXPECTATION_REFERENCE = 1.16519

Units: Hours/Order
Fixed external expectation that customers have for time allocated per order. Estimated to fit past data on time per order.
Uses:
indicated_customer_service_expectations - Instantaneous customer service expectations. Anchored to the service provided by other suppliers in the industry and adapts to current service experienced.
initial_perception_of_quality - Initial level of quality. Used to initialize quality perceptions in equilibrium.

T_TO_ADJUST_CE = 52

Units: Week
Time for customer to adjust expectations to past performance. Parameter not active in base simulation.
Uses:
Cust_Service_Expectations - Expectation of time per order that customers have.

indicated_customer_service_expectations = OMEGA_C * CUST_EXPECTATION_REFERENCE + ( 1 - OMEGA_C ) * time_per_order

Units: Hours/Order
Instantaneous customer service expectations. Anchored to the service provided by other suppliers in the industry and adapts to current service experienced.
Uses:
Cust_Service_Expectations - Expectation of time per order that customers have.

OMEGA_C = 1

Units: Dimensionless
Weight to external (fix) standard for the formation of customer's service expectations. Set as a fortiori assumption.
Uses:
indicated_customer_service_expectations - Instantaneous customer service expectations. Anchored to the service provided by other suppliers in the industry and adapts to current service experienced.

effect_of_qp_on_turnover = QP_ON_TO_GRAPH ( Emp_Perception_Of_Quality )

Units: Dimensionless
Effect of quality pressure on turnover. Set based on previous studies.
Uses:
turnover_rate - Rate of people voluntarily leaving the firm.

QP_ON_TO_GRAPH ( [(0.5,0)-(1.5,2)],(0.5,1),(1,1),(1.5,1) )

Units: Dimensionless
Effect of Quality pressure on turnover. Table function set based on previous studies.
Uses:
effect_of_qp_on_turnover - Effect of quality pressure on turnover. Set based on previous studies.

quality_pressure = ( Emp_Quality_Expectation - Emp_Perception_Of_Quality ) / Emp_Quality_Expectation

Units: Dimensionless
The dissonance created in employees by the gap between what they perceive to be the delivered quality and an internally held quality standard.
Uses:
effect_of_qp_on_to - Effect of quality pressure on time per order. The employees' response as modification of time per order to quality pressure. This should be formulated as table function. The present formulation reflects the substution done to estimated parameter.

********************************
.Measures
********************************
Measures to evaluate the performance of the service center. Included to facilitate diagnosis of performance but not reported model description.

avg_delivery_delay = Service_Backlog / order_fulfillment

Units: Week
The average delivery delay in the service center (Little's law).

net_overtime_gain = work_intensity * effect_of_fatigue_on_prod

Units: Dimensionless
Net effect of extended work intensity.

turnover_fraction = turnover_rate / total_labor

Units: Dimensionless/Week
Fractional turnover per week.

case_load = Service_Backlog / total_labor

Units: Order/Employee
Cases in backlog per number of employees

production_ratio = customer_orders / order_fulfillment

Units: Dimensionless
Ratio of incoming orders to outgoing orders.

average_productivity_of_labor = service_capacity / total_labor

Units: Hours/(Week*Employee)
Average Productivity of Labor. Includes the effects of fatigue and experience.

********************************
.Inputs
********************************

customer_orders = IF_THEN_ELSE ( Time <= 104, CUSTOMER_ords , a_customer_ords )

Units: Order/Week
Orders incoming to the service center. Up to week 104 it is driven by exogenous data series (NWD), for the reminder of the simulation, an artificial series (a Customer ords) is utilized.
Uses:
Service_Backlog - Service Backlog. Initialized in equilibrium based on the incoming customer orders.
production_ratio - Ratio of incoming orders to outgoing orders.

CUSTOMER_ords := NWD

Units: Order/Week
Renaming of Customer Orders per Week. Intermediate variable introduced to allow plotting and manipulation of the data series.
Uses:
customer_orders - Orders incoming to the service center. Up to week 104 it is driven by exogenous data series (NWD), for the reminder of the simulation, an artificial series (a Customer ords) is utilized.

NWD

Units: Order/Week
Customer Orders per Week. Exogenous data series to drive the model.
Uses:
CUSTOMER_ords - Renaming of Customer Orders per Week. Intermediate variable introduced to allow plotting and manipulation of the data series.

a_customer_ords = PINK_NOISE ( 2071.07, 77.48, 1, TIME_STEP )

Units: Order/Week
Artificial Customer Orders per Week; generated through the pink noise macro.
Uses:
customer_orders - Orders incoming to the service center. Up to week 104 it is driven by exogenous data series (NWD), for the reminder of the simulation, an artificial series (a Customer ords) is utilized.

absenteeism = IF_THEN_ELSE ( Time <= 104, ( PER * HWE - NTA ) / ( PER * HWE ) , a_absenteeism )

Units: Dimensionless
Fraction of Absentee employees -- includes vacation time. Calculated from exogenous data series. The difference between total number of hours available employees and the number of employees that showed up to work. Up to week 104 it is driven by exogenous data series (PER & NTA), for the reminder of the simulation, an artificial series (a Absenteeism) is utilized.
Uses:
on_office_service_capacity - Number of person hours available to work (Total labor * hours per week per employee). The formulation reflects the effects of absenteeism not considered in the original model but of significant impact in the NH Lending Center.

PER

Units: Employee
Personnel. Exogenous data series used to calculate absenteeism. Number of employees currently employed in the lending center.
Uses:
absenteeism - Fraction of Absentee employees -- includes vacation time. Calculated from exogenous data series. The difference between total number of hours available employees and the number of employees that showed up to work. Up to week 104 it is driven by exogenous data series (PER & NTA), for the reminder of the simulation, an artificial series (a Absenteeism) is utilized.

NTA

Units: Hours/Week
Net time Available. Exogenous data series used to calculate absenteeism. Number of hours available per week.
Uses:
absenteeism - Fraction of Absentee employees -- includes vacation time. Calculated from exogenous data series. The difference between total number of hours available employees and the number of employees that showed up to work. Up to week 104 it is driven by exogenous data series (PER & NTA), for the reminder of the simulation, an artificial series (a Absenteeism) is utilized.

a_absenteeism = PINK_NOISE ( 0.1654, 0.032, 2, TIME_STEP )

Units: Dimensionless
Artificial Fraction of Absentee employees; generated through the pink noise macro.
Uses:
absenteeism - Fraction of Absentee employees -- includes vacation time. Calculated from exogenous data series. The difference between total number of hours available employees and the number of employees that showed up to work. Up to week 104 it is driven by exogenous data series (PER & NTA), for the reminder of the simulation, an artificial series (a Absenteeism) is utilized.

HWE = 35

Units: Hours/(Week*Employee)
Hours per week per employee. Conversion constant.
Uses:
Desired_Labor - Smoothing of the instantaneous labor requirements based on desired service capacity and perceived labor productivity
Perceived_Labor_Productivity - Perceived Labor Productivity. Labor productivity is estimated by comparing the service capacity to the nominal service capacity.
absenteeism - Fraction of Absentee employees -- includes vacation time. Calculated from exogenous data series. The difference between total number of hours available employees and the number of employees that showed up to work. Up to week 104 it is driven by exogenous data series (PER & NTA), for the reminder of the simulation, an artificial series (a Absenteeism) is utilized.
on_office_service_capacity - Number of person hours available to work (Total labor * hours per week per employee). The formulation reflects the effects of absenteeism not considered in the original model but of significant impact in the NH Lending Center.

********************************
.Control
********************************

INITIAL_TIME = 53

Units: Week
The time at which the simulation starts.
Uses:
Time - Internally defined simulation time.

FINAL_TIME = 300

Units: Week
The time at which the simulation ends.

TIME_STEP = 0.125

Units: Week
The solution interval for the model.
Uses:
a_absenteeism - Artificial Fraction of Absentee employees; generated through the pink noise macro.
a_customer_ords - Artificial Customer Orders per Week; generated through the pink noise macro.

SAVEPER = 1

Units: Week
The frequency with which results are saved.