Small or Medium scale focused research project STREP MICIE



Similar documents
Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

The following chart provides the breakdown of exam as to the weight of each section of the exam.

(d-5273) CCIE Security v3.0 Written Exam Topics

APNIC elearning: Network Security Fundamentals. 20 March :30 pm Brisbane Time (GMT+10)

Network Security Fundamentals

Computer Networks. Secure Systems

ICTTEN8195B Evaluate and apply network security

Chapter 5. Data Communication And Internet Technology

On the use of Honeypots for Detecting Cyber Attacks on Industrial Control Networks

PROJECT FINAL REPORT

How To Understand And Understand The Security Of A Key Infrastructure

Oct 15, Internet : the vast collection of interconnected networks that all use the TCP/IP protocols

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

This Working Paper provides an introduction to the web services security standards.

Chapter 4 Virtual Private Networking

COTS SECURITY GUIDANCE (CSG) VOICE OVER INTERNET PROTOCOL (VoIP)

QAME Support for Policy-Based Management of Country-wide Networks

CTS2134 Introduction to Networking. Module Network Security

Site to Site Virtual Private Networks (VPNs):

Chapter 32 Internet Security

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

Other VPNs TLS/SSL, PPTP, L2TP. Advanced Computer Networks SS2005 Jürgen Häuselhofer

Table of Contents. 1 Overview 1-1 Introduction 1-1 Product Design 1-1 Appearance 1-2

PRIVACY, SECURITY AND THE VOLLY SERVICE

Protocol Security Where?

1.264 Lecture 37. Telecom: Enterprise networks, VPN

CCNA Security 1.1 Instructional Resource

VPN. VPN For BIPAC 741/743GE

Lecture 17 - Network Security

Network Access Security. Lesson 10

Ontological Identification of Patterns for Choreographing Business Workflow

Cornerstones of Security

NIST s Guide to Secure Web Services

Internet Privacy Options

NCP Secure Enterprise Management Next Generation Network Access Technology

INF3510 Information Security University of Oslo Spring Lecture 9 Communication Security. Audun Jøsang

SERVICE DISCOVERY AND MOBILITY MANAGEMENT

WISE-4000 Series. WISE IoT Wireless I/O Modules

APNIC elearning: IPSec Basics. Contact: esec03_v1.0

Security in IPv6. Basic Security Requirements and Techniques. Confidentiality. Integrity

CS 356 Lecture 28 Internet Authentication. Spring 2013

Security Services on IPv6 Networks: PKIv6 and IPv6-VPNs

EXAM questions for the course TTM Information Security May Part 1

Release: 1. ICANWK502A Implement secure encryption technologies

Setup Guide Access Manager Appliance 3.2 SP3

EUCIP - IT Administrator. Module 5 IT Security. Version 2.0

DRAFT Standard Statement Encryption

Outline. INF3510 Information Security. Lecture 10: Communications Security. Communication Security Analogy. Network Security Concepts

Lecture 10: Communications Security

Security Protocols HTTPS/ DNSSEC TLS. Internet (IPSEC) Network (802.1x) Application (HTTP,DNS) Transport (TCP/UDP) Transport (TCP/UDP) Internet (IP)

Chapter 7 Transport-Level Security

Secure Use of the New NHS Network (N3): Good Practice Guidelines

VPN Modules for Cisco 1841 and Cisco 2800 and 3800 Series Integrated Services Routers

Release Notes. NCP Secure Entry Mac Client. 1. New Features and Enhancements. 2. Improvements / Problems Resolved. 3. Known Issues

Asheville-Buncombe Technical Community College Department of Networking Technology. Course Outline

The BANDIT Products in Virtual Private Networks

Gigaset IP and IP-PRO Phones Provisioning / Remote Management. last modifications by J. Stahl, Bocholt, January the 18 th 2011

Appendix A: Configuring Firewalls for a VPN Server Running Windows Server 2003

Products that are referred to in this document may be trademarks and/or registered trademarks of the respective owners.

Transport Layer Security Protocols

Service Virtualization: Managing Change in a Service-Oriented Architecture

CS 4803 Computer and Network Security

Accellion Secure File Transfer Cryptographic Module Security Policy Document Version 1.0. Accellion, Inc.

SSL VPN Technical Primer

PKI Uncovered. Cisco Press. Andre Karamanian Srinivas Tenneti Francois Dessart. 800 East 96th Street. Indianapolis, IN 46240

ACADEMIA LOCAL CISCO UCV-MARACAY CONTENIDO DE CURSO CURRICULUM CCNA. SEGURIDAD CCNA SECURITY. VERSION 1.0

Measurement of the Usage of Several Secure Internet Protocols from Internet Traces

Chapter 9. IP Secure

13 Virtual Private Networks 13.1 Point-to-Point Protocol (PPP) 13.2 Layer 2/3/4 VPNs 13.3 Multi-Protocol Label Switching 13.4 IPsec Transport Mode

TABLE OF CONTENTS NETWORK SECURITY 2...1

EDA Training Programs. Catalog of Course Descriptions

<Insert Picture Here> Oracle Web Services Manager (WSM)

The basic groups of components are described below. Fig X- 1 shows the relationship between components on a network.

Huawei Remote Access Security Solution for Enterprise Networks. -Secure and Stable Platforms for Network Interconnection and Data Interaction

Building Robust Security Solutions Using Layering And Independence

Sophos UTM. Remote Access via PPTP. Configuring UTM and Client

Virtual Private Network VPN IPSec Testing: Functionality Interoperability and Performance

Information Technology Security Guideline. Network Security Zoning

2. From a control perspective, the PRIMARY objective of classifying information assets is to:

Unifying Information Security. Implementing TLS on the CLEARSWIFT SECURE Gateway

How To Protect A Web Application From Attack From A Trusted Environment

Release Notes. NCP Secure Entry Mac Client. Major Release 2.01 Build 47 May New Features and Enhancements. Tip of the Day

Industrial Network Security for SCADA, Automation, Process Control and PLC Systems. Contents. 1 An Introduction to Industrial Network Security 1

3.2: Transport Layer: SSL/TLS Secure Socket Layer (SSL) Transport Layer Security (TLS) Protocol

OPNET Network Simulator

Public-Key Infrastructure

Introduction to Service Oriented Architectures (SOA)

SECURITY DOCUMENT. BetterTranslationTechnology

Optus SMS for MS Outlook and Lotus Notes

BeamYourScreen Security

Quality Model for Web Services

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

Configuring an IPSec Tunnel between a Firebox & a Check Point FireWall-1

Transcription:

FP7-ICT-SEC-2007.1.7 ICT-SEC 225353 - MICIE Small or Medium scale focused research project STREP MICIE Tool for systemic risk analysis and secure mediation of data exchanged across linked CI information infrastructures Grant agreement no.: 225353 WP5000 Secure Mediation Gateway D5.1 On-line Risk Prediction Tool SW Beta Release Submission date: 30/11/2010 Organisation name of lead contractor for this deliverable: SELEX COMMS Dissemination Level PU Public Start date of project: 01 September 2008 Duration: 30 months

Editor Authors Stefano Panzieri ROMA3 SCOM, CRPHT, ROMA3, PIAP Work package WP5000 Tasks 5001 Internal Review Approval Date On-line Risk Prediction Tool SW Beta Release 2

Table of Contents Table of Contents...3 List of Figures...4 Terminology...5 List of acronyms...6 1. Introduction...11 2. On-line risk prediction tool architecture...13 2.1 Prediction Module...14 2.1.1 Association.xml... 14 2.1.2 Net.xml... 15 2.1.3 Entity.xml... 21 2.1.4 Status.xml... 44 2.2 Aggregation Module...119 2.2.2 Merge.xml... 120 2.3 Filter Module...125 2.3.1 Filter.java... 125 2.4 Communication Module...126 2.4.1 Package org.me.cisiawebservice... 126 2.4.2 Package MicieClient... 155 2.5 Operator Interface Module...179 2.5.6 From Xml to TAG Database C# Program... 180 2.5.7 From TAG Database to Xml C# Program... 185 On-line Risk Prediction Tool SW Beta Release 3

List of Figures Figure 1 MICIE on-line tool architecture...1 Figure 2 The on-line risk prediction tool architecture...1 Figure 3 Prediction Module...1 Figure 4 Aggregation Module Architecture...1 Figure 5 Filtering Module Architecture...1 Figure 6 Communication Module Architecture...1 Figure 7 UML diagram for the risk prediction web service...1 Figure 8 UML diagram for risk prediction web client...1 Figure 9 Operator Interface...1 Figure 10 ifix Architecture...1 Figure 11 The electric operator interface...1 Figure 12 The telecommunication operator interface...1 Figure 13 The service layer interface...1 Figure 14 The medium voltage grid interface...1 Figure 15 The telecommunication network interface...1 Figure 16 The SCADA system interface...1 On-line Risk Prediction Tool SW Beta Release 4

Terminology Adaptor Communication network MICIE system Ontology model Prediction tool Functional entity of the MICIE system performing data filtering and data format conversion between a CI and its SMGW system Network Infrastructure dedicated to information exchange between CIs A set of cooperating CIs interconnected by a communication infrastructure and organized according to the MICIE system architecture. Model for description of data including object properties, services offered by objects and relationships between objects. It can include rules for semantic inference between objects through a composition of rules. System in the MICIE architecture devoted to risk analysis. Secure Gateway Mediation System in the MICIE architecture devoted to secure communication and data exchange between remote CIs SMGW system Set of coordinated functions enabling secure and reliable data exchange between remote CIs On-line Risk Prediction Tool SW Beta Release 5

List of acronyms ACC AD ADSL AES AH API B2B B2C BIT CA CI CISIA CCI CN COPS CPE CPU CRL CSR DB DES DMTF DoS Area Control Centres Adaptor Asymmetric Digital Subscriber Line Advanced Encryption Standard Authentication Header Application Programming Interface Business to Business Business to Customer Built in test Certificate Authority Critical Infrastructure Critical Infrastructure Simulation by Interdependent Agents Communication Critical Infrastructure Communication Network Common Open Policy Service Customer Provider Equipment Central Processing Unit Certificate Revocation List Certificate Signing Request Database Data Encryption Standard Distributed Management Task-Force Denial of Service On-line Risk Prediction Tool SW Beta Release 6

EA EC ECI ER ESMGW ESP FSM GAN GENA GPS GUI HTTP HTTPS ICT ICTCI ICT-MC ID IDF IDS IEC IETF IKE IP IPSec IT Electrical CI Adaptor European Commission Electrical Critical Infrastructure Entity-Relationship diagram External SMGW Encapsulating Security Payload Finite State Machine Geographical Area Network General Event Notification Architecture Global Positioning System Graphic User Interface Hypertext Transfer Protocol Hypertext Transfer Protocol over Secure Socket Layer Information and communication Technology Information and communication Technology Critical Infrastructure ICTCI Monitoring Component Identificator Information Discovery Framework Intrusion Detection System Israel Electric Corporation Internet Engineering Task-Force Internet Key Exchange Internet Protocol Internet Protocol Security Information Technology On-line Risk Prediction Tool SW Beta Release 7

LAN LDAP MAC MHR MPLS MSC NMS OWL OWL-DL OPC PBN PBNM PC PDP PE PEP PGP PKI PM PT QoS RA RPC RSA RTU Local Area Network Lightweight Directory Access Protocol Message Authentication Code Mixed Holistic-Reductionistic model Multi Protocol Label Switching Message Sequence Chart diagram Network Management System Web Ontology Language Web Ontology Language Description Logic Open Connectivity Policy Based Networking Policy Based Network Management Personal computer Policy Decision Point Personnel Policy Enforcement Point Pretty Good Privacy Public Key Infrastructure Periodic (Scheduled) Maintenance Prediction Tool Quality of Service Registration Authority Remote Procedure Call Rivest Shamir Adleman algorithm Remote Terminal Unit On-line Risk Prediction Tool SW Beta Release 8

SA SCADA SLA SLS SMGW SNMP SOAP SP SSH SSL SSDP SW TCP TLCA TLS UDDI UML UPnP UPS UTC VA VPN W3C Wi-Fi WoT Security Association Supervisory Control and Data Acquisition Service Level Agreement Service Level Specification Secure Mediation Gateway Simple Network Management Protocol Simple Object Access Protocol Service Provider Secure SHell Secure Socket Layer Simple Service Discovery Protocol Software Transmission Control Protocol Telecommunication CI Adaptor Transport Layer Security Universal Description Discovery and Integration Unified Modeling Language Universal Plug n Play Uninterruptible Power Supply Coordinated Universal Time Validation Authority Virtual Private Network World Wide Web Consortium Wireless Fidelity Web of Trust On-line Risk Prediction Tool SW Beta Release 9

WS WS-Security WSDL XML Web Service Web Services Security Web Service Description Language Extensible Markup Language On-line Risk Prediction Tool SW Beta Release 10

1. Introduction This report describes the deployment architecture and the software design of the On-line Risk Prediction Tool. The MICIE system includes a distributed network environment in which heterogeneous CIs exchange information. Each CI in the MICIE system is interconnected through a local SMGW, which provides secure and reliable communication across the MICIE system. Exchange of information among CIs makes it possible to enhance capabilities of risk analysis taking into account CI interdependencies. Each CI has its prediction tool that extract information from field and then calculate the short-term prediction. The prediction tool uses a so-called adaptor to transform the information from the CI control centre in a compatible format with prediction tool input. One of the outputs of MICIE project will be a prototyped tool able to predict, in a distributed way, the state of some services related to two or more interconnected infrastructures. It is our opinion that such forecast will have a deep impact on the management of each infrastructure due to the new capabilities that will be available to the operators of each control room. Capabilities related to a better real-time understanding of crisis scenarios in which will be clear, to all involved people, what is going to happen and what is possible to do with available systems. It is clear that, to have a reasonable emergency management improvement, a real enhancement with respect to a standard isolated scenario, some data will have to be exchanged between control rooms. We also know that in a perfect world, where everything is shared, this would not be a problem. In our real world, some Figure 1 MICIE on-line tool architecture information will be not available to disclosure due to several reasons but, it is our firm opinion that, although some aggregate information, something related to what is going on, and not why, will be useful to mitigate the risk of a worse disaster. On-line Risk Prediction Tool SW Beta Release 11

Obviously, the tool inside each infrastructure directly receives only the data originated within its infrastructure. The different tools will be interconnected. The easiest way to grant the consistency of the oberall state stimation by the different distributed tools is to equip every system with a common general model, even if every specific domain receives only a subset of the inputs. We propose that each tool has exactly the same model of the overall system of systems, see Figure 1. The aim of the project is to provide an on-line tool whose architecture is depicted in Figure 1. The communication between two or more prediction tools will be handled by means of Secure Mediation Gateways, which will be completely transparent to the risk prediction tools; moreover each tool will receive data coming from the specific field where the tool is attested by means of an adaptor. Finally the prediction of the future state of the system will be provided to the operators of the infrastructures. On-line Risk Prediction Tool SW Beta Release 12

2. On-line risk prediction tool architecture The on-line risk prediction tool is the core element of the system as it includes the module that provide a risk estimation to the CI operators. Figure 2 The on-line risk prediction tool architecture The Error! Reference source not found. shows the architecture of the risk prediction tool. It is composed of five main interrelated modules, each devoted to a specific task: 1. Prediction Module: has the duty to produce a new prediction; 2. Aggregation Module: is devoted to aggregate the predictions coming from other tools, the data coming from the field and the last local prediction, in order to provide an updated input for the prediction module; 3. Filtering Module: is aimed to filter the updated prediction provided by the prediction module, exposing to the Secure Mediation Gateway only the Quaity of Services; 4. Communication Module: is the interface with the Secure Mediation Gateway; 5. Operator Interface Module: is devoted to show operators the prediction provided by the prediction module in an easily understandable view. On-line Risk Prediction Tool SW Beta Release 13

2.1 Prediction Module The prediction module is the core of the whole prediction tool; it is based on the MHR-CISIA simulator, which is able to provide a prediction on the future state of the whole system of systems. To this end the simulator requires an input XML file containing the initial condition of each entity and Service. Figure 3 Prediction Module In order to use this simulator in an online framework, there is the need to update such an input file based on the data coming from other PTs and from the field. In the next paragraphs we show an example of input and output files. The input files are four xml documents: Association.xml: the file that contains the association among nets and resources. Every resource that is transmitted on the network is explained with the associated net; Net.xml: the file contains the net with the entity ports and the links among the ports, that are seen as nodes; Entity.xml: the file contains every entity with its type, its name and its ports; Status.xml: the file contains every statusitem of each entity with its fuzzy values. The output file is only one file that contains all the entities and their statusitem with the short-term previsions. The file is named EntityStatuses.xml. This file is not shown due to its length by has the same structure of status.xml repeated for each step of prediction. 2.1.1 Association.xml <DOCUMENT> <ASSOC> <RESOURCE>DATA_TLC_LINES</RESOURCE> On-line Risk Prediction Tool SW Beta Release 14

<NET>1</NET> </ASSOC> <ASSOC> <RESOURCE>ALARM_TLC</RESOURCE> <NET>1</NET> </ASSOC> <ASSOC> <RESOURCE>CONNECTION</RESOURCE> <NET>1</NET> </ASSOC> <ASSOC> <RESOURCE>CURRENT</RESOURCE> <NET>2</NET> </ASSOC> <ASSOC> <RESOURCE>IMPEDANCE</RESOURCE> <NET>2</NET> </ASSOC> <ASSOC> <RESOURCE>ALARM_ELE</RESOURCE> <NET>2</NET> </ASSOC> <ASSOC> <RESOURCE>REPORT</RESOURCE> <NET>2</NET> </ASSOC> <ASSOC> <RESOURCE>BREAKER_STATE</RESOURCE> <NET>2</NET> </ASSOC> <ASSOC> <RESOURCE>LOAD_ALARM</RESOURCE> <NET>2</NET> </ASSOC> </DOCUMENT> 2.1.2 Net.xml <DOCUMENT> <NET> <NAME>Rete_TLC</NAME> <TYPE>1</TYPE> <DIM>24</DIM> <NODES> <NODE>2</NODE> <NODE>3</NODE> <NODE>4</NODE> <NODE>5</NODE> On-line Risk Prediction Tool SW Beta Release 15

[ ] <NODE>1845</NODE> <NODE>1865</NODE> <NODE>1885</NODE> <NODE>1905</NODE> </NODES> <CONNECTIONS> <CONNECT> <FROM>2</FROM> <TO>22</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>3008</FROM> <TO>904</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>3009</FROM> <TO>924</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>3010</FROM> <TO>944</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>3011</FROM> <TO>964</TO> <WEIGHT> <H>1</H> </WEIGHT> On-line Risk Prediction Tool SW Beta Release 16

