architecture and design of scenario editor and player

14
Architecture & Design-Scenario Editor & Player 2014 Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 1 TABLE OF CONTENTS Context:............................................................................................................................................. 2 What Is A Scenario? .......................................................................................................................... 2 What Is Scenario Editing?.................................................................................................................. 3 What Is A Scenario Playing?.............................................................................................................. 3 What Is Available Today In Open/Commercial Tools? ........................................................................ 3 What Is New In This Tool? ................................................................................................................. 3 Scenario Definition ......................................................................................................................... 3 Architecture & Design .................................................................................................................... 8 Quality Objectives And How they are Met ....................................................................................... 8 Target Environment........................................................................................................................ 8 Overview Of Architectural Solution ................................................................................................. 8 How To Develop Using The Libraries And Code ........................................................................... 10 Folder Structure ........................................................................................................................... 10 Supported Graphical Elements..................................................................................................... 11 Adding New MetaData of BOMType ............................................................................................. 12 A Sample Scenario File................................................................................................................ 14 Next Steps ................................................................................................................................... 14 References .................................................................................................................................. 14

Upload: abb

Post on 23-Jan-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 1

TABLE OF CONTENTSContext: ............................................................................................................................................. 2

What Is A Scenario? .......................................................................................................................... 2

What Is Scenario Editing? .................................................................................................................. 3

What Is A Scenario Playing?.............................................................................................................. 3

What Is Available Today In Open/Commercial Tools? ........................................................................ 3

What Is New In This Tool? ................................................................................................................. 3

Scenario Definition ......................................................................................................................... 3

Architecture & Design .................................................................................................................... 8

Quality Objectives And How they are Met ....................................................................................... 8

Target Environment........................................................................................................................ 8

Overview Of Architectural Solution ................................................................................................. 8

How To Develop Using The Libraries And Code ........................................................................... 10

Folder Structure ........................................................................................................................... 10

Supported Graphical Elements ..................................................................................................... 11

Adding New MetaData of BOMType ............................................................................................. 12

A Sample Scenario File ................................................................................................................ 14

Next Steps ................................................................................................................................... 14

References .................................................................................................................................. 14

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 2

CONTEXT:

WHAT IS A SCENARIO?A scenario (from Italian: that which is pinned to the scenery originating from the Greek word skēnē) isa synoptical collage of an event or series of actions and events. Includes entrances, exits, and actiondescribing the plot of a play, and was literally pinned to the back of the scenery. – From Wikipedia

In theatre, a scenario is often developed as it is helpful in "pitching" the idea to a prospectiveproducer, director or composer. The term "scenario" is also used for a synopsis of a projected courseof action, events or situations. Scenario development is used in policy planning. Some scenariosinclude current events where as you can also do simulation combining known facts about the future,such as demographics, geography, industrial information etc.

Scenarios can fall under various categories including business scenarios/use cases and technicalscenarios which explain how the standard approach towards that solution needs to be andimplementation detail scenarios which create awareness and provides insight into the design.

FIGURE 1: CUSTOMER SERVICE - BUSINESS SCENARIO

For example as in Figure 1, the business scenario describes the workflow, the actors involved and thebusiness process. In the case of customer support, the customer requests for support on an issuewith a product or service, the support raises issue in system intimates the reference number andredirects to the appropriate field service representative close to the customer location. The fieldservice attends to the call and resolves the issue within the service level agreements. The resolutionis also updated in the system and notified to customer support and they might contact customer andtake feedback on customer satisfaction.

FIGURE 2: MOBILE COMMUNICATION - TECHNCIAL SCENARIO

Now let us look at a systems case. As in Figure 2, mobile communication scenario involves customerusing mobile service which involves many interactions between the mobile towers as well. Forexample when using 4G networks, the support for heterogeneous networks is involved. For examplewith Business on the move, the user would like to be connected from the time they leave from hometo place of work and get information on trains subways and next connection. According to user’sdecisions their time plan needs to be constantly be scheduled in the most efficient way. This scenariois implemented by 4G by being a convergence network being able to interoperate with 3G, UMTS,

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 3

