Skip to content

Latest commit

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Scotiabank OEC Data Simulation

Overview

This repository contains code to run a discrete-event simulation that creates synthetic event logs for Scotiabanks OEC system for testing and demonstration purposes. It models how employees create and work on customer complaints, requests, and claims.

Setup

To setup the simulation on your own machine run the following commands in order:

git clone https://github.com/QuMuLab/scotiabank-data-simulation.git
cd scotiabank-data-simulation
python -m venv oec_simulation
source oec_simulation/bin/activate # macOS or Linux
oec_simulation\Scripts\activate # Windows
pip install -r requirements.txt

Usage

The simulation can be ran in headless mode with:

python simulation/OEC_simulation.py

Or can be ran through an interactive dashboard with:

python simulation/OEC_simulation.py --dashboard

Configuration

In headless mode, the simulation settings will pull from the values in config/preferences.yaml, you can edit this file as you see fit and re-run the simulation to adjust it's output. Alternatively, you can pass a flag while running in headless mode with the name of a parameter and a value to overwrite that parameter's value in the yaml file.

For example:

python simulation/OEC_simulation.py --sla_multiplier 0.2 --base_reassign_chance 0.4

Run python simulation/OEC_simulation.py --help for a full list of the accepted parameters. But note that parameter flags will not work if the script is run with --dashboard.

If you ran the simulation with --dashboard you can edit the settings through the dashboard, which is accesible at http://127.0.0.1:8050. You can easily adjust the settings without having to rerun the script by clicking "Back to Setup" after a run of the simulation. The dashboard autofills with the defaults from preferences.yaml.

Changes made directly to preferences.yaml will save between runs of the simulation, but changes made through the dashbaord or through the command line flags will not.

Additionally, you can change what kind of incidents are created by adding, removing, or editing variants in config/incidents.yaml.

Parameters

A brief description of what each parameter in preferences.yaml does can be found below.

settings

KeyDescription
start_dateSimulated calendar start date
simulation_daysNumber of days the simulation runs for
work_day.start / work_day.endThe business hours employees will work
employee_countNumber of employees
transaction_date_windowMax number of days old an incident's transaction day can be
employee_timeout.minimum / .maximumHours an idle employee waits before checking for new work
employee_work_session.minimum / .maximumHours a single work session on an incident can be
employee_work_breakHours max between work sessions
employee_clarification_wait.minimum / .maximumHours to wait on a customer clarification response
noise_percentageGaussian noise applied to the probabilities & weights each run

probabilities

KeyDescription
select_unassigned_incident_chanceChance an employee pulls from the unassigned queue instead of creating a new incident
select_new_incident_chanceChance a newly created incident is worked on immediately rather than queued
sla_multiplierMultiplier applied to each incident variant's base SLA
incident_high_priority_thresholdFraction of SLA time remaining for an incident to be "high priority"
hand_over_chanceChance an incident is handed off to another employee after a break
base_clarification_chanceBase chance of requesting a customer clarification
incident_resolution_sessions_weightAdded resolution chance per completed work session
incorrect_field_chanceBase chance a given field is populated incorrectly
fraud_clarify_multiplierMultiplier on clarification chance for suspected-fraud incidents
clarification_retry_chanceChance of a repeat clarification when fixing an incorrect field
clarification_retry_decayDecay applied to retry chance on each subsequent attempt
base_reassign_chanceChance an incident is reassigned to a different transit
base_cancel_chanceBase chance an incident is cancelled instead of closed
incident_blowup_chanceChance of an access-control "burst" event on an incident

weights

KeyDescription
providersRelative weights for provider values (e.g. TSYS, NOT_APPLICABLE, FDR) assigned to Claims/Requests incidents
prioritiesRelative weights for High / Medium / Low incident priority
reception_channelsRelative weights for how an incident was received (Branch, Phone Call, Email, etc.)
missing_fieldsRelative weight controlling how often each listed field is generated incorrectly or missing
root_causesPer incident type (Claims, Requests, Complaints), relative weights over incident root causes
clarification_reasonsRelative weights over the reason given when a clarification is requested
factor_decaysDecay factors (Sessions, Clarifications) used when scoring an incident's closure response type

About

Simulation to create synthetic Scotiabank OEC data

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages