« Back to University of Duisburg-Essen

Sum of probabilities at edges linked to symbols limited to 1

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sum of probabilities at edges linked to symbols limited to 1
community documentation configuration functionality
Answer
3/27/14 11:42 AM
At the "subsequent" edges there is a probability-function implemented.
Can that concept be expanded, so that the sum of the probabilities of all edge occurrences,
which are connected to an object, has to become 1?

RE: Sum of probabilities at edges linked to symbols limited to 1
Answer
8/27/13 1:20 PM as a reply to Endrju S. & Sobhi A..
You have different options to realize this functionality. Please find below 2 different approaches that could be realized in your implementation:

Alternative A: AdoScript-based Solution:
The validation of the process model can be realized by a triggering and validation script either by user interaction (click on menu) or triggered by listening to a platform event (e.g. "SaveModel" or "OpenModel" - please find the details for both events below). The pseudo code could - depending on your configuration, would parse the model and validate the outgoing connections of branching objects according to the rule set defined.
 1
 2ON_EVENT "OpenModel" {
 3  #Get all instances of class "branching"
 4  CC "Core" GET_ALL_OBJS_OF_CLASSNAME modelid: (VAL modelid) classname:"Branching"
 5  SETL lBranchingObjIDs: (objids)
 6  FOR sBranchingObjID in: (lBranchingObjIDs) {
 7    CC "Core" GET_CONNECTORS objid: (VAL sBranchingObjID) out
 8    SETL lOutGoingConnectors: (objids)
 9    #Get attribute value and calculate whether the sum is 1
10  }
11}

 1ON_EVENT "SaveModel" {
 2  IF (origin = "save") {
 3    #Get all instances of class "branching"
 4    CC "Core" GET_ALL_OBJS_OF_CLASSNAME modelid: (VAL modelid) classname:"Branching"
 5    SETL lBranchingObjIDs: (objids)
 6    FOR sBranchingObjID in: (lBranchingObjIDs) {
 7      CC "Core" GET_CONNECTORS objid: (VAL sBranchingObjID) out
 8      SETL lOutGoingConnectors: (objids)
 9      #Get attribute value and calculate whether the sum is 1
10    }   
11  }
12}


Alternative B: Simulation Component Configuration
ADOxx 1.3 UL1 has basic simulation functionalities included. The simulation algorithm can be used to determin the consistency of the process graph according to your needs. In case the simulation algorithm can not determine consistency with requirement of the algorithm (actually a path analysis), an error message is displayed.
To enable this functionality, two steps of configuration have to be performed in your modelling language implementation
1. Enable the functionality (in the sample below as a menu item, can also be event driven as above):
 1#-----------------------------------------------
 2ITEM "Check validity" modeling:"Extras"
 3#-----------------------------------------------
 4
 5CC "Modeling" GET_ACT_MODEL
 6 # --> RESULT modelid: intValue
 7SET idCrtModelID: (modelid)
 8
 9SETG errmsg: ("")
10
11CC "Simulation" RUN_PATH_ANALYSIS modelid: (idCrtModelID) runs:100 auto-read-only:1 no-error-messages:1 no-result-window
12 # --> RESULT ecode: intValue errmsg: strValue
13
14IF (ecode) {
15 CC "AdoScript" INFOBOX (errmsg)
16}
2. Configure the mapping of classes and attributes to the simulation model
For details on the mapping, please have a look on the attached sample implementation. the classes are generic in this sample and you can see how they are derived from the underlying meta-model to enable the functionality
1M : __Activity__
2N : __Start__
3P : __D_end_
4Q : __Decision__
5Parallelism : __Parallelity__
6Merge : __Merging__
7Sample : __D-construct__
Attachments: Sample Model Uni DUE.adl (12.2k), Sample-Library-Simulation_ADOxx1-3UL1_1-0.abl (39.4k)

RE: Sum of probabilities at edges linked to symbols limited to 1
Answer
3/8/14 11:32 AM as a reply to Wilfrid Utz.
Thanks a lot. This issue is still relevant for our further implementation. The proposals and sampe implementations are being considered.