GSM, WiMAX etc in a seamless fashion by supporting terminal heterogeneity and networkheterogeneity. Network heterogeneity would mean instead of being totally reliant of one base station,we make use of several diverse networks and bring the network closer to the user. These diversenetworks could include UMTS, GSM etc. Inter-cell Interference Coordination (ICIC) is something veryimportant for heterogeneous network which would mean resource coordination amongst interferingbase stations, where an interfering base station gives up use of some resources in order to enablecontrol and data transmissions to the victim user terminal.While we drive further down the implementation could involve much finer details. While the systemview and interactions are more important from interaction/interoperability angle, the internal systemimplementation is important for the R&D or the development team.

It is important to notice that, Systems Engineering Organizations like Boeing, Royal Dutch/Shell makeuse of scenario planning at some stage of their work, sometimes prior to formulating specificstrategies, sometimes to collect feedback. Scenario planning may involve aspects of systemsthinking, specifically the recognition that many factors may combine in complex ways to createsometime surprising futures (due to non-linear feedback loops). NASA has been heard for using thesefor scientific visualization to explain their missions to general public.

WHAT IS SCENARIO EDITING?Defining a scenario by setting the environment of the various structural aspects of the environmentand then defining the sequence or course of actions thereby describing the behavioral model isknown as scenario editing. This would require you to create the elements in the canvas, then definethe actions and dynamic objects and define an order or sequence of events and then saving thisscenario as file/data so that it is available for use later.

WHAT IS A SCENARIO PLAYING?A Scenario when played, first draws the canvas with the defined structural aspects of the environmentand then visually using animated objects show the sequence of events and the dynamic objectsmoving around thereby visually animating all the sequenced actions.

WHAT IS AVAILABLE TODAY IN OPEN/COMMERCIAL TOOLS?Most people make use of video editing for such scenario description and playing movie files forvisualizing the scenario. You can use presentation tools also for the same. Not only that this is timeconsuming, it doesn’t help much in the what-if case or in further explorations on a subject/domain.

WHAT IS NEW IN THIS TOOL?A tool inherently having a model and description of the scenario and its elements as types, haspotential to be used further to just playing and can be used to analyze what-if cases.

The tool allows you to define the elements as types and you can model your own infrastructureelements in an easy to use XML based format. The tool allows you to use your own elements andcreate scenarios, save them. The tool also allows reload of the scenarios and editing them and savinglater. The tool also allows loading the scenario from file and playing them thereby visually depictingthe scenario as a list of actions.

SCENARIO DEFINITION

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 4

Scenario definition involves dragging and dropping the necessary elements and then describing thinteractions via scene actions. These scene actions describe the interactions between actors as wellas machines or objects defined.

FIGURE 3: SCENARIO EDITOR IN ACTION

Start Execute Scenario Editor exe. The tool opens as shown in Figure 3.

FIGURE 4: CREATE SCENARIO - STEP1

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 5

As in Figure 4, drag and drop the required elements from left toolbox pane to graphics pane–here in example the Customer, the Customer Support and FieldService actors.

FIGURE 5: DEFINE SCENARIO - STEP2

As in Figure 5, specify the sequence of actions or interactions between the elements. In thisexample, we define interaction between customer support and customer “My stereo notworking”. The customer support issues Ref No 1123 and issue will be resolved in 24 hours.Once issue is resolved customer support collects feedback from customer. Once all scenariois defined in this pane, right click for context menu and click “set Action List”.

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 6

FIGURE 6: DEFINE SCENARIO - STEP3 – SAVE

As in Figure 6, right Click from the graphics pane and click ‘Save Scenario”. Specify thefilename in the Save dialog – like eg. customersupportscenario.xml and click Save. On successfulsave it displays a message as in Figure 7.