<DELAY>0</DELAY> </CONNECT> [ ] <CONNECT> <FROM>803</FROM> <TO>1825</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>823</FROM> <TO>1845</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>843</FROM> <TO>1865</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>863</FROM> <TO>1885</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>883</FROM> <TO>1905</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> </CONNECTIONS> </NET> On-line Risk Prediction Tool SW Beta Release 17

<NET> <NAME>Rete_Ele</NAME> <TYPE>2</TYPE> <DIM>36</DIM> <NODES> <NODE>1282</NODE> <NODE>1283</NODE> <NODE>1284</NODE> <NODE>1285</NODE> [ ] <NODE>2904</NODE> <NODE>2922</NODE> <NODE>2923</NODE> <NODE>2924</NODE> </NODES> <CONNECTIONS> <CONNECT> <FROM>1296</FROM> <TO>1302</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>1297</FROM> <TO>1322</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>1323</FROM> <TO>1664</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>1664</FROM> <TO>1323</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> On-line Risk Prediction Tool SW Beta Release 18

[ ] <CONNECT> <FROM>2704</FROM> <TO>1292</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>2724</FROM> <TO>1293</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>2744</FROM> <TO>1285</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>2764</FROM> <TO>1285</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>2784</FROM> <TO>1285</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>2804</FROM> <TO>1285</TO> <WEIGHT> On-line Risk Prediction Tool SW Beta Release 19

<H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>2824</FROM> <TO>1285</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>2844</FROM> <TO>1285</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>2864</FROM> <TO>1285</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>2884</FROM> <TO>1285</TO> <WEIGHT> <H>1</H> </WEIGHT> <DELAY>0</DELAY> </CONNECT> <CONNECT> <FROM>2924</FROM> <TO>1287</TO> <WEIGHT> <H>1</H> </WEIGHT> On-line Risk Prediction Tool SW Beta Release 20

<DELAY>0</DELAY> </CONNECT> </CONNECTIONS> </NET> </DOCUMENT> 2.1.3 Entity.xml <DOCUMENT> <TYPE>TlcHolNode</TYPE> <NAME>TlcHolNode1</NAME> <ID>1</ID> <PORT>1</PORT> <PORT>2</PORT> <PORT>3</PORT> <PORT>4</PORT> <PORT>5</PORT> <PORT>6</PORT> <PORT>7</PORT> <PORT>8</PORT> <PORT>9</PORT> <PORT>10</PORT> <PORT>11</PORT> <PORT>12</PORT> <PORT>13</PORT> <PORT>3002</PORT> <PORT>3003</PORT> <PORT>3004</PORT> <PORT>3005</PORT> <PORT>3006</PORT> <PORT>3007</PORT> <PORT>3008</PORT> <PORT>3009</PORT> <PORT>3010</PORT> <PORT>3011</PORT> <PORT>3012</PORT> <PORT>3013</PORT> <TYPE>RingRoutingService</TYPE> <NAME>RingRoutingService1</NAME> <ID>21</ID> <PORT>21</PORT> <PORT>22</PORT> <PORT>23</PORT> <TYPE>NMS</TYPE> <NAME>NMS1</NAME> <ID>41</ID> <PORT>41</PORT> On-line Risk Prediction Tool SW Beta Release 21

<PORT>42</PORT> <PORT>43</PORT> <PORT>44</PORT> <TYPE>TlcNode</TYPE> <NAME>TlcNode1</NAME> <ID>61</ID> <PORT>61</PORT> <PORT>62</PORT> <PORT>63</PORT> <TYPE>TlcNode</TYPE> <NAME>TlcNode2</NAME> <ID>81</ID> <PORT>81</PORT> <PORT>82</PORT> <PORT>83</PORT> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode1</NAME> <ID>101</ID> <PORT>101</PORT> <PORT>102</PORT> <PORT>103</PORT> <PORT>104</PORT> <PORT>105</PORT> <PORT>106</PORT> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode2</NAME> <ID>121</ID> <PORT>121</PORT> <PORT>122</PORT> <PORT>123</PORT> <PORT>124</PORT> <PORT>125</PORT> <PORT>126</PORT> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode3</NAME> <ID>141</ID> <PORT>141</PORT> <PORT>142</PORT> <PORT>143</PORT> <PORT>144</PORT> On-line Risk Prediction Tool SW Beta Release 22

<PORT>145</PORT> <PORT>146</PORT> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode4</NAME> <ID>161</ID> <PORT>161</PORT> <PORT>162</PORT> <PORT>163</PORT> <PORT>164</PORT> <PORT>165</PORT> <PORT>166</PORT> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode5</NAME> <ID>181</ID> <PORT>181</PORT> <PORT>182</PORT> <PORT>183</PORT> <PORT>184</PORT> <PORT>185</PORT> <PORT>186</PORT> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode6</NAME> <ID>201</ID> <PORT>201</PORT> <PORT>202</PORT> <PORT>203</PORT> <PORT>204</PORT> <PORT>205</PORT> <PORT>206</PORT> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode7</NAME> <ID>221</ID> <PORT>221</PORT> <PORT>222</PORT> <PORT>223</PORT> <PORT>224</PORT> <PORT>225</PORT> <PORT>226</PORT> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode8</NAME> <ID>241</ID> On-line Risk Prediction Tool SW Beta Release 23

<PORT>241</PORT> <PORT>242</PORT> <PORT>243</PORT> <PORT>244</PORT> <PORT>245</PORT> <PORT>246</PORT> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode9</NAME> <ID>261</ID> <PORT>261</PORT> <PORT>262</PORT> <PORT>263</PORT> <PORT>264</PORT> <PORT>265</PORT> <PORT>266</PORT> <TYPE>WireTlc</TYPE> <NAME>WireTlc1</NAME> <ID>281</ID> <PORT>281</PORT> <PORT>282</PORT> <PORT>283</PORT> <PORT>284</PORT> <TYPE>WireTlc</TYPE> <NAME>WireTlc2</NAME> <ID>301</ID> <PORT>301</PORT> <PORT>302</PORT> <PORT>303</PORT> <PORT>304</PORT> <TYPE>WireTlc</TYPE> <NAME>WireTlc3</NAME> <ID>321</ID> <PORT>321</PORT> <PORT>322</PORT> <PORT>323</PORT> <PORT>324</PORT> <TYPE>WireTlc</TYPE> <NAME>WireTlc4</NAME> <ID>341</ID> On-line Risk Prediction Tool SW Beta Release 24

<PORT>341</PORT> <PORT>342</PORT> <PORT>343</PORT> <PORT>344</PORT> <TYPE>WireTlc</TYPE> <NAME>WireTlc5</NAME> <ID>361</ID> <PORT>361</PORT> <PORT>362</PORT> <PORT>363</PORT> <PORT>364</PORT> <TYPE>WireTlc</TYPE> <NAME>WireTlc6</NAME> <ID>381</ID> <PORT>381</PORT> <PORT>382</PORT> <PORT>383</PORT> <PORT>384</PORT> <TYPE>WireTlc</TYPE> <NAME>WireTlc7</NAME> <ID>401</ID> <PORT>401</PORT> <PORT>402</PORT> <PORT>403</PORT> <PORT>404</PORT> <TYPE>WireTlc</TYPE> <NAME>WireTlc8</NAME> <ID>421</ID> <PORT>421</PORT> <PORT>422</PORT> <PORT>423</PORT> <PORT>424</PORT> <TYPE>WireTlc</TYPE> <NAME>WireTlc9</NAME> <ID>441</ID> <PORT>441</PORT> <PORT>442</PORT> <PORT>443</PORT> <PORT>444</PORT> On-line Risk Prediction Tool SW Beta Release 25

<TYPE>WireTlc</TYPE> <NAME>WireTlc10</NAME> <ID>461</ID> <PORT>461</PORT> <PORT>462</PORT> <PORT>463</PORT> <PORT>464</PORT> <TYPE>Scada</TYPE> <NAME>Scada1</NAME> <ID>481</ID> <PORT>481</PORT> <PORT>482</PORT> <PORT>483</PORT> <TYPE>WireTlc</TYPE> <NAME>WireTlc11</NAME> <ID>501</ID> <PORT>501</PORT> <PORT>502</PORT> <PORT>503</PORT> <PORT>504</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode1</NAME> <ID>521</ID> <PORT>521</PORT> <PORT>522</PORT> <PORT>523</PORT> <PORT>524</PORT> <PORT>525</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode2</NAME> <ID>541</ID> <PORT>541</PORT> <PORT>542</PORT> <PORT>543</PORT> <PORT>544</PORT> <PORT>545</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode3</NAME> On-line Risk Prediction Tool SW Beta Release 26

<ID>561</ID> <PORT>561</PORT> <PORT>562</PORT> <PORT>563</PORT> <PORT>564</PORT> <PORT>565</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode4</NAME> <ID>581</ID> <PORT>581</PORT> <PORT>582</PORT> <PORT>583</PORT> <PORT>584</PORT> <PORT>585</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode5</NAME> <ID>601</ID> <PORT>601</PORT> <PORT>602</PORT> <PORT>603</PORT> <PORT>604</PORT> <PORT>605</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode6</NAME> <ID>621</ID> <PORT>621</PORT> <PORT>622</PORT> <PORT>623</PORT> <PORT>624</PORT> <PORT>625</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode7</NAME> <ID>641</ID> <PORT>641</PORT> <PORT>642</PORT> <PORT>643</PORT> <PORT>644</PORT> <PORT>645</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode8</NAME> On-line Risk Prediction Tool SW Beta Release 27

<ID>661</ID> <PORT>661</PORT> <PORT>662</PORT> <PORT>663</PORT> <PORT>664</PORT> <PORT>665</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode9</NAME> <ID>681</ID> <PORT>681</PORT> <PORT>682</PORT> <PORT>683</PORT> <PORT>684</PORT> <PORT>685</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode10</NAME> <ID>701</ID> <PORT>701</PORT> <PORT>702</PORT> <PORT>703</PORT> <PORT>704</PORT> <PORT>705</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode11</NAME> <ID>721</ID> <PORT>721</PORT> <PORT>722</PORT> <PORT>723</PORT> <PORT>724</PORT> <PORT>725</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode12</NAME> <ID>741</ID> <PORT>741</PORT> <PORT>742</PORT> <PORT>743</PORT> <PORT>744</PORT> <PORT>745</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode13</NAME> On-line Risk Prediction Tool SW Beta Release 28

<ID>761</ID> <PORT>761</PORT> <PORT>762</PORT> <PORT>763</PORT> <PORT>764</PORT> <PORT>765</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode14</NAME> <ID>781</ID> <PORT>781</PORT> <PORT>782</PORT> <PORT>783</PORT> <PORT>784</PORT> <PORT>785</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode15</NAME> <ID>801</ID> <PORT>801</PORT> <PORT>802</PORT> <PORT>803</PORT> <PORT>804</PORT> <PORT>805</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode16</NAME> <ID>821</ID> <PORT>821</PORT> <PORT>822</PORT> <PORT>823</PORT> <PORT>824</PORT> <PORT>825</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode17</NAME> <ID>841</ID> <PORT>841</PORT> <PORT>842</PORT> <PORT>843</PORT> <PORT>844</PORT> <PORT>845</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode18</NAME> On-line Risk Prediction Tool SW Beta Release 29

<ID>861</ID> <PORT>861</PORT> <PORT>862</PORT> <PORT>863</PORT> <PORT>864</PORT> <PORT>865</PORT> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode19</NAME> <ID>881</ID> <PORT>881</PORT> <PORT>882</PORT> <PORT>883</PORT> <PORT>884</PORT> <PORT>885</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService1</NAME> <ID>901</ID> <PORT>901</PORT> <PORT>902</PORT> <PORT>903</PORT> <PORT>904</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService2</NAME> <ID>921</ID> <PORT>921</PORT> <PORT>922</PORT> <PORT>923</PORT> <PORT>924</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService3</NAME> <ID>941</ID> <PORT>941</PORT> <PORT>942</PORT> <PORT>943</PORT> <PORT>944</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService4</NAME> <ID>961</ID> <PORT>961</PORT> On-line Risk Prediction Tool SW Beta Release 30

<PORT>962</PORT> <PORT>963</PORT> <PORT>964</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService5</NAME> <ID>981</ID> <PORT>981</PORT> <PORT>982</PORT> <PORT>983</PORT> <PORT>984</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService6</NAME> <ID>1001</ID> <PORT>1001</PORT> <PORT>1002</PORT> <PORT>1003</PORT> <PORT>1004</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService7</NAME> <ID>1021</ID> <PORT>1021</PORT> <PORT>1022</PORT> <PORT>1023</PORT> <PORT>1024</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService8</NAME> <ID>1041</ID> <PORT>1041</PORT> <PORT>1042</PORT> <PORT>1043</PORT> <PORT>1044</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService9</NAME> <ID>1061</ID> <PORT>1061</PORT> <PORT>1062</PORT> <PORT>1063</PORT> <PORT>1064</PORT> On-line Risk Prediction Tool SW Beta Release 31

<TYPE>ConnectionService</TYPE> <NAME>ConnectionService10</NAME> <ID>1081</ID> <PORT>1081</PORT> <PORT>1082</PORT> <PORT>1083</PORT> <PORT>1084</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService11</NAME> <ID>1101</ID> <PORT>1101</PORT> <PORT>1102</PORT> <PORT>1103</PORT> <PORT>1104</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService12</NAME> <ID>1121</ID> <PORT>1121</PORT> <PORT>1122</PORT> <PORT>1123</PORT> <PORT>1124</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService13</NAME> <ID>1141</ID> <PORT>1141</PORT> <PORT>1142</PORT> <PORT>1143</PORT> <PORT>1144</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService14</NAME> <ID>1161</ID> <PORT>1161</PORT> <PORT>1162</PORT> <PORT>1163</PORT> <PORT>1164</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService15</NAME> <ID>1181</ID> On-line Risk Prediction Tool SW Beta Release 32

<PORT>1181</PORT> <PORT>1182</PORT> <PORT>1183</PORT> <PORT>1184</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService16</NAME> <ID>1201</ID> <PORT>1201</PORT> <PORT>1202</PORT> <PORT>1203</PORT> <PORT>1204</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService17</NAME> <ID>1221</ID> <PORT>1221</PORT> <PORT>1222</PORT> <PORT>1223</PORT> <PORT>1224</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService18</NAME> <ID>1241</ID> <PORT>1241</PORT> <PORT>1242</PORT> <PORT>1243</PORT> <PORT>1244</PORT> <TYPE>ConnectionService</TYPE> <NAME>ConnectionService19</NAME> <ID>1261</ID> <PORT>1261</PORT> <PORT>1262</PORT> <PORT>1263</PORT> <PORT>1264</PORT> <TYPE>EleHolNode</TYPE> <NAME>EleHolNode1</NAME> <ID>1281</ID> <PORT>1281</PORT> <PORT>1282</PORT> <PORT>1283</PORT> <PORT>1284</PORT> <PORT>1285</PORT> On-line Risk Prediction Tool SW Beta Release 33

<PORT>1286</PORT> <PORT>1287</PORT> <PORT>1288</PORT> <PORT>1289</PORT> <PORT>1290</PORT> <PORT>1291</PORT> <PORT>1292</PORT> <PORT>1293</PORT> <PORT>1294</PORT> <PORT>1295</PORT> <PORT>1296</PORT> <PORT>1297</PORT> <TYPE>ReportService</TYPE> <NAME>ReportService1</NAME> <ID>1301</ID> <PORT>1301</PORT> <PORT>1302</PORT> <TYPE>FisrService</TYPE> <NAME>FisrService1</NAME> <ID>1321</ID> <PORT>1321</PORT> <PORT>1322</PORT> <PORT>1323</PORT> <PORT>1324</PORT> <PORT>1325</PORT> <PORT>1326</PORT> <PORT>1327</PORT> <PORT>1328</PORT> <PORT>1329</PORT> <PORT>1330</PORT> <PORT>1331</PORT> <PORT>1332</PORT> <PORT>1333</PORT> <PORT>1334</PORT> <PORT>1335</PORT> <TYPE>IECSecondaryStation</TYPE> <NAME>IECSecondaryStation1</NAME> <ID>1341</ID> <PORT>1341</PORT> <PORT>1342</PORT> <PORT>1343</PORT> <TYPE>IECSecondaryStation</TYPE> <NAME>IECSecondaryStation2</NAME> <ID>1361</ID> On-line Risk Prediction Tool SW Beta Release 34

<PORT>1361</PORT> <PORT>1362</PORT> <PORT>1363</PORT> <TYPE>Joint</TYPE> <NAME>Joint1</NAME> <ID>1381</ID> <PORT>1381</PORT> <PORT>1382</PORT> <PORT>1383</PORT> <PORT>1384</PORT> <PORT>1385</PORT> <TYPE>Joint</TYPE> <NAME>Joint2</NAME> <ID>1401</ID> <PORT>1401</PORT> <PORT>1402</PORT> <PORT>1403</PORT> <PORT>1404</PORT> <PORT>1405</PORT> <TYPE>Joint</TYPE> <NAME>Joint3</NAME> <ID>1421</ID> <PORT>1421</PORT> <PORT>1422</PORT> <PORT>1423</PORT> <PORT>1424</PORT> <PORT>1425</PORT> <TYPE>Joint</TYPE> <NAME>Joint4</NAME> <ID>1441</ID> <PORT>1441</PORT> <PORT>1442</PORT> <PORT>1443</PORT> <PORT>1444</PORT> <PORT>1445</PORT> <TYPE>Joint</TYPE> <NAME>Joint5</NAME> <ID>1461</ID> <PORT>1461</PORT> <PORT>1462</PORT> On-line Risk Prediction Tool SW Beta Release 35

<PORT>1463</PORT> <PORT>1464</PORT> <PORT>1465</PORT> <TYPE>Joint</TYPE> <NAME>Joint6</NAME> <ID>1481</ID> <PORT>1481</PORT> <PORT>1482</PORT> <PORT>1483</PORT> <PORT>1484</PORT> <PORT>1485</PORT> <TYPE>Joint</TYPE> <NAME>Joint7</NAME> <ID>1501</ID> <PORT>1501</PORT> <PORT>1502</PORT> <PORT>1503</PORT> <PORT>1504</PORT> <PORT>1505</PORT> <TYPE>Joint</TYPE> <NAME>Joint8</NAME> <ID>1521</ID> <PORT>1521</PORT> <PORT>1522</PORT> <PORT>1523</PORT> <PORT>1524</PORT> <PORT>1525</PORT> <TYPE>Joint</TYPE> <NAME>Joint9</NAME> <ID>1541</ID> <PORT>1541</PORT> <PORT>1542</PORT> <PORT>1543</PORT> <PORT>1544</PORT> <PORT>1545</PORT> <TYPE>Joint</TYPE> <NAME>Joint10</NAME> <ID>1561</ID> <PORT>1561</PORT> <PORT>1562</PORT> On-line Risk Prediction Tool SW Beta Release 36

<PORT>1563</PORT> <PORT>1564</PORT> <PORT>1565</PORT> <TYPE>Joint</TYPE> <NAME>Joint11</NAME> <ID>1581</ID> <PORT>1581</PORT> <PORT>1582</PORT> <PORT>1583</PORT> <PORT>1584</PORT> <PORT>1585</PORT> <TYPE>Joint</TYPE> <NAME>Joint12</NAME> <ID>1601</ID> <PORT>1601</PORT> <PORT>1602</PORT> <PORT>1603</PORT> <PORT>1604</PORT> <PORT>1605</PORT> <TYPE>Joint</TYPE> <NAME>Joint13</NAME> <ID>1621</ID> <PORT>1621</PORT> <PORT>1622</PORT> <PORT>1623</PORT> <PORT>1624</PORT> <PORT>1625</PORT> <TYPE>Joint</TYPE> <NAME>Joint14</NAME> <ID>1641</ID> <PORT>1641</PORT> <PORT>1642</PORT> <PORT>1643</PORT> <PORT>1644</PORT> <PORT>1645</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker1</NAME> <ID>1661</ID> <PORT>1661</PORT> <PORT>1662</PORT> On-line Risk Prediction Tool SW Beta Release 37

<PORT>1663</PORT> <PORT>1664</PORT> <PORT>1665</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker2</NAME> <ID>1681</ID> <PORT>1681</PORT> <PORT>1682</PORT> <PORT>1683</PORT> <PORT>1684</PORT> <PORT>1685</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker3</NAME> <ID>1701</ID> <PORT>1701</PORT> <PORT>1702</PORT> <PORT>1703</PORT> <PORT>1704</PORT> <PORT>1705</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker4</NAME> <ID>1721</ID> <PORT>1721</PORT> <PORT>1722</PORT> <PORT>1723</PORT> <PORT>1724</PORT> <PORT>1725</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker5</NAME> <ID>1741</ID> <PORT>1741</PORT> <PORT>1742</PORT> <PORT>1743</PORT> <PORT>1744</PORT> <PORT>1745</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker6</NAME> <ID>1761</ID> <PORT>1761</PORT> <PORT>1762</PORT> On-line Risk Prediction Tool SW Beta Release 38

<PORT>1763</PORT> <PORT>1764</PORT> <PORT>1765</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker7</NAME> <ID>1781</ID> <PORT>1781</PORT> <PORT>1782</PORT> <PORT>1783</PORT> <PORT>1784</PORT> <PORT>1785</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker8</NAME> <ID>1801</ID> <PORT>1801</PORT> <PORT>1802</PORT> <PORT>1803</PORT> <PORT>1804</PORT> <PORT>1805</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker9</NAME> <ID>1821</ID> <PORT>1821</PORT> <PORT>1822</PORT> <PORT>1823</PORT> <PORT>1824</PORT> <PORT>1825</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker10</NAME> <ID>1841</ID> <PORT>1841</PORT> <PORT>1842</PORT> <PORT>1843</PORT> <PORT>1844</PORT> <PORT>1845</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker11</NAME> <ID>1861</ID> <PORT>1861</PORT> <PORT>1862</PORT> On-line Risk Prediction Tool SW Beta Release 39

<PORT>1863</PORT> <PORT>1864</PORT> <PORT>1865</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker12</NAME> <ID>1881</ID> <PORT>1881</PORT> <PORT>1882</PORT> <PORT>1883</PORT> <PORT>1884</PORT> <PORT>1885</PORT> <TYPE>Breaker</TYPE> <NAME>Breaker13</NAME> <ID>1901</ID> <PORT>1901</PORT> <PORT>1902</PORT> <PORT>1903</PORT> <PORT>1904</PORT> <PORT>1905</PORT> <TYPE>Load</TYPE> <NAME>Load1</NAME> <ID>1921</ID> <PORT>1921</PORT> <PORT>1922</PORT> <PORT>1923</PORT> <TYPE>Load</TYPE> <NAME>Load2</NAME> <ID>1941</ID> <PORT>1941</PORT> <PORT>1942</PORT> <PORT>1943</PORT> <TYPE>Load</TYPE> <NAME>Load3</NAME> <ID>1961</ID> <PORT>1961</PORT> <PORT>1962</PORT> <PORT>1963</PORT> On-line Risk Prediction Tool SW Beta Release 40

<TYPE>Load</TYPE> <NAME>Load4</NAME> <ID>1981</ID> <PORT>1981</PORT> <PORT>1982</PORT> <PORT>1983</PORT> <TYPE>Load</TYPE> <NAME>Load5</NAME> <ID>2001</ID> <PORT>2001</PORT> <PORT>2002</PORT> <PORT>2003</PORT> <TYPE>Load</TYPE> <NAME>Load6</NAME> <ID>2021</ID> <PORT>2021</PORT> <PORT>2022</PORT> <PORT>2023</PORT> <TYPE>Load</TYPE> <NAME>Load7</NAME> <ID>2041</ID> <PORT>2041</PORT> <PORT>2042</PORT> <PORT>2043</PORT> <TYPE>Load</TYPE> <NAME>Load8</NAME> <ID>2061</ID> <PORT>2061</PORT> <PORT>2062</PORT> <PORT>2063</PORT> <TYPE>Load</TYPE> <NAME>Load9</NAME> <ID>2081</ID> <PORT>2081</PORT> <PORT>2082</PORT> <PORT>2083</PORT> On-line Risk Prediction Tool SW Beta Release 41

<TYPE>Load</TYPE> <NAME>Load10</NAME> <ID>2101</ID> <PORT>2101</PORT> <PORT>2102</PORT> <PORT>2103</PORT> <TYPE>Load</TYPE> <NAME>Load11</NAME> <ID>2121</ID> <PORT>2121</PORT> <PORT>2122</PORT> <PORT>2123</PORT> <TYPE>Load</TYPE> <NAME>Load12</NAME> <ID>2141</ID> <PORT>2141</PORT> <PORT>2142</PORT> <PORT>2143</PORT> <TYPE>Load</TYPE> <NAME>Load13</NAME> <ID>2161</ID> <PORT>2161</PORT> <PORT>2162</PORT> <PORT>2163</PORT> <TYPE>Load</TYPE> <NAME>Load14</NAME> <ID>2181</ID> <PORT>2181</PORT> <PORT>2182</PORT> <PORT>2183</PORT> <TYPE>Wire</TYPE> <NAME>Wire1</NAME> <ID>2201</ID> <PORT>2201</PORT> <PORT>2202</PORT> <PORT>2203</PORT> <PORT>2204</PORT> On-line Risk Prediction Tool SW Beta Release 42

<TYPE>Wire</TYPE> <NAME>Wire2</NAME> <ID>2221</ID> <PORT>2221</PORT> <PORT>2222</PORT> <PORT>2223</PORT> <PORT>2224</PORT> <TYPE>Wire</TYPE> <NAME>Wire3</NAME> <ID>2241</ID> <PORT>2241</PORT> <PORT>2242</PORT> <PORT>2243</PORT> <PORT>2244</PORT> <TYPE>Wire</TYPE> <NAME>Wire4</NAME> <ID>2261</ID> <PORT>2261</PORT> <PORT>2262</PORT> <PORT>2263</PORT> <PORT>2264</PORT> <TYPE>Wire</TYPE> <NAME>Wire5</NAME> <ID>2281</ID> <PORT>2281</PORT> <PORT>2282</PORT> <PORT>2283</PORT> <PORT>2284</PORT> [ ] <TYPE>Wire</TYPE> <NAME>Wire35</NAME> <ID>2881</ID> <PORT>2881</PORT> <PORT>2882</PORT> <PORT>2883</PORT> <PORT>2884</PORT> <TYPE>Wire</TYPE> <NAME>Wire36</NAME> <ID>2901</ID> On-line Risk Prediction Tool SW Beta Release 43

<PORT>2901</PORT> <PORT>2902</PORT> <PORT>2903</PORT> <PORT>2904</PORT> <TYPE>Wire</TYPE> <NAME>Wire37</NAME> <ID>2921</ID> <PORT>2921</PORT> <PORT>2922</PORT> <PORT>2923</PORT> <PORT>2924</PORT> </DOCUMENT> 2.1.4 Status.xml <DOCUMENT> <TYPE>TlcHolNode</TYPE> <NAME>TlcHolNode1</NAME> <NAME>fault_ring_wire</NAME> <NAME>tlc_oper</NAME> <NAME>fault_scada_node</NAME> On-line Risk Prediction Tool SW Beta Release 44

<L>5.000000</L> <M>5.000000</M> <R>5.000000</R> <TYPE>RingRoutingService</TYPE> <NAME>RingRoutingService1</NAME> <NAME>fault_ring_wire</NAME> <TYPE>NMS</TYPE> <NAME>NMS1</NAME> <NAME>fault_ring_wire</NAME> <TYPE>TlcNode</TYPE> <NAME>TlcNode1</NAME> On-line Risk Prediction Tool SW Beta Release 45

<TYPE>TlcNode</TYPE> <NAME>TlcNode2</NAME> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode1</NAME> <NAME>n2s</NAME> <NAME>update</NAME> <NAME>fault_ring_wire</NAME> On-line Risk Prediction Tool SW Beta Release 46

<NAME>mechanical_fault</NAME> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode2</NAME> <NAME>n2s</NAME> <NAME>update</NAME> <NAME>fault_ring_wire</NAME> <NAME>mechanical_fault</NAME> On-line Risk Prediction Tool SW Beta Release 47

<TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode3</NAME> <NAME>n2s</NAME> <NAME>update</NAME> <NAME>fault_ring_wire</NAME> <NAME>mechanical_fault</NAME> On-line Risk Prediction Tool SW Beta Release 48

<TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode4</NAME> <NAME>update</NAME> <NAME>n2s</NAME> <NAME>fault_ring_wire</NAME> <NAME>mechanical_fault</NAME> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode5</NAME> On-line Risk Prediction Tool SW Beta Release 49

<NAME>n2s</NAME> <NAME>update</NAME> <NAME>fault_ring_wire</NAME> <NAME>mechanical_fault</NAME> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode6</NAME> <NAME>n2s</NAME> On-line Risk Prediction Tool SW Beta Release 50

<NAME>update</NAME> <NAME>fault_ring_wire</NAME> <NAME>mechanical_fault</NAME> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode7</NAME> <NAME>update</NAME> <NAME>n2s</NAME> On-line Risk Prediction Tool SW Beta Release 51

<NAME>fault_ring_wire</NAME> <NAME>mechanical_fault</NAME> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode8</NAME> <NAME>n2s</NAME> <NAME>update</NAME> <NAME>fault_ring_wire</NAME> On-line Risk Prediction Tool SW Beta Release 52

<NAME>mechanical_fault</NAME> <TYPE>TlcRingNode</TYPE> <NAME>TlcRingNode9</NAME> <NAME>n2s</NAME> <NAME>update</NAME> <NAME>fault_ring_wire</NAME> <NAME>mechanical_fault</NAME> On-line Risk Prediction Tool SW Beta Release 53

<TYPE>WireTlc</TYPE> <NAME>WireTlc1</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>WireTlc</TYPE> <NAME>WireTlc2</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>WireTlc</TYPE> <NAME>WireTlc3</NAME> On-line Risk Prediction Tool SW Beta Release 54

<NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>WireTlc</TYPE> <NAME>WireTlc4</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>WireTlc</TYPE> <NAME>WireTlc5</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> On-line Risk Prediction Tool SW Beta Release 55

<TYPE>WireTlc</TYPE> <NAME>WireTlc6</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>WireTlc</TYPE> <NAME>WireTlc7</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>WireTlc</TYPE> <NAME>WireTlc8</NAME> On-line Risk Prediction Tool SW Beta Release 56

<NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>WireTlc</TYPE> <NAME>WireTlc9</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>WireTlc</TYPE> <NAME>WireTlc10</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> On-line Risk Prediction Tool SW Beta Release 57

<TYPE>WireTlc</TYPE> <NAME>WireTlc11</NAME> <NAME>mechanical_fault</NAME> <TYPE>Scada</TYPE> <NAME>Scada1</NAME> <NAME>conn_to_rtu</NAME> <NAME>data_to_rtu</NAME> On-line Risk Prediction Tool SW Beta Release 58

<TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode1</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode2</NAME> On-line Risk Prediction Tool SW Beta Release 59

<NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode3</NAME> <NAME>data_to_rtu</NAME> On-line Risk Prediction Tool SW Beta Release 60

<NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode4</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> On-line Risk Prediction Tool SW Beta Release 61

<NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode5</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> On-line Risk Prediction Tool SW Beta Release 62

<L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode6</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> On-line Risk Prediction Tool SW Beta Release 63

<L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode7</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> On-line Risk Prediction Tool SW Beta Release 64

<TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode8</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode9</NAME> On-line Risk Prediction Tool SW Beta Release 65

<NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode10</NAME> <NAME>data_to_rtu</NAME> On-line Risk Prediction Tool SW Beta Release 66

<NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode11</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> On-line Risk Prediction Tool SW Beta Release 67

<NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode12</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> On-line Risk Prediction Tool SW Beta Release 68

<R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode13</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> On-line Risk Prediction Tool SW Beta Release 69

<R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode14</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode15</NAME> On-line Risk Prediction Tool SW Beta Release 70

<NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode16</NAME> On-line Risk Prediction Tool SW Beta Release 71

<NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode17</NAME> <NAME>data_to_rtu</NAME> On-line Risk Prediction Tool SW Beta Release 72

<NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode18</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> On-line Risk Prediction Tool SW Beta Release 73

<NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>TlcScadaNode</TYPE> <NAME>TlcScadaNode19</NAME> <NAME>data_to_rtu</NAME> <NAME>conn_to_rtu</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> On-line Risk Prediction Tool SW Beta Release 74

<NAME>reconfigTLC</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService1</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> On-line Risk Prediction Tool SW Beta Release 75

<TYPE>Connectionservice</TYPE> <NAME>ConnectionService2</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService3</NAME> On-line Risk Prediction Tool SW Beta Release 76

<NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService4</NAME> <NAME>conn_to_rtu</NAME> On-line Risk Prediction Tool SW Beta Release 77

<NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService5</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> On-line Risk Prediction Tool SW Beta Release 78

<NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService6</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> On-line Risk Prediction Tool SW Beta Release 79

<NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService7</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> On-line Risk Prediction Tool SW Beta Release 80

<TYPE>Connectionservice</TYPE> <NAME>ConnectionService8</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> On-line Risk Prediction Tool SW Beta Release 81

<TYPE>Connectionservice</TYPE> <NAME>ConnectionService9</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService10</NAME> On-line Risk Prediction Tool SW Beta Release 82

<NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService11</NAME> <NAME>conn_to_rtu</NAME> On-line Risk Prediction Tool SW Beta Release 83

<NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService12</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> On-line Risk Prediction Tool SW Beta Release 84

<NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService13</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> On-line Risk Prediction Tool SW Beta Release 85

<NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService14</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> On-line Risk Prediction Tool SW Beta Release 86

<TYPE>Connectionservice</TYPE> <NAME>ConnectionService15</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService16</NAME> On-line Risk Prediction Tool SW Beta Release 87

<NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService17</NAME> On-line Risk Prediction Tool SW Beta Release 88

<NAME>conn_to_rtu</NAME> <NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService18</NAME> <NAME>conn_to_rtu</NAME> On-line Risk Prediction Tool SW Beta Release 89

<NAME>active</NAME> <NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>Connectionservice</TYPE> <NAME>ConnectionService19</NAME> <NAME>conn_to_rtu</NAME> <NAME>active</NAME> On-line Risk Prediction Tool SW Beta Release 90

<NAME>update</NAME> <NAME>fault_scada_node</NAME> <TYPE>EleHolNode</TYPE> <NAME>EleHolNode1</NAME> <NAME>reporting</NAME> <NAME>ele_fault</NAME> <TYPE>ReportService</TYPE> <NAME>ReportService1</NAME> On-line Risk Prediction Tool SW Beta Release 91

<NAME>reporting</NAME> <TYPE>FisrService</TYPE> <NAME>FisrService1</NAME> <NAME>reconfig</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>reconfig_start</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>IECSecondaryStation</TYPE> <NAME>IECSecondaryStation1</NAME> On-line Risk Prediction Tool SW Beta Release 92

<NAME>Telecontrolled</NAME> <NAME>NominalSecondaryVoltage</NAME> <L>22000</L> <M>22000</M> <R>22000</R> <NAME>CurrentThreshold</NAME> <L>2000.000000</L> <M>2000.000000</M> <R>2000.000000</R> <NAME>breaker_fault</NAME> <TYPE>IECSecondaryStation</TYPE> <NAME>IECSecondaryStation2</NAME> <NAME>Telecontrolled</NAME> On-line Risk Prediction Tool SW Beta Release 93

<NAME>NominalSecondaryVoltage</NAME> <L>22000</L> <M>22000</M> <R>22000</R> <NAME>CurrentThreshold</NAME> <L>2000.000000</L> <M>2000.000000</M> <R>2000.000000</R> <NAME>breaker_fault</NAME> <TYPE>Joint</TYPE> <NAME>Joint1</NAME> <TYPE>Joint</TYPE> <NAME>Joint2</NAME> On-line Risk Prediction Tool SW Beta Release 94

<TYPE>Joint</TYPE> <NAME>Joint3</NAME> <TYPE>Joint</TYPE> <NAME>Joint4</NAME> <TYPE>Joint</TYPE> <NAME>Joint5</NAME> <TYPE>Joint</TYPE> <NAME>Joint6</NAME> On-line Risk Prediction Tool SW Beta Release 95

