Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • af3/af3-rcp
1 result
Show changes
Showing
with 2327 additions and 0 deletions
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Documentation of Creating a Code Specification for a Component. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Creating a Code Specification for a Component</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<div class="dropdown">
<a href="../getting_started.html" style="padding:0;">
<button class="btn" id="hamburger" onclick="javascript:window.location.href='../getting_started.html'">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
</a>
<div class="dropdown-content">
<button class="dropdown-btn">Getting Started<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Resources for Users<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href=".././managing_projects.html">Managing AutoFOCUS3 Projects</a>
<a href=".././examples.MainPage.html">Examples</a>
<a href=".././tipsAndTricks.html">Tips &amp; Tricks</a>
<a href=".././af3_faq.html">FAQs</a>
</div>
<a href=".././rcphelp.gettingstarted.MainPage.html">Resources for Developers</a>
<a href=".././rcphelp.gettingstarted.MainPage.html">Contact</a>
</div>
<button class="dropdown-btn">Requirements Engineering<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../requirements/MIRA.requirements_analysis.html"> Requirements Analysis Node</a>
<a href="../requirements/MIRA.glossary.html">Glossary</a>
<a href="../requirements/MIRA.requirements.html">Requirements</a>
</div>
<button class="dropdown-btn">Modeling and Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="model_element_attributes.html" >Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
<button class="dropdown-btn">Behavior Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a style="background-color:#f2f2f2;">Code Specification</a>
<a href="state_automaton.html">State Automata</a>
<a href="hierarchical_state_automaton.html">Hierarchical State Automata</a>
<a href="mode_automaton.html"> Mode Automata</a>
</div>
<button class="dropdown-btn">Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="simulation_with_af3.html">Simulation</a>
<a href="operatorpanels.html">Operator Panels</a>
<a href="operatorpanels_advanced.html">Advanced Operator Panels</a>
<a href="cosimulation_with_af3.html"> Co-Simulation and FMI Support</a>
</div>
</div>
<button class="dropdown-btn">Deployment and Code Generation<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Modeling Technical Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture.html">Platform Architecture</a>
<button class="dropdown-btn">Supported Platform Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture_generic.html">Generic Platform Architecture</a>
<a href="../ta/platform_architecture_hierarchical.html">Hierarchical Platform Architecture</a>
<a href="../ta/platform_architecture_raspberrypi.html">RaspberryPi Platform Architecture</a>
</div>
<a href="../ta/task_architecture.html">Task Architecture</a>
<a href="../ta/partition_architecture.html"> Partition Architecture</a>
<a href="../ta/allocations.html"> Deployments/Allocations</a>
<a href="../ta/system_schedule.html"> System Schedule</a>
</div>
<a href="../ta/code_generation.html">Code Generation</a>
</div>
<button class="dropdown-btn">Design Space Exploration (DSE)<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../dse/dse_perspective.html">DSE Perspective Overview</a>
<a href="../dse/dse_dashboard.html">DSE Dashboard</a>
<a href="../dse/constraints.html">Constraint Modeling</a>
<a href="../dse/objectives.html">Objective Modeling</a>
<a href="../dse/synthesis.html">Deployment/Schedule Synthesis (Exploration)</a>
<a href="../dse/visualization.html">Solution Visualization</a>
</div>
<button class="dropdown-btn">Assurance Case Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../assuranceCases/creation.html">Modeling GSN-based Assurance Cases</a>
<a href="../assuranceCases/assessment.html">Quantitative Assessment of Assurance Cases</a>
<a href="../assuranceCases/maintenance.html">Assurance Case Maintenance</a>
</div>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'code_specification.html' Documentation Problem!&body= Dear AutoFOCUS3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</div>
</div>
<div class="box">
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h1>Creating a Code Specification for a Component</h1>
<p> If you added a Code Specification to a Component, you are able to specify the behavior of that component on code level.</p>
<img src="./pictures/CodeSpecification.png"/>
<!--
if (mergeA == Present( )) {
mergeReq = Present( );
return;
}
if (mergeB == Present( )) {
mergeReq = Present( );
}
-->
<p> The Code Specification View also provides Syntax-Checking and marks invalid code with a little red error-marker.
Move your mouse over this error-marker and you will get an info-text about at which position in the code the error is found and what kind of error it is.
Only the first error in your code is marked. If you remove this error, the next error will be marked.
</p>
<img src="./pictures/CodeSpecification.Errors.png"/>
<p>
Things to note:
<ul><li>Variables can not be defined in a code specification.</li>
<li>Code specifications do not return a value.</li></ul>
</p>
</div>
<script src="../layout/jsscript/topBtn.js">
</script>
<script src="../layout/jsscript/submenuScript.js">
</script>
<div class="footer">
<p>
&copy; 2020 <a href="https://www.fortiss.org/">fortiss GmbH</a> &nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/publications/software/autofocus-3#c2007">Contact</a>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/imprint">Imprint</a>
</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Documentation of MIRA - Model-based Integrated Requirements. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css"/>
<title>Creating a Component Architecture</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<div class="dropdown">
<a href="../getting_started.html" style="padding:0;">
<button class="btn" id="hamburger" onclick="javascript:window.location.href='../getting_started.html'">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
</a>
<div class="dropdown-content">
<button class="dropdown-btn">Getting Started<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Resources for Users<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href=".././managing_projects.html">Managing AutoFOCUS3 Projects</a>
<a href=".././examples.MainPage.html">Examples</a>
<a href=".././tipsAndTricks.html">Tips &amp; Tricks</a>
<a href=".././af3_faq.html">FAQs</a>
</div>
<a href=".././rcphelp.gettingstarted.MainPage.html">Resources for Developers</a>
<a href=".././rcphelp.gettingstarted.MainPage.html">Contact</a>
</div>
<button class="dropdown-btn">Requirements Engineering<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../requirements/MIRA.requirements_analysis.html"> Requirements Analysis Node</a>
<a href="../requirements/MIRA.glossary.html">Glossary</a>
<a href="../requirements/MIRA.requirements.html">Requirements</a>
</div>
<button class="dropdown-btn">Modeling and Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="model_element_attributes.html" >Introduction to Graphical Modeling Interface</a>
<a style="background-color:#f2f2f2;">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
<button class="dropdown-btn">Behavior Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="code_specification.html">Code Specification</a>
<a href="state_automaton.html">State Automata</a>
<a href="hierarchical_state_automaton.html">Hierarchical State Automata</a>
<a href="mode_automaton.html"> Mode Automata</a>
</div>
<button class="dropdown-btn">Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="simulation_with_af3.html">Simulation</a>
<a href="operatorpanels.html">Operator Panels</a>
<a href="operatorpanels_advanced.html">Advanced Operator Panels</a>
<a href="cosimulation_with_af3.html"> Co-Simulation and FMI Support</a>
</div>
</div>
<button class="dropdown-btn">Deployment and Code Generation<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Modeling Technical Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture.html">Platform Architecture</a>
<button class="dropdown-btn">Supported Platform Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture_generic.html">Generic Platform Architecture</a>
<a href="../ta/platform_architecture_hierarchical.html">Hierarchical Platform Architecture</a>
<a href="../ta/platform_architecture_raspberrypi.html">RaspberryPi Platform Architecture</a>
</div>
<a href="../ta/task_architecture.html">Task Architecture</a>
<a href="../ta/partition_architecture.html"> Partition Architecture</a>
<a href="../ta/allocations.html"> Deployments/Allocations</a>
<a href="../ta/system_schedule.html"> System Schedule</a>
</div>
<a href="../ta/code_generation.html">Code Generation</a>
</div>
<button class="dropdown-btn">Design Space Exploration (DSE)<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../dse/dse_perspective.html">DSE Perspective Overview</a>
<a href="../dse/dse_dashboard.html">DSE Dashboard</a>
<a href="../dse/constraints.html">Constraint Modeling</a>
<a href="../dse/objectives.html">Objective Modeling</a>
<a href="../dse/synthesis.html">Deployment/Schedule Synthesis (Exploration)</a>
<a href="../dse/visualization.html">Solution Visualization</a>
</div>
<button class="dropdown-btn">Assurance Case Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../assuranceCases/creation.html">Modeling GSN-based Assurance Cases</a>
<a href="../assuranceCases/assessment.html">Quantitative Assessment of Assurance Cases</a>
<a href="../assuranceCases/maintenance.html">Assurance Case Maintenance</a>
</div>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'component_architecture.html' Documentation Problem!&body= Dear AutoFOCUS3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</div>
</div>
<div class="box">
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h1>Creating a Component Architecture</h1>
<p>Following sub-sections discuss the creation of <i>Component Architecture</i></p>
<h2>Introduction</h2>
<p> Create a component architecture inside an empty new project, open the context menu of the project and select <i>Component Architecture</i>.</p>
<img src="./pictures/components_new-architecture.png"/>
<p>In the same way, you can add more component architectures to your project.</p>
<h2>Modeling a Component Architecture</h2>
<p>Once you have created a component architecture, you can specify the contained components as well as channels between them. To add a component, drag &amp; drop a component from the <i>Model Elements</i> view on the right side to your diagram. In the same way, you can add Input or Output-Ports to your components.</p>
<img src="./pictures/components_add-component.png"/>
<p> move a component, just pick the component somewhere in the middle and move. To resize a component, pick it in the lower right corner and move the mouse to resize. Channels can be created by dragging from one port to the other.
When starting the drag, potential target ports are highlighted with green color, while unavailable or incompatible ones are marked red. Channels will only be created when dropping over compatible ports.</p>
<img src="./pictures/components_channels.png"/>
<p>To support the drag &amp; drop actions the interactive areas around elements can be displayed via the respective option in the editor's context menu:</p>
<img src="./pictures/components_interactive-area-shading.png"/>
<p>These are the areas within which an element can be dragged. Where areas are overlapping, the action applies to the topmost element. Notice that Input-Ports of Sub-Components have a different color than Input-Ports of the Parent-Component.
This is, because from the inner point of view, the Input-Ports of the Parent-Component are sending (delegating) data. Hence, these Input-Ports are black (like the Output-Ports of Sub-Components).</p>
<img src="./pictures/components_ports.png"/>
<p>The shape and route of channels can be modified by adding and moving bend points.
Bend points can be added by clicking on a point along the channel while pressing the <b>&lt;ctrl&gt;-key</b>.
The bend points can then be moved by dragging &amp; dropping the red squares around them.
To remove a bend point, right-click on it while pressing the <b>&lt;ctrl&gt;-key</b>.</p>
<img src="./pictures/components_bend-points.png"/>
<p>In the <i>Properties View</i>, you can edit the names of selected components, channels and ports. You can also specify comments.</p>
<img src="./pictures/components_properties.png" height="500" width="900"/>
<h2>Causality</h2>
<p>Each component is declared to be <i>weakly causal</i> or <i>strongly causal</i>.
Weak causality models instantaneous reaction, while strong causality models a delayed reaction.
This means that in a weak causal component a value arrived at an Input-Port is directly accessible in the same time step,
whereas in a strongly causal component such an input value is accessible only at the next time step.
This indicates that for a strongly causal component, there is a delay of at least one time step before input has any effect on output.</p>
<p>If you add a component, it is per default weakly causal. You can change the causality in the Properties-View of a component.</p>
<img src="./pictures/components_causality.png"/>
<p>The color of a component indicates its causality. There is also a difference in the colors of composite components and atomic components.
However the causality of a composite component depends on its sub-components, therefore composite components all have the same color.</p>
<h2>Causality and Cycles</h2>
<p>Cycles which contain only weakly causal components can entail infinitely many system state modifications at once:
one component of the cycle makes a change, which triggers <i>immediately</i> (due to weak causality)
a change in the next component, which also immediately triggers a change in the next component, etc.
Since we have a cycle, these changes will at one point reach the first component,
thus yielding an infinite loop of changes.
This can be the source of many theoretical and practical problems, therefore,
to avoid this, AF3 only allows cycles which contain <i>at least one strongly causal component:</i>
this way, the infinite loop of changes cannot occur during a single time unit,
but instead spreads on several time instants.</p>
<p>
When a cycle does not have this property, one gets the error "Component ... is part of a weakly causal cycle":</p>
<img src="./pictures/components_decorations_weak-cycle.png"/>
<p> If it is indeed a property of the model to have such a cycle then one has no other choice than modifying
the design of the model so as to satisfy the strong-causal-cycle requirements.
However, most of the time, the error happens in the process of building a model, when the components are not marked yet
as strongly causal, or when they are composite components whose (not yet provided) implementation is intended to be
made only of strongly causal components. </p>
<p>In such cases one can either accept the error until one provides a strongly-causal implementation, or fix the error
by just marking (at least) one of the components among the path as strongly causal:</p>
<img src="./pictures/components_decorations_strong-cycle.png"/>
<h2>Initial Message</h2>
<p> The field initial message provides the first message delivered by the port.
If a port is of type array, it can be initialized by the expression "<tt>[value_0, value_1, ..., value_N]</tt>".
If a port is of type structure, it can be initialized by the expression "<tt>{MEMBER_x:value_x, MEMBER_y:value_y, ..., MEMBER_z:value_z}</tt>". </p>
<h2>Propagate Data</h2>
<p> AutoFOCUS provides some mechanisms to make development easier and faster.
For instance, if you have already connected two Ports by a Channel and want subsequently change the type of the Ports,
you have to do this only at one of the both connected Ports.
Instead of doing the same at the other Port again, you should use the <i>backward</i> and <i>forward</i> buttons in the Properties-View of a Port.</p>
<i>Forward</i> copies the Port-Settings (Name, Type and initial message) to all Ports connected by an outgoing channel.<br/>
<i>Backward</i> copies the Port-Settings to all Ports connected by an incoming channel.<br/>
<img src="./pictures/components_propagation.png" height="400" width="950"/>
<p> In the shown example the settings of the selected Output-Port are propagated to the connected Input-Port. Also the channel is renamed by this.</p>
<h2>Behavior</h2>
<p> In order to specify the behavior of your components, you might add either <a href="code_specification.html"><i>Code Specifications</i></a> or <a href="state_automaton.html"><i>Automaton Specifications</i></a> to these.</p>
<h2>Selecting Multiple Elements</h2>
Multiple elements of a component architecture can be selected by pressing the <b>&lt;ctrl&gt;-key</b> while selecting components:
<img src="./pictures/components_multi-select.png"/>
<h2>Copy &amp; Paste Components</h2>
<p> Components can be copied and pasted via the respective entry in the context menu of the model navigator:</p>
<img src="./pictures/components_copy-paste.png"/>
<h2>Moving Ports</h2>
<p> Ports attached to components can be manually moved by</p>
<ol>
<li>
clicking on the port first to select it and<br/>
<img src="./pictures/components_moving-ports_selected.png"/>
</li>
<li>dragging and dropping it at any point along the component's border.</li>
</ol>
<h2>Zoom</h2>
<p>
Rolling the mouse wheel while hovering over the component architecture editor and holding the <b>&lt;ctrl&gt;-key</b> zooms in or out, allowing the inspection parts of the model in detail or providing an overview over large models.
</p>
<img src="./pictures/components_zoom.png" height="350" width="1050"/>
<h2>Auto-Layout</h2>
<p>
A component architecture can be automatically organized using the <i>Auto-Layout</i> feature found in the conext menu of the respective architecture in the model viewer:
</p>
<img src="./pictures/components_auto-layout_context-menu.png"/>
<p> The components of the architecture are then automatically reorganized like so: </p>
<img src="./pictures/components_auto-layout_architecture.png" height="350" width="1150"/>
</div>
<script src="../layout/jsscript/topBtn.js">
</script>
<script src="../layout/jsscript/submenuScript.js">
</script>
<div class="footer">
<p>
&copy; 2020 <a href="https://www.fortiss.org/">fortiss GmbH</a> &nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/publications/software/autofocus-3#c2007">Contact</a>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/imprint">Imprint</a>
</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- User documentation for Co-simulation feature. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Coupling AutoFOCUS3 with other Tools using Co-Simulation</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<div class="dropdown">
<a href="../getting_started.html" style="padding:0;">
<button class="btn" id="hamburger" onclick="javascript:window.location.href='../getting_started.html'">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
</a>
<div class="dropdown-content">
<button class="dropdown-btn">Getting Started<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Resources for Users<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href=".././managing_projects.html">Managing AutoFOCUS3 Projects</a>
<a href=".././examples.MainPage.html">Examples</a>
<a href=".././tipsAndTricks.html">Tips &amp; Tricks</a>
<a href=".././af3_faq.html">FAQs</a>
</div>
<a href=".././rcphelp.gettingstarted.MainPage.html">Resources for Developers</a>
<a href=".././rcphelp.gettingstarted.MainPage.html">Contact</a>
</div>
<button class="dropdown-btn">Requirements Engineering<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../requirements/MIRA.requirements_analysis.html"> Requirements Analysis Node</a>
<a href="../requirements/MIRA.glossary.html">Glossary</a>
<a href="../requirements/MIRA.requirements.html">Requirements</a>
</div>
<button class="dropdown-btn">Modeling and Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="model_element_attributes.html" >Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
<button class="dropdown-btn">Behavior Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="code_specification.html">Code Specification</a>
<a href="state_automaton.html">State Automata</a>
<a href="hierarchical_state_automaton.html">Hierarchical State Automata</a>
<a href="mode_automaton.html"> Mode Automata</a>
</div>
<button class="dropdown-btn">Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="simulation_with_af3.html">Simulation</a>
<a href="operatorpanels.html">Operator Panels</a>
<a href="operatorpanels_advanced.html">Advanced Operator Panels</a>
<a style="background-color:#f2f2f2;"> Co-Simulation and FMI Support</a>
</div>
</div>
<button class="dropdown-btn">Deployment and Code Generation<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Modeling Technical Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture.html">Platform Architecture</a>
<button class="dropdown-btn">Supported Platform Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture_generic.html">Generic Platform Architecture</a>
<a href="../ta/platform_architecture_hierarchical.html">Hierarchical Platform Architecture</a>
<a href="../ta/platform_architecture_raspberrypi.html">RaspberryPi Platform Architecture</a>
</div>
<a href="../ta/task_architecture.html">Task Architecture</a>
<a href="../ta/partition_architecture.html"> Partition Architecture</a>
<a href="../ta/allocations.html"> Deployments/Allocations</a>
<a href="../ta/system_schedule.html"> System Schedule</a>
</div>
<a href="../ta/code_generation.html">Code Generation</a>
</div>
<button class="dropdown-btn">Design Space Exploration (DSE)<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../dse/dse_perspective.html">DSE Perspective Overview</a>
<a href="../dse/dse_dashboard.html">DSE Dashboard</a>
<a href="../dse/constraints.html">Constraint Modeling</a>
<a href="../dse/objectives.html">Objective Modeling</a>
<a href="../dse/synthesis.html">Deployment/Schedule Synthesis (Exploration)</a>
<a href="../dse/visualization.html">Solution Visualization</a>
</div>
<button class="dropdown-btn">Assurance Case Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../assuranceCases/creation.html">Modeling GSN-based Assurance Cases</a>
<a href="../assuranceCases/assessment.html">Quantitative Assessment of Assurance Cases</a>
<a href="../assuranceCases/maintenance.html">Assurance Case Maintenance</a>
</div>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'cosimulation_with_af3.html' Documentation Problem!&body= Dear AutoFOCUS3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</div>
</div>
<div class="box">
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h1>Coupling AutoFOCUS3 with other Tools using Co-Simulation</h1>
<p>The following sections provide introduction and discuss co-simulation functionality in detail.
The <a href="../example_co-simulation.html">inverted pendulum example</a> illustrates the concepts introduced in this section with a co-simulation comprising three tools.</p>
<h2>Introduction</h2>
<p> AF3 alone cannot satisfy all the needs of system development.
Other tools are often needed, e.g., for modeling continuous behavior
(for the environment or for analog parts of a system),
for interoperability with legacy tools, or simply for using non-AF3 features in combination with AF3
(e.g., visualization). </p>
<p>
In such cases, AF3 has <i>co-simulation</i> capabilities which allows to use AF3 <a href="simulation_with_af3.html">simulation</a>
with other tools in a synchronous manner.
AF3 offers co-simulation functionality in the following two ways:
<ul> <li>
The AF3 model can be exported as an <a target="_blank" rel="noopener noreferrer" href="http://www.fmi-standard.org">FMU</a>, which can be used as one of the components for co-simulation in other tools.</li>
<li>AF3 provides the environment for FMUs co-simulation by utilizing Co-simulation Orchestration Engine (<a target="_blank" rel="noopener noreferrer" href="https://into-cps-association.github.io/simulation/coe.html">COE</a>)
provided by INTO-CPS as a service. Thus, the FMUs from different tools can be imported and co-simulated together along with the AF3 components.</li>
</ul>
</p>
<h2>Co-simulation using FMI (Functional Mockup Interface)</h2>
<p>
AutoFOCUS3 supports currently supports FMU 2.0 export on the following platforms that
meet the listed prerequisites:
<ul>
<li>Windows
<ul>
<li>We recommend <a target="_blank" rel="noopener noreferrer" href="https://jmeubank.github.io/tdm-gcc/">TDM-GCC MinGW (x64)</a> (tested with release 9.2.0)</li>
<li>Note: <tt>gcc</tt> has to be in the search <tt>PATH</tt>. Therefore, restart AutoFOCUS3 after installing the <i>TDM-GCC MinGW</i> package.</li>
</ul>
</li>
<li>Linux
<ul>
<li>Install <tt>gcc</tt> using your distributions package manager.</li>
<li>Ensure that <tt>gcc</tt> is in the <tt>PATH</tt>.
</ul>
<li>macOS: Currently not supported</li>
</ul>
<b>Note</b>:
<ul>
<li>Input and output values cannot carry <tt>NoVal</tt> but instead contain
default values (<tt>0</tt> for integers and reals, <tt>false</tt> for booleans, first item for enumerations)
</li>
<li>This behaviour is different from AF3 <i>simulation</i>!</li>
</ul>
</p>
<h2>Exporting component architecture as an FMU</h2>
<p>
FMI export can be done at the level of both component architecture and component.
To export anyone of them to the FMU, right-click on it in the model navigator and select "Export to FMU2.0":</p>
<img src="./pictures/FMI_menu.png"/>
<p> AF3 works with logical time, however co-simulation is generally achieved with tools modeling reality and therefore working with real time.
Therefore, the FMI standard requires that AF3 notion of time is translated to real time.
For that, a function with the name 'samplingTime()' can be defined in the data dictionary and used inside the AF3 component's behavior.
If the samplingTime() is not defined, the user will be
asked to provide the required frequency (equivalent to sampling time) for the component:</p>
<img src="./pictures/FMI_tick_duration.png"/>
<p> You will then be asked where to store the generated FMU.
Once this is done, a message confirming that generation was successful appears and you can find the generated FMU in the directory that you selected.
You can then make use of the <a target="_blank" rel="noopener noreferrer" href="https://www.fmi-standard.org/tools">numerous co-simulation tools</a> along with AF3 itself, supporting FMI to co-simulate the generated AF3 model's FMU.</p>
<h2>Importing FMUs and their co-simulation</h2>
<p>
The FMU's from other tools can be imported in AF3 for the co-simulation together with the AF3's own behavior components.</p>
<h3>Creating an FMU Specification</h3>
<p>
To use the co-simulation feature, you have to create the <i>FMU Specification</i> inside the component.
Only the entire component architecture can be simulated having FMUs or other AF3 behaviors inside its subcomponents.</p>
<p>To create an <i>FMU specification</i> for a component, open the context menu of the component and select "FMU Specification".</p>
<img src="./pictures/FMUSpecification.png"/>
<p>The FMU Specification can also be dragged and dropped from the <i>Model Elements</i> window.</p>
<img src="./pictures/FMUModelElements.png"/>
<p> The <i>FMU Specification</i> consists of only one section available by double clicking the FMU Specification icon or its component.
It has a field with:
<ul>
<li><i>Browse button:</i> To upload the FMU. The input/output ports will be automatically generated.</li>
</ul>
</p>
<img src="./pictures/externalSpecificationEditor.png"/>
<p>Different AF3 component and the FMUs are connected with each other through the input and output ports. The outputs that has to be displayed as a result of the
co-simulation are assigned to the Component Architecture's root component.</p>
<img src="./pictures/cosimulationComponentsConnection.png"/>
<h3>Running a Co-simulation</h3>
<p>To start the co-simulation, right-click on the <i>Component Architecture</i> element in the <i>Model Navigator</i> and select "Run Co-simulator". Remember
that this option will only be available, if there is at least two atomic component and one of them has an FMU Specification behavior.</p>
<img src="./pictures/runCosimulator.png"/>
<p>
If there would be no error in the model, then Co-simulation Configuration window will open containing two sections:
<ul>
<li><i>Simulation time:</i> The step size, start and end time values has to be provided for which the simulation needs to be run.
The end time should be greater than the start time and the step size should be greater than zero and within the range of start and end time. </li>
<li><i>Ports to be displayed:</i> The check boxes with port names (that were assigned to the root component ports) to be displayed on the output graph. </li>
</ul>
</p>
<p>Then press OK to proceed or cancel to stop the co-simulator.</p>
<img src="./pictures/cosimulationConfigurations.png"/>
<p> OK will execute the co-simulation of the components and at last the window with graph having the results will pop up.</p>
<img src="./pictures/cosimulationResults.png"/>
</div>
<script src="../layout/jsscript/topBtn.js"></script>
<script src="../layout/jsscript/submenuScript.js"></script>
<div class="footer">
<p>
&copy; 2020 <a href="https://www.fortiss.org/">fortiss GmbH</a> &nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/publications/software/autofocus-3#c2007">Contact</a>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/imprint">Imprint</a>
</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Documentation of Defining a Data Dictionary. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Defining a Data Dictionary</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<div class="dropdown">
<a href="../getting_started.html" style="padding:0;">
<button class="btn" id="hamburger" onclick="javascript:window.location.href='../getting_started.html'">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
</a>
<div class="dropdown-content">
<button class="dropdown-btn">Getting Started<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Resources for Users<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href=".././managing_projects.html">Managing AutoFOCUS3 Projects</a>
<a href=".././examples.MainPage.html">Examples</a>
<a href=".././tipsAndTricks.html">Tips &amp; Tricks</a>
<a href=".././af3_faq.html">FAQs</a>
</div>
<a href=".././rcphelp.gettingstarted.MainPage.html">Resources for Developers</a>
<a href=".././rcphelp.gettingstarted.MainPage.html">Contact</a>
</div>
<button class="dropdown-btn">Requirements Engineering<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../requirements/MIRA.requirements_analysis.html"> Requirements Analysis Node</a>
<a href="../requirements/MIRA.glossary.html">Glossary</a>
<a href="../requirements/MIRA.requirements.html">Requirements</a>
</div>
<button class="dropdown-btn">Modeling and Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="model_element_attributes.html" >Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a style="background-color:#f2f2f2;">Data Dictionary: Types and Functions</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
<button class="dropdown-btn">Behavior Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="code_specification.html">Code Specification</a>
<a href="state_automaton.html">State Automata</a>
<a href="hierarchical_state_automaton.html">Hierarchical State Automata</a>
<a href="mode_automaton.html"> Mode Automata</a>
</div>
<button class="dropdown-btn">Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="simulation_with_af3.html">Simulation</a>
<a href="operatorpanels.html">Operator Panels</a>
<a href="operatorpanels_advanced.html">Advanced Operator Panels</a>
<a href="cosimulation_with_af3.html"> Co-Simulation and FMI Support</a>
</div>
</div>
<button class="dropdown-btn">Deployment and Code Generation<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Modeling Technical Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture.html">Platform Architecture</a>
<button class="dropdown-btn">Supported Platform Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture_generic.html">Generic Platform Architecture</a>
<a href="../ta/platform_architecture_hierarchical.html">Hierarchical Platform Architecture</a>
<a href="../ta/platform_architecture_raspberrypi.html">RaspberryPi Platform Architecture</a>
</div>
<a href="../ta/task_architecture.html">Task Architecture</a>
<a href="../ta/partition_architecture.html"> Partition Architecture</a>
<a href="../ta/allocations.html"> Deployments/Allocations</a>
<a href="../ta/system_schedule.html"> System Schedule</a>
</div>
<a href="../ta/code_generation.html">Code Generation</a>
</div>
<button class="dropdown-btn">Design Space Exploration (DSE)<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../dse/dse_perspective.html">DSE Perspective Overview</a>
<a href="../dse/dse_dashboard.html">DSE Dashboard</a>
<a href="../dse/constraints.html">Constraint Modeling</a>
<a href="../dse/objectives.html">Objective Modeling</a>
<a href="../dse/synthesis.html">Deployment/Schedule Synthesis (Exploration)</a>
<a href="../dse/visualization.html">Solution Visualization</a>
</div>
<button class="dropdown-btn">Assurance Case Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../assuranceCases/creation.html">Modeling GSN-based Assurance Cases</a>
<a href="../assuranceCases/assessment.html">Quantitative Assessment of Assurance Cases</a>
<a href="../assuranceCases/maintenance.html">Assurance Case Maintenance</a>
</div>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'Data_Dictionary.html' Documentation Problem!&body= Dear AutoFOCUS3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</div>
</div>
<div class="box">
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h1>Defining a Data Dictionary</h1>
<p>AF3 allows you to define your own datatypes and functions by using a so-called <i>Data Dictionary</i>. To create it, right-click at the root of your project and select <i>Data Dictionary</i>, as shown below:</p>
<img src="./pictures/DataDictionary.Add.png"/>
<p>You can then add the following elements to your Data Dictionary:
<ul>
<li>Enumeration</li>
<li>Structure</li>
<li>Array</li>
<li>Function</li>
</ul>
</p>
<p>These can be added by drag-and-drop from the model elements palette or by the context menu (right-click) of the data dictionary itself in the model navigator.</p>
<p>We describe below every of these elements in more details: what they consist of, how to define them, as well as the <i>syntax</i> to use to refer to the data items they define. The latter is particularly
useful, e.g., in Guards and Actions of <a href="state_automaton.html"><i>State Automata</i></a> or in <a href="code_specification.html"><i>Code Specifications</i></a>.</p>
<h2>Enumeration</h2>
<p> An enumeration is a data type defined as a finite list of values. Variables of this type can only contain a value which belong to this list. This is similar to "unions" in C, or to "sum types" in functional languages. After having created an enumeration, you can add elements to it by drag and dropping "enumeration members" from the
palette or by right-clicking the enumeration in the data dictionary editor.</p>
<p><i>Syntax</i>: an enumeration member can be accessed by writing its name followed by "()" (this allows to distinguish enumeration members from ports).
For instance, referring to the elements of the enumeration defined below is done by writing "Green()", "Red()", "RedYellow()", "Yellow()". </p>
<img src="./pictures/DataDictionary.Enumeration.png"/>
<h2>Structure</h2>
<p> A structure is a data type which allows to gather various values in one variable, each value being uniquely identified by a structure member <i>name</i>. One can for instance state a value shall always have a member called "x" of type integer and a member called "y" of type boolean.
This is similar to "records" in C, or to "product types" in functional languages. After having created a structure, you can add elements to it by drag and dropping "structure members" from the
palette or by right-clicking the structure in the data dictionary editor. </p>
<p><i>Syntax</i>: a structure member of a variable "v" can be accessed by writing "<tt>v.MEMBER_NAME"</tt>.
For instance, for the example structure mentioned in the previous paragraph, one would access the integer by "<tt>v.x</tt>" and the boolean by "<tt>v.y</tt>".
Creating a structure is done with the syntax "<tt>{member_name_1: value_1, member_name_2: value_2, ...}</tt>". With the same example above: "<tt>{ x: 1, y: true }</tt>".
</p>
<h2>Array</h2>
Arrays are like usual C arrays, but <i>their size is defined in the datatype itself</i>.
<p><i>Syntax</i>: Given a variable "v" whose type is an array, the i-th element can be accessed by the expression
"<tt>v[i]</tt>". The index starts from 0. Assigning a value x to the i-th element is done with the syntax "<tt>v[i] = x</tt>".</p>
<h2>Function</h2>
<p>Functions denote small functions which can be used in various places in an AF3 project. <i>Note:</i>Functions are not a type but are still defined in the data dictionary.
</p>
<p>Functions have:
<ul>
<li>name</li>
<li>comment</li>
<li>parameters</li>
<li>a return type</li>
<li>a definition</li>
<i>Note:</i> the definition cannot contain local variables! (this means that practically, most function definitions contain only "if" and "return" statements.)
</ul>
(see next figure for an example).
</p>
<img src="./pictures/DataDictionary.Definitions.png"/>
<h2>Evaluator</h2>
<p>If you want to check your defined functions, AutoFOCUS provides an Evaluator for the Data Dictionary. Simply click onto the Evaluator-Tab and insert commands into the lower field. The upper field shows the results of your inputs.
As you can see in the following Example, the Function "tRed()" returns 5 as defined. </p>
<img src="./pictures/DataDictionary.Evaluator.png"/>
</div>
<script src="../layout/jsscript/topBtn.js">
</script>
<script src="../layout/jsscript/submenuScript.js">
</script>
<div class="footer">
<p>
&copy; 2020 <a href="https://www.fortiss.org/">fortiss GmbH</a> &nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/publications/software/autofocus-3#c2007">Contact</a>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/imprint">Imprint</a>
</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Documentation of Creating a Hierarchical State Automaton. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Creating a Hierarchical State Automaton</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<div class="dropdown">
<a href="../getting_started.html" style="padding:0;">
<button class="btn" id="hamburger" onclick="javascript:window.location.href='../getting_started.html'">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
</a>
<div class="dropdown-content">
<button class="dropdown-btn">Getting Started<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Resources for Users<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href=".././managing_projects.html">Managing AutoFOCUS3 Projects</a>
<a href=".././examples.MainPage.html">Examples</a>
<a href=".././tipsAndTricks.html">Tips &amp; Tricks</a>
<a href=".././af3_faq.html">FAQs</a>
</div>
<a href=".././rcphelp.gettingstarted.MainPage.html">Resources for Developers</a>
<a href=".././rcphelp.gettingstarted.MainPage.html">Contact</a>
</div>
<button class="dropdown-btn">Requirements Engineering<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../requirements/MIRA.requirements_analysis.html"> Requirements Analysis Node</a>
<a href="../requirements/MIRA.glossary.html">Glossary</a>
<a href="../requirements/MIRA.requirements.html">Requirements</a>
</div>
<button class="dropdown-btn">Modeling and Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="model_element_attributes.html" >Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
<button class="dropdown-btn">Behavior Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="code_specification.html">Code Specification</a>
<a href="state_automaton.html">State Automata</a>
<a style="background-color:#f2f2f2;">Hierarchical State Automata</a>
<a href="mode_automaton.html"> Mode Automata</a>
</div>
<button class="dropdown-btn">Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="simulation_with_af3.html">Simulation</a>
<a href="operatorpanels.html">Operator Panels</a>
<a href="operatorpanels_advanced.html">Advanced Operator Panels</a>
<a href="cosimulation_with_af3.html"> Co-Simulation and FMI Support</a>
</div>
</div>
<button class="dropdown-btn">Deployment and Code Generation<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Modeling Technical Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture.html">Platform Architecture</a>
<button class="dropdown-btn">Supported Platform Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture_generic.html">Generic Platform Architecture</a>
<a href="../ta/platform_architecture_hierarchical.html">Hierarchical Platform Architecture</a>
<a href="../ta/platform_architecture_raspberrypi.html">RaspberryPi Platform Architecture</a>
</div>
<a href="../ta/task_architecture.html">Task Architecture</a>
<a href="../ta/partition_architecture.html"> Partition Architecture</a>
<a href="../ta/allocations.html"> Deployments/Allocations</a>
<a href="../ta/system_schedule.html"> System Schedule</a>
</div>
<a href="../ta/code_generation.html">Code Generation</a>
</div>
<button class="dropdown-btn">Design Space Exploration (DSE)<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../dse/dse_perspective.html">DSE Perspective Overview</a>
<a href="../dse/dse_dashboard.html">DSE Dashboard</a>
<a href="../dse/constraints.html">Constraint Modeling</a>
<a href="../dse/objectives.html">Objective Modeling</a>
<a href="../dse/synthesis.html">Deployment/Schedule Synthesis (Exploration)</a>
<a href="../dse/visualization.html">Solution Visualization</a>
</div>
<button class="dropdown-btn">Assurance Case Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../assuranceCases/creation.html">Modeling GSN-based Assurance Cases</a>
<a href="../assuranceCases/assessment.html">Quantitative Assessment of Assurance Cases</a>
<a href="../assuranceCases/maintenance.html">Assurance Case Maintenance</a>
</div>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'state_automaton.html' Documentation Problem!&body= Dear AutoFOCUS3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</div>
</div>
<div class="box">
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h1>Creating a Hierarchical State Automaton</h1>
<p><i>Hierarchical State Automatons</i> ("HSA") are an extension of <a href="state_automaton.html"><i>State Automatons</i></a> whose states can themselves contain state automatons.</p>
<p>
Note that HSAs are experimental, thus not all features of state automata are supported.
In particular, the support for verification is limited (e.g., reachability analysis is not supported).
The simulation of HSAs is possible.</p>
<h3>When to use HSAs?</h3>
<p>HSAs are useful when a usual state automaton becomes too big to be handled conveniently.
In this case, one can often decompose the state automaton into a HSA.
Note that <i>HSAs are not more powerful than state automata</i>, i.e., one cannot use a HSA to model a behavior which
cannot be modeled by a state automaton.</p>
<h3>Create a Hierarchical State Automaton</h3>
<p>To create a HSA, simply model the top state automaton like any other automaton:</p>
<img width=900px src="./pictures/HSA.Base.Automaton.png"/>
<p>Then simply drag&drop a state from the Model Elements View to <i>some existing state</i> of your diagram:</p>
<img width=900px src="./pictures/HSA.Drag.Drop.png"/>
<p>This will create a state automaton inside the existing state:</p>
<img width=900px src="./pictures/HSA.Built.png"/>
<p>You can then double click the state to open this inner automaton:</p>
<img width=900px src="./pictures/HSA.Inside.png"/>
<p>And start building the inside automaton as any <a href="state_automaton.html">state automaton</a>:</p>
<img width=900px src="./pictures/HSA.Inner.Built.png"/>
<p>When modeling the inner automaton, one can notice that some ports are automatically added, disconnected from any state.
See, e.g., Input, Input1, and Output below:</p>
<img width=900px src="./pictures/HSA.Inside.Ports.png"/>
<p>Just as any other port, these ports can be connected to the states, thus allowing to make a connection between the behavior
of the inner state automaton and the outer state automaton.</p>
<h3>Semantics and Behavior of the Inner Automaton</h3>
<p>The inner automaton is connected to the outer one through the ports of the outer state.
The semantics of the HSA are as follows:
assume a transition followed in the outer state automaton goes to a hierarchical state through some port "Input":</p>
<img width=900px src="./pictures/HSA.Base.Automaton.Behavior.png"/>
<p>Then the focus switches to the inside automaton by following any suitable transition from "Input":</p>
<img width=900px src="./pictures/HSA.Inner.Automaton.Behavior.png"/>
<p>Once inside this automaton, the usual behavior of state automaton applies.
Note that, meanwhile, the outer automaton is "frozen" in its current state.
This is until an output port is reached in the inner automaton:</p>
<img width=900px src="./pictures/HSA.Inner.Automaton.Out.png"/>
<p>In that case the focus gets back to the outer automaton, which follows the appropriate transition:</p>
<img width=900px src="./pictures/HSA.Base.Automaton.Out.png"/>
</div>
<script src="../layout/jsscript/topBtn.js"></script>
<script src="../layout/jsscript/submenuScript.js"></script>
<div class="footer">
<p>
&copy; 2020 <a href="https://www.fortiss.org/">fortiss GmbH</a> &nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/publications/software/autofocus-3#c2007">Contact</a>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/imprint">Imprint</a>
</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Documentation of Creating a Mode Automaton. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Creating a Mode Automaton</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<div class="dropdown">
<a href="../getting_started.html" style="padding:0;">
<button class="btn" id="hamburger" onclick="javascript:window.location.href='../getting_started.html'">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
</a>
<div class="dropdown-content">
<button class="dropdown-btn">Getting Started<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Resources for Users<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href=".././managing_projects.html">Managing AutoFOCUS3 Projects</a>
<a href=".././examples.MainPage.html">Examples</a>
<a href=".././tipsAndTricks.html">Tips &amp; Tricks</a>
<a href=".././af3_faq.html">FAQs</a>
</div>
<a href=".././rcphelp.gettingstarted.MainPage.html">Resources for Developers</a>
<a href=".././rcphelp.gettingstarted.MainPage.html">Contact</a>
</div>
<button class="dropdown-btn">Requirements Engineering<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../requirements/MIRA.requirements_analysis.html"> Requirements Analysis Node</a>
<a href="../requirements/MIRA.glossary.html">Glossary</a>
<a href="../requirements/MIRA.requirements.html">Requirements</a>
</div>
<button class="dropdown-btn">Modeling and Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="model_element_attributes.html" >Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
<button class="dropdown-btn">Behavior Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="code_specification.html">Code Specification</a>
<a href="state_automaton.html">State Automata</a>
<a href="hierarchical_state_automaton.html">Hierarchical State Automata</a>
<a style="background-color:#f2f2f2;"> Mode Automata</a>
</div>
<button class="dropdown-btn">Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="simulation_with_af3.html">Simulation</a>
<a href="operatorpanels.html">Operator Panels</a>
<a href="operatorpanels_advanced.html">Advanced Operator Panels</a>
<a href="cosimulation_with_af3.html"> Co-Simulation and FMI Support</a>
</div>
</div>
<button class="dropdown-btn">Deployment and Code Generation<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Modeling Technical Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture.html">Platform Architecture</a>
<button class="dropdown-btn">Supported Platform Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture_generic.html">Generic Platform Architecture</a>
<a href="../ta/platform_architecture_hierarchical.html">Hierarchical Platform Architecture</a>
<a href="../ta/platform_architecture_raspberrypi.html">RaspberryPi Platform Architecture</a>
</div>
<a href="../ta/task_architecture.html">Task Architecture</a>
<a href="../ta/partition_architecture.html"> Partition Architecture</a>
<a href="../ta/allocations.html"> Deployments/Allocations</a>
<a href="../ta/system_schedule.html"> System Schedule</a>
</div>
<a href="../ta/code_generation.html">Code Generation</a>
</div>
<button class="dropdown-btn">Design Space Exploration (DSE)<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../dse/dse_perspective.html">DSE Perspective Overview</a>
<a href="../dse/dse_dashboard.html">DSE Dashboard</a>
<a href="../dse/constraints.html">Constraint Modeling</a>
<a href="../dse/objectives.html">Objective Modeling</a>
<a href="../dse/synthesis.html">Deployment/Schedule Synthesis (Exploration)</a>
<a href="../dse/visualization.html">Solution Visualization</a>
</div>
<button class="dropdown-btn">Assurance Case Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../assuranceCases/creation.html">Modeling GSN-based Assurance Cases</a>
<a href="../assuranceCases/assessment.html">Quantitative Assessment of Assurance Cases</a>
<a href="../assuranceCases/maintenance.html">Assurance Case Maintenance</a>
</div>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'mode_automaton.html' Documentation Problem!&body= Dear AutoFOCUS3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</div>
</div>
<div class="box">
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h1>Creating a Mode Automaton</h1>
<p>Following sections discuss motivation and steps to create Mode Automaton in AF3.</p>
<h3>Motivation and Introduction</h3>
<p>Beside the usage of <a href="state_automaton.html"><i>State Automaton</i></a>, there exists another way to model the behavior of components in a graphical Mode Automaton Diagram.</p>
<p>A component may contain some running modes, which should be used in distinct periods of the time. The control model for such modes is <b>mode automaton</b>.
The usage of the mode automaton my have consequences on the code efficiency as well as on the correctness of the design. There are four kinds of the model elements in mode automaton.</p>
<p><b>Mode</b>: A mode automaton contains at least one mode. A mode describes the current configuration of computational data flow a component is in.
This configuration computes outputs for given component depending on the current inputs as well as the state of the local variables. A mode must have a sub component structure, in order to describe the current computation for the component.
An initial mode, which the mode automaton starts with, is required in mode automaton.</p>
<p><b>Switch</b>: Switch controls the change of the mode to execute. Switch element contains the <i>Guards</i>, which takes cares of the switch conditions.</p>
<p><b>Input and Output Ports</b>: A port belongs to a mode, and is the start and the end of a switch.</p>
<p><b>Mode Component Structure</b>: This model element contains the component architecture, which is used to compute the outputs when the corresponding mode active is. Every mode must contain one sub component structure.
A mode component structure must have the same ports with the component, which contains this mode automaton.</p>
<h3>Mode Automaton</h3>
<p>The mode automaton editor is very similar to state automaton editor. You can add a mode automaton to your component as shown in figure 1. In mode automaton editor, you might drag&drop a mode from the right Model Elements View to your diagram. In the same way you can add ports and mode component structure to your modes.</p>
<img src="./pictures/modes.add_mode_automaton.png"/>
<p>You can select the mode and drag it to everywhere in the editor. Same for ports, just pick them and move around the border of the mode.
To resize a mode, pick the lower, the right, or the lower-right point of its bounding-box and then move it.</p>
<p>In order to create switches between your modes, press the <b>&lt;alt&gt;-Key</b> on your keyboard and drag the switch from one port to another port of different I/O-kind.
You can also create the switch from one mode to another mode, new ports will be created automatically and the switch will be created between the new ports.
Invalid switches (e.g., between two Output-Ports) are avoided by disabling the dragging.</p>
<img src="./pictures/modes.mode_automaton_editor.png"/>
<h3>Mode</h3>
<p>A mode automaton requires an <b>initial mode</b>. This can be done in the <i>Properties View</i> after you selected a mode.
This mode is marked with a little black dot afterwards(see the following figure).</p>
<img src="./pictures/modes.initial_mode.png"/>
<p>In the <i>Properties View</i>, you can also edit the names of selected modes and also specify comments.</p>
<h3>Switch</h3>
<p>Just like transition in state automaton, you can change the route of switches by selecting it, pick the point shown in the middle and move it.
Afterwards, two new points are shown between the moved middle point and the two ports. By moving these points, you can further define the route more precisely.
The conditions for switch between modes are done by specifying <i>Guards</i> of a switch. If no Guard of an outgoing switch is fulfilled, the current mode remains active.
If a switch can be fired, then new mode will be active, and the sub component architecture of this mode will take over the computation job.</p>
<img src="./pictures/modes.switch_blendpoint.png"/>
<p> Note that, unlike transitions of a state automaton, mode switches do not have <i>actions</i>.
Modifying the outputs should be done instead through <i>component structure inside a mode</i>.</p>
<h3>Mode Component Structure</h3>
<p> A mode generally contains a component structure.
Editing such a structure is done in the same way as for <a href="component_architecture.html"><i>Component Architectures</i></a>.
You can add a mode component structure as shown in the following figure. </p>
<img src="./pictures/modes.add_mode_component_structure.png"/>
The following figure shows an example of a mode component structure.
You can drag and drop the component and channels and like a component architecture.
The ports, which are highlighted in blue rectangles, should correspond to the ports of the component of the mode automaton.
<img src="./pictures/modes.example_mode_component_struct.png"/>
</div>
<script src="../layout/jsscript/topBtn.js"></script>
<script src="../layout/jsscript/submenuScript.js"></script>
<div class="footer">
<p>
&copy; 2020 <a href="https://www.fortiss.org/">fortiss GmbH</a> &nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/publications/software/autofocus-3#c2007">Contact</a>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/imprint">Imprint</a>
</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Documentation of MIRA - Model-based Integrated Requirements. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css"/>
<title>Introduction to Graphical Modeling Interface</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<div class="dropdown">
<a href="../getting_started.html" style="padding:0;">
<button class="btn" id="hamburger" onclick="javascript:window.location.href='../getting_started.html'">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
</a>
<div class="dropdown-content">
<button class="dropdown-btn">Getting Started<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Resources for Users<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href=".././managing_projects.html">Managing AutoFOCUS3 Projects</a>
<a href=".././examples.MainPage.html">Examples</a>
<a href=".././tipsAndTricks.html">Tips &amp; Tricks</a>
<a href=".././af3_faq.html">FAQs</a>
</div>
<a href=".././rcphelp.gettingstarted.MainPage.html">Resources for Developers</a>
<a href=".././rcphelp.gettingstarted.MainPage.html">Contact</a>
</div>
<button class="dropdown-btn">Requirements Engineering<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../requirements/MIRA.requirements_analysis.html"> Requirements Analysis Node</a>
<a href="../MIRA.glossary.html">Glossary</a>
<a href="../MIRA.requirements.html">Requirements</a>
</div>
<button class="dropdown-btn">Modeling and Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a style="background-color:#f2f2f2;">Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
<button class="dropdown-btn">Behavior Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="code_specification.html">Code Specification</a>
<a href="state_automaton.html">State Automata</a>
<a href="hierarchical_state_automaton.html">Hierarchical State Automata</a>
<a href="mode_automaton.html"> Mode Automata</a>
</div>
<button class="dropdown-btn">Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="simulation_with_af3.html">Simulation</a>
<a href="operatorpanels.html">Operator Panels</a>
<a href="operatorpanels_advanced.html">Advanced Operator Panels</a>
<a href="cosimulation_with_af3.html"> Co-Simulation and FMI Support</a>
</div>
</div>
<button class="dropdown-btn">Deployment and Code Generation<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Modeling Technical Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture.html">Platform Architecture</a>
<button class="dropdown-btn">Supported Platform Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture_generic.html">Generic Platform Architecture</a>
<a href="../ta/platform_architecture_hierarchical.html">Hierarchical Platform Architecture</a>
<a href="../ta/platform_architecture_raspberrypi.html">RaspberryPi Platform Architecture</a>
</div>
<a href="../ta/task_architecture.html">Task Architecture</a>
<a href="../ta/partition_architecture.html"> Partition Architecture</a>
<a href="../ta/allocations.html"> Deployments/Allocations</a>
<a href="../ta/system_schedule.html"> System Schedule</a>
</div>
<a href="../ta/code_generation.html">Code Generation</a>
</div>
<button class="dropdown-btn">Design Space Exploration (DSE)<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../dse/dse_perspective.html">DSE Perspective Overview</a>
<a href="../dse/dse_dashboard.html">DSE Dashboard</a>
<a href="../dse/constraints.html">Constraint Modeling</a>
<a href="../dse/objectives.html">Objective Modeling</a>
<a href="../dse/synthesis.html">Deployment/Schedule Synthesis (Exploration)</a>
<a href="../dse/visualization.html">Solution Visualization</a>
</div>
<button class="dropdown-btn">Assurance Case Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../assuranceCases/creation.html">Modeling GSN-based Assurance Cases</a>
<a href="../assuranceCases/assessment.html">Quantitative Assessment of Assurance Cases</a>
<a href="../assuranceCases/maintenance.html">Assurance Case Maintenance</a>
</div>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'model_element_attribute.html' Documentation Problem!&body= Dear AutoFOCUS3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</div>
</div>
<div class="box">
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h1>Introduction to Graphical Modeling Interface</h1>
<p>The graphical interface provides three different entry points for modelling:</p>
<ul>
<li><i>Editor</i> - main window (by default taking the most prominent space on
the screen) allowing to edit the most common information of a given element.
This is the window which opens when double-clicking on an element in the <i>Model
Navigator</i>.</li>
<li><i>Properties</i> - Information which does not fit in the editor or would make
the editor unreadable is generally to be found and edited in the properties view.
Properties should information about the <i>currently selected element</i>.
Therefore, to see the properties of a given element, you should first click on it
in the editor or in the model navigator.
The properties view should always be present, if not type "Properties" in the
Quick Access entry of the tool bar.</li>
<li><i>Annotations</i> - Similar to properties but also presents information of
the children of the selected element. Annotations allow to have a quick overview of
similar information along the hierarchy. For instance, instead of seeing
the name of the currently selected element only, you can also see in a convenient
table the name of <i>all the children of the selected element</i>.</li>
</ul>
<p>In the following, the different ways and the associated views will be described based on the simple <a href="component_architecture.html">component architecture</a> shown below.</p>
<img src="./pictures/ModelElementAttributesExample.png"/>
<p>The example is based, for the sake of simplicity, on a restricted version of AutoFOCUS containing only the so-called "component architecture plugin". It should therefore not come as a surprise if your
version of AutoFOCUS allows more specification, more properties or more annotations than showed in this help.</p>
<h2>Editor</h2>
<p>The main editor allows to describe models through diagrams as in this example, through text (e.g.,
for code specifications), through tables/trees (e.g., data dictionary), or through forms (e.g.,
requirements). In diagram or tree editors, the models can be edited by drag and dropping elements
from the Model Elements pane, or by right-clicking the elements in the model navigator.</p>
<img src="./pictures/ModelElementAttributesSpecifications.png" style='height: auto; width: auto'/>
<p>In the example, <i>Component1</i> contains two model elements:</p>
<ul>
<li><a href="code_specification.html">Code Specification</a></li>
<li>Component Specifications (deprecated)</li>
</ul>
<h2>Properties View</h2>
<p>The <i>Properties View</i> provides a local view on all properties of the currently
selected component. The following screenshot illustrates the properties of <i>Component1</i>.</p>
<img src="./pictures/ModelElementAttributesPropertiesView.png"/>
<p>The following properties are available (in the <i>General</i> tab) for any
model element type:</p>
<ul>
<li>Name</li>
<li>Comment</li>
<li>Strongly causal</li>
<li>Verification behavior</li>
</ul>
Note that name and comment are available for most elements in AutoFOCUS.
<p>The <i>Internal</i> is of no use for the standard user.</p>
<h2>Annotation View</h2>
<p> The <i>Annotation View</i> provides a global view on all model elements annotations within
the current project root element (e.g., within a <a href="component_architecture.html">Component Architecture</a> or a
<a href="ta/platform_architecture.html">Platform Architecture</a>).</p>
<h3>Overview</h3>
<p>In the <i>Annotation View</i>, each model element is represented as a row. The row for the model element that is currently selected in the associated model
diagram editor is highlighted with a green background.</p>
<img src="./pictures/ModelElementAttributesAnnotationView.png" width="100%"/>
<p>The view's columns represent the annotations that are associated with the respective model element. Here, the following three cases can be distinguished:</p>
<ul>
<li>White cell - the model element contains the respective annotation that is
<i>editable by the user</i>.</li>
<li>Grey cell - the model element <i>does not contain</i> the respective annotation.</li>
<li>Blue cell - the model element contains the respective annotation. However, its
value is the result of a calculation (and hence the cell is read-only).</li>
</ul>
<p>Like the <i>Properties View</i>, the <i>Annotation View</i> provides the following two annotations for any model element. </p>
<ul>
<li>Name</li>
<li>Comment</li>
</ul>
<p> In fact, the <i>Name</i> and <i>Comment</i> annotations provide an alternative way to access the corresponding properties.</p>
<h3>Annotation View Filters</h3>
<p>At the bottom, the <i>Annotation View</i> provides a number of row and column filters.</p>
<p>Here, the following <i>row filters</i> can be used to restrict the set of model elements that is shown in the view:</p>
<ul>
<li><i>Filter model element name</i>: only model elements are shown whose name matches the filter string.</li>
<li><i>Filter model element type</i>: if checked, only model elements are shown that have the same type
as the model element that is selected in the associated model diagram editor.</li>
<li><i>Filter model element hierarchy level</i>: Filters the set of model elements based on the model structure. The following options are available:
<ul>
<li><i>Show all levels</i>: Any model element beneath the currently selected project root element is shown.</li>
<li><i>Show current level</i>: Only model elements are shown that have the same hierarchy level as the currently selected model element.</li>
<li><i>Show selected sub-model</i>: The currently selected sub-model and its entire offspring is shown.</li>
</ul>
</li>
</ul>
<p>The following <i>column filters</i> can be used to restrict the set of annotations that is shown in the view:</p>
<ul>
<li><i>Filter annotations name</i>: only annotations are shown whose name matches the filter string.</li>
<li><i>Filter annotation type</i>: either all annotation types, or only annotations of the selected type are shown.</li>
</ul>
</div>
<script src="../layout/jsscript/topBtn.js"></script>
<script src="../layout/jsscript/submenuScript.js"></script>
<div class="footer">
<p>
&copy; 2020 <a href="https://www.fortiss.org/">fortiss GmbH</a> &nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/publications/software/autofocus-3#c2007">Contact</a>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/imprint">Imprint</a>
</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Documentation of the Model Markers View. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>On-the-fly Checks</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<div class="dropdown">
<a href="../getting_started.html" style="padding:0;">
<button class="btn" id="hamburger" onclick="javascript:window.location.href='../getting_started.html'">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
</a>
<div class="dropdown-content">
<button class="dropdown-btn">Getting Started<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Resources for Users<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href=".././managing_projects.html">Managing AutoFOCUS3 Projects</a>
<a href=".././examples.MainPage.html">Examples</a>
<a href=".././tipsAndTricks.html">Tips &amp; Tricks</a>
<a href=".././af3_faq.html">FAQs</a>
</div>
<a href=".././rcphelp.gettingstarted.MainPage.html">Resources for Developers</a>
<a href=".././rcphelp.gettingstarted.MainPage.html">Contact</a>
</div>
<button class="dropdown-btn">Requirements Engineering<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../requirements/MIRA.requirements_analysis.html"> Requirements Analysis Node</a>
<a href="../requirements/MIRA.glossary.html">Glossary</a>
<a href="../requirements/MIRA.requirements.html">Requirements</a>
</div>
<button class="dropdown-btn">Modeling and Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="model_element_attributes.html" >Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="refactoring.html">Refactoring</a>
<a style="background-color:#f2f2f2;">On-the-fly Checks</a>
<button class="dropdown-btn">Behavior Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="code_specification.html">Code Specification</a>
<a href="state_automaton.html">State Automata</a>
<a href="hierarchical_state_automaton.html">Hierarchical State Automata</a>
<a href="mode_automaton.html"> Mode Automata</a>
</div>
<button class="dropdown-btn">Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="simulation_with_af3.html">Simulation</a>
<a href="operatorpanels.html">Operator Panels</a>
<a href="operatorpanels_advanced.html">Advanced Operator Panels</a>
<a href="cosimulation_with_af3.html"> Co-Simulation and FMI Support</a>
</div>
</div>
<button class="dropdown-btn">Deployment and Code Generation<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Modeling Technical Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture.html">Platform Architecture</a>
<button class="dropdown-btn">Supported Platform Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture_generic.html">Generic Platform Architecture</a>
<a href="../ta/platform_architecture_hierarchical.html">Hierarchical Platform Architecture</a>
<a href="../ta/platform_architecture_raspberrypi.html">RaspberryPi Platform Architecture</a>
</div>
<a href="../ta/task_architecture.html">Task Architecture</a>
<a href="../ta/partition_architecture.html"> Partition Architecture</a>
<a href="../ta/allocations.html"> Deployments/Allocations</a>
<a href="../ta/system_schedule.html"> System Schedule</a>
</div>
<a href="../ta/code_generation.html">Code Generation</a>
</div>
<button class="dropdown-btn">Design Space Exploration (DSE)<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../dse/dse_perspective.html">DSE Perspective Overview</a>
<a href="../dse/dse_dashboard.html">DSE Dashboard</a>
<a href="../dse/constraints.html">Constraint Modeling</a>
<a href="../dse/objectives.html">Objective Modeling</a>
<a href="../dse/synthesis.html">Deployment/Schedule Synthesis (Exploration)</a>
<a href="../dse/visualization.html">Solution Visualization</a>
</div>
<button class="dropdown-btn">Assurance Case Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../assuranceCases/creation.html">Modeling GSN-based Assurance Cases</a>
<a href="../assuranceCases/assessment.html">Quantitative Assessment of Assurance Cases</a>
<a href="../assuranceCases/maintenance.html">Assurance Case Maintenance</a>
</div>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'refactoring.html' Documentation Problem!&body= Dear AutoFOCUS3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</div>
</div>
<div class="box">
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h1>On-the-fly Checks</h1>
<p>An essential aspect of AutoFOCUS is the <i>early detection of design mistakes</i>.
This is achieved by running permanently in the background various checks on your project.
Examples of such checks are extremely diversified in AutoFOCUS:
<ul>
<li>Completeness of provided information</li>
<li>Type checking</li>
<li>Syntactic error</li>
<li>Causality checks</li>
</ul>
</p>
<h3>Basics</h3>
<p>When a check fails, an "alarm" icon is shown on the corresponding model element in the model navigator and in the editor(s) displaying this element.</p>
<img src="./pictures/failedConstraint.png" style='height: auto; width: 100%; object-fit: contain'/>
<p>For some checks which are considered of less importance a yellow warning sign is shown instead of a cross:</p>
<img src="./pictures/warningConstraint2.png"/>
<h3>On-save checks</h3>
<p>
Checks are done as follows:
<ul>
<li>checks are run when saving the project</li>
<li>all checks are re-run every time the project is saved</li>
</ul>
</p>
<p> checks are permanently gathered in a summary called "Model Markers" which is normally on bottom left part of AF3.
You can filter out check results by type (failure, warning, information, etc.) by clicking the corresponding icon above the table.
However you cannot filter out results on a per-project basis: all errors of all projects are shown.</p>
<img src="./pictures/ModelMarkers1.png"/>
</div>
<script src="../layout/jsscript/topBtn.js">
</script>
<script src="../layout/jsscript/submenuScript.js">
</script>
<div class="footer">
<p>
&copy; 2020 <a href="https://www.fortiss.org/">fortiss GmbH</a> &nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/publications/software/autofocus-3#c2007">Contact</a>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/imprint">Imprint</a>
</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Documentation of Operator Panels. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Operator Panels: Interaction with the Environment</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<div class="dropdown">
<a href="../getting_started.html" style="padding:0;">
<button class="btn" id="hamburger" onclick="javascript:window.location.href='../getting_started.html'">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
</a>
<div class="dropdown-content">
<button class="dropdown-btn">Getting Started<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Resources for Users<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href=".././managing_projects.html">Managing AutoFOCUS3 Projects</a>
<a href=".././examples.MainPage.html">Examples</a>
<a href=".././tipsAndTricks.html">Tips &amp; Tricks</a>
<a href=".././af3_faq.html">FAQs</a>
</div>
<a href=".././rcphelp.gettingstarted.MainPage.html">Resources for Developers</a>
<a href=".././rcphelp.gettingstarted.MainPage.html">Contact</a>
</div>
<button class="dropdown-btn">Requirements Engineering<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../requirements/MIRA.requirements_analysis.html"> Requirements Analysis Node</a>
<a href="../requirements/MIRA.glossary.html">Glossary</a>
<a href="../requirements/MIRA.requirements.html">Requirements</a>
</div>
<button class="dropdown-btn">Modeling and Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="model_element_attributes.html" >Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
<button class="dropdown-btn">Behavior Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="code_specification.html">Code Specification</a>
<a href="state_automaton.html">State Automata</a>
<a href="hierarchical_state_automaton.html">Hierarchical State Automata</a>
<a href="mode_automaton.html"> Mode Automata</a>
</div>
<button class="dropdown-btn">Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="simulation_with_af3.html">Simulation</a>
<a style="background-color:#f2f2f2;">Operator Panels</a>
<a href="operatorpanels_advanced.html">Advanced Operator Panels</a>
<a href="cosimulation_with_af3.html"> Co-Simulation and FMI Support</a>
</div>
</div>
<button class="dropdown-btn">Deployment and Code Generation<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Modeling Technical Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture.html">Platform Architecture</a>
<button class="dropdown-btn">Supported Platform Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture_generic.html">Generic Platform Architecture</a>
<a href="../ta/platform_architecture_hierarchical.html">Hierarchical Platform Architecture</a>
<a href="../ta/platform_architecture_raspberrypi.html">RaspberryPi Platform Architecture</a>
</div>
<a href="../ta/task_architecture.html">Task Architecture</a>
<a href="../ta/partition_architecture.html"> Partition Architecture</a>
<a href="../ta/allocations.html"> Deployments/Allocations</a>
<a href="../ta/system_schedule.html"> System Schedule</a>
</div>
<a href="../ta/code_generation.html">Code Generation</a>
</div>
<button class="dropdown-btn">Design Space Exploration (DSE)<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../dse/dse_perspective.html">DSE Perspective Overview</a>
<a href="../dse/dse_dashboard.html">DSE Dashboard</a>
<a href="../dse/constraints.html">Constraint Modeling</a>
<a href="../dse/objectives.html">Objective Modeling</a>
<a href="../dse/synthesis.html">Deployment/Schedule Synthesis (Exploration)</a>
<a href="../dse/visualization.html">Solution Visualization</a>
</div>
<button class="dropdown-btn">Assurance Case Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../assuranceCases/creation.html">Modeling GSN-based Assurance Cases</a>
<a href="../assuranceCases/assessment.html">Quantitative Assessment of Assurance Cases</a>
<a href="../assuranceCases/maintenance.html">Assurance Case Maintenance</a>
</div>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'operatorpanels.html' Documentation Problem!&body= Dear AutoFOCUS3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</div>
</div>
<div class="box">
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h1>Operator Panels: Interaction with the Environment</h1>
<p>The following sections discuss how to create <i>Operator Panel Specification</i> to allow the user to interact with the environment.</p>
<h3>Creating an Operator Panel Specification</h3>
<p> In order to create an Operator Panel you first have to create an appropriate component to contain it.
In most cases it is ideal to create the enclosing component next to your actual model and then connect this component's outputs to your model's inputs and vice versa.</p>
<img src ="./pictures/op-compcreation.png"/>
<p> Afterwards right click on the newly created component in the model tree on the left and add an "Operator Panel".</p>
<img src ="./pictures/op-speccreation.png"/>
<br/>
<h3>Populating the Operator Panel with items</h3>
<p>Once you have added an operator panel to your component and opened it, you may drag & drop an item from the Model Elements View on the right.
Place and size the items to your needs and use labels to annotate your widgets. Aside from buttons these will be the only text displayed later during simulation.</p>
<p> There are two type of operator panel items:
<UL>
<LI><i>Input Operator Panel Items:</i> These items display data that is input data to the enclosing component, which in general is output data from your model.</li>
<LI><i>Output Operator Panel Items:</i> These items create output from the enclosing component that can be input to your model.</li>
</UL>
</p>
<h3>Push Button</h3>
<img src ="./pictures/op-pushbtneditor.png"/>
&nbsp;
<img src ="./pictures/op-pushbtnsim.png"/>
<p>In the property section you can enter the text displayed on the button using the comments text field. More importantly you can enter one or multiple outputs to be performed
upon button selection. In all other times the output assigned will be <code>NoVal</code>.</p>
<h3>Toggle Button</h3>
<img src ="./pictures/op-togglebtneditor.png"/>
&nbsp;
<img src ="./pictures/op-togglebtnsim.png"/>
<p>The property section of the toggle button allows entering two output patterns which are performed on selection or deselection respectiveley.</p>
<p>The state behavior flag unchecked causes
these outputs to be performed only once upon de-/selection and in all other times <tt>NoVal</tt> will be assigned. If the state behavior is checked the appropriate output is held until
the user toggles the button and the other pattern is performed and held.</p>
<h3>Term Input</h3>
<img src ="./pictures/op-iterminputeditor.png"/>
&nbsp;
<img src ="./pictures/op-iterminputsim.png"/>
<p>The term input item offers a text field to specify input during simulation.
The user's input is evaluated as an expression term, e.g., Present() or 5, and assigned as an output port value.
The type of the expression and the output pattern are specified when defining the item in the operator panel editor.
The variable <code>_this</code> holds the value of the text field and can be assigned the port directly
or as part of a more complex output pattern.</p>
<p> Say the specified type is <tt>int</tt> then the following output pattern would be possible:</p>
<tt>port1 = _this; port2 = _this * 2; port3 = _this / 3</tt>
<h3>Color Display</h3>
<img src ="./pictures/op-colordisplayeditor.png" style='height: auto; width: 100%; object-fit: contain'/>
&nbsp;
<img src ="./pictures/op-colordisplaysim.png"/>
<p>This item allows you to assign colors to certain input patterns. Switch to the <i>Reactions</i> tab inside the property section and add lines by clicking the Add button.
In the guards column you can specify the input pattern and in the color column you can open the system color picker.</p>
<p>Use the Up and Down buttons to rearrange multiple rows as the input patterns are evaluated top down and the first matching pattern's color will be displayed.</p>
<h3>Text Display</h3>
<img src ="./pictures/op-textdisplayeditor.png"/>
&nbsp;
<img src ="./pictures/op-textdisplaysim.png"/>
<p>This item allows you to textually display output data. Multiple patterns can be entered using the Reactions tab in the property section and again mind the order of your patterns as they will
be evaluated top down.</p>
<p>For simply displaying a port's value leave blank the guard column and enter the port's name in the Item input column.</p>
<p>But more complex assignments - even taking multiple ports into account - are possible as well. For a port of type <tt>int</tt> the following set of guards and item inputs would be possible:
<table>
<tr>
<td><i>Guard</i></td>
<td> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td><i>Item input</i></td>
</tr>
<tr>
<td>port &gt;0 &amp;&amp; port &lt; 10</td>
<td> &nbsp; </td>
<td>port</td>
</tr>
<tr>
<td>port &ge; 10 &amp;&amp; port &lt; 100</td>
<td> &nbsp; </td>
<td>port / 10</td>
</tr>
<tr>
<td>port &ge; 100 &amp;&amp; port &lt; 1000</td>
<td> &nbsp; </td>
<td>port / 100</td>
</tr>
</table>
</p>
<h3>Using the Operator Panel in a simulation</h3>
<p>Switch to a new simulation and unfold the tree until you see the enclosing component with the operator panel icon. You can either double click or use the context menu to open the operator panel.</p>
<img src ="./pictures/op-opensimview.png"/>
<p>Now you can either run or step through your simulation, alter your model's inputs and observe its behavior.</p>
<img src ="./pictures/op-simview.png"/>
</div>
<script src="../layout/jsscript/topBtn.js"></script>
<script src="../layout/jsscript/submenuScript.js"></script>
<div class="footer">
<p>
&copy; 2020 <a href="https://www.fortiss.org/">fortiss GmbH</a> &nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/publications/software/autofocus-3#c2007">Contact</a>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/imprint">Imprint</a>
</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Documentation of advanced Operator Panel items. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Advanced OperatorPanel Items</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<div class="dropdown">
<a href="../getting_started.html" style="padding:0;">
<button class="btn" id="hamburger" onclick="javascript:window.location.href='../getting_started.html'">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
</a>
<div class="dropdown-content">
<button class="dropdown-btn">Getting Started<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Resources for Users<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href=".././managing_projects.html">Managing AutoFOCUS3 Projects</a>
<a href=".././examples.MainPage.html">Examples</a>
<a href=".././tipsAndTricks.html">Tips &amp; Tricks</a>
<a href=".././af3_faq.html">FAQs</a>
</div>
<a href=".././rcphelp.gettingstarted.MainPage.html">Resources for Developers</a>
<a href=".././rcphelp.gettingstarted.MainPage.html">Contact</a>
</div>
<button class="dropdown-btn">Requirements Engineering<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../requirements/MIRA.requirements_analysis.html"> Requirements Analysis Node</a>
<a href="../requirements/MIRA.glossary.html">Glossary</a>
<a href="../requirements/MIRA.requirements.html">Requirements</a>
</div>
<button class="dropdown-btn">Modeling and Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="model_element_attributes.html" >Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
<button class="dropdown-btn">Behavior Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="code_specification.html">Code Specification</a>
<a href="state_automaton.html">State Automata</a>
<a href="hierarchical_state_automaton.html">Hierarchical State Automata</a>
<a href="mode_automaton.html"> Mode Automata</a>
</div>
<button class="dropdown-btn">Simulation<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="simulation_with_af3.html">Simulation</a>
<a href="operatorpanels.html">Operator Panels</a>
<a style="background-color:#f2f2f2;">Advanced Operator Panels</a>
<a href="cosimulation_with_af3.html"> Co-Simulation and FMI Support</a>
</div>
</div>
<button class="dropdown-btn">Deployment and Code Generation<i class="caret-down"></i></button>
<div class="dropdown-container">
<button class="dropdown-btn">Modeling Technical Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture.html">Platform Architecture</a>
<button class="dropdown-btn">Supported Platform Architectures<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../ta/platform_architecture_generic.html">Generic Platform Architecture</a>
<a href="../ta/platform_architecture_hierarchical.html">Hierarchical Platform Architecture</a>
<a href="../ta/platform_architecture_raspberrypi.html">RaspberryPi Platform Architecture</a>
</div>
<a href="../ta/task_architecture.html">Task Architecture</a>
<a href="../ta/partition_architecture.html"> Partition Architecture</a>
<a href="../ta/allocations.html"> Deployments/Allocations</a>
<a href="../ta/system_schedule.html"> System Schedule</a>
</div>
<a href="../ta/code_generation.html">Code Generation</a>
</div>
<button class="dropdown-btn">Design Space Exploration (DSE)<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../dse/dse_perspective.html">DSE Perspective Overview</a>
<a href="../dse/dse_dashboard.html">DSE Dashboard</a>
<a href="../dse/constraints.html">Constraint Modeling</a>
<a href="../dse/objectives.html">Objective Modeling</a>
<a href="../dse/synthesis.html">Deployment/Schedule Synthesis (Exploration)</a>
<a href="../dse/visualization.html">Solution Visualization</a>
</div>
<button class="dropdown-btn">Assurance Case Modeling<i class="caret-down"></i></button>
<div class="dropdown-container">
<a href="../assuranceCases/creation.html">Modeling GSN-based Assurance Cases</a>
<a href="../assuranceCases/assessment.html">Quantitative Assessment of Assurance Cases</a>
<a href="../assuranceCases/maintenance.html">Assurance Case Maintenance</a>
</div>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'operatorpanels_advanced.html' Documentation Problem!&body= Dear AutoFOCUS3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</div>
</div>
<div class="box">
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h1>Advanced Operator Panels Items</h1>
<p>The following explanations assume that you are familiar with the basics of <A HREF="operatorpanels.html">Using Operator Panels</A>.
Use the <B>Operator Panel Example</B> model from the file menu to access the model used here. This tutorial covers the following operator panel items:
<I>2D Area Input</I>, <I>2D Graph Viewer</I>, <I>3D Viewer</I></p>
<img src ="./pictures/opa-items.png"/>
<h3>2D Area Input</h3>
<P>
The 2D area input item allows to user to move a cursor within a rectangular or quadratic area
and thereby select two input values at the same time.</p>
<p>For example, this input item can be used to model a steering stick or joystick.</p>
<P>
<p>The area input works for three different types: <I>boolean</I>, <I>int</I>, and <I>double</I>.</p>
<p>The following picture shows the simulation view of the area input item for each type.</p>
<p>During the simulation the black circular cursor can be moved by <B>dragging</B> the mouse across the input area.</p>
<img src ="./pictures/opa-area-input-sim.png"/>
<p> <B>Double-clicking</B> in one of the grid areas makes the cursor jump to the minimum, center, and maximum value of the area input.<br/></p>
<p>For example, the center grid of the int type item makes the cursor jump to the (0,0) location, while the upper-right grid makes it jump to the (100, 100) location.</p>
<P>
For the boolean type item the exact location of the cursor is not relevant, only the grid is evaluated and interpreted as one of the
three possible port values: <I>false</I>, <I>NoVal</I>, or <I>true</I>.</p>
<p>For the int and double type item the exact position of the cursor is interpreted with the respective interval (-100 to 100, or 0.0 to 1.0).</p>
<P>
The following picture shows the property section of the area input item:</p>
<img src ="./pictures/opa-area-input-prop.png"/>
<p> In the <B>type</B> field the item type is specified. Enter <I>boolean</I>, <I>int</I>, or <I>double</I> here.</p>
<p>In the <B>output</B> field the port values are assigned by using the user input stored in the <I>_this_X</I> and <I>_this_Y</I> variables.
<p> Here, you can scale the input to the values required by the application or you can use the raw value and add another component to your system, which does the scaling.
Note that the display of the area input will always show the values depicted above, not the values you compute for output ports.
Therefore, the second option is possibly the more intuitive one, since the user will see his entered values directly on the output channels.</p>
<h3>2D Graph Viewer</h3>
<p>The 2D Graph Viewer output item allows to plot numeric values with an oscilloscope-like display.
The following picture shows the simulation output of the 2D graph viewer item.
Note that it may take a few seconds to initialize the OpenGL font, the first time you open this simulation view.</p>
<img src ="./pictures/opa-graph-viewer-sim.png"/>
<p> The input to this component over time is a counter from 0 to 360 degree, which is plotted in the graph view from -180 to +180.
The following picture of the property section of the 2D graph viewer item shows how this output is computed:</p>
<img src ="./pictures/opa-graph-viewer-prop.png"/>
<p> In the <B>type</B> field the item type is specified. Enter <I>boolean</I>, <I>int</I>, or <I>double</I> here.
In the <B>sample value</B> field the displayed value is computed from the input port values.<br/>
The <B>samples per grid</B> value specifies how many time steps should be displayed in each horizontal section of the grid.<br/>
The <B>levels per grid</B> value specifies how many value units should be displayed in each vertical section of the grid.<br/>
In the <B>line color</B> field you can specify the red, green, and blue color component of the line color (each value is between 0.0 and 1.0).<br/>
In the <B>number of horizontal grids</B> field you specify how many grid fields should be displayed horizontally. Adapt this value to the size you have chosen for the panel item. Enter one to get rid of the grid. <br/>
In the <B>number of vertical grids</B> field you specify how many grid fields should be displayed vertically above and below the horizontal axis. In the example there are four grids above and four below the origin line. Again, enter one to get rid of the grid.<br/>
</p>
<h3>3D Object Viewer</h3>
</p>
The 3D Object Viewer output item allows to render simple 3D scenes with imported meshes and translations, rotations, and scalings computed from input port values. The 3D Viewer comes with its own editor, which you can access by double-clicking the item in the operator panel editor or the model navigator.</p>
<p>The following picture is showing the example scene during the simulation:</p>
<img src ="./pictures/opa-scene-viewer-sim.png"/>
<p>The scene shows the following objects from the <I>Camera1</I> perspective:
<UL>
<LI>a yellow sphere in the the center</LI>
<LI>a blue sphere, which circles the yellow one in the X-Y-plane</LI>
<LI>four white cubes, which are added as references for the X-Y-plane</LI>
<LI>another white cube, which shows the location of the light source</LI>
<LI>a hint to hit the <I>TAB</I> key to cycle through the cameras</LI>
</UL>
</p>
<p> The scene contains two cameras: the static <I>Camera1</I> (looking at the origin from a small distance along the positive Y axis) and the moving <I>Camera2</I> (looking a the origin from a small distance along the X axis and pitching from -20 to 20 degree below and above the X-Y-plane).
The whole animation is driven by a counter component, which counts from zero to 360 and back to zero.
From this input value all object positions are derived using rotation object nodes (see below).
</p>
<p>The following picture shows the scene editor of the example.</p>
<img src ="./pictures/opa-scene-viewer-editor.png"/>
<p>You can drag objects and display nodes from the library view to scene editor tree.</p>
<img src ="./pictures/opa-scene-viewer-lib.png"/>
<p> Note that you have to drop <I>Cubes</I> and <I>Spheres</I> onto the <I>3D Viewer</I> tree entry, not the loaded objects entry.
You can replace the cube or sphere objects with arbitrary meshes from 3D modeling tools (like Blender) as described below.</p>
<h5>World Coordinates</h5>
<p>The whole scene uses a world coordinate system with the positive Z axis being the upward direction of cameras.
In other words the X-Y-plane is the surface of the scene world. Camera perspective is fixed to a 45 degree field of view with the near distance set to 0.5 and the far distance set to 400.0.</p>
<h5>Cameras and Lights</h5>
<p>Each scene needs a least one camera, which means that the scene graph must contain at least one <I>Camera Node</I>.
Cameras are defined by specifying an eye position and a look target location, which may not be the same (i.e. they define a vector).
If you want the camera to be translated and/or rotated, you should set either the eye or the target location to the origin and the other one unit away in either X or Y direction.
See <I>Camera0</I> in the example for moving camera with fixed target location.</p>
<img src ="./pictures/opa-scene-viewer-camera-prop.png"/>
<p> The scene viewer can be used with or without using the OpenGL light engine.
You can switch the use of light using the property section of the <I>3D Viewer</I> tree item.
There you can also set the ambient light intensity when the light is turned on.
If the light is turned off, the ambient component of the material of loaded objects will be used as color (see next section).</p>
<p>
A light source can be specified by adding a <I>Light Node</I> to the scene graph. There is a maximum of <B>8 lights</B> currently supported.
With the property section you can specify the properties of the light source, in particular, its ambient, diffuse, and specular intensities/colors as well as the attenuation coefficients.</p>
<img src ="./pictures/opa-scene-viewer-light-prop.png"/>
<p>Note that lights can also be positioned in the scene by using transformations (see below).</p>
<h5>Objects and Materials</h5>
<p>Objects in the scene are built from meshes (i.e. sets of triangles).
More complex objects can be loaded from external files using the button from the property.
See below for information on how to export proper meshes from the Blender 3D modeling tool.</p>
<img src ="./pictures/opa-scene-viewer-obj-prop.png"/>
<p>Each object's triangles are associated with a material, which describes the objects reaction to light sources.
These values are imported when the object is loaded, but can be changed in the editor.</p>
<img src ="./pictures/opa-scene-viewer-material-prop.png"/>
<p>If the light engine is disabled the ambient component of the material is used as color.
Each loaded object is instantiated in the scene graph by adding <I>Object Nodes</I>.
The property section of the object node references a loaded object by name.
Note that loaded objects can be used by multiple object nodes with each node possibly being transformed differently.
For example, the white cube is used five times in the tutorial model.</p>
<h5>Transformations: Translation, Rotation, and Scaling</h5>
<p>You can move or animate objects by specifying transformation nodes.
Each such nodes applies its transformation to the model view matrix of OpenGL before its sub-components are processed.
There transformations can be chained to allow to draw any object at any location, rotation and size.
Furthermore, the values for the transformation can be computed from input port values, which allows animation.</p>
<p> The following picture shows the rotation node properties for the blue sphere (the rotation angle is taken from the input port <I>angle</I>):</p>
<img src ="./pictures/opa-scene-viewer-rot-prop.png"/>
<p>The property sections of translations and scalings work similar.
The X, Y, and Z values can also be computed from input port values.</p>
<h5>Using Blender to replace Object meshes.</h5>
<p>
When using Blender to produce the objects to be shown in the 3D Viewer make sure you trianlges and all the normal vectors point in the right direction.
Here is an example picture from the default cube with normals pointing outward.</p>
<img src ="./pictures/opa-scene-viewer-blender-cube.png"/>
<p> Before you can import your mesh in the 3D viewer, you must export it from Blender into the Wavefront format (.OBJ object and .MTL material files).
Make sure the edges, normals and materials are exported and the mesh has triangulated faces (if you haven't done so during editing).
Here is an example of the export options that were tested for AF3.</p>
<img src ="./pictures/opa-scene-viewer-blender-export.png"/>
<p>You are advised to export your mesh with correct up axis.</p>
</div>
<script src="../layout/jsscript/topBtn.js"></script>
<script src="../layout/jsscript/submenuScript.js"></script>
<div class="footer">
<p>
&copy; 2020 <a href="https://www.fortiss.org/">fortiss GmbH</a> &nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/publications/software/autofocus-3#c2007">Contact</a>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://www.fortiss.org/en/imprint">Imprint</a>
</p>
</div>
</body>
</html>
\ No newline at end of file
org.fortiss.af3.rcp.help/html/ModandSim/pictures/CodeSpecification.png

34.1 KiB

org.fortiss.af3.rcp.help/html/ModandSim/pictures/DataStateVariables1.png

16.1 KiB

org.fortiss.af3.rcp.help/html/ModandSim/pictures/DataStateVariables2.png

16.7 KiB