Artificial Intelligence CW2 – TASK3: Expert Systems for Handling Contingency Plans Dr Wenjia Wang wenjia.wang@uea.ac.uk CW2 TASK 3: An Expert System Objective: to develop an expert system for dealing with contingency plans Key tasks 1. To read and extract information/knowledge out from the given documents and build a KB 2. To carry out a conversation with a staff to get necessary information and produce corresponding advice. AI CW2 TASK 3: Expert systems for Handling Contingency Plans 2wjw@uea Expert System: Architecture Architecture of a typical expert system Explanation Facility Inference Engine Knowledge Acquisition Inter faceUser Knowledge engineer Knowledge Base Knowledge acquisition subsystem Interface AI CW2 TASK 3: Expert systems for Handling Contingency Plans 3wjw@uea CW2 TASK 3: Requiements 1. Each group should read and analyze the provided documents, focusing at least on the disruption plans 1-19 and the stations issues of SWR West Journey. 2. Build a DB and KB based on these documents and using one of the provided database schemas. Do not use NoSQL 3. Build a UI to get information from a staff user about the current situation (e.g. a line blockage) and return the requested details of the appropriate contingency plan and/or station disruption plan. 4. Devise some example cases to demonstrate the system. Below gives the generic scenario. AI CW2 TASK 3: Expert systems for Handling Contingency Plans 4wjw@uea South Western Railways AI CW2 TASK 3: Expert systems for Handling Contingency Plans 5wjw@uea Terminology DM: Down Main = from anywhere to LONDON UM: Up Main = Leave London to Anywhere SL: Slow Line FL: FAST Line DMSL: Down Main Slow Line DMFL: Down Main Fast Line UMSL: Up Main Slow Line UMFL: Up Main Fast Line AI CW2 TASK 3: Expert systems for Handling Contingency Plans 6wjw@uea Documents for Building a KB Rail Track Blockage Plans (PPT files): Mainline CPT: Plans 01 -19: Weymouth to Surbiton 20 Batch Station Disruption Plans(Word Files) Divided into 5 regions: West, Central, Metro, South, Waterloo Recommended starting points: Track Blockages: Mainline plan 1-19. Stations: West AI CW2 TASK 3: Expert systems for Handling Contingency Plans 7wjw@uea Wessex Contingency Planning: Line Blockage Plans Page 8 Contingency Planning Note: Access the Line Blockage Plans by clicking in the tables below. Bournemouth Main Line Plan No. Line Blockage location Usage History Plan Update s 1 Surbiton – Hampton Court Junction 1 2 Hampton Court Junction – Weybridge 2 3 Weybridge – Woking 4 Woking Junction – Pirbright Junction Update d Mar 21 5 Pirbright Junction – Basingstoke 2 Update d Mar 21 6 Basingstoke – Micheldever 7 Micheldever – Winchester 8 Winchester – Eastleigh 2 9 Eastleigh – St. Denys (No access to Eastleigh South Junction) 10 Eastleigh – St. Denys (Access to Eastleigh South Junction) 2 11 St. Denys – Southampton (No access to station) 12 St. Denys – Southampton (Access tostation) 13 Southampton – Redbridge/Totton 14 Redbridge/Totton – Brockenhurst 15 Brockenhurst – Bournemouth 5 16 Bournemouth – Poole 2 17 Poole – Wareham 2 18 Wareham – Dorchester South 19 Dorchester South – Weymouth 1 Portsmouth Direct Plan No. Line Blockage location Usage History Plan Update s 20 Woking – Guildford 1 21 Guildford – Haslemere 1 22 Haslemere – Petersfield 1 23 Petersfield – Havant 1 24 Havant – Portcreek Junction 25 Portcreek Junction – Fratton 1 26 Fratton – Portsmouth & Southsea 27 Portsmouth & Southsea – Portsmouth Harbour 4 Southampton Local Plan No. Line Blockage location Usage History Plan Update s 36 Eastleigh – Fareham 5 37 St. Denys – Fareham 38 Fareham – Cosham 3 39 Cosham – Cosham Junction 40 Cosham Junction -Portcreek/Farlington Junction 1 Suburban to Epsom Line Plan No. Line Blockage location Usage History Plan Update s 41 Raynes Park – Motspur Pk 42 Motspur Park – Chessington South 4 43 Worcester Park – Epsom 1 44 Epsom – Leatherhead 1 45 Leatherhead – Effingham Junction 1 45a Leatherhead – Dorking 2 Suburban to Shepperton Line Plan No. Line Blockage location Usage History Plan Update s 46 New Malden – Kingston 47 Kingston – Strawberry Hill 3 48 Fulwell – Shepperton Hampton Court / Guildford / New Line Plan No. Line Blockage location Usage History Plan Update s 49 Surbiton – Hampton Court 50 Hampton Court Junction – Effingham Junction 51 Effingham Junction – Effingham Junction 52 Effingham Junction – Guildford 3 Windsor Line (via Richmond) Plan No. Line Blockage location Usage History Plan Update s 53 Barnes – Richmond 1 54 Richmond – Twickenham 55 Twickenham – Whitton Junction 1 55a Whitton Junction – Feltham Junction 56 Feltham Junction – Feltham 57 Feltham – Staines 58 Staines – Virginia Water 1 59 Staines – Virginia Water 1 60 Virginia Water – Ascot 1 61 Ascot – Bracknell 62 Bracknell – Wokingham 63 Wokingham – Reading Hounslow Loop Plan No. Line Blockage location Usage History Plan Update s 64 Barnes – Kew Bridge 65 Kew Bridge – Hounslow 65a Hounslow Junction – Whitton Junction 65b Hounslow Junction – Feltham Junction Update d May 21 Windsor Branch Lines Plan No. Line Blockage location Usage History Plan Update s 66 Staines – Windsor 3 67 Virginia Water – Weybridge 1 68 Ascot – Camberley 69 Camberley – Frimley 1 70 Frimley – Ash Vale 3 70a Aldershot North Jnctn – Aldershot South Jnctn 1 71 Guildford – Ash 1 Alton Line Plan No. Line Blockage location Usage History Plan Update s 28 Pirbright Junction – Ash Vale 1 29 Ash Vale – Aldershot North Junction 1 30 Aldershot North Junction – Aldershot 2 31 Aldershot – Farnham 32 Farnham – Bentley 33 Bentley – Alton 1 Basingstoke to Laverstock Plan No. Line Blockage location Usage History Plan Update s 34 Basingstoke – Andover 1 35 Andover – Laverstock North Junction Clapham to Barnes Plan No. Line Blockage location Usage History Plan Update s 75a/ b Clapham Junction – Barnes 2 (No crossover) Navigati on Diversionary Routes (Additional Time Required) Service Reduction SWRT & Contingency Planning Home Usage Instructions Version Control Berthing & Siding Locations Start Up Plans New Line Blockage Plans (List View) Line Blockage Plans (Map View) Off Route: West of England Plan No. Line Blockage location Usage History Plan Update s 101 GWR Unplanned Diversions via Honiton New Line Blockage Plans (List View)Index based on Line of Route Useful contact details and station information for this Line of Route Note: Station Information comes from ‘National Rail’ and may take several seconds to load due to large file size. Ashurst New Forest: N/A Station info Christchurch: 50524 Station info Hinton Admiral: 50523 Station info Poole: 50529/28 Station info Sway: 50522 Station info Winchfield: 50202 Station info Dorchester SB: 0758355 Southampton Ctl Supv: 075 8107 Basingstoke: 50299 Station info Dorchester South: 50534/33 Station info Holton Health: N/A Station info Portsmouth & Southsea: 50259/58/63 Station info Swaythling: 50490 Station info Woking: 50339/37/38 Station info Eastleigh ASC: 0757202 Southampton SCP: 075 8219 Beaulieu Road: N/A Station info Eastleigh: 50485/82 Station info Hook: 50244 Station info Redbridge: N/A Station info Totton: 50486 Station info Wool: 50532 Station info Guildford SB: 0067562 Woking ASC: 0069410 / 0069420 Bitterne: N/A Station info Esher: 50641 Station info Micheldever: 50251 Station info Shawford: N/A Station info Upwey: N/A Station info Woolston: 50487 Station info Guildford SCP: 50359 Woking SCP: 50341 Bournemouth: 50380/79/76 Station info Fareham: 50286/85 Station info Millbrook: N/A Station info Sholing: N/A Station info Walton on Thames: 50632 Station info Basingstoke (DC) Panel: 0750010 Guildford Surbiton Supervisor / Duty Manager: 07771 613061Branksome: 50526 Station info Farnborough: 50514 Station info Moreton: N/A Station info Southampton AP: 50489/88 Station info Wareham: 50530 Station info Basingstoke ASC: 0750131 Brockenhurst: 50495/94 Station info Fleet: 50203 Station info Netley: 50479 Station info Southampton Central: N/A Station info West Byfleet: 50589 Station info Basingstoke SCP: 50297 GWR Train Service Control West: 08582219Brookwood: 50325 Station info Hamble: N/A Station info New Milton: 50493 Station info St Denys: 50491 Station info Weybridge: 50631/30 Station info Bournemouth SB: 0755332 Bursledon: N/A Station info Hamworthy: 50531 Station info Parkstone: 50544 Station info Surbiton: 50650/47/46 Station info Weymouth: 50536/35 Station info Bournemouth SCP: 50375 Portsmouth SCP: 50265 Byfleet & New Haw: 50629 Station info Hersham: 50642 Station info Pokesdown: 50525 Station info Swanwick: 50289 Station info Winchester: 50510/09/13 Station info Brockenhurst SB: 08528311 Salisbury SCP: 50412 Contingency Planning Wessex Contingency Planning: Line Blockage Plans Page 9 Note: Access the Line Blockage Plans using the arrows in the navigation bar or clicking the yellow squares on the map. Note: Red line = line blocked, Hatched line = line in either direction could be blocked. Navigati on Line Blockage Plans (Map View) Service Reduction Next Plan Previous Plan Line Blockage Plans (List View) Important! Please complete a Feedback Form if applying this Plan (Click here) Plan 1.1 Surbiton – Hampton Court Junction Bournemouth Main Line Status: DMSL blocked Principles of Service Alteration If no access to New Line: 2Gxx Guildford (C) services diverted via Woking (call for crew purposes). 1Gxx Portsmouth via Cobham divert via Woking. Alternative Passenger Journey SWR bus service Surbiton to Effingham Junction. Local bus. Information for Signallers 2Gxx Waterloo to Guildford divert via Woking with extra stop at Woking. 1Gxx Waterloo to Havant/Portsmouth via Woking. Additional Information for Station Staff SWR Bus Replacement Service all stations Surbiton to Effingham Junction. Passenger Information K3 bus Every 15 minutes, Surbiton to Hinchley Wood 12 minutes and Claygate 21 minutes. Useful contact details and station information for this Line of Route Note: Station Information comes from ‘National Rail’ and may take several seconds to load due to large file size. Ashurst New Forest: N/A Station info Christchurch: 50524 Station info Hinton Admiral: 50523 Station info Poole: 50529/28 Station info Sway: 50522 Station info Winchfield: 50202 Station info Dorchester SB: 0758355 Southampton Ctl Supv: 075 8107 Basingstoke: 50299 Station info Dorchester South: 50534/33 Station info Holton Health: N/A Station info Portsmouth & Southsea: 50259/58/63 Station info Swaythling: 50490 Station info Woking: 50339/37/38 Station info Eastleigh ASC: 0757202 Southampton SCP: 075 8219 Beaulieu Road: N/A Station info Eastleigh: 50485/82 Station info Hook: 50244 Station info Redbridge: N/A Station info Totton: 50486 Station info Wool: 50532 Station info Guildford SB: 0067562 Woking ASC: 0069410 / 0069420 Bitterne: N/A Station info Esher: 50641 Station info Micheldever: 50251 Station info Shawford: N/A Station info Upwey: N/A Station info Woolston: 50487 Station info Guildford SCP: 50359 Woking SCP: 50341 Bournemouth: 50380/79/76 Station info Fareham: 50286/85 Station info Millbrook: N/A Station info Sholing: N/A Station info Walton on Thames: 50632 Station info Basingstoke (DC) Panel: 0750010 Guildford Surbiton Supervisor / Duty Manager: 07771 613061Branksome: 50526 Station info Farnborough: 50514 Station info Moreton: N/A Station info Southampton AP: 50489/88 Station info Wareham: 50530 Station info Basingstoke ASC: 0750131 Brockenhurst: 50495/94 Station info Fleet: 50203 Station info Netley: 50479 Station info Southampton Central: N/A Station info West Byfleet: 50589 Station info Basingstoke SCP: 50297 GWR Train Service Control West: 08582219Brookwood: 50325 Station info Hamble: N/A Station info New Milton: 50493 Station info St Denys: 50491 Station info Weybridge: 50631/30 Station info Bournemouth SB: 0755332 Bursledon: N/A Station info Hamworthy: 50531 Station info Parkstone: 50544 Station info Surbiton: 50650/47/46 Station info Weymouth: 50536/35 Station info Bournemouth SCP: 50375 Portsmouth SCP: 50265 Byfleet & New Haw: 50629 Station info Hersham: 50642 Station info Pokesdown: 50525 Station info Swanwick: 50289 Station info Winchester: 50510/09/13 Station info Brockenhurst SB: 08528311 Salisbury SCP: 50412 Contingency Planning Wessex Contingency Planning: Line Blockage Plans Page 10 Note: Access the Line Blockage Plans using the arrows in the navigation bar or clicking the yellow squares on the map. Note: Red line = line blocked, Hatched line = line in either direction could be blocked. Navigati on Line Blockage Plans (Map View) Service Reduction Next Plan Previous Plan Line Blockage Plans (List View) This plan has Usage History Important! Please complete a Feedback Form if applying this Plan (Click here) Plan 2.5 Hampton Court Junction – Weybridge Bournemouth Main Line Status: DMSL & DMFL blocked or Status: UMSL & UMFL blocked Principles of Service Alteration 1Lxx xx.20/50 Waterloo – Salisbury/Exeter. 1Lxx xx.20/45 Exeter/Salisbury – Waterloo. Terminate/start Basingstoke/Woking (consider Reading if 5 coaches or less) 1Wxx xx.05 Waterloo – Weymouth. 1Wxx xx.20 Weymouth – Waterloo. Start/terminate Basingstoke 1Bxx xx.35 Waterloo – Poole. 1Bxx xx.41 Poole – Waterloo. Terminate/start Woking Portsmouth line services via (EH). 1Txx xx.09 Waterloo-Portsmouth Harbour(EH) & 1Txx xx.59 Portsmouth Harbour (EH) – Waterloo. Terminate/start Basingstoke 1Axx xx.23/53 Waterloo to Alton. 1Axx xx.14/44 Alton to Waterloo. Divert via Chertsey (Check Crew route knowledge) 2Lxx xx.12/42 Waterloo – Basingstoke. 2Lxx xx.24/54 Basingstoke – Waterloo. Terminate at Woking 1Pxx xx.30 Waterloo – Portsmouth and 1Pxx xx.45 Portsmouth to Waterloo divert via Cobham. 2Pxx xx.45 Waterloo – Portsmouth & Southsea xx.24 Portsmouth & Southsea– Waterloo divert via Cobham 1Pxx xx.00 Waterloo – Haslemere / xx.02 Haslemere – Waterloo Cancelled – Use stock to run a Woking – Guildford shuttle. 1Pxx/2Pxx xx.00/xx.15 ex Waterloo and Up Peak additional services to be cancelled and stock to rebalance. 1Gxx to run as booked 2Gxx xx.03/33 Guildford (C) services run as booked 2Dxx xx 54 Waterloo – Guildford & xx.45 Guildford to Waterloo Consider terminating at Effingham Jn if crew in and out at Guildford to free up Platform 2 or 3 2Fxx Woking divert via Chertsey Call Clapham Jn, West Byfleet Woking only. Alternative Passenger Journey SWR bus replacement. Local buses. Information for Signallers See Principles of Service Alteration. Diverted 2Fxx services to run ahead of 2Cxx from Barnes Additional Information for Station Staff SWR Bus Replacement Fast Bus Surbiton to Woking & all stations to Weybridge. Alternative: Alton line passengers can travel via Ascot to Clapham and Waterloo. Passengers for Weybridge can travel via Staines and Virginia Water. Passenger Information Local buses. Surbiton to/from Weybridge Bus 515 (Hourly) Esher 30 minutes, Hersham 32 minutes, Walton on Thames 42 minutes, Weybridge 50 minutes. Station Disruption Plans: E.g. Station Disruption Plan – Wareham Issue 1 – April 2018.docx AI CW2 TASK 3: Expert systems for Handling Contingency Plans 11wjw@uea Station Disruption Plans: E.g. Station Disruption Plan – Wareham Issue 1 – April 2018.docx AI CW2 TASK 3: Expert systems for Handling Contingency Plans 12wjw@uea Software Packages/Libraries For PPTX file: Python-pptx Or Python Tika Word docx file Python-docx Java Tika AI CW2 TASK 3: Expert systems for Handling Contingency Plans 13wjw@uea Database and Knowledge Base DB for storing the information in a structured format The schema has been designed by Doug Has been provided KB For storing knowledge: rules AI CW2 TASK 3: Expert systems for Handling Contingency Plans 14wjw@uea Task 3: Dialogue Asking for information 1. Type of issues: (1) track blockage: partial or full (2) Station disruption 2. Location 3. Time 4. Etc. AI CW2 TASK 3: Expert systems for Handling Contingency Plans 15wjw@uea Task 3: Outputs Advice for Staff Principles of Service Alterations Alternative Passenger Journey For signallers For Station staff Information for Passenger AI CW2 TASK 3: Expert systems for Handling Contingency Plans 16wjw@uea Task 3: Output Info from the PPT file Advice for Staff Principles of Service Alterations Alternative Passenger Journey For signallers For Station staff Information for Passenger AI CW2 TASK 3: Expert systems for Handling Contingency Plans 17wjw@uea