<TYPE>Joint</TYPE> <NAME>Joint7</NAME> <TYPE>Joint</TYPE> <NAME>Joint8</NAME> <TYPE>Joint</TYPE> <NAME>Joint9</NAME> <TYPE>Joint</TYPE> <NAME>Joint10</NAME> On-line Risk Prediction Tool SW Beta Release 96

<TYPE>Joint</TYPE> <NAME>Joint11</NAME> <TYPE>Joint</TYPE> <NAME>Joint12</NAME> <TYPE>Joint</TYPE> <NAME>Joint13</NAME> <TYPE>Joint</TYPE> <NAME>Joint14</NAME> On-line Risk Prediction Tool SW Beta Release 97

<TYPE>Breaker</TYPE> <NAME>Breaker1</NAME> <NAME>internal_impedance</NAME> <NAME>breaker_state</NAME> <TYPE>Breaker</TYPE> <NAME>Breaker2</NAME> <NAME>internal_impedance</NAME> <NAME>breaker_state</NAME> On-line Risk Prediction Tool SW Beta Release 98

<TYPE>Breaker</TYPE> <NAME>Breaker3</NAME> <NAME>internal_impedance</NAME> <NAME>breaker_state</NAME> <TYPE>Breaker</TYPE> <NAME>Breaker4</NAME> <NAME>internal_impedance</NAME> On-line Risk Prediction Tool SW Beta Release 99

<NAME>breaker_state</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>Breaker</TYPE> <NAME>Breaker5</NAME> <NAME>internal_impedance</NAME> <NAME>breaker_state</NAME> <TYPE>Breaker</TYPE> <NAME>Breaker6</NAME> On-line Risk Prediction Tool SW Beta Release 100

<NAME>internal_impedance</NAME> <NAME>breaker_state</NAME> <TYPE>Breaker</TYPE> <NAME>Breaker7</NAME> <NAME>internal_impedance</NAME> <NAME>breaker_state</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>Breaker</TYPE> <NAME>Breaker8</NAME> On-line Risk Prediction Tool SW Beta Release 101

<NAME>internal_impedance</NAME> <NAME>breaker_state</NAME> <TYPE>Breaker</TYPE> <NAME>Breaker9</NAME> <NAME>internal_impedance</NAME> <NAME>breaker_state</NAME> <L>0</L> <M>0</M> <R>0</R> On-line Risk Prediction Tool SW Beta Release 102

<TYPE>Breaker</TYPE> <NAME>Breaker10</NAME> <NAME>internal_impedance</NAME> <NAME>breaker_state</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>Breaker</TYPE> <NAME>Breaker11</NAME> <NAME>internal_impedance</NAME> <NAME>breaker_state</NAME> On-line Risk Prediction Tool SW Beta Release 103

<TYPE>Breaker</TYPE> <NAME>Breaker12</NAME> <NAME>internal_impedance</NAME> <NAME>breaker_state</NAME> <TYPE>Breaker</TYPE> <NAME>Breaker13</NAME> <NAME>internal_impedance</NAME> On-line Risk Prediction Tool SW Beta Release 104

<NAME>breaker_state</NAME> <TYPE>Load</TYPE> <NAME>Load1</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load2</NAME> On-line Risk Prediction Tool SW Beta Release 105

<NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load3</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> On-line Risk Prediction Tool SW Beta Release 106

<L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load4</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> On-line Risk Prediction Tool SW Beta Release 107

<TYPE>Load</TYPE> <NAME>Load5</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load6</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> On-line Risk Prediction Tool SW Beta Release 108

<R>0</R> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load7</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> On-line Risk Prediction Tool SW Beta Release 109

<R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load8</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load9</NAME> On-line Risk Prediction Tool SW Beta Release 110

<NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load10</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> On-line Risk Prediction Tool SW Beta Release 111

<NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load11</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load12</NAME> On-line Risk Prediction Tool SW Beta Release 112

<NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load13</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <NAME>internal_impedance</NAME> On-line Risk Prediction Tool SW Beta Release 113

<L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> <TYPE>Load</TYPE> <NAME>Load14</NAME> <NAME>mechanical_fault</NAME> <NAME>internal_impedance</NAME> <L>100.000000</L> <M>100.000000</M> <R>100.000000</R> <NAME>voltage</NAME> <L>22000.000000</L> <M>22000.000000</M> <R>22000.000000</R> On-line Risk Prediction Tool SW Beta Release 114

<TYPE>Wire</TYPE> <NAME>Wire1</NAME> <NAME>internal_impedance</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>Wire</TYPE> <NAME>Wire2</NAME> <NAME>internal_impedance</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> On-line Risk Prediction Tool SW Beta Release 115

<R>0</R> <TYPE>Wire</TYPE> <NAME>Wire3</NAME> <NAME>internal_impedance</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>Wire</TYPE> <NAME>Wire4</NAME> <NAME>internal_impedance</NAME> On-line Risk Prediction Tool SW Beta Release 116

<NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>Wire</TYPE> <NAME>Wire5</NAME> <NAME>internal_impedance</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> [ ] <TYPE>Wire</TYPE> <NAME>Wire35</NAME> On-line Risk Prediction Tool SW Beta Release 117

<NAME>internal_impedance</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>Wire</TYPE> <NAME>Wire36</NAME> <NAME>internal_impedance</NAME> <NAME>mechanical_fault</NAME> <L>0</L> <M>0</M> <R>0</R> <TYPE>Wire</TYPE> <NAME>Wire37</NAME> On-line Risk Prediction Tool SW Beta Release 118

<NAME>internal_impedance</NAME> <NAME>mechanical_fault</NAME> </DOCUMENT> 2.2 Aggregation Module Figure 4 Aggregation Module Architecture The aggregation module is the software module devoted to merge the different data sets coming from different data sources, i.e., the other prediction tools and the field. Moreover there is the need to take into account also the last output of MHR-CISIA simulator, in order to maintain a memory on the state of the entities. The most relevant issue is how to aggregate data coming from multiple information sources; to this end two approaches can be adopted: On-line Risk Prediction Tool SW Beta Release 119

