Changes for page Simulation Visualization using KEV
Last modified by aas2 on 2023/09/11 16:16
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,7 +2,6 @@ 2 2 3 3 1. create an SVG image 4 4 1. create a mapping file for this SVG 5 -1. open the mapping file in KEV 6 6 1. create a street light controller in SCCharts 7 7 1. simulation the controller, including visualization 8 8 ... ... @@ -26,7 +26,7 @@ 26 26 27 27 Finally, save the result as **Inkscape-SVG** or **Normal-SVG** and name it **Lights.svg**. 28 28 29 -== 2 Mapping animations to SVG elements == 28 +== 2. Mapping animations to SVG elements == 30 30 31 31 In the following a mapping of animations, domains and variables to elements in the SVG is created. Therefore one has to create a new mapping file in KIELER using **File > New > Other > Mapping Model.** Name the file** Lights.mapping** and select **SVG File** as **Model Object**. 32 32 ... ... @@ -80,6 +80,26 @@ 80 80 81 81 This will map the input values from 0 to 2 linearly to the angles from 0 to 90. 82 82 82 +== 3. Creating a Light Controller with SCChart == 83 + 84 +Create an empty SCChart and fill it with the following content: 85 + 86 +{{code language="java" title="Traffic light controller"}} 87 +scchart TrafficLight { 88 + 89 + output int showLight; 90 + 91 + initial state init 92 + --> init with / showLight += 1; showLight = showLight % 3; 93 +} 94 +{{/code}} 95 + 96 +This model will set showLight successively to 0, 1 and 2. 97 + 98 +== 4. Starting the simulation == 99 + 100 +\\ 101 + 83 83 == Problem Solving == 84 84 85 85 Ensure that the KEV Data Observer is added to the list in the Execution Manager (When opening an SCChart, this list might be lost.).
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -259523 371 +25952341 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/259523 37/Simulation Visualization Tutorial1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/25952341/Simulation Visualization Tutorial