<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
                         "http://docbook.org/xml/4.4/docbookx.dtd">
<chapter>
    <title>Parametric Study Component</title>
    <sect1>
        <title>Synopsis</title>
        <para>The Parametric Study Component is for running a workflow through a set of values for
            one input variable.</para>
    </sect1>
    <sect1>
        <title>Rationale</title>
        <para>The component starts at a given value and puts it into the workflow. When the workflow
            is finished, another value is given to the workflow, which is the first value plus a
            given step size. This iterates until a third given value, the upper bound, is reached.
            The resulted data can be seen if an input variable for the component is defined. </para>
    </sect1>
    <sect1>
        <title>Usage</title>
        <para>To use the parametric study component you need to define the range and the step size,
            the study will iterate over. There are two different ways to do that. Either by defining 
            the parameters pre execution or by using inputs that will define the parameters during
            execution.</para>
        <para><emphasis role="bold">Pre Execution</emphasis></para>
        <para>The settings to define the study parameters before execution can be found in the
        	properties tab of the parametric study. There is a pre-defined endpoint named Design
        	Variable which has three metadata values. By clicking on the endpoint and then on the
        	"Edit"-Button, these values may be defined.</para>
       	<para><emphasis role="bold">During Execution</emphasis></para>
        <para>At the same place where you can define the metadata values you may choose to use an
        	input for the values. If you do so, more inputs will appear that must be connected to a
        	providing output. Note that if you want to use the parametric study in a nested loop and
        	define the settings via inputs the parametric study must run in passiv mode (i. e. an
        	input to <emphasis>Inputs(to forward)</emphasis> or <emphasis>
        	Inputs(evaluation results received from loop)</emphasis> must be added).</para>
        <para>The “from” value is the start point of the iteration and will be the first value to be
            send out. After that, the step size will be added to the last sent value and be the next
            one. This will be done, until the next to be sent out value is bigger than the “to”
            value.</para>
        <para>There is an option called "Fit step size to bounds". This option takes the given step
            size, but then sets it to the nearest step size so that the upper bound is never
            overstepped but the last value will be exactly the upper bound.</para>
        <para>Note that the step size must always be positive. If the "to" value is smaller than the
            "from" value, the step size is still positive, but will decrease the steps
            internally.</para>
        <para>For all three options "from", "to" and "step size", it is possible to declare them to
            be defined from an input. For that, the "use input" checkbox must be checked. Then an
            input for the selected option will be created, which will receive the value for the
            option during the workflow execution. </para>
        <para><inlinegraphic fileref="images/component_parametricstudy_01.png" contentwidth="400"/></para>
        <para>Having these values defined, there are two possible modes for running the
            component.</para>
        <para>If you define a new dynamic endpoint in the parameters tab and connect it to other
            components, the study will send out the values subsequently. Meaning, a new value is sent out as soon as the study
            receives a response at the newly defined endpoint (except for the first value, which gets sent without the need for a response).
            This makes it possible to plot a graph when the workflow is started, because for every sent out value there is a
            corresponding incoming value.</para>
        <para><inlinegraphic fileref="images/component_parametricstudy_03.png" contentwidth="400"/></para>
        <para>The other mode is active, if no parameter was defined. In this case, all values in the
            study range are sent out in the first run of the component, so the next component will
            have all input at the same time. With this, a graph like in the first mode is not
            possible.</para>
        <para><emphasis role="bold">Output</emphasis></para>
        <para>In a running workflow, you are able to see the result from a workflow run by double
            clicking the component in the Parametric Study view. There you can plot a graph with the
            results or see them in a table in the data tab.</para>
        <para>For help concerning nested and fault-tolerant loop settings, see the general section "Workflows" in the user guide.</para>
    </sect1>
</chapter>