Source Reliability Rating: the different information sources might be characterized by a parameter representing their reliability. This approach can be very useful to reduce the impact of unreliable data in the resulting aggregated state; however, in the case of the reference scenario analyzed, each infrastructure has an exact knowledge of negative phenomena occurring to its equipments and services, or, at least, each information provided by a prediction tool to the others has complete reliability if it is restricted to the subset of entities and services belonging to the infrastructure where it is attested, while in general, the information about services provided by other infrastructures is not exact, since it just represents the part of information extracted by the interdependency model when a partial set of inputs (i.e., sector specific inputs) is applied to it. Domain competence: each tool has maximum competence for what regards data related to such an infrastructure. In this case there is the need to provide an aggregation strategy able to privilege the sector specific information coming from local prediction module. A feasible approach, in this case, is a worst case approach, where the maximum failure and the minimum operativeness is chosen while aggregating different data sets. Such a criterion has the property of not being dependent on the order of the aggregation. 2.2.2 Merge.xml / To change this template, choose Tools Templates and open the template in the editor. / package micieclient; import java.util.; import java.io.; / @author gabriele / public class Merge { //Nota sceglie il peggiore tra due statusitem in base al solo valore M. //si può migliorare calcolando l'area del triangolo differenza e vedendo se è > 0 //tri(x)-tri(y)>0 --> x > y public Vector<CisiaEntity> mergexml(vector<cisiaentity> x, Vector<CisiaEntity> y){ for(int i=0;i<x.size();i++){ String name=x.get(i).getname(); int found=0; int id_found=-1; for(int j=0;(j<y.size())&&(found==0);j++){ if(y.get(j).getname().equalsignorecase(name)){ found=1; id_found=j; On-line Risk Prediction Tool SW Beta Release 120

//se ho trovato l'indice della stessa entita di x su y if(found==1){ //scandisci tutti gli statusitem for(int k=0;k<x.get(i).getstatus().size();k++){ String statusname=x.get(i).getstatusitem(k).getname(); //scandisci lo stato dell'entità in w int found_item=0; for(int w=0;(w<y.get(id_found).getstatus().size())&&(found_item==0);w++){ if (statusname.equalsignorecase(y.get(id_found).getstatusitem(w).getname())){ found_item=1; //confronta i valori float ly=y.get(id_found).getstatusitem(w).getl(); float my=y.get(id_found).getstatusitem(w).getm(); float ry=y.get(id_found).getstatusitem(w).getr(); float mx=x.get(i).getstatusitem(k).getm(); if(y.get(id_found).getstatusitem(w).getname().equals("current_op_level") y.get(id_found).getstatu sitem(w).getname().equals("breaker_state")){ if(mx>my){ CisiaEntity fake_entity= x.get(i); Vector <StatusItem> fake_status = fake_entity.getstatus(); StatusItem fake_si = fake_entity.getstatusitem(k); fake_si.setl(ly); fake_si.setm(my); fake_si.setr(ry); fake_status.setelementat(fake_si, k); fake_entity.setstatus(fake_status); x.setelementat(fake_entity, i); else{ if(mx<my){ CisiaEntity fake_entity= x.get(i); Vector <StatusItem> fake_status = fake_entity.getstatus(); StatusItem fake_si = fake_entity.getstatusitem(k); fake_si.setl(ly); fake_si.setm(my); fake_si.setr(ry); fake_status.setelementat(fake_si, k); fake_entity.setstatus(fake_status); x.setelementat(fake_entity, i); On-line Risk Prediction Tool SW Beta Release 121

return x; public Vector<CisiaEntity> mergexmlifix(vector<cisiaentity> x, Vector<CisiaEntity> y){ for(int i=0;i<x.size();i++){ String name=x.get(i).getname(); int found=0; int id_found=-1; for(int j=0;(j<y.size())&&(found==0);j++){ if(y.get(j).getname().equalsignorecase(name)){ found=1; id_found=j; //se ho trovato l'indice della stessa entita di x su y if(found==1){ //scandisci tutti gli statusitem for(int k=0;k<x.get(i).getstatus().size();k++){ String statusname=x.get(i).getstatusitem(k).getname(); //scandisci lo stato dell'entità in w int found_item=0; for(int w=0;(w<y.get(id_found).getstatus().size())&&(found_item==0);w++){ if (statusname.equalsignorecase(y.get(id_found).getstatusitem(w).getname())){ found_item=1; //confronta i valori float ly=y.get(id_found).getstatusitem(w).getl(); float my=y.get(id_found).getstatusitem(w).getm(); float ry=y.get(id_found).getstatusitem(w).getr(); float mx=x.get(i).getstatusitem(k).getm(); if(y.get(id_found).getstatusitem(w).getname().equals("current_op_level") y.get(id_found).getstatu sitem(w).getname().equals("breaker_state")){ if(mx>my){ CisiaEntity fake_entity= x.get(i); Vector <StatusItem> fake_status = fake_entity.getstatus(); StatusItem fake_si = fake_entity.getstatusitem(k); fake_si.setl(ly); fake_si.setm(my); fake_si.setr(ry); fake_status.setelementat(fake_si, k); fake_entity.setstatus(fake_status); x.setelementat(fake_entity, i); else if(y.get(id_found).getstatusitem(w).getname().equals("reconfigtlc")) On-line Risk Prediction Tool SW Beta Release 122

return x; { if(mx<my){ CisiaEntity fake_entity= x.get(i); Vector <StatusItem> fake_status = fake_entity.getstatus(); StatusItem fake_si = fake_entity.getstatusitem(k); fake_si.setl(ly); fake_si.setm(my); fake_si.setr(ry); fake_status.setelementat(fake_si, k); fake_entity.setstatus(fake_status); x.setelementat(fake_entity, i); public Vector<CisiaEntity> mergexmlifix2(vector<cisiaentity> x, Vector<CisiaEntity> y){ for(int i=0;i<x.size();i++){ String name=x.get(i).getname(); int found=0; int id_found=-1; for(int j=0;(j<y.size())&&(found==0);j++){ if(y.get(j).getname().equalsignorecase(name)){ found=1; id_found=j; //se ho trovato l'indice della stessa entita di x su y if(found==1){ //scandisci tutti gli statusitem for(int k=0;k<x.get(i).getstatus().size();k++){ String statusname=x.get(i).getstatusitem(k).getname(); //scandisci lo stato dell'entità in w int found_item=0; for(int w=0;(w<y.get(id_found).getstatus().size())&&(found_item==0);w++){ if (statusname.equalsignorecase(y.get(id_found).getstatusitem(w).getname())){ found_item=1; //confronta i valori float ly=y.get(id_found).getstatusitem(w).getl(); float my=y.get(id_found).getstatusitem(w).getm(); float ry=y.get(id_found).getstatusitem(w).getr(); float mx=x.get(i).getstatusitem(k).getm(); On-line Risk Prediction Tool SW Beta Release 123

if(y.get(id_found).getstatusitem(w).getname().equals("current_op_level") y.get(id_found).getstatu sitem(w).getname().equals("breaker_state")){ if(mx>my){ CisiaEntity fake_entity= x.get(i); Vector <StatusItem> fake_status = fake_entity.getstatus(); StatusItem fake_si = fake_entity.getstatusitem(k); fake_si.setl(ly); fake_si.setm(my); fake_si.setr(ry); fake_status.setelementat(fake_si, k); fake_entity.setstatus(fake_status); x.setelementat(fake_entity, i); else if(y.get(id_found).getstatusitem(w).getname().contains("fault")){ CisiaEntity fake_entity= x.get(i); Vector <StatusItem> fake_status = fake_entity.getstatus(); StatusItem fake_si = fake_entity.getstatusitem(k); fake_si.setl(ly); fake_si.setm(my); fake_si.setr(ry); fake_status.setelementat(fake_si, k); fake_entity.setstatus(fake_status); x.setelementat(fake_entity, i); else if(y.get(id_found).getstatusitem(w).getname().equals("reconfigtlc")) { if(mx<my){ CisiaEntity fake_entity= x.get(i); Vector <StatusItem> fake_status = fake_entity.getstatus(); StatusItem fake_si = fake_entity.getstatusitem(k); fake_si.setl(ly); fake_si.setm(my); fake_si.setr(ry); fake_status.setelementat(fake_si, k); fake_entity.setstatus(fake_status); x.setelementat(fake_entity, i); return x; On-line Risk Prediction Tool SW Beta Release 124

2.3 Filter Module Figure 5 Filtering Module Architecture The filtering module provides the data that will be forwarded to other prediction tools. To this end, given the updated prediction, only the quality of the services is selected. There is also the possibility to introduce a tuning parameter in order to dynamically change the nature of the information exposed; for instance there is the possibility to exchange every piece of information in order to reconstruct exactly the state. 2.3.1 Filter.java / To change this template, choose Tools Templates and open the template in the editor. / package micieclient; import java.util.; import java.io.; / @author gabriele / public class Filter { public Vector<CisiaEntity> filterqos(vector<cisiaentity> x){ Vector<CisiaEntity> ret = new Vector<CisiaEntity>(); for(int i=0;i<x.size();i++){ if(x.get(i).getname().contains("ervice")){ ret.add(x.get(i)); return ret; On-line Risk Prediction Tool SW Beta Release 125

2.4 Communication Module Figure 6 Communication Module Architecture This module represents the actual interface of the prediction tool with the SMGW and then with the Adaptor and the other prediction tools. The communication with other tools and the adaptor is performed by communicating with the local SMGW, which is demanded to retrieve information and provide it to the local prediction tool, as well as providing the updated prediction of local prediction tool to other remote SMGWs. The whole communication architecture is based on the WSO2/Tomacat framework and uses webservices to perform data exchange. Such an exchange can be performed both in pull and push mode. More in detail, the communication module is composed of two software modules: 1. Client: it is a Java application devoted to collect data coming from other prediction tools and from the adaptor. Since the SMGW is completely transparent to the Client, it can be configured as if it is directly connected to the remote Webservices (in push mode). 2. Output Webservice: it is aimed to forward the filtered prediction to other prediction tools. 2.4.1 Package org.me.cisiawebservice In the following, the programming code is presented and in is shown the UML diagram classes of the risk prediction tool web service. package org.me.cisiawebservice; import java.util.list; import javax.jws.webmethod; import javax.jws.webparam; import javax.jws.webresult; On-line Risk Prediction Tool SW Beta Release 126

import javax.jws.webservice; import javax.xml.bind.annotation.xmlseealso; On-line Risk Prediction Tool SW Beta Release 127

import javax.xml.ws.requestwrapper; On-line Risk Prediction Tool SW Beta Release 128 Figure 7 UML diagram for the risk prediction web service

import javax.xml.ws.responsewrapper; / This class was generated by the JAX-WS RI. JAX-WS RI 2.1.6 Generated source version: 2.1 / @WebService(name = "Cisia", targetnamespace = "http://cisiawebservice.me.org/") @XmlSeeAlso({ ObjectFactory.class ) public interface Cisia { / @param name @return returns java.lang.string / @WebMethod @WebResult(targetNamespace = "") @RequestWrapper(localName = "hello", targetnamespace = "http://cisiawebservice.me.org/", classname = "org.me.cisiawebservice.hello") @ResponseWrapper(localName = "helloresponse", targetnamespace = "http://cisiawebservice.me.org/", classname = "org.me.cisiawebservice.helloresponse") public String hello( @WebParam(name = "name", targetnamespace = "") String name); / @param arg0 @return returns java.util.list<org.me.cisiawebservice.cisiaentity> / @WebMethod @WebResult(targetNamespace = "") @RequestWrapper(localName = "getallentity", targetnamespace = "http://cisiawebservice.me.org/", classname = "org.me.cisiawebservice.getallentity") @ResponseWrapper(localName = "getallentityresponse", targetnamespace = "http://cisiawebservice.me.org/", classname = "org.me.cisiawebservice.getallentityresponse") public List<CisiaEntity> getallentity( @WebParam(name = "arg0", targetnamespace = "") int arg0); / On-line Risk Prediction Tool SW Beta Release 129

@param arg1 @param arg0 @return returns java.util.list<org.me.cisiawebservice.cisiaentity> / @WebMethod @WebResult(targetNamespace = "") @RequestWrapper(localName = "getallentitybytype", targetnamespace = "http://cisiawebservice.me.org/", classname = "org.me.cisiawebservice.getallentitybytype") @ResponseWrapper(localName = "getallentitybytyperesponse", targetnamespace = "http://cisiawebservice.me.org/", classname = "org.me.cisiawebservice.getallentitybytyperesponse") public List<CisiaEntity> getallentitybytype( @WebParam(name = "arg0", targetnamespace = "") String arg0, @WebParam(name = "arg1", targetnamespace = "") int arg1); / @param arg1 @param arg0 @return returns org.me.cisiawebservice.cisiaentity / @WebMethod @WebResult(targetNamespace = "") @RequestWrapper(localName = "getentitybyname", targetnamespace = "http://cisiawebservice.me.org/", classname = "org.me.cisiawebservice.getentitybyname") @ResponseWrapper(localName = "getentitybynameresponse", targetnamespace = "http://cisiawebservice.me.org/", classname = "org.me.cisiawebservice.getentitybynameresponse") public CisiaEntity getentitybyname( @WebParam(name = "arg0", targetnamespace = "") String arg0, @WebParam(name = "arg1", targetnamespace = "") int arg1); package org.me.cisiawebservice; import java.util.arraylist; import java.util.list; import javax.xml.bind.annotation.xmlaccesstype; import javax.xml.bind.annotation.xmlaccessortype; import javax.xml.bind.annotation.xmlelement; import javax.xml.bind.annotation.xmltype; On-line Risk Prediction Tool SW Beta Release 130

/ <p>java class for cisiaentity complex type. <p>the following schema fragment specifies the expected content contained within this class. <pre> <complextype name="cisiaentity"> <complexcontent> <restriction base="{http://www.w3.org/2001/xmlschemaanytype"> <sequence> <element name="name" type="{http://www.w3.org/2001/xmlschemastring" minoccurs="0"/> <element name="numparams" type="{http://www.w3.org/2001/xmlschemaint"/> <element name="status" type="{http://cisiawebservice.me.org/statusitem" maxoccurs="unbounded" minoccurs="0"/> <element name="steps" type="{http://www.w3.org/2001/xmlschemaint"/> <element name="type" type="{http://www.w3.org/2001/xmlschemastring" minoccurs="0"/> </sequence> </restriction> </complexcontent> </complextype> </pre> / @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "cisiaentity", proporder = { "name", "numparams", "status", "steps", "type" ) public class CisiaEntity { protected String name; protected int numparams; @XmlElement(nillable = true) protected List<StatusItem> status; protected int steps; protected String type; / Gets the value of the name property. @return On-line Risk Prediction Tool SW Beta Release 131

possible object is {@link String / public String getname() { return name; / Sets the value of the name property. @param value allowed object is {@link String / public void setname(string value) { this.name = value; / Gets the value of the numparams property. / public int getnumparams() { return numparams; / Sets the value of the numparams property. / public void setnumparams(int value) { this.numparams = value; / Gets the value of the status property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the status property. <p> For example, to add a new item, do as follows: <pre> getstatus().add(newitem); On-line Risk Prediction Tool SW Beta Release 132

</pre> <p> Objects of the following type(s) are allowed in the list {@link StatusItem / public List<StatusItem> getstatus() { if (status == null) { status = new ArrayList<StatusItem>(); return this.status; / Gets the value of the steps property. / public int getsteps() { return steps; / Sets the value of the steps property. / public void setsteps(int value) { this.steps = value; / Gets the value of the type property. @return possible object is {@link String / public String gettype() { return type; / Sets the value of the type property. @param value allowed object is On-line Risk Prediction Tool SW Beta Release 133

{@link String / public void settype(string value) { this.type = value; package org.me.cisiawebservice; import java.net.malformedurlexception; import java.net.url; import java.util.logging.logger; import javax.xml.namespace.qname; import javax.xml.ws.service; import javax.xml.ws.webendpoint; import javax.xml.ws.webserviceclient; import javax.xml.ws.webservicefeature; / This class was generated by the JAX-WS RI. JAX-WS RI 2.1.6 Generated source version: 2.1 / @WebServiceClient(name = "CisiaService", targetnamespace = "http://cisiawebservice.me.org/", wsdllocation = "http://localhost:8080/cisiawebservice/cisia?wsdl") public class CisiaService extends Service { private final static URL CISIASERVICE_WSDL_LOCATION; private final static Logger logger = Logger.getLogger(org.me.cisiawebservice.CisiaService.class.getName()); static { URL url = null; try { URL baseurl; baseurl = org.me.cisiawebservice.cisiaservice.class.getresource("."); url = new URL(baseUrl, "http://192.168.1.5:8080/cisiawebservice/cisia?wsdl"); catch (MalformedURLException e) { logger.warning("failed to create URL for the wsdl Location: 'http://localhost:8080/cisiawebservice/cisia?wsdl', retrying as a local file"); logger.warning(e.getmessage()); CISIASERVICE_WSDL_LOCATION = url; On-line Risk Prediction Tool SW Beta Release 134

public CisiaService(URL wsdllocation, QName servicename) { super(wsdllocation, servicename); public CisiaService() { super(cisiaservice_wsdl_location, new QName("http://cisiawebservice.me.org/", "CisiaService")); / @return returns Cisia / @WebEndpoint(name = "CisiaPort") public Cisia getcisiaport() { return super.getport(new QName("http://cisiawebservice.me.org/", "CisiaPort"), Cisia.class); / @param features A list of {@link javax.xml.ws.webservicefeature to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. @return returns Cisia / @WebEndpoint(name = "CisiaPort") public Cisia getcisiaport(webservicefeature... features) { return super.getport(new QName("http://cisiawebservice.me.org/", "CisiaPort"), Cisia.class, features); package org.me.cisiawebservice; import javax.xml.bind.annotation.xmlaccesstype; import javax.xml.bind.annotation.xmlaccessortype; import javax.xml.bind.annotation.xmltype; / <p>java class for getallentity complex type. <p>the following schema fragment specifies the expected content contained within this class. On-line Risk Prediction Tool SW Beta Release 135

<pre> <complextype name="getallentity"> <complexcontent> <restriction base="{http://www.w3.org/2001/xmlschemaanytype"> <sequence> <element name="arg0" type="{http://www.w3.org/2001/xmlschemaint"/> </sequence> </restriction> </complexcontent> </complextype> </pre> / @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "getallentity", proporder = { "arg0" ) public class GetAllEntity { protected int arg0; / Gets the value of the arg0 property. / public int getarg0() { return arg0; / Sets the value of the arg0 property. / public void setarg0(int value) { this.arg0 = value; package org.me.cisiawebservice; import javax.xml.bind.annotation.xmlaccesstype; import javax.xml.bind.annotation.xmlaccessortype; import javax.xml.bind.annotation.xmltype; / <p>java class for getallentitybytype complex type. On-line Risk Prediction Tool SW Beta Release 136

<p>the following schema fragment specifies the expected content contained within this class. <pre> <complextype name="getallentitybytype"> <complexcontent> <restriction base="{http://www.w3.org/2001/xmlschemaanytype"> <sequence> <element name="arg0" type="{http://www.w3.org/2001/xmlschemastring" minoccurs="0"/> <element name="arg1" type="{http://www.w3.org/2001/xmlschemaint"/> </sequence> </restriction> </complexcontent> </complextype> </pre> / @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "getallentitybytype", proporder = { "arg0", "arg1" ) public class GetAllEntityByType { protected String arg0; protected int arg1; / Gets the value of the arg0 property. @return possible object is {@link String / public String getarg0() { return arg0; / Sets the value of the arg0 property. @param value allowed object is {@link String / On-line Risk Prediction Tool SW Beta Release 137

public void setarg0(string value) { this.arg0 = value; / Gets the value of the arg1 property. / public int getarg1() { return arg1; / Sets the value of the arg1 property. / public void setarg1(int value) { this.arg1 = value; package org.me.cisiawebservice; import java.util.arraylist; import java.util.list; import javax.xml.bind.annotation.xmlaccesstype; import javax.xml.bind.annotation.xmlaccessortype; import javax.xml.bind.annotation.xmlelement; import javax.xml.bind.annotation.xmltype; / <p>java class for getallentitybytyperesponse complex type. <p>the following schema fragment specifies the expected content contained within this class. <pre> <complextype name="getallentitybytyperesponse"> <complexcontent> <restriction base="{http://www.w3.org/2001/xmlschemaanytype"> <sequence> <element name="return" type="{http://cisiawebservice.me.org/cisiaentity" maxoccurs="unbounded" minoccurs="0"/> </sequence> </restriction> </complexcontent> </complextype> </pre> On-line Risk Prediction Tool SW Beta Release 138

/ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "getallentitybytyperesponse", proporder = { "_return" ) public class GetAllEntityByTypeResponse { @XmlElement(name = "return") protected List<CisiaEntity> _return; / Gets the value of the return property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the return property. <p> For example, to add a new item, do as follows: <pre> getreturn().add(newitem); </pre> <p> Objects of the following type(s) are allowed in the list {@link CisiaEntity / public List<CisiaEntity> getreturn() { if (_return == null) { _return = new ArrayList<CisiaEntity>(); return this._return; package org.me.cisiawebservice; import java.util.arraylist; import java.util.list; import javax.xml.bind.annotation.xmlaccesstype; import javax.xml.bind.annotation.xmlaccessortype; On-line Risk Prediction Tool SW Beta Release 139

import javax.xml.bind.annotation.xmlelement; import javax.xml.bind.annotation.xmltype; / <p>java class for getallentityresponse complex type. <p>the following schema fragment specifies the expected content contained within this class. <pre> <complextype name="getallentityresponse"> <complexcontent> <restriction base="{http://www.w3.org/2001/xmlschemaanytype"> <sequence> <element name="return" type="{http://cisiawebservice.me.org/cisiaentity" maxoccurs="unbounded" minoccurs="0"/> </sequence> </restriction> </complexcontent> </complextype> </pre> / @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "getallentityresponse", proporder = { "_return" ) public class GetAllEntityResponse { @XmlElement(name = "return") protected List<CisiaEntity> _return; / Gets the value of the return property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the return property. <p> For example, to add a new item, do as follows: <pre> getreturn().add(newitem); </pre> On-line Risk Prediction Tool SW Beta Release 140

<p> Objects of the following type(s) are allowed in the list {@link CisiaEntity / public List<CisiaEntity> getreturn() { if (_return == null) { _return = new ArrayList<CisiaEntity>(); return this._return; package org.me.cisiawebservice; import javax.xml.bind.annotation.xmlaccesstype; import javax.xml.bind.annotation.xmlaccessortype; import javax.xml.bind.annotation.xmltype; / <p>java class for getentitybyname complex type. <p>the following schema fragment specifies the expected content contained within this class. <pre> <complextype name="getentitybyname"> <complexcontent> <restriction base="{http://www.w3.org/2001/xmlschemaanytype"> <sequence> <element name="arg0" type="{http://www.w3.org/2001/xmlschemastring" minoccurs="0"/> <element name="arg1" type="{http://www.w3.org/2001/xmlschemaint"/> </sequence> </restriction> </complexcontent> </complextype> </pre> / @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "getentitybyname", proporder = { "arg0", "arg1" ) public class GetEntityByName { On-line Risk Prediction Tool SW Beta Release 141

protected String arg0; protected int arg1; / Gets the value of the arg0 property. @return possible object is {@link String / public String getarg0() { return arg0; / Sets the value of the arg0 property. @param value allowed object is {@link String / public void setarg0(string value) { this.arg0 = value; / Gets the value of the arg1 property. / public int getarg1() { return arg1; / Sets the value of the arg1 property. / public void setarg1(int value) { this.arg1 = value; package org.me.cisiawebservice; import javax.xml.bind.annotation.xmlaccesstype; On-line Risk Prediction Tool SW Beta Release 142

import javax.xml.bind.annotation.xmlaccessortype; import javax.xml.bind.annotation.xmlelement; import javax.xml.bind.annotation.xmltype; / <p>java class for getentitybynameresponse complex type. <p>the following schema fragment specifies the expected content contained within this class. <pre> <complextype name="getentitybynameresponse"> <complexcontent> <restriction base="{http://www.w3.org/2001/xmlschemaanytype"> <sequence> <element name="return" type="{http://cisiawebservice.me.org/cisiaentity" minoccurs="0"/> </sequence> </restriction> </complexcontent> </complextype> </pre> / @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "getentitybynameresponse", proporder = { "_return" ) public class GetEntityByNameResponse { @XmlElement(name = "return") protected CisiaEntity _return; / Gets the value of the return property. @return possible object is {@link CisiaEntity / public CisiaEntity getreturn() { return _return; / Sets the value of the return property. On-line Risk Prediction Tool SW Beta Release 143

@param value allowed object is {@link CisiaEntity / public void setreturn(cisiaentity value) { this._return = value; package org.me.cisiawebservice; import javax.xml.bind.annotation.xmlaccesstype; import javax.xml.bind.annotation.xmlaccessortype; import javax.xml.bind.annotation.xmltype; / <p>java class for hello complex type. <p>the following schema fragment specifies the expected content contained within this class. <pre> <complextype name="hello"> <complexcontent> <restriction base="{http://www.w3.org/2001/xmlschemaanytype"> <sequence> <element name="name" type="{http://www.w3.org/2001/xmlschemastring" minoccurs="0"/> </sequence> </restriction> </complexcontent> </complextype> </pre> / @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "hello", proporder = { "name" ) public class Hello { protected String name; / Gets the value of the name property. On-line Risk Prediction Tool SW Beta Release 144

@return possible object is {@link String / public String getname() { return name; / Sets the value of the name property. @param value allowed object is {@link String / public void setname(string value) { this.name = value; package org.me.cisiawebservice; import javax.xml.bind.annotation.xmlaccesstype; import javax.xml.bind.annotation.xmlaccessortype; import javax.xml.bind.annotation.xmlelement; import javax.xml.bind.annotation.xmltype; / <p>java class for helloresponse complex type. <p>the following schema fragment specifies the expected content contained within this class. <pre> <complextype name="helloresponse"> <complexcontent> <restriction base="{http://www.w3.org/2001/xmlschemaanytype"> <sequence> <element name="return" type="{http://www.w3.org/2001/xmlschemastring" minoccurs="0"/> </sequence> </restriction> </complexcontent> </complextype> </pre> On-line Risk Prediction Tool SW Beta Release 145

/ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "helloresponse", proporder = { "_return" ) public class HelloResponse { @XmlElement(name = "return") protected String _return; / Gets the value of the return property. @return possible object is {@link String / public String getreturn() { return _return; / Sets the value of the return property. @param value allowed object is {@link String / public void setreturn(string value) { this._return = value; package org.me.cisiawebservice; import javax.xml.bind.jaxbelement; import javax.xml.bind.annotation.xmlelementdecl; import javax.xml.bind.annotation.xmlregistry; import javax.xml.namespace.qname; / This object contains factory methods for each Java content interface and Java element interface generated in the org.me.cisiawebservice package. On-line Risk Prediction Tool SW Beta Release 146

<p>an ObjectFactory allows you to programatically construct new instances of the Java representation for XML content. The Java representation of XML content can consist of schema derived interfaces and classes representing the binding of schema type definitions, element declarations and model groups. Factory methods for each of these are provided in this class. / @XmlRegistry public class ObjectFactory { private final static QName _GetAllEntityByTypeResponse_QNAME = new QName("http://cisiawebservice.me.org/", "getallentitybytyperesponse"); private final static QName _GetAllEntityByType_QNAME = new QName("http://cisiawebservice.me.org/", "getallentitybytype"); private final static QName _GetEntityByNameResponse_QNAME = new QName("http://cisiawebservice.me.org/", "getentitybynameresponse"); private final static QName _GetEntityByName_QNAME = new QName("http://cisiawebservice.me.org/", "getentitybyname"); private final static QName _Hello_QNAME = new QName("http://cisiawebservice.me.org/", "hello"); private final static QName _GetAllEntity_QNAME = new QName("http://cisiawebservice.me.org/", "getallentity"); private final static QName _GetAllEntityResponse_QNAME = new QName("http://cisiawebservice.me.org/", "getallentityresponse"); private final static QName _HelloResponse_QNAME = new QName("http://cisiawebservice.me.org/", "helloresponse"); / Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.me.cisiawebservice / public ObjectFactory() { / Create an instance of {@link GetEntityByNameResponse / public GetEntityByNameResponse creategetentitybynameresponse() { return new GetEntityByNameResponse(); / Create an instance of {@link GetAllEntityResponse On-line Risk Prediction Tool SW Beta Release 147

/ public GetAllEntityResponse creategetallentityresponse() { return new GetAllEntityResponse(); / Create an instance of {@link GetAllEntityByTypeResponse / public GetAllEntityByTypeResponse creategetallentitybytyperesponse() { return new GetAllEntityByTypeResponse(); / Create an instance of {@link HelloResponse / public HelloResponse createhelloresponse() { return new HelloResponse(); / Create an instance of {@link GetEntityByName / public GetEntityByName creategetentitybyname() { return new GetEntityByName(); / Create an instance of {@link GetAllEntityByType / public GetAllEntityByType creategetallentitybytype() { return new GetAllEntityByType(); / Create an instance of {@link Hello / public Hello createhello() { return new Hello(); / Create an instance of {@link StatusItem / On-line Risk Prediction Tool SW Beta Release 148

public StatusItem createstatusitem() { return new StatusItem(); / Create an instance of {@link CisiaEntity / public CisiaEntity createcisiaentity() { return new CisiaEntity(); / Create an instance of {@link GetAllEntity / public GetAllEntity creategetallentity() { return new GetAllEntity(); / Create an instance of {@link JAXBElement {@code <{@link GetAllEntityByTypeResponse {@code > / @XmlElementDecl(namespace = "http://cisiawebservice.me.org/", name = "getallentitybytyperesponse") public JAXBElement<GetAllEntityByTypeResponse> creategetallentitybytyperesponse(getallentitybytyperesponse value) { return new JAXBElement<GetAllEntityByTypeResponse>(_GetAllEntityByTypeResponse_QNAME, GetAllEntityByTypeResponse.class, null, value); / Create an instance of {@link JAXBElement {@code <{@link GetAllEntityByType {@code > / @XmlElementDecl(namespace = "http://cisiawebservice.me.org/", name = "getallentitybytype") public JAXBElement<GetAllEntityByType> creategetallentitybytype(getallentitybytype value) { return new JAXBElement<GetAllEntityByType>(_GetAllEntityByType_QNAME, GetAllEntityByType.class, null, value); / On-line Risk Prediction Tool SW Beta Release 149

Create an instance of {@link JAXBElement {@code <{@link GetEntityByNameResponse {@code > / @XmlElementDecl(namespace = "http://cisiawebservice.me.org/", name = "getentitybynameresponse") public JAXBElement<GetEntityByNameResponse> creategetentitybynameresponse(getentitybynameresponse value) { return new JAXBElement<GetEntityByNameResponse>(_GetEntityByNameResponse_QNAME, GetEntityByNameResponse.class, null, value); / Create an instance of {@link JAXBElement {@code <{@link GetEntityByName {@code > / @XmlElementDecl(namespace = "http://cisiawebservice.me.org/", name = "getentitybyname") public JAXBElement<GetEntityByName> creategetentitybyname(getentitybyname value) { return new JAXBElement<GetEntityByName>(_GetEntityByName_QNAME, GetEntityByName.class, null, value); / Create an instance of {@link JAXBElement {@code <{@link Hello {@code > / @XmlElementDecl(namespace = "http://cisiawebservice.me.org/", name = "hello") public JAXBElement<Hello> createhello(hello value) { return new JAXBElement<Hello>(_Hello_QNAME, Hello.class, null, value); / Create an instance of {@link JAXBElement {@code <{@link GetAllEntity {@code > / @XmlElementDecl(namespace = "http://cisiawebservice.me.org/", name = "getallentity") public JAXBElement<GetAllEntity> creategetallentity(getallentity value) { return new JAXBElement<GetAllEntity>(_GetAllEntity_QNAME, GetAllEntity.class, null, value); / Create an instance of {@link JAXBElement {@code <{@link GetAllEntityResponse {@code > / On-line Risk Prediction Tool SW Beta Release 150

@XmlElementDecl(namespace = "http://cisiawebservice.me.org/", name = "getallentityresponse") public JAXBElement<GetAllEntityResponse> creategetallentityresponse(getallentityresponse value) { return new JAXBElement<GetAllEntityResponse>(_GetAllEntityResponse_QNAME, GetAllEntityResponse.class, null, value); / Create an instance of {@link JAXBElement {@code <{@link HelloResponse {@code > / @XmlElementDecl(namespace = "http://cisiawebservice.me.org/", name = "helloresponse") public JAXBElement<HelloResponse> createhelloresponse(helloresponse value) { return new JAXBElement<HelloResponse>(_HelloResponse_QNAME, HelloResponse.class, null, value); package org.me.cisiawebservice; import javax.xml.bind.annotation.xmlaccesstype; import javax.xml.bind.annotation.xmlaccessortype; import javax.xml.bind.annotation.xmltype; / <p>java class for statusitem complex type. <p>the following schema fragment specifies the expected content contained within this class. <pre> <complextype name="statusitem"> <complexcontent> <restriction base="{http://www.w3.org/2001/xmlschemaanytype"> <sequence> <element name="h" type="{http://www.w3.org/2001/xmlschemafloat"/> <element name="l" type="{http://www.w3.org/2001/xmlschemafloat"/> <element name="m" type="{http://www.w3.org/2001/xmlschemafloat"/> <element name="name" type="{http://www.w3.org/2001/xmlschemastring" minoccurs="0"/> <element name="r" type="{http://www.w3.org/2001/xmlschemafloat"/> </sequence> </restriction> </complexcontent> </complextype> </pre> On-line Risk Prediction Tool SW Beta Release 151

/ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "statusitem", proporder = { "h", "l", "m", "name", "r" ) public class StatusItem { protected float h; protected float l; protected float m; protected String name; protected float r; / Gets the value of the h property. / public float geth() { return h; / Sets the value of the h property. / public void seth(float value) { this.h = value; / Gets the value of the l property. / public float getl() { return l; / Sets the value of the l property. / public void setl(float value) { this.l = value; On-line Risk Prediction Tool SW Beta Release 152

/ Gets the value of the m property. / public float getm() { return m; / Sets the value of the m property. / public void setm(float value) { this.m = value; / Gets the value of the name property. @return possible object is {@link String / public String getname() { return name; / Sets the value of the name property. @param value allowed object is {@link String / public void setname(string value) { this.name = value; / Gets the value of the r property. / public float getr() { return r; On-line Risk Prediction Tool SW Beta Release 153

/ Figure 8 UML diagram for risk prediction web client On-line Risk Prediction Tool SW Beta Release 154

Sets the value of the r property. / public void setr(float value) { this.r = value; @javax.xml.bind.annotation.xmlschema(namespace = "http://cisiawebservice.me.org/") package org.me.cisiawebservice; 2.4.2 Package MicieClient In the following, the programming code of the on-line risk prediction client module is presented and in the Figure 8 is shown the UML diagramm classes of the package. / To change this template, choose Tools Templates and open the template in the editor. / package micieclient; import java.util.; import java.io.; / @author Gabriele Oliva / public class Main { / Legge il webservice in ingresso Legge l'output di Ifix Legge l'input di CISIA (TODO: dati dal campo) Legge l'output di CISIA Combina i files nel caso peggiore (massimo fault minimo operative level) Lancia CISIA con il nuovo input (TODO: cancellare prima Entity Statuses1.xml) Filtra l'output e aggiorna il webservice in uscita @param argomenti di CISIA / public static void main(string[] args) { / Initialization / Ws2XML rd = new Ws2XML();//writes Webservice data to local xml EntityReader locrd = new EntityReader();//reads local xml Filter fltr= new Filter();//Filters local data structure (i.e., only services) WriteLocale locwr= new WriteLocale();//Writes local data structure to local xml Merge mrg = new Merge();//Merges local data structures Convert cnvrt = new Convert(); On-line Risk Prediction Tool SW Beta Release 155

/ Parameters / int step=1;//step chosen for merging, selection, etc. boolean verbose=true; //if false no text comments displayed int wsreadmode = 3;//0 only ol, 1 fault, 2 ol + fault, >2 all String mod="all"; // or "onlyol", "onlyfault", "olandfault" // Strings used for reading / writing xml String path = "C:\\Documents and Settings\\Foglietta\\Documenti\\NetBeansProjects\\MICIEClient\\"; String EntityStatuses1="EntityStatuses1.xml"; String ifix="ifix.xml"; String statusiec="statusiec.xml"; String outws="outws.xml"; String pathws = "C:\\CisiaWS\\"; boolean onlyservices=true; //1)Call Webservice and read QoS prediction if(verbose==true)system.out.println("webservice Request..."); org.me.cisiawebservice.cisiaservice service = new org.me.cisiawebservice.cisiaservice(); org.me.cisiawebservice.cisia port = service.getcisiaport(); java.util.list<org.me.cisiawebservice.cisiaentity> QoSIn; QoSIn = port.getallentity(wsreadmode); //2) convert QoSIn in a local data structure Vector<CisiaEntity> INWS = cnvrt.ws2local(qosin); //3a) read local xml file containing Webservice Data: // in this way the data structure used is a local data structure. //3b) read Cisia Output and input files //3c) read ifix output if(verbose==true)system.out.println("read xml files from local directory..."); Vector<CisiaEntity> CISIAOUT = locrd.readxmlentitiesfirststep(path+entitystatuses1,mod); Vector<CisiaEntity> IFIXOUT = locrd.readxmlentitiesfirststep(path+ifix,mod); Vector<CisiaEntity> INCISIA = locrd.readxmlentitiesfirststep(path+statusiec,mod); //4) merge xml files: left argument is filled with data from right template //if right template has more entities, statusitems, they are not considered if(verbose==true)system.out.println("merge XML Files and Write to local Folder..."); Vector<CisiaEntity> MERGED = mrg.mergexml(incisia,cisiaout); MERGED=mrg.mergexml(MERGED, INWS); MERGED=mrg.mergexmlIFIX2(MERGED, IFIXOUT); //5)update statusiec.xml by selecting step in merged data and by omitting <STEPXXX> tags if(verbose==true)system.out.println("update Cisia Input File..."); locwr.localewritexmlentitiesstep(statusiec, MERGED,step,0); On-line Risk Prediction Tool SW Beta Release 156

File f = new File("EntityStatuses1.xml"); boolean success = f.delete(); if (!success) { System.out.println("Error deleting Entitystatuses..."); f = new File("EntityStatuses1.log"); success = f.delete(); if (!success) { System.out.println("Error deleting Entitystatuses..."); try{ Runtime rt = Runtime.getRuntime(); Process proc; if(verbose==true)system.out.println("run Cisia..."); proc = rt.exec("cisia.exe dataiec.xml "+args[0]+" "+args[1]); proc.waitfor(); catch(exception e){ System.out.println("Error Running Cisia..."); //8) read new EntityStatuses1.xml if(verbose==true)system.out.println("read Cisia Output..."); Vector<CisiaEntity> QOSOUT = locrd.readxmlentitiesfirststep(path+entitystatuses1,mod); //9)Filter EntityStatuses1.xml if chosen (select only entities whose name contains "ervice") if(verbose==true)system.out.println("update Webservice Output File..."); if(onlyservices==true)qosout=fltr.filterqos(qosout); //10) Update local (outgoing) webservice file //TODO: avoid problems with locked files (it seems to work as it is for no reason) locwr.localewritexmlentitiesstep(pathws+outws, QOSOUT,step,1); if(verbose==true)system.out.println("cycle Completed!"); package micieclient; / To change this template, choose Tools Templates and open the template in the editor. / import java.util.; / On-line Risk Prediction Tool SW Beta Release 157

@author gabriele / public class CisiaEntity { String name; String type; int num_steps; int num_params; Vector<StatusItem> status; CisiaEntity(){ CisiaEntity(String name,string type){ this.name=name; this.type=type; this.num_steps=0; this.num_params=0; CisiaEntity(String name,string type,int steps,int params){ this.name=name; this.type=type; this.num_steps=steps; this.num_params=params; CisiaEntity(String name,string type, Vector<StatusItem> status){ this.status = status; this.name=name; this.type=type; this.num_steps=0; this.num_params=0; /Get e Set / public void setname(string name){this.name=name; public void setsteps(int steps){this.num_steps=steps; public void setnumparams(int params){this.num_params=params; public void settype(string type){this.type=type; public void setstatus(vector<statusitem> status){this.status=status; public String getname(){return this.name; public String gettype(){return this.type; public int getsteps(){return this.num_steps; public int getnumparams(){return this.num_params; public Vector<StatusItem> getstatus(){return this.status; public StatusItem getstatusitem(int index){return this.status.get(index); public void appendstatusitem(statusitem toadd){this.status.add(toadd); On-line Risk Prediction Tool SW Beta Release 158

public void copy(cisiaentity copy){ this.name=copy.getname(); this.type=copy.gettype(); this.status=copy.getstatus(); this.num_steps=copy.getsteps(); this.num_params=copy.getnumparams(); / To change this template, choose Tools Templates and open the template in the editor. / package micieclient; import java.util.; import java.io.; / @author micie1 / public class Convert { public Vector<CisiaEntity> ws2local(java.util.list<org.me.cisiawebservice.cisiaentity> x){ Vector<CisiaEntity> ret = new Vector<CisiaEntity>(); for(int i=0;i<x.size();i++){ CisiaEntity tmp_entity = new CisiaEntity(); tmp_entity.setname(x.get(i).getname()); tmp_entity.settype(x.get(i).gettype()); tmp_entity.setnumparams(x.get(i).getnumparams()); tmp_entity.setsteps(x.get(i).getsteps()); tmp_entity.status = new Vector<StatusItem>(); for(int j=0;j<x.get(i).getnumparams();j++){ StatusItem tmp_stit = new StatusItem(); tmp_stit.setname(x.get(i).getstatus().get(j).getname()); tmp_stit.setl(x.get(i).getstatus().get(j).getl()); tmp_stit.setm(x.get(i).getstatus().get(j).getm()); tmp_stit.setr(x.get(i).getstatus().get(j).getr()); tmp_stit.seth(x.get(i).getstatus().get(j).geth()); tmp_entity.appendstatusitem(tmp_stit); ret.add(tmp_entity); return ret; On-line Risk Prediction Tool SW Beta Release 159

/ To change this template, choose Tools Templates and open the template in the editor. / package micieclient; import java.io.; import java.util.; //LIbreria necessaria per StAX import javax.xml.stream.; / Rad all entities according to the chosen mode mode="onlyol" --> read only operative levels mode="onlyfault" --> read each statusitem containing "fail" in its name mode"all" read each statusitem OlAndFault @author gabriele / public class EntityReader { public Vector<CisiaEntity> readxmlentities(string xmlfile,string mode){ //leggi il file xml passato per parametro File file = new File(xmlfile); FileInputStream fis = null; int eventcode; try{ fis = new FileInputStream(file); catch (FileNotFoundException e){ //lista di CisiaEntity Vector<CisiaEntity> EntityList = new Vector<CisiaEntity>(); //Entità temporanea per lettura da XML CisiaEntity tmp = new CisiaEntity(); //StatusItem temporanteo per lettura XML StatusItem st = new StatusItem(); Vector <StatusItem> statuslist = new Vector<StatusItem>(); /Lettura XML e creazione lista di CisiaEntity/ On-line Risk Prediction Tool SW Beta Release 160

try{ //Leggi il file XMLStreamReader xmlstreamreader = XMLInputFactory.newInstance().createXMLStreamReader(fis); / Flag necessari a capire che campo sto leggendo / int numsteps=1;//numero di steps int numparams=0;//numero parametri int numentity=0; //Se vale 1 sto per leggere un campo entity int flag_entity=0; //Se vale 1 sto per leggere un campo name (di CisiaEntity) int flag_entity_name=0; //Se vale 1 sto per leggere un campo name (di StatusItem) int flag_statusentity_name=0; //Se vale 1 sto per leggere un campo type int flag_type=0; //Se vale 1 sto per leggere un campo l int flag_l=0; //Se vale 1 sto per leggere un campo l int flag_m=0; //Se vale 1 sto per leggere un campo l int flag_r=0; //Se vale 1 sto per leggere un campo l int flag_h=0; //all'inizio NAME rappresenta il nome di una entity //se vale 0 indica che sto leggendo il nome di uno statusitem int is_entity_name=1; while (xmlstreamreader.hasnext()) { //leggi il prossimo elemento (tag o testo) eventcode = xmlstreamreader.next(); //Esegui azioni in base al tipo di dato letto switch (eventcode) { //Ogni volta che legge un tag di apertura case XMLStreamConstants.START_ELEMENT : String open_tag=xmlstreamreader.getlocalname(); //System.out.println(open_tag); //se è un tag STEP if(open_tag.equalsignorecase("step"+numsteps)){ numentity=0; //se è un tag ENTITY if(open_tag.equalsignorecase("entity")){ flag_entity=1; numparams=0; //se è un tag TYPE On-line Risk Prediction Tool SW Beta Release 161

else if(open_tag.equalsignorecase("type")){ flag_type=1; //Se è un tag NAME //specifica se name di una CisiaEntity o di uno statusitem else if(open_tag.equalsignorecase("name")){ if(is_entity_name==1){flag_entity_name=1;flag_statusentity_name=0;is_entity_name=0; else {flag_entity_name=0;flag_statusentity_name=1; //se è un tag STATUS else if(open_tag.equalsignorecase("status")){ //non fare nulla //se è un tag STATUSITEM else if(open_tag.equalsignorecase("statusitem")){ flag_entity_name=0; flag_statusentity_name=1; //se è un tag L else if(open_tag.equalsignorecase("l")){ flag_l=1; //se è un tag M else if(open_tag.equalsignorecase("m")){ flag_m=1; //se è un tag R else if(open_tag.equalsignorecase("r")){ flag_r=1; //se è un tag H else if(open_tag.equalsignorecase("h")){ flag_h=1; break; //Operazioni legate al contenuto del tag case XMLStreamConstants.CHARACTERS : String payload=xmlstreamreader.gettext(); //System.out.println(payload); //se sto leggendo il name dell CisiaEntity if(flag_entity_name==1){ tmp.setname(payload); flag_entity_name=0; On-line Risk Prediction Tool SW Beta Release 162

//se sto leggendo il type dell CisiaEntity else if (flag_type==1){ tmp.settype(payload); flag_type=0; //se sto leggendo il name dello StatusItem else if (flag_statusentity_name==1){ st.setname(payload); flag_statusentity_name=0; //se sto leggendo il tag L dello StatusItem else if (flag_l==1){ st.setl(float.valueof(payload).floatvalue()); flag_l=0; //se sto leggendo il tag M dello StatusItem else if (flag_m==1){ st.setm(float.valueof(payload).floatvalue()); flag_m=0; //se sto leggendo il tag R dello StatusItem else if (flag_r==1){ st.setr(float.valueof(payload).floatvalue()); flag_r=0; //se sto leggendo il tag H dello StatusItem else if (flag_h==1){ st.seth(float.valueof(payload).floatvalue()); flag_h=0; break; //Ogni volta che legge un tag di chiusura case XMLStreamConstants.END_ELEMENT : String close_tag=xmlstreamreader.getlocalname(); //se finisce lo step if(close_tag.equalsignorecase("step"+numsteps)){ numsteps++; //se finisce lo statusitem accodalo if(close_tag.equalsignorecase("statusitem")){ boolean condaddstatus=true; if(mode.equalsignorecase("all")) condaddstatus=true; else if(mode.equalsignorecase("onlyol"))condaddstatus=(st.getname().equalsignorecase("current_op _level")); On-line Risk Prediction Tool SW Beta Release 163

else if(mode.equalsignorecase("onlyfault"))condaddstatus=(st.getname().contains("fault")); else if(mode.equalsignorecase("olandfault"))condaddstatus=((st.getname().equalsignorecase("curre nt_op_level")) (st.getname().contains("fault"))); if(condaddstatus){ StatusItem addstatus = new StatusItem(st.getName(),st.getL(),st.getM(),st.getR(),st.getH()); statuslist.add(addstatus); if(numsteps==1)numparams++; //accoda la entity if(close_tag.equalsignorecase("entity")){ //System.out.println(tmp.getName()+tmp.getType()); if(numsteps==1){ CisiaEntity add = new CisiaEntity(); add.setname(tmp.getname()); add.settype(tmp.gettype()); add.setnumparams(numparams); add.setsteps(numsteps); add.setstatus(statuslist); EntityList.add(add); else{ //append statusitems for steps >1 for(int h=0;h<statuslist.size();h++){ EntityList.get(numentity).appendStatusItem(statuslist.get(h)); EntityList.get(numentity).setSteps(numsteps); is_entity_name=1; tmp = new CisiaEntity(); statuslist = new Vector<StatusItem>(); numentity++; break; xmlstreamreader.close(); On-line Risk Prediction Tool SW Beta Release 164

catch (Exception e){ //System.out.println("errore!"); return EntityList; / for(int i=0;i<entitylist.size();i++){ CisiaEntity a = (CisiaEntity) EntityList.get(i); System.out.println(a.getName()); List statusit = a.getstatus(); for(int j=0;j<statusit.size();j++){ StatusItem ss= (StatusItem) statusit.get(j); ss.print(); / return EntityList; public Vector<CisiaEntity> readxmlentitiesfirststep(string xmlfile,string mode){ //leggi il file xml passato per parametro File file = new File(xmlfile); FileInputStream fis = null; int eventcode; try{ fis = new FileInputStream(file); catch (FileNotFoundException e){ //lista di CisiaEntity Vector<CisiaEntity> EntityList = new Vector<CisiaEntity>(); //Entità temporanea per lettura da XML CisiaEntity tmp = new CisiaEntity(); //StatusItem temporanteo per lettura XML StatusItem st = new StatusItem(); Vector <StatusItem> statuslist = new Vector<StatusItem>(); /Lettura XML e creazione lista di CisiaEntity/ try{ On-line Risk Prediction Tool SW Beta Release 165

//Leggi il file XMLStreamReader xmlstreamreader = XMLInputFactory.newInstance().createXMLStreamReader(fis); / Flag necessari a capire che campo sto leggendo / int numsteps=1;//numero di steps int numparams=0;//numero parametri int numentity=0; //Se vale 1 sto per leggere un campo entity int flag_entity=0; //Se vale 1 sto per leggere un campo name (di CisiaEntity) int flag_entity_name=0; //Se vale 1 sto per leggere un campo name (di StatusItem) int flag_statusentity_name=0; //Se vale 1 sto per leggere un campo type int flag_type=0; //Se vale 1 sto per leggere un campo l int flag_l=0; //Se vale 1 sto per leggere un campo l int flag_m=0; //Se vale 1 sto per leggere un campo l int flag_r=0; //Se vale 1 sto per leggere un campo l int flag_h=0; //all'inizio NAME rappresenta il nome di una entity //se vale 0 indica che sto leggendo il nome di uno statusitem int is_entity_name=1; while (xmlstreamreader.hasnext()) { //leggi il prossimo elemento (tag o testo) eventcode = xmlstreamreader.next(); //Esegui azioni in base al tipo di dato letto switch (eventcode) { //Ogni volta che legge un tag di apertura case XMLStreamConstants.START_ELEMENT : String open_tag=xmlstreamreader.getlocalname(); //System.out.println(open_tag); //se è un tag STEP if(open_tag.equalsignorecase("step"+numsteps)){ numentity=0; //se è un tag ENTITY if(open_tag.equalsignorecase("entity")){ flag_entity=1; numparams=0; //se è un tag TYPE else if(open_tag.equalsignorecase("type")){ On-line Risk Prediction Tool SW Beta Release 166

flag_type=1; //Se è un tag NAME //specifica se name di una CisiaEntity o di uno statusitem else if(open_tag.equalsignorecase("name")){ if(is_entity_name==1){flag_entity_name=1;flag_statusentity_name=0;is_entity_name=0; else {flag_entity_name=0;flag_statusentity_name=1; //se è un tag STATUS else if(open_tag.equalsignorecase("status")){ //non fare nulla //se è un tag STATUSITEM else if(open_tag.equalsignorecase("statusitem")){ flag_entity_name=0; flag_statusentity_name=1; //se è un tag L else if(open_tag.equalsignorecase("l")){ flag_l=1; //se è un tag M else if(open_tag.equalsignorecase("m")){ flag_m=1; //se è un tag R else if(open_tag.equalsignorecase("r")){ flag_r=1; //se è un tag H else if(open_tag.equalsignorecase("h")){ flag_h=1; break; //Operazioni legate al contenuto del tag case XMLStreamConstants.CHARACTERS : String payload=xmlstreamreader.gettext(); //System.out.println(payload); //se sto leggendo il name dell CisiaEntity if(flag_entity_name==1){ tmp.setname(payload); flag_entity_name=0; On-line Risk Prediction Tool SW Beta Release 167

//se sto leggendo il type dell CisiaEntity else if (flag_type==1){ tmp.settype(payload); flag_type=0; //se sto leggendo il name dello StatusItem else if (flag_statusentity_name==1){ st.setname(payload); flag_statusentity_name=0; //se sto leggendo il tag L dello StatusItem else if (flag_l==1){ st.setl(float.valueof(payload).floatvalue()); flag_l=0; //se sto leggendo il tag M dello StatusItem else if (flag_m==1){ st.setm(float.valueof(payload).floatvalue()); flag_m=0; //se sto leggendo il tag R dello StatusItem else if (flag_r==1){ st.setr(float.valueof(payload).floatvalue()); flag_r=0; //se sto leggendo il tag H dello StatusItem else if (flag_h==1){ st.seth(float.valueof(payload).floatvalue()); flag_h=0; break; //Ogni volta che legge un tag di chiusura case XMLStreamConstants.END_ELEMENT : String close_tag=xmlstreamreader.getlocalname(); //se finisce lo step if(close_tag.equalsignorecase("step"+numsteps)){ numsteps++; //se finisce lo statusitem accodalo if(close_tag.equalsignorecase("statusitem")){ boolean condaddstatus=true; if(mode.equalsignorecase("all")) condaddstatus=true; else if(mode.equalsignorecase("onlyol"))condaddstatus=(st.getname().equalsignorecase("current_op _level")); else if(mode.equalsignorecase("onlyfault"))condaddstatus=(st.getname().contains("fault")); On-line Risk Prediction Tool SW Beta Release 168

else if(mode.equalsignorecase("olandfault"))condaddstatus=((st.getname().equalsignorecase("curre nt_op_level")) (st.getname().contains("fault"))); if(condaddstatus){ StatusItem addstatus = new StatusItem(st.getName(),st.getL(),st.getM(),st.getR(),st.getH()); statuslist.add(addstatus); if(numsteps==1)numparams++; //accoda la entity if(close_tag.equalsignorecase("entity")){ //System.out.println(tmp.getName()+tmp.getType()); if(numsteps==1){ CisiaEntity add = new CisiaEntity(); add.setname(tmp.getname()); add.settype(tmp.gettype()); add.setnumparams(numparams); add.setsteps(numsteps); add.setstatus(statuslist); EntityList.add(add); is_entity_name=1; tmp = new CisiaEntity(); statuslist = new Vector<StatusItem>(); numentity++; break; xmlstreamreader.close(); catch (Exception e){ //System.out.println("errore!"); return EntityList; / for(int i=0;i<entitylist.size();i++){ CisiaEntity a = (CisiaEntity) EntityList.get(i); System.out.println(a.getName()); List statusit = a.getstatus(); for(int j=0;j<statusit.size();j++){ StatusItem ss= (StatusItem) statusit.get(j); ss.print(); On-line Risk Prediction Tool SW Beta Release 169

/ return EntityList; package micieclient; / To change this template, choose Tools Templates and open the template in the editor. / import java.io.; import java.util.; / @author gabriele / public class StatusItem { private String name; private float l; private float m; private float r; private float h; / Costruttori / StatusItem() { StatusItem(String name, float l, float m, float r, float h) { this.name= name; this.l=l; this.m=m; this.r=r; this.h=h; /Get e Set / public void setname(string name){this.name=name; public void setl(float l){this.l = l; public void setm(float m){this.m = m; public void setr(float r){this.r = r; public void seth(float h){this.h = h; On-line Risk Prediction Tool SW Beta Release 170

public String getname(){return this.name; public float getl(){return this.l; public float getm(){return this.m; public float getr(){return this.r; public float geth(){return this.h; void print(){ System.out.println("StatusItem : "+this.name+" ["+this.l+","+this.m+","+this.r+","+this.h+"]"); / To change this template, choose Tools Templates and open the template in the editor. / package micieclient; import java.io.; import java.util.; import java.util.list; import javax.xml.stream.; / Writes the list of entities received by the Webservice into a local XML file @author Gabriele Oliva / public class WriteLocale { public void LocalewriteXmlEntities(String xmlfile, Vector<CisiaEntity> ToWrite){ //leggi il file xml passato per parametro File file = new File(xmlfile); FileOutputStream fis = null; try{ fis = new FileOutputStream(file); catch (FileNotFoundException e){ System.out.println("Errrore Lettura File!"); try{ XMLStreamWriter xmlstreamwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(fis); xmlstreamwriter.writestartelement("document"); On-line Risk Prediction Tool SW Beta Release 171

for(int i=0;i<towrite.get(0).getsteps();i++){ xmlstreamwriter.writestartelement("step"+(i+1)); for(int j=0;j<towrite.size();j++){ xmlstreamwriter.writestartelement("entity"); xmlstreamwriter.writestartelement("type"); xmlstreamwriter.writecharacters(towrite.get(j).gettype()); xmlstreamwriter.writeendelement();//</type> xmlstreamwriter.writestartelement("name"); xmlstreamwriter.writecharacters(towrite.get(j).getname()); xmlstreamwriter.writeendelement();//</name> xmlstreamwriter.writestartelement("status"); for(int k=0;k<towrite.get(j).getnumparams();k++){ xmlstreamwriter.writestartelement("statusitem"); xmlstreamwriter.writestartelement("name"); int z=k+towrite.get(j).getnumparams()i; xmlstreamwriter.writecharacters(towrite.get(j).getstatus().get(z).getname()); xmlstreamwriter.writeendelement();//</name> xmlstreamwriter.writestartelement("value"); xmlstreamwriter.writestartelement("l"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getl()); xmlstreamwriter.writeendelement();//</l> xmlstreamwriter.writestartelement("m"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getm()); xmlstreamwriter.writeendelement();//</m> xmlstreamwriter.writestartelement("r"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getr()); xmlstreamwriter.writeendelement();//</r> xmlstreamwriter.writestartelement("h"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).geth()); xmlstreamwriter.writeendelement();//</h> xmlstreamwriter.writeendelement();// xmlstreamwriter.writeendelement();// xmlstreamwriter.writeendelement();// xmlstreamwriter.writeendelement();// xmlstreamwriter.writeendelement();//</step> xmlstreamwriter.writeendelement();//</document> xmlstreamwriter.close(); fis.close(); On-line Risk Prediction Tool SW Beta Release 172

catch (Exception e){ System.out.println("errore di scrittura!"); public void LocalewriteXmlEntitiesStep(String xmlfile, Vector<CisiaEntity> ToWrite, int step, int steptag){ //leggi il file xml passato per parametro File file = new File(xmlfile); FileOutputStream fis = null; try{ fis = new FileOutputStream(file); catch (FileNotFoundException e){ System.out.println("Errore Lettura File!"); try{ XMLStreamWriter xmlstreamwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(fis); if(towrite.size()>0){ xmlstreamwriter.writestartelement("document"); xmlstreamwriter.writecharacters("\n\t"); for(int i=0;i<=towrite.get(0).getsteps();i++){ if(i==step-1){ if(steptag==1)xmlstreamwriter.writestartelement("step"+step); for(int j=0;j<towrite.size();j++){ xmlstreamwriter.writestartelement("entity"); xmlstreamwriter.writecharacters("\n\t\t"); xmlstreamwriter.writestartelement("type"); xmlstreamwriter.writecharacters(towrite.get(j).gettype()); xmlstreamwriter.writeendelement();//</type> xmlstreamwriter.writecharacters("\n\t\t"); xmlstreamwriter.writestartelement("name"); xmlstreamwriter.writecharacters(towrite.get(j).getname()); xmlstreamwriter.writeendelement();//</name> xmlstreamwriter.writecharacters("\n\t\t"); xmlstreamwriter.writestartelement("status"); xmlstreamwriter.writecharacters("\n\t\t\t"); for(int k=0;k<towrite.get(j).getnumparams();k++){ xmlstreamwriter.writestartelement("statusitem"); xmlstreamwriter.writecharacters("\n\t\t\t\t"); On-line Risk Prediction Tool SW Beta Release 173

xmlstreamwriter.writestartelement("name"); int z=k+(towrite.get(j).getnumparams()-1)i; xmlstreamwriter.writecharacters(towrite.get(j).getstatus().get(z).getname()); xmlstreamwriter.writeendelement();//</name> xmlstreamwriter.writecharacters("\n\t\t\t\t"); xmlstreamwriter.writestartelement("value"); xmlstreamwriter.writecharacters("\n\t\t\t\t\t"); xmlstreamwriter.writestartelement("l"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getl()); xmlstreamwriter.writeendelement();//</l> xmlstreamwriter.writecharacters("\n\t\t\t\t\t"); xmlstreamwriter.writestartelement("m"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getm()); xmlstreamwriter.writeendelement();//</m> xmlstreamwriter.writecharacters("\n\t\t\t\t\t"); xmlstreamwriter.writestartelement("r"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getr()); xmlstreamwriter.writeendelement();//</r> xmlstreamwriter.writecharacters("\n\t\t\t\t\t"); xmlstreamwriter.writestartelement("h"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).geth()); xmlstreamwriter.writeendelement();//</h> xmlstreamwriter.writecharacters("\n\t\t\t\t"); xmlstreamwriter.writeendelement();// xmlstreamwriter.writecharacters("\n\t\t\t"); xmlstreamwriter.writeendelement();// xmlstreamwriter.writecharacters("\n\t\t"); xmlstreamwriter.writeendelement();// xmlstreamwriter.writecharacters("\n\t"); xmlstreamwriter.writeendelement();// xmlstreamwriter.writecharacters("\n\t"); if(steptag==1)xmlstreamwriter.writeendelement();//</step> xmlstreamwriter.writeendelement();//</document> else { //file vuoto xmlstreamwriter.writestartelement("document"); xmlstreamwriter.writeendelement();//</document> On-line Risk Prediction Tool SW Beta Release 174

xmlstreamwriter.close(); fis.close(); catch (Exception e){ System.out.println("errore di scrittura nostro!"); / To change this template, choose Tools Templates and open the template in the editor. / package micieclient; import java.io.; import java.util.; import java.util.list; import org.me.cisiawebservice.; import javax.xml.stream.; / Writes the list of entities received by the Webservice into a local XML file @author Gabriele Oliva / public class Ws2XML { public void writexmlentities(string xmlfile, List<org.me.cisiawebservice.CisiaEntity> ToWrite){ //leggi il file xml passato per parametro File file = new File(xmlfile); FileOutputStream fis = null; try{ fis = new FileOutputStream(file); catch (FileNotFoundException e){ System.out.println("Errrore Lettura File!"); try{ XMLStreamWriter xmlstreamwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(fis); xmlstreamwriter.writestartelement("document"); On-line Risk Prediction Tool SW Beta Release 175

for(int i=0;i<towrite.get(0).getsteps();i++){ xmlstreamwriter.writestartelement("step"+(i+1)); for(int j=0;j<towrite.size();j++){ xmlstreamwriter.writestartelement("entity"); xmlstreamwriter.writestartelement("type"); xmlstreamwriter.writecharacters(towrite.get(j).gettype()); xmlstreamwriter.writeendelement();//</type> xmlstreamwriter.writestartelement("name"); xmlstreamwriter.writecharacters(towrite.get(j).getname()); xmlstreamwriter.writeendelement();//</name> xmlstreamwriter.writestartelement("status"); for(int k=0;k<towrite.get(j).getnumparams();k++){ xmlstreamwriter.writestartelement("statusitem"); xmlstreamwriter.writestartelement("name"); int z=k+towrite.get(j).getnumparams()i; xmlstreamwriter.writecharacters(towrite.get(j).getstatus().get(z).getname()); xmlstreamwriter.writeendelement();//</name> xmlstreamwriter.writestartelement("value"); xmlstreamwriter.writestartelement("l"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getl()); xmlstreamwriter.writeendelement();//</l> xmlstreamwriter.writestartelement("m"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getm()); xmlstreamwriter.writeendelement();//</m> xmlstreamwriter.writestartelement("r"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getr()); xmlstreamwriter.writeendelement();//</r> xmlstreamwriter.writestartelement("h"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).geth()); xmlstreamwriter.writeendelement();//</h> xmlstreamwriter.writeendelement();// xmlstreamwriter.writeendelement();// xmlstreamwriter.writeendelement();// xmlstreamwriter.writeendelement();// xmlstreamwriter.writeendelement();//</step> xmlstreamwriter.writeendelement();//</document> xmlstreamwriter.close(); fis.close(); On-line Risk Prediction Tool SW Beta Release 176

catch (Exception e){ System.out.println("errore di scrittura!"); public void writexmlentitiesstep(string xmlfile, List<org.me.cisiawebservice.CisiaEntity> ToWrite, int step){ //leggi il file xml passato per parametro File file = new File(xmlfile); FileOutputStream fis = null; try{ fis = new FileOutputStream(file); catch (FileNotFoundException e){ System.out.println("Errore Lettura File!"); try{ XMLStreamWriter xmlstreamwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(fis); if(towrite.size()>0){ xmlstreamwriter.writestartelement("document"); xmlstreamwriter.writecharacters("\n\t"); for(int i=0;i<=towrite.get(0).getsteps();i++){ if(i==step){ xmlstreamwriter.writestartelement("step"+step); for(int j=0;j<towrite.size();j++){ xmlstreamwriter.writestartelement("entity"); xmlstreamwriter.writecharacters("\n\t\t"); xmlstreamwriter.writestartelement("type"); xmlstreamwriter.writecharacters(towrite.get(j).gettype()); xmlstreamwriter.writeendelement();//</type> xmlstreamwriter.writecharacters("\n\t\t"); xmlstreamwriter.writestartelement("name"); xmlstreamwriter.writecharacters(towrite.get(j).getname()); xmlstreamwriter.writeendelement();//</name> xmlstreamwriter.writecharacters("\n\t\t"); xmlstreamwriter.writestartelement("status"); xmlstreamwriter.writecharacters("\n\t\t\t"); for(int k=0;k<towrite.get(j).getnumparams();k++){ xmlstreamwriter.writestartelement("statusitem"); xmlstreamwriter.writecharacters("\n\t\t\t\t"); On-line Risk Prediction Tool SW Beta Release 177

xmlstreamwriter.writestartelement("name"); int z=k+(towrite.get(j).getnumparams()-1)i; xmlstreamwriter.writecharacters(towrite.get(j).getstatus().get(z).getname()); xmlstreamwriter.writeendelement();//</name> xmlstreamwriter.writecharacters("\n\t\t\t\t"); xmlstreamwriter.writestartelement("value"); xmlstreamwriter.writecharacters("\n\t\t\t\t\t"); xmlstreamwriter.writestartelement("l"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getl()); xmlstreamwriter.writeendelement();//</l> xmlstreamwriter.writecharacters("\n\t\t\t\t\t"); xmlstreamwriter.writestartelement("m"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getm()); xmlstreamwriter.writeendelement();//</m> xmlstreamwriter.writecharacters("\n\t\t\t\t\t"); xmlstreamwriter.writestartelement("r"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).getr()); xmlstreamwriter.writeendelement();//</r> xmlstreamwriter.writecharacters("\n\t\t\t\t\t"); xmlstreamwriter.writestartelement("h"); xmlstreamwriter.writecharacters(""+towrite.get(j).getstatus().get(z).geth()); xmlstreamwriter.writeendelement();//</h> xmlstreamwriter.writecharacters("\n\t\t\t\t"); xmlstreamwriter.writeendelement();// xmlstreamwriter.writecharacters("\n\t\t\t"); xmlstreamwriter.writeendelement();// xmlstreamwriter.writecharacters("\n\t\t"); xmlstreamwriter.writeendelement();// xmlstreamwriter.writecharacters("\n\t"); xmlstreamwriter.writeendelement();// xmlstreamwriter.writecharacters("\n\t"); xmlstreamwriter.writeendelement();//</step> xmlstreamwriter.writeendelement();//</document> else { //file vuoto xmlstreamwriter.writestartelement("document"); xmlstreamwriter.writeendelement();//</document> On-line Risk Prediction Tool SW Beta Release 178

xmlstreamwriter.close(); fis.close(); catch (Exception e){ System.out.println("errore di scrittura nostro!"); 2.5 Operator Interface Module Figure 9 Operator Interface Figure 10 ifix Architecture The operator interface module is based on IFIX Scada system, since typically operators are confident with this kind of operator panels. As shown in Figure 10Error! Reference source not found. IFIX is much more than a simple graphical environment, it is a complex SCADA monitoring system able to retrieve data from the field by means of an OPC Adaptor (or other adaptors if required). On-line Risk Prediction Tool SW Beta Release 179

It has been implemented C# programs that allow the transformation from risk prediction output file to TAG database and vice versa, in order to simulate the data from field. Infact, during the test phase, the data from field are simulated by click on the operator panels. 2.5.6 From Xml to TAG Database C# Program using System; using System.Collections; using System.Text; using System.IO; using System.Xml; using GeFanuc.iFixToolkit.Adapter; namespace DatiIFIX { class Program { public static void Main(string[] args) { Read reader = new Read(); XmlDocument doc = new XmlDocument(); doc.load(args[0]); try { // Initialize access to tags in one node reader.readxml(doc); catch (FileNotFoundException) { Console.WriteLine("File does not exist"); finally { // Put cleanup code in a finally block to make sure // that it gets executed regardless of whether or not // exception occured Console.WriteLine("Executing cleanup code"); using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Xml; using GeFanuc.iFixToolkit.Adapter; namespace DatiIFIX { class Read { long time = DateTime.Now.Ticks; StringBuilder buf = new StringBuilder(80); On-line Risk Prediction Tool SW Beta Release 180

Int16 err = 0; Int16 err1 = 0; ArrayList anodes = new ArrayList(); Int32[] thandles = new Int32[10000]; string[] avalues = new string[10000]; List<string> current_op_level; List<string> mechanical_fault; List<string> fault_ring_wire; List<string> update_list; List<string> n2s_list; XmlNode tag; XmlNode entity; XmlNode status; XmlNode statusitem1; XmlNode name1; XmlNode val1; XmlNode value1; XmlNode value2; XmlNode value3; XmlNode value4; XmlNode value5; XmlNode value6; XmlNode value7; XmlNode value8; XmlNode value9; XmlNode value10; XmlNode value11; String field; XmlDocument output = new XmlDocument(); IntPtr ghandle = IntPtr.Zero; Int32 ithandle = 0; int k = 1; string op_lev; string fault_ring; string ud; string mech; string n2s; string breaker; string tlc_op; string conn2rtu; string rep; string reconfig; string reconf_start; public void ReadXml(XmlDocument doc) { ghandle = Eda.DefineGroup(1, 0); if (ghandle == IntPtr.Zero) { Console.WriteLine("Failed to create a group"); return; XmlElement root = doc.documentelement; int ii = 0; On-line Risk Prediction Tool SW Beta Release 181

for (int i = 0; i < root.childnodes.count; i++) { XmlNode step = root.childnodes[i]; string[] step_num = new string[100]; for (int jj = 0; jj < 100; jj++) { step_num[jj] = "0"; if (step.name.contains("step")) { step_num[ii] = ExtractNumbers(step.Name); ii++; if (step.name.equals("step" + step_num[0]) step.name.equals("step" + step_num[2]) step.name.equals("step" + step_num[5]) step.name.equals("step" + step_num[8])) { for (int j = 1; j < step.childnodes.count; j++) { entity = step.selectsinglenode("./entity[" + j + "]"); tag = entity.selectsinglenode("./name/text()"); status = entity.selectsinglenode("./status"); value1 = status.selectsinglenode(".//name[contains(text(),'current_op_level')]/followingsibling::value/m/text()"); value4 = status.selectsinglenode(".//name[contains(text(),'mechanical_fault')]/followingsibling::value/m/text()"); value6 = status.selectsinglenode(".//name[contains(text(),'breaker_state')]/followingsibling::value/m/text()"); value7 = status.selectsinglenode(".//name[contains(text(),'tlc_oper')]/followingsibling::value/m/text()"); value8 = status.selectsinglenode(".//name[contains(text(),'conn_to_rtu')]/followingsibling::value/m/text()"); value9 = status.selectsinglenode(".//name[contains(text(),'reporting')]/followingsibling::value/m/text()"); value10 = status.selectsinglenode(".//name[contains(text(),'reconfig')]/followingsibling::value/m/text()"); value11 = status.selectsinglenode(".//name[contains(text(),'reconfig_start')]/followingsibling::value/m/text()"); field = "A_CV"; if (value1!= null) { float f_value1 = float.parse(value1.value); f_value1 = f_value1 / 1000000; op_lev = f_value1.tostring(); thandles[k] = Eda.DefineNtf(gHandle, "Fix", (String)tag.Value + "S_" + (i + 1) + "_OP_LEV", field, IntPtr.Zero); avalues[k] = op_lev; k++; On-line Risk Prediction Tool SW Beta Release 182

if (value4!= null) { float f_value4 = float.parse(value4.value); f_value4 = f_value4 / 1000000; mech = f_value4.tostring(); avalues[k] = mech; thandles[k] = Eda.DefineNtf(gHandle, "Fix", (String)tag.Value + "S_" + (i + 1) + "_MECH_F", field, IntPtr.Zero); k++; if (value6!= null) { float f_value6 = float.parse(value6.value); f_value6 = f_value6 / 1000000; breaker = f_value6.tostring(); avalues[k] = breaker; thandles[k] = Eda.DefineNtf(gHandle, "Fix", (String)tag.Value + "S_" + (i + 1) + "_BREAKER_CL", field, IntPtr.Zero); k++; if (value7!= null) { float f_value7 = float.parse(value7.value); f_value7 = f_value7 / 1000000; tlc_op = f_value7.tostring(); avalues[k] = tlc_op; thandles[k] = Eda.DefineNtf(gHandle, "Fix", (String)tag.Value + "S_" + (i + 1) + "_TLC_OP", field, IntPtr.Zero); k++; if (value8!= null) { float f_value8 = float.parse(value8.value); f_value8 = f_value8 / 1000000; conn2rtu = f_value8.tostring(); avalues[k] = conn2rtu; thandles[k] = Eda.DefineNtf(gHandle, "Fix", (String)tag.Value + "S_" + (i + 1) + "_CON2RTU", field, IntPtr.Zero); k++; if (value9!= null) { float f_value9 = float.parse(value9.value); f_value9 = f_value9 / 1000000; rep = f_value9.tostring(); avalues[k] = rep; thandles[k] = Eda.DefineNtf(gHandle, "Fix", (String)tag.Value + "S_" + (i + 1) + "_REPORT", field, IntPtr.Zero); k++; if (value10!= null) { On-line Risk Prediction Tool SW Beta Release 183

float f_value10 = float.parse(value10.value); f_value10 = f_value10 / 1000000; reconfig = f_value10.tostring(); avalues[k] = reconfig; thandles[k] = Eda.DefineNtf(gHandle, "Fix", (String)tag.Value + "S_" + (i + 1) + "_RECONF", field, IntPtr.Zero); k++; if (value11!= null) { float f_value11 = float.parse(value11.value); f_value11 = f_value11 / 1000000; reconf_start = f_value11.tostring(); avalues[k] = reconf_start; thandles[k] = Eda.DefineNtf(gHandle, "Fix", (String)tag.Value + "S_" + (i + 1) + "_REC_INIZ", field, IntPtr.Zero); Eda.Lookup(gHandle); Eda.Wait(gHandle); k++; Eda.Lookup(gHandle); Eda.Wait(gHandle); for (int i = 0; i < avalues.length; i++) { Eda.SetAscii(gHandle, thandles[i], avalues[i]); Eda.Write(gHandle); Eda.Wait(gHandle); Console.WriteLine("Tempo trascorso: " + (new TimeSpan(DateTime.Now.Ticks - time).totalmilliseconds) + " ms"); // end readxml method private string ExtractNumbers(string Expression) { string result = null; char Letter; for (int i = 0; i < Expression.Length; i++) { Letter = Convert.ToChar(Expression.Substring(i, 1)); if (Char.IsNumber(Letter)) { result += Letter.ToString(); return result; // end ExtractNumbers method // end class read // end namespace On-line Risk Prediction Tool SW Beta Release 184

2.5.7 From TAG Database to Xml C# Program using System; using System.Collections.Specialized; using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; using System.Text; using GeFanuc.iFixToolkit.Adapter; using System.Xml; namespace XmlOutput { class Program { / Function to remove the number from a string / private static string RemoveNumbers(string key) { return Regex.Replace(key, @"\d", ""); / Function to cast the name of the entities. / private static void NamePrint(XmlTextWriter writer, string name) { string newname; if (name.contains("tlcholnode")==true) { writer.writestartelement("", "TYPE", ""); writer.writestring("tlcholnode"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"TLCHOLNODE", "TlcHolNode")); writer.writeendelement(); else if (name.contains("ringroutingservice") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("ringroutingservice"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"RINGROUTINGSERVICE", "RingRoutingService")); writer.writeendelement(); else if (name.contains("nms") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("nms"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(name + ""); writer.writeendelement(); else if (name.contains("tlcnode") == true) { On-line Risk Prediction Tool SW Beta Release 185

writer.writestartelement("", "TYPE", ""); writer.writestring("tlcnode"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"TLCNODE", "TlcNode")); writer.writeendelement(); else if (name.contains("tlcringnode") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("tlcringnode"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"TLCRINGNODE", "TlcRingNode")); writer.writeendelement(); else if (name.contains("wiretlc") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("wiretlc"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"WIRETLC", "WireTlc")); writer.writeendelement(); else if (name.contains("tlcscadanode") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("tlcscadanode"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"TLCSCADANODE", "TlcScadaNode")); writer.writeendelement(); else if (name.contains("scada") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("scada"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"SCADA", "Scada")); writer.writeendelement(); else if (name.contains("connectionservice") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("connectionservice"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"CONNECTIONSERVICE", "ConnectionService")); writer.writeendelement(); else if (name.contains("eleholnode") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("eleholnode"); writer.writeendelement(); On-line Risk Prediction Tool SW Beta Release 186

writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"ELEHOLNODE", "EleHolNode")); writer.writeendelement(); else if (name.contains("reportservice") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("reportservice"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"REPORTSERVICE", "ReportService")); writer.writeendelement(); else if (name.contains("fisrservice") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("fisrservice"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"FISRSERVICE", "FisrService")); writer.writeendelement(); else if (name.contains("iecsecondarystation") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("iecsecondarystation"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"IECSECONDARYSTATION", "IECSecondaryStation")); writer.writeendelement(); else if (name.contains("joint") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("joint"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"JOINT", "Joint")); writer.writeendelement(); else if (name.contains("breaker") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("breaker"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"BREAKER", "Breaker")); writer.writeendelement(); else if (name.contains("load") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("load"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"LOAD", "Load")); On-line Risk Prediction Tool SW Beta Release 187

writer.writeendelement(); else if (name.contains("wire") == true) { writer.writestartelement("", "TYPE", ""); writer.writestring("wire"); writer.writeendelement(); writer.writestartelement("", "NAME", ""); writer.writestring(regex.replace(name, @"WIRE", "Wire")); writer.writeendelement(); / Function to print the values of the statusitem. / private static void valueprint(xmltextwriter writer, StringBuilder sbuf) { writer.writestartelement("", "VALUE", ""); String a = Regex.Replace(sBuf.ToString(), @",", "."); writer.writestartelement("", "L", ""); writer.writestring(a + ""); writer.writeendelement(); writer.writestartelement("", "M", ""); writer.writestring(a + ""); writer.writeendelement(); writer.writestartelement("", "R", ""); writer.writestring(a + ""); writer.writeendelement(); writer.writestartelement("", "H", ""); writer.writestring("1.000000"); writer.writeendelement(); writer.writeendelement(); public static void Main(string[] args) { string strnomefile = args[0]; long time = DateTime.Now.Ticks; String field = "A_CV"; StringBuilder sbuf = new StringBuilder(100, 100); String node = "FIX"; Int16 numreceived = 0; Int16 ntypeindex; Int16 nerr = 0; Int16 numrequest = 2000; int i; String[] aslotsoftags = null; Int32 j = 0; ENUMBUF eb; String sfilter = "0"; ArrayList copy = new ArrayList(); ArrayList astags = new ArrayList(); ntypeindex = Eda.TypeToIndex("FIX", "TX"); XmlTextWriter writer = new XmlTextWriter(strNomeFile, null); On-line Risk Prediction Tool SW Beta Release 188

try { writer.formatting = Formatting.Indented; writer.indentation = 2; writer.namespaces = false; // inizio scrittura file xml writer.writestartdocument(); writer.writestartelement("", "DOCUMENT", ""); do { nerr = Eda.EnumAllTags("Fix", ntypeindex, sfilter, out aslotsoftags, numrequest, out numreceived, out eb); while (numrequest == numreceived); foreach (string s in aslotsoftags) { copy.add(s); astags.add(s); i = 1; while( i < 10) { string nametag = null; if (i==1) { foreach (String stag in astags) { if ((copy.contains(stag)) && (stag.contains("s_" + (i)))) { int index = stag.lastindexof('s'); ""); ""); "STATUSITEM", ""); ""); sbuf); nametag = stag.remove(index); writer.writestartelement("", "ENTITY", NamePrint(writer, nametag); writer.writestartelement("", "STATUS", writer.writestartelement("", writer.writestartelement("", "NAME", Eda.GetOneAscii(node, stag, field, if (stag.contains("_op_lev")) { writer.writestring("current_op_le vel"); writer.writeendelement(); valueprint(writer, sbuf); if (stag.contains("_mech_f")) { writer.writestring("mechanical_fa ult"); writer.writeendelement(); valueprint(writer, sbuf); if (stag.contains("_breaker_cl")) On-line Risk Prediction Tool SW Beta Release 189

{ writer.writestring("breaker_state"); writer.writeendelement(); valueprint(writer, sbuf); if (stag.contains("_tlc_op")) { writer.writestring("tlc_oper"); writer.writeendelement(); valueprint(writer, sbuf); if (stag.contains("_con2rtu")) { writer.writestring("conn_to_rtu"); writer.writeendelement(); valueprint(writer, sbuf); if (stag.contains("_report")) { writer.writestring("report"); writer.writeendelement(); valueprint(writer, sbuf); writer.writeendelement(); // chiudo statusitem copy.remove(stag); foreach (String s in astags) { int ind = s.lastindexof('s'); string n = s.remove(ind); if ((copy.contains(s)) && (s.contains("s_" + (i))) && (nametag == n)) { Eda.GetOneAscii(node, s, field, sbuf); writer.writestartelement("", "STATUSITEM", ""); writer.writestartelement("", "NAME", ""); if (s.contains("_op_lev")) { writer.writestring("current_op_level"); writer.writeendelement(); valueprint(writer, sbuf); if (s.contains("_mech_f")) { writer.writestring("mechanical_fault"); writer.writeendelement(); valueprint(writer, sbuf); if (s.contains("_breaker_cl")) { writer.writestring("breaker_closed"); writer.writeendelement(); valueprint(writer, sbuf); if (s.contains("_tlc_op")) { writer.writestring("tlc_oper"); On-line Risk Prediction Tool SW Beta Release 190

writer.writestring("conn_to_rtu"); writer.writestring("report"); writer.writestring("reconfig"); writer.writestring("reconfig_start"); chiudo statusitem status writer.writeendelement(); valueprint(writer, sbuf); if (s.contains("_con2rtu")) { writer.writeendelement(); valueprint(writer, sbuf); if (s.contains("_report")) { writer.writeendelement(); valueprint(writer, sbuf); if (s.contains("_reconf")) { writer.writeendelement(); valueprint(writer, sbuf); if (s.contains("_rec_iniz")) { writer.writeendelement(); valueprint(writer, sbuf); writer.writeendelement(); // copy.remove(s); // chiudo if // chiudo foreach writer.writeendelement(); // chiudo writer.writeendelement(); // chiudo entity // chiudo if // chiudo foreach i++; // chiudo while writer.writeendelement(); // chiudo document writer.flush(); Console.WriteLine("Il file {0 è stato salvato correttamente!", strnomefile); catch (Exception errore) { // in caso di errore // segnala l'errore Console.WriteLine("Errore: {0", errore.tostring()); finally { if (writer!= null) { writer.close(); Console.WriteLine("Tempo trascorso: " + (new TimeSpan(DateTime.Now.Ticks - time).totalmilliseconds) + " ms"); On-line Risk Prediction Tool SW Beta Release 191

// chiudo main // chiudo class // chiudo namespace On-line Risk Prediction Tool SW Beta Release 192 Figure 11 The electric operator interface

On-line Risk Prediction Tool SW Beta Release 193 Figure 12 The telecommunication operator interface

On-line Risk Prediction Tool SW Beta Release 194 Figure 13 The service layer interface

On-line Risk Prediction Tool SW Beta Release 195

On-line Risk Prediction Tool SW Beta Release 196 Figure 14 The medium voltage grid interface

Figure 15 The telecommunication network interface On-line Risk Prediction Tool SW Beta Release 197

On-line Risk Prediction Tool SW Beta Release 198 Figure 16 The SCADA system interface