SMILE Diagnostic: DIAG network
This class provides all the functions necessary to perform diagnosis on a network. To explain how, we describe 4 steps for performing diagnosis.
Step 1
Before the program can start with diagnosis, information has to be collected from the targets and observations nodes. The states from the targets that the user would like to pursue are stored in the list faults, and the observation nodes that have not been assigned with evidence and have the flag ranked are stored in the list unperformedTests.
Step 2
To start the diagnosis at least one of the available faultStates from the target nodes have to be selected as pursuedFault. Each pursuedFault represents a fault the user wishes to investigate or pursue.
Step 3
ComputeTestStrength calculates the strength of each of the unperformed ranked observation nodes for the selected pursuedFaults.
Step 4
The user can now choose to select the best test and set the evidence of it. This will cause the system to change the state of belief. The test with evidence will be removed from the list of unperformedTests.
As long as there are unperformed tests, the user can continue diagnosing by performing the steps mentioned above. It is also possible to remove evidence from performed tests so it is possible to perform again later.
DSL_caseLibrary
The class DSL_caseLibrary provides functions to save, before, during or after a diagnosing session, the current status into one or more DSL_cases. These cases can be used to record different moments of the diagnosis process for this.
Each DSL_case consists of the following elements:
| Title | The title of the case |
| Comment | The comment on the case |
| PursuedFaults | A collection of all the pursuedFaults selected in the diagnosis system, each item of the collection contains two strings, one for the nodeID, the node where the pursuedFault is from, and one for which state of the node is the pursuedFault. |
| Evidence | A collection of all the evidence entered in the diagnosis system, each item of the collection contains two strings, one for the nodeID of the node where the evidence was entered and one for the value of the evidence. |
| ModelName | The name of the model when the environment was saved. |
All the DSL_cases are members of a collection _caseContainer. Each caseLibrary is stored in a different file, associated with the extension .scl. Below we present the different functions for handling cases and writing, reading, and creating a caseLibrary.
Save, Load, Update, and Delete a Case From a Library
With the caseLibrary it is possible to create new DSL_cases, update DSL_cases that already exists, delete DSL_cases and load a DSL_case. To load a DSL_case will set the PursuedFaults and instantiate the evidence in the current network.
Writing, Reading, and Creating a Library
Since each caseLibrary is associated with a file every operation of reading, writing or creating a caseLibrary will have effect on the specific file. This means when writing the caseLibrary to a given file all the DSL_cases within the caseLibrary will be written to the file. To create a new library a given file will be created but with an empty collection of cases. To read a caseLibrary from a file, all the DSL_cases within the file will be collected and put in the current caseLibrary.