FIGURE 7: MESSAGE SHOWING SCENARIO SAVED

SCENARIO PLAYING

FIGURE 8: PLAY SCENARIO BUTTON FROM EDITOR

As in Figure 8, click Play Scenario from main toolbar to open the scenario viewer exe.

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 7

FIGURE 9: OPEN SCENARIO

As in Figure 9, click context menu and click “Open Scenario File” and eg. select thecustomersupportscenario.xml file from the saved folder. Now click “Play Scenario File” and then thesequence of actions is replayed in the player/view as in Figure 10. (Maximise the window).

FIGURE 10: SCENARIO PLAYER - CUSTOMER SUPPORT SCENARIO

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 8

ARCHITECTURE & DESIGN

QUALITY OBJECTIVES AND HOW THEY ARE MET

1. Ease of UseThe tool should be easy to learn and make use of and extend in the process.-This is met by providing drag and drop capabilities and providing documentationincluding videos to help get closer to using the tool faster. Usage is described inFigure 3, Figure 4 and Figure 5.

2. Integration to 3rd Party Tools and TechniquesThe tool should be complimenting the video based learning techniques and be able tointegrate to these techniques seamlessly. The tool should support documentation andprint and similar features.-Print not supported in current releases.

3. ExtensibilityThe tool should be easily customizable in terms of modeling, adding variedtypes/metadata representing objects in varied domains. The tool should be able toextend itself to make use of varied graphical engines and benefit from their use andable to take advantage of these.-The tool supports modeling using BOM and the BOM elements existing can beextended by adding new model elements using the BOM based xml grammardescribed in Figure 17.-The tool architecture separates the editor which is used to define scenarios and theviewer as described in Overview Of Architectural Solution. The scenario itself isdefined in Figure 18. So scenario viewer can be even using other technologies likeHTML 5 but making use of same metadata. Metadata libraries are built as QtPlugin’smaking sure of extensibility/loose coupling.

4. Platform IndependenceThe tool should be able to be easily portable to support different variants includingLinux in addition to Windows. It should be able to support Tablet operating systems.-The tool uses Qt Framework which provides support for the widest operatingsystems. As a matter of fact, Qt requires you to compile the code on anotheroperating system, but using the same source code.

5. Responsive DesignThe tool should be responsive to the various form factors.-Not included in the current releases

TARGET ENVIRONMENT

The current supported target environment at Scenario Editing or definition/Viewing is a PC/Laptopwith 15inch monitor, running Windows 7 or Later Operating System.

OVERVIEW OF ARCHITECTURAL SOLUTION

The project was reorganized to have clear separation of type libraries, graphical libraries and Viewers.Here we have a good organization and supports good reuse as well as flexibility. So the Viewers aredeveloped on top of Graphical Libraries layer.

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 9

FIGURE 11: ARCHITECTURE OVERVIEW

The solution is built on Qt Framework. (Latest builds using Qt 5.1.1). The Modeling approach usedextends from Base Object Model (BOM) from Simulation Interoperability Standards Organization(SISO). The BOM model is built into the BOMLibrary which is available as a library. The BOM Librarysupports a BOMReader which reads the BOM bases grammer (xml) and loads the objects intoBOMLibrary. One loaded these are termed BOMTypes/Types. The BOMGraphicalLibrary furtherextends BOMLibrary this providing QGraphicalItem Objects which help us visualize the BOMTypes.

FIGURE 12: BOMLIBRARY - TYPE LOADING

As in Figure 12, BOMLibrary in BOMLibrary is responsible for the loading BOMObjects (BOMTypes).This implements IBOMTypeLoad interface.

The two assemblies of BOMLibrary and BOMGraphicalLibrary are available as Libraries (dll) andrelevant header files as to be able to build ScenarioEditor and Viewer are provided open.

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 10

FIGURE 13: BOMFACTORY - INSTANCE CREATION

