import simulation_time
from icecream import ic
pdata = []
pe_ins_sol = []  # protocol engine inputs
pe_ins_unsol = []
pe_outs = {}  # protocol engine outputs
pe_waits = {}  # protocol engine waits
pe_outs['123'] = {}  # when a staff member signs in with a device the device needs an empty dictionary
pe_outs['234'] = {}  # these four pe_outs rows will go away when we have a staff sign in process
pe_outs['345'] = {}
pe_outs['456'] = {}
pe_outs['567'] = {}
pe_outs['678'] = {}
pe_outs['789'] = {}
pe_outs['987'] = {}
pe_outs['876'] = {}
pe_outs['765'] = {}
pe_outs['654'] = {}
pe_outs['543'] = {}

log_dict = {}
token_status_dict ={}
flow_data = {}


adat = {
    'pers101': {
        '~1': [[101, None, None, 's', 'Tina', None, 1603824276.5]],
        '~14': [[102, None, None, '~', '~22', None, 1603824276.5]],
        '~15': [[103, None, None, 'f', 40, '~40', 1603824276.5]],
        '~16': [[104, None, None, 's', '202-888-5431', None, 1603824276.5]],
        '~17': [[105, None, None, '~', '~28', None, 1603824276.5]],
        '~2': [[116, None, None, '~', '~5', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 1.7, '~46', 1603800000.5]],
        '~19': [[113, None, None, 'f', 70, '~41', 1603800000.5],
                [114, None, None, 'f', 71, '~41', 1603812000.5],
                [115, None, None, 'f', 72, '~41', 1603824276.5]]
    },
    'pers102': {
        '~1': [[107, None, None, 's', 'Tony', None, 1603824276.5]],
        '~14': [[108, None, None, '~', '~21', None, 1603824276.5]],
        '~15': [[109, None, None, 'f', 35, '~40', 1603824276.5]],
        '~16': [[110, None, None, 's', '703-999-3341', None, 1603824276.5]],
        '~17': [[111, None, None, '~', '~29', None, 1603824276.5]],
        '~2': [[112, None, None, '~', '~30', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 1.9, '~46', 1603800000.5]],
        '~19': [[116, None, None, 'f', 75, '~41', 1603800000.5],
                [117, None, None, 'f', 74, '~41', 1603812000.5],
                [118, None, None, 'f', 75, '~41', 1603824276.5]]
    },
    'pers103': {
        '~1': [[121, None, None, 's', 'Bill', None, 1603824276.5]],
        '~14': [[122, None, None, '~', '~21', None, 1603824276.5]],
        '~15': [[123, None, None, 'f', 21, '~40', 1603824276.5]],
        '~16': [[124, None, None, 's', '703-999-8888', None, 1603824276.5]],
        '~17': [[125, None, None, '~', '~29', None, 1603824276.5]],
        '~2': [[126, None, None, '~', '~30', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 2.0, '~46', 1603800000.5]],
        '~19': [[127, None, None, 'f', 88, '~41', 1603800000.5],
                [128, None, None, 'f', 92, '~41', 1603812000.5],
                [129, None, None, 'f', 94, '~41', 1603824276.5]]
    },
    'pers104': {
        '~1': [[131, None, None, 's', 'Mary', None, 1603824276.5]],
        '~14': [[132, None, None, '~', '~22', None, 1603824276.5]],
        '~15': [[133, None, None, 'f', 66, '~40', 1603824276.5]],
        '~16': [[134, None, None, 's', '703-999-1111', None, 1603824276.5]],
        '~17': [[135, None, None, '~', '~29', None, 1603824276.5]],
        '~2': [[136, None, None, '~', '~30', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 1.8, '~46', 1603800000.5]],
        '~19': [[137, None, None, 'f', 44, '~41', 1603800000.5],
                [138, None, None, 'f', 43, '~41', 1603812000.5],
                [139, None, None, 'f', 42, '~41', 1603824276.5]]
    },
    'pers105': {
        '~1': [[141, None, None, 's', 'Lisa', None, 1603824276.5]],
        '~14': [[142, None, None, '~', '~22', None, 1603824276.5]],
        '~15': [[143, None, None, 'f', 35, '~40', 1603824276.5]],
        '~16': [[144, None, None, 's', '703-999-3341', None, 1603824276.5]],
        '~17': [[145, None, None, '~', '~29', None, 1603824276.5]],
        '~2': [[146, None, None, '~', '~30', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 1.6, '~46', 1603800000.5]],
        '~19': [[147, None, None, 'f', 54, '~41', 1603800000.5],
                [148, None, None, 'f', 56, '~41', 1603812000.5],
                [149, None, None, 'f', 53, '~41', 1603824276.5]]
    },
    'pers106': {
        '~1': [[141, None, None, 's', 'Neal', None, 1603824276.5]],
        '~14': [[142, None, None, '~', '~21', None, 1603824276.5]],
        '~15': [[143, None, None, 'f', 18, '~40', 1603824276.5]],
        '~16': [[144, None, None, 's', '612-926-0000', None, 1603824276.5]],
        '~17': [[145, None, None, '~', '~29', None, 1603824276.5]],
        '~2': [[146, None, None, '~', '~30', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 1.8, '~46', 1603800000.5]],
        '~19': [[147, None, None, 'f', 54, '~41', 1603800000.5],
                [148, None, None, 'f', 56, '~41', 1603812000.5],
                [149, None, None, 'f', 59, '~41', 1603824276.5]]
    }
}
de37fa1901f8211d6b7099fd34a5e7d89f154eaf
<mask token>