As in Figure 13, BOMFactory in BOMGraphicalLibrary is responsible for the instantiation of graphicalobjects. This implements IBOMInstanceCreation interface. The details of Open Source forScenarioEditor and ScenarioViewer projects are available as doxygen generated chm files.

HOW TO DEVELOP USING THE LIBRARIES AND CODE

FOLDER STRUCTURE

FIGURE 14: OUTPUT FOLDER

The output folder as in Figure 14, would contain the binaries (as in green rectangle), the xml BOMType definitions in ModelElements folder (as in brown rectangle) and images included inmodelelements and extended by you need to be present in CustomImages folder (marked in blue)

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 11

SUPPORTED GRAPHICAL ELEMENTS

FIGURE 15: GRAPHICAL ELEMENTS SUPPORTED

As in Figure 15, the graphical elements supported include messages, motor, generator, turbine,device, boiler. The messages or moving objects include electric signal, steam, flame. If you can find aelement matching in these, then there is no need to define a custom image and you can go aheaddefining the type xml files using one of these.

Note: If the image defined in the type xml is not found in custom images folder, then the programdisplays imagenotfound32.ico which gives you indication that image needs to be added.

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 12

ADDING NEW METADATA OF BOMTYPE

Some basic objects are provided as part of the existing baseline.

FIGURE 16: AVAILABLE METADATA/BOMTYPES