<mask token>
pdata = []
pe_ins_sol = []
pe_ins_unsol = []
pe_outs = {}
pe_waits = {}
pe_outs['123'] = {}
pe_outs['234'] = {}
pe_outs['345'] = {}
pe_outs['456'] = {}
pe_outs['567'] = {}
pe_outs['678'] = {}
pe_outs['789'] = {}
pe_outs['987'] = {}
pe_outs['876'] = {}
pe_outs['765'] = {}
pe_outs['654'] = {}
pe_outs['543'] = {}
log_dict = {}
token_status_dict = {}
flow_data = {}
adat = {'pers101': {'~1': [[101, None, None, 's', 'Tina', None, 
    1603824276.5]], '~14': [[102, None, None, '~', '~22', None, 
    1603824276.5]], '~15': [[103, None, None, 'f', 40, '~40', 1603824276.5]
    ], '~16': [[104, None, None, 's', '202-888-5431', None, 1603824276.5]],
    '~17': [[105, None, None, '~', '~28', None, 1603824276.5]], '~2': [[116,
    None, None, '~', '~5', None, 1603824276.5]], '~45': [[116, None, None,
    'f', 1.7, '~46', 1603800000.5]], '~19': [[113, None, None, 'f', 70,
    '~41', 1603800000.5], [114, None, None, 'f', 71, '~41', 1603812000.5],
    [115, None, None, 'f', 72, '~41', 1603824276.5]]}, 'pers102': {'~1': [[
    107, None, None, 's', 'Tony', None, 1603824276.5]], '~14': [[108, None,
    None, '~', '~21', None, 1603824276.5]], '~15': [[109, None, None, 'f', 
    35, '~40', 1603824276.5]], '~16': [[110, None, None, 's',
    '703-999-3341', None, 1603824276.5]], '~17': [[111, None, None, '~',
    '~29', None, 1603824276.5]], '~2': [[112, None, None, '~', '~30', None,
    1603824276.5]], '~45': [[116, None, None, 'f', 1.9, '~46', 1603800000.5
    ]], '~19': [[116, None, None, 'f', 75, '~41', 1603800000.5], [117, None,
    None, 'f', 74, '~41', 1603812000.5], [118, None, None, 'f', 75, '~41', 
    1603824276.5]]}, 'pers103': {'~1': [[121, None, None, 's', 'Bill', None,
    1603824276.5]], '~14': [[122, None, None, '~', '~21', None, 
    1603824276.5]], '~15': [[123, None, None, 'f', 21, '~40', 1603824276.5]
    ], '~16': [[124, None, None, 's', '703-999-8888', None, 1603824276.5]],
    '~17': [[125, None, None, '~', '~29', None, 1603824276.5]], '~2': [[126,
    None, None, '~', '~30', None, 1603824276.5]], '~45': [[116, None, None,
    'f', 2.0, '~46', 1603800000.5]], '~19': [[127, None, None, 'f', 88,
    '~41', 1603800000.5], [128, None, None, 'f', 92, '~41', 1603812000.5],
    [129, None, None, 'f', 94, '~41', 1603824276.5]]}, 'pers104': {'~1': [[
    131, None, None, 's', 'Mary', None, 1603824276.5]], '~14': [[132, None,
    None, '~', '~22', None, 1603824276.5]], '~15': [[133, None, None, 'f', 
    66, '~40', 1603824276.5]], '~16': [[134, None, None, 's',
    '703-999-1111', None, 1603824276.5]], '~17': [[135, None, None, '~',
    '~29', None, 1603824276.5]], '~2': [[136, None, None, '~', '~30', None,
    1603824276.5]], '~45': [[116, None, None, 'f', 1.8, '~46', 1603800000.5
    ]], '~19': [[137, None, None, 'f', 44, '~41', 1603800000.5], [138, None,
    None, 'f', 43, '~41', 1603812000.5], [139, None, None, 'f', 42, '~41', 
    1603824276.5]]}, 'pers105': {'~1': [[141, None, None, 's', 'Lisa', None,
    1603824276.5]], '~14': [[142, None, None, '~', '~22', None, 
    1603824276.5]], '~15': [[143, None, None, 'f', 35, '~40', 1603824276.5]
    ], '~16': [[144, None, None, 's', '703-999-3341', None, 1603824276.5]],
    '~17': [[145, None, None, '~', '~29', None, 1603824276.5]], '~2': [[146,
    None, None, '~', '~30', None, 1603824276.5]], '~45': [[116, None, None,
    'f', 1.6, '~46', 1603800000.5]], '~19': [[147, None, None, 'f', 54,
    '~41', 1603800000.5], [148, None, None, 'f', 56, '~41', 1603812000.5],
    [149, None, None, 'f', 53, '~41', 1603824276.5]]}, 'pers106': {'~1': [[
    141, None, None, 's', 'Neal', None, 1603824276.5]], '~14': [[142, None,
    None, '~', '~21', None, 1603824276.5]], '~15': [[143, None, None, 'f', 
    18, '~40', 1603824276.5]], '~16': [[144, None, None, 's',
    '612-926-0000', None, 1603824276.5]], '~17': [[145, None, None, '~',
    '~29', None, 1603824276.5]], '~2': [[146, None, None, '~', '~30', None,
    1603824276.5]], '~45': [[116, None, None, 'f', 1.8, '~46', 1603800000.5
    ]], '~19': [[147, None, None, 'f', 54, '~41', 1603800000.5], [148, None,
    None, 'f', 56, '~41', 1603812000.5], [149, None, None, 'f', 59, '~41', 
    1603824276.5]]}}

import simulation_time
from icecream import ic
pdata = []
pe_ins_sol = []
pe_ins_unsol = []
pe_outs = {}
pe_waits = {}
pe_outs['123'] = {}
pe_outs['234'] = {}
pe_outs['345'] = {}
pe_outs['456'] = {}
pe_outs['567'] = {}
pe_outs['678'] = {}
pe_outs['789'] = {}
pe_outs['987'] = {}
pe_outs['876'] = {}
pe_outs['765'] = {}
pe_outs['654'] = {}
pe_outs['543'] = {}
log_dict = {}
token_status_dict = {}
flow_data = {}
adat = {'pers101': {'~1': [[101, None, None, 's', 'Tina', None, 
    1603824276.5]], '~14': [[102, None, None, '~', '~22', None, 
    1603824276.5]], '~15': [[103, None, None, 'f', 40, '~40', 1603824276.5]
    ], '~16': [[104, None, None, 's', '202-888-5431', None, 1603824276.5]],
    '~17': [[105, None, None, '~', '~28', None, 1603824276.5]], '~2': [[116,
    None, None, '~', '~5', None, 1603824276.5]], '~45': [[116, None, None,
    'f', 1.7, '~46', 1603800000.5]], '~19': [[113, None, None, 'f', 70,
    '~41', 1603800000.5], [114, None, None, 'f', 71, '~41', 1603812000.5],
    [115, None, None, 'f', 72, '~41', 1603824276.5]]}, 'pers102': {'~1': [[
    107, None, None, 's', 'Tony', None, 1603824276.5]], '~14': [[108, None,
    None, '~', '~21', None, 1603824276.5]], '~15': [[109, None, None, 'f', 
    35, '~40', 1603824276.5]], '~16': [[110, None, None, 's',
    '703-999-3341', None, 1603824276.5]], '~17': [[111, None, None, '~',
    '~29', None, 1603824276.5]], '~2': [[112, None, None, '~', '~30', None,
    1603824276.5]], '~45': [[116, None, None, 'f', 1.9, '~46', 1603800000.5
    ]], '~19': [[116, None, None, 'f', 75, '~41', 1603800000.5], [117, None,
    None, 'f', 74, '~41', 1603812000.5], [118, None, None, 'f', 75, '~41', 
    1603824276.5]]}, 'pers103': {'~1': [[121, None, None, 's', 'Bill', None,
    1603824276.5]], '~14': [[122, None, None, '~', '~21', None, 
    1603824276.5]], '~15': [[123, None, None, 'f', 21, '~40', 1603824276.5]
    ], '~16': [[124, None, None, 's', '703-999-8888', None, 1603824276.5]],
    '~17': [[125, None, None, '~', '~29', None, 1603824276.5]], '~2': [[126,
    None, None, '~', '~30', None, 1603824276.5]], '~45': [[116, None, None,
    'f', 2.0, '~46', 1603800000.5]], '~19': [[127, None, None, 'f', 88,
    '~41', 1603800000.5], [128, None, None, 'f', 92, '~41', 1603812000.5],
    [129, None, None, 'f', 94, '~41', 1603824276.5]]}, 'pers104': {'~1': [[
    131, None, None, 's', 'Mary', None, 1603824276.5]], '~14': [[132, None,
    None, '~', '~22', None, 1603824276.5]], '~15': [[133, None, None, 'f', 
    66, '~40', 1603824276.5]], '~16': [[134, None, None, 's',
    '703-999-1111', None, 1603824276.5]], '~17': [[135, None, None, '~',
    '~29', None, 1603824276.5]], '~2': [[136, None, None, '~', '~30', None,
    1603824276.5]], '~45': [[116, None, None, 'f', 1.8, '~46', 1603800000.5
    ]], '~19': [[137, None, None, 'f', 44, '~41', 1603800000.5], [138, None,
    None, 'f', 43, '~41', 1603812000.5], [139, None, None, 'f', 42, '~41', 
    1603824276.5]]}, 'pers105': {'~1': [[141, None, None, 's', 'Lisa', None,
    1603824276.5]], '~14': [[142, None, None, '~', '~22', None, 
    1603824276.5]], '~15': [[143, None, None, 'f', 35, '~40', 1603824276.5]
    ], '~16': [[144, None, None, 's', '703-999-3341', None, 1603824276.5]],
    '~17': [[145, None, None, '~', '~29', None, 1603824276.5]], '~2': [[146,
    None, None, '~', '~30', None, 1603824276.5]], '~45': [[116, None, None,
    'f', 1.6, '~46', 1603800000.5]], '~19': [[147, None, None, 'f', 54,
    '~41', 1603800000.5], [148, None, None, 'f', 56, '~41', 1603812000.5],
    [149, None, None, 'f', 53, '~41', 1603824276.5]]}, 'pers106': {'~1': [[
    141, None, None, 's', 'Neal', None, 1603824276.5]], '~14': [[142, None,
    None, '~', '~21', None, 1603824276.5]], '~15': [[143, None, None, 'f', 
    18, '~40', 1603824276.5]], '~16': [[144, None, None, 's',
    '612-926-0000', None, 1603824276.5]], '~17': [[145, None, None, '~',
    '~29', None, 1603824276.5]], '~2': [[146, None, None, '~', '~30', None,
    1603824276.5]], '~45': [[116, None, None, 'f', 1.8, '~46', 1603800000.5
    ]], '~19': [[147, None, None, 'f', 54, '~41', 1603800000.5], [148, None,
    None, 'f', 56, '~41', 1603812000.5], [149, None, None, 'f', 59, '~41', 
    1603824276.5]]}}

import simulation_time
from icecream import ic
pdata = []
pe_ins_sol = []  # protocol engine inputs
pe_ins_unsol = []
pe_outs = {}  # protocol engine outputs
pe_waits = {}  # protocol engine waits
pe_outs['123'] = {}  # when a staff member signs in with a device the device needs an empty dictionary
pe_outs['234'] = {}  # these four pe_outs rows will go away when we have a staff sign in process
pe_outs['345'] = {}
pe_outs['456'] = {}
pe_outs['567'] = {}
pe_outs['678'] = {}
pe_outs['789'] = {}
pe_outs['987'] = {}
pe_outs['876'] = {}
pe_outs['765'] = {}
pe_outs['654'] = {}
pe_outs['543'] = {}

log_dict = {}
token_status_dict ={}
flow_data = {}


adat = {
    'pers101': {
        '~1': [[101, None, None, 's', 'Tina', None, 1603824276.5]],
        '~14': [[102, None, None, '~', '~22', None, 1603824276.5]],
        '~15': [[103, None, None, 'f', 40, '~40', 1603824276.5]],
        '~16': [[104, None, None, 's', '202-888-5431', None, 1603824276.5]],
        '~17': [[105, None, None, '~', '~28', None, 1603824276.5]],
        '~2': [[116, None, None, '~', '~5', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 1.7, '~46', 1603800000.5]],
        '~19': [[113, None, None, 'f', 70, '~41', 1603800000.5],
                [114, None, None, 'f', 71, '~41', 1603812000.5],
                [115, None, None, 'f', 72, '~41', 1603824276.5]]
    },
    'pers102': {
        '~1': [[107, None, None, 's', 'Tony', None, 1603824276.5]],
        '~14': [[108, None, None, '~', '~21', None, 1603824276.5]],
        '~15': [[109, None, None, 'f', 35, '~40', 1603824276.5]],
        '~16': [[110, None, None, 's', '703-999-3341', None, 1603824276.5]],
        '~17': [[111, None, None, '~', '~29', None, 1603824276.5]],
        '~2': [[112, None, None, '~', '~30', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 1.9, '~46', 1603800000.5]],
        '~19': [[116, None, None, 'f', 75, '~41', 1603800000.5],
                [117, None, None, 'f', 74, '~41', 1603812000.5],
                [118, None, None, 'f', 75, '~41', 1603824276.5]]
    },
    'pers103': {
        '~1': [[121, None, None, 's', 'Bill', None, 1603824276.5]],
        '~14': [[122, None, None, '~', '~21', None, 1603824276.5]],
        '~15': [[123, None, None, 'f', 21, '~40', 1603824276.5]],
        '~16': [[124, None, None, 's', '703-999-8888', None, 1603824276.5]],
        '~17': [[125, None, None, '~', '~29', None, 1603824276.5]],
        '~2': [[126, None, None, '~', '~30', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 2.0, '~46', 1603800000.5]],
        '~19': [[127, None, None, 'f', 88, '~41', 1603800000.5],
                [128, None, None, 'f', 92, '~41', 1603812000.5],
                [129, None, None, 'f', 94, '~41', 1603824276.5]]
    },
    'pers104': {
        '~1': [[131, None, None, 's', 'Mary', None, 1603824276.5]],
        '~14': [[132, None, None, '~', '~22', None, 1603824276.5]],
        '~15': [[133, None, None, 'f', 66, '~40', 1603824276.5]],
        '~16': [[134, None, None, 's', '703-999-1111', None, 1603824276.5]],
        '~17': [[135, None, None, '~', '~29', None, 1603824276.5]],
        '~2': [[136, None, None, '~', '~30', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 1.8, '~46', 1603800000.5]],
        '~19': [[137, None, None, 'f', 44, '~41', 1603800000.5],
                [138, None, None, 'f', 43, '~41', 1603812000.5],
                [139, None, None, 'f', 42, '~41', 1603824276.5]]
    },
    'pers105': {
        '~1': [[141, None, None, 's', 'Lisa', None, 1603824276.5]],
        '~14': [[142, None, None, '~', '~22', None, 1603824276.5]],
        '~15': [[143, None, None, 'f', 35, '~40', 1603824276.5]],
        '~16': [[144, None, None, 's', '703-999-3341', None, 1603824276.5]],
        '~17': [[145, None, None, '~', '~29', None, 1603824276.5]],
        '~2': [[146, None, None, '~', '~30', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 1.6, '~46', 1603800000.5]],
        '~19': [[147, None, None, 'f', 54, '~41', 1603800000.5],
                [148, None, None, 'f', 56, '~41', 1603812000.5],
                [149, None, None, 'f', 53, '~41', 1603824276.5]]
    },
    'pers106': {
        '~1': [[141, None, None, 's', 'Neal', None, 1603824276.5]],
        '~14': [[142, None, None, '~', '~21', None, 1603824276.5]],
        '~15': [[143, None, None, 'f', 18, '~40', 1603824276.5]],
        '~16': [[144, None, None, 's', '612-926-0000', None, 1603824276.5]],
        '~17': [[145, None, None, '~', '~29', None, 1603824276.5]],
        '~2': [[146, None, None, '~', '~30', None, 1603824276.5]],
        '~45': [[116, None, None, 'f', 1.8, '~46', 1603800000.5]],
        '~19': [[147, None, None, 'f', 54, '~41', 1603800000.5],
                [148, None, None, 'f', 56, '~41', 1603812000.5],
                [149, None, None, 'f', 59, '~41', 1603824276.5]]
    }
}