If these are not matching your scenarios, you might need to create a new BOMType by adding a newxml file and modifying the major attributes like name (Type, user,Equipment, the Glymph specifies thetoolbox image (32x32 icon) and scene image (64x64 icon or image formats .png,.jpg).

FIGURE 17: MODELING ELEMENTS

The format is as per one Boiler Object as example<?xml version="1.0"?><!-- edited with XMLSpy v2005 U (http://www.xmlspy.com) by Tram Chase (SimVentions) --><!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Bjorn Lofstrand (Pitch Technologies) --><!-- Example BOM. The only namespaces needed apart from the standards--><BOM xmlns="http://www.sisostds.org/schemas/bom" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:omt="http://www.sisostds.org/schemas/IEEE1516.2-2006" xmlns:modelID="http://www.sisostds.org/schemas/modelID"xsi:schemaLocation="http://www.sisostds.org/schemas/bom BOM_v2006.xsd"><modelIdentification><modelID:name>BOILER</modelID:name><modelID:type>BOM4</modelID:type><modelID:version>1.0 Beta</modelID:version><modelID:modificationDate>2012-08-21</modelID:modificationDate><modelID:securityClassification>Unclassified</modelID:securityClassification><modelID:releaseRestriction>Not for release outside.</modelID:releaseRestriction><modelID:releaseRestriction>Release only to BOM PDG members.</modelID:releaseRestriction><modelID:purpose> Definition of Boiler Equipment</modelID:purpose><modelID:applicationDomain>Power System</modelID:applicationDomain>

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 13

<modelID:description>Fire Tube Boiler</modelID:description><modelID:useLimitation>Not applicable to drive-through operations</modelID:useLimitation><modelID:useHistory>Utilized in the Power System FOM</modelID:useHistory><modelID:keyword><modelID:taxonomy>Power System Taxonomy</modelID:taxonomy><modelID:keywordValue>Power System</modelID:keywordValue></modelID:keyword><modelID:keyword><modelID:taxonomy>Sub Area Taxomony</modelID:taxonomy><modelID:keywordValue>Substation</modelID:keywordValue></modelID:keyword><modelID:poc><modelID:pocType>Primary author</modelID:pocType><modelID:pocName>Abhilash</modelID:pocName><modelID:pocOrg>Open</modelID:pocOrg><modelID:pocTelephone>+91 999</modelID:pocTelephone><modelID:pocEmail>[email protected]</modelID:pocEmail></modelID:poc><modelID:poc><modelID:pocType>Release authority</modelID:pocType><modelID:pocOrg>Open</modelID:pocOrg><modelID:pocTelephone>+1 44 123-456-1000</modelID:pocTelephone><modelID:pocEmail>[email protected]</modelID:pocEmail></modelID:poc><modelID:glymph><modelID:alt>32</modelID:alt><modelID:height>32</modelID:height><modelID:image>boiler32</modelID:image><modelID:type>ico</modelID:type><modelID:width>32</modelID:width></modelID:glymph><modelID:glymph><modelID:alt>64</modelID:alt><modelID:height>128</modelID:height><modelID:image>boiler128</modelID:image><modelID:type>ico</modelID:type><modelID:width>128</modelID:width></modelID:glymph><modelID:reference><modelID:type>Glossary</modelID:type><modelID:identification>ISBN 12345678901</modelID:identification></modelID:reference><modelID:reference><modelID:type>Conceptual Model</modelID:type><modelID:identification>http://boms.info/resaurantconceptualmodel.doc</modelID:identification></modelID:reference><modelID:other>Featured</modelID:other></modelIdentification><conceptualModelDefinition><stateMachine><name>Ready</name><conceptualEntity>Controller</conceptualEntity><conceptualEntity>Application</conceptualEntity><state><name>Monitoring</name><exitCondition><exitAction>UserBOM.AlarmCondition</exitAction><nextState>ActionCommand</nextState></exitCondition></state><state><name>ActionCommand</name><exitCondition><exitAction>UserBOM.ActionTakenMessageArrived</exitAction><nextState>Test</nextState></exitCondition></state><state><name>Test</name><exitCondition><exitAction>UserBOM.TestModeSuccessMessageArrived</exitAction><nextState>Monitoring</nextState></exitCondition></state></stateMachine><Interfaces><Interface id="1" name="Sight" Type="1"/><Interface id="2" name="Touch" Type="1"/></Interfaces></conceptualModelDefinition><notes><omt:note>

Architecture & Design-Scenario Editor & Player 2014

Scenario Editor and Player - Author: Abhilash Gopalakrishnan Page 14

<omt:label>ID1</omt:label><omt:semantics>This pattern of interplay might be able to be used as a template to support payment patterns for otherservice oriented businesses</omt:semantics></omt:note><omt:note><omt:label>ID2</omt:label><omt:semantics>This pattern action may involve other employees including the host (i.e. Greeter) </omt:semantics></omt:note><omt:note><omt:label>ID3</omt:label><omt:semantics>The support for this trigger may involve a completely other BOM (pattern) to support non-payingcustomer</omt:semantics></omt:note><omt:note><omt:label>ID4</omt:label><omt:semantics>Customer may also request check from other employee conceptual entity types</omt:semantics></omt:note><omt:note><omt:label>ID5</omt:label><omt:semantics>This is the idle state for the Greeter or Waiter</omt:semantics></omt:note></notes></BOM>

A SAMPLE SCENARIO FILE

FIGURE 18: SCENARIO XML GRAMMER

NEXT STEPS

1. Improve the tools and ecosystem to support modeling and adding custom elements andimages

2. Improve Scenarios for Education and Integration with how lectures happen at universities.

REFERENCES

1. Abhilash Gopalakrishnan, Abhinna Chandra Biswal “Software Based Assistive Systems InEngineering Education” in IEEE Global Humanitarian Technology Conference - South AsiaSatellite, Trivandrum, Kerala, August 2013.

2. Source Code: https://github.com/Abh4git3. Hank Childs, Berk Geveci and Will Schroeder, Kitware Jeremy Meredith,Kenneth Moreland,

Christopher Sewell, Torsten Kuhlen,E. Wes Bethel, "Research Challenges for VisualizationSoftware"IEEE Computer Society, IEEE Computer Soicety, May 2013

4. Kwan-Liu Ma and Isaac Liao, Jennifer Frazier, Helwig Hauser and Helen-Nicole Kostis,“Scientific Storytelling Using Visualization”, IEEE Computer Graphics And Applications,January/February 2012.