~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/xcos/help/en_US/batch_functions/scicos_simulate.xml

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 * See the file ./license.txt
24
24
 -->
25
25
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="scicos_simulate">
26
 
  <refnamediv>
27
 
    <refname>scicos_simulate</refname>
28
 
    <refpurpose>Function for running xcos simulation in batch mode</refpurpose>
29
 
  </refnamediv>
30
 
  <refsynopsisdiv>
31
 
    <title>Calling Sequence</title>
32
 
    <synopsis>Info=scicos_simulate(scs_m)</synopsis>
33
 
    <synopsis>Info=scicos_simulate(scs_m,Info)</synopsis>
34
 
    <synopsis>Info=scicos_simulate(scs_m,context)</synopsis>
35
 
    <synopsis>Info=scicos_simulate(scs_m,flag)</synopsis>
36
 
    <synopsis>Info=scicos_simulate(scs_m ,Info [, context] [,flag])</synopsis>
37
 
  </refsynopsisdiv>
38
 
  <refsection id="Parameters_scicos_simulate">
39
 
    <title>Arguments</title>
40
 
    <variablelist>
41
 
      <varlistentry>
42
 
        <term>scs_m</term>: A diagram data structure (see <link linkend="scicos_diagram">scs_m structure</link>).
43
 
        <para/>
44
 
      </varlistentry>
45
 
      <varlistentry>
46
 
        <term>Info</term>: A list. It must be set to <literal>list()</literal> at
47
 
        the first call, then use output <literal>Info</literal> as
48
 
        input <literal>Info </literal>for the next
49
 
        calls. <literal>Info</literal> contains compilation and
50
 
        simulation information and is used to avoid recompilation when
51
 
        not needed.
52
 
        <para/>
53
 
      </varlistentry>
54
 
      <varlistentry>
55
 
        <term>ContextValues</term>: A Scilab struct containing values of symbolic variables
56
 
        used in the context and xcos blocks.
57
 
        <para/>
58
 
      </varlistentry>
59
 
      <varlistentry>
60
 
        <term>flag</term>: A string. If it equals 'nw' (no window),
61
 
        then blocks using graphical windows are not executed. Note
62
 
        that the list of such blocks must be updated as new blocks are
63
 
        added.
64
 
      </varlistentry>
65
 
    </variablelist>
66
 
  </refsection>
67
 
  <refsection id="Module_scicos_simulate">
68
 
    <title>Module</title>
69
 
    <itemizedlist>
70
 
      <listitem>
 
26
    <refnamediv>
 
27
        <refname>scicos_simulate</refname>
 
28
        <refpurpose>Function for running xcos simulation in batch mode</refpurpose>
 
29
    </refnamediv>
 
30
    <refsynopsisdiv>
 
31
        <title>Calling Sequence</title>
 
32
        <synopsis>Info=scicos_simulate(scs_m)</synopsis>
 
33
        <synopsis>Info=scicos_simulate(scs_m,Info)</synopsis>
 
34
        <synopsis>Info=scicos_simulate(scs_m,context)</synopsis>
 
35
        <synopsis>Info=scicos_simulate(scs_m,flag)</synopsis>
 
36
        <synopsis>Info=scicos_simulate(scs_m ,Info [, context] [,flag])</synopsis>
 
37
    </refsynopsisdiv>
 
38
    <refsection id="Parameters_scicos_simulate">
 
39
        <title>Arguments</title>
 
40
        <variablelist>
 
41
            <varlistentry>
 
42
                <term>scs_m</term>: A diagram data structure (see <link linkend="scicos_diagram">scs_m structure</link>).
 
43
                <para/>
 
44
            </varlistentry>
 
45
            <varlistentry>
 
46
                <term>Info</term>: A list. It must be set to <literal>list()</literal> at
 
47
                the first call, then use output <literal>Info</literal> as
 
48
                input <literal>Info </literal>for the next
 
49
                calls. <literal>Info</literal> contains compilation and
 
50
                simulation information and is used to avoid recompilation when
 
51
                not needed.
 
52
                <para/>
 
53
            </varlistentry>
 
54
            <varlistentry>
 
55
                <term>ContextValues</term>: A Scilab struct containing values of symbolic variables
 
56
                used in the context and xcos blocks.
 
57
                <para/>
 
58
            </varlistentry>
 
59
            <varlistentry>
 
60
                <term>flag</term>: A string. If it equals 'nw' (no window),
 
61
                then blocks using graphical windows are not executed. Note
 
62
                that the list of such blocks must be updated as new blocks are
 
63
                added.
 
64
            </varlistentry>
 
65
        </variablelist>
 
66
    </refsection>
 
67
    <refsection id="Module_scicos_simulate">
 
68
        <title>Module</title>
 
69
        <itemizedlist>
 
70
            <listitem>
 
71
                <para>
 
72
                    <link linkend="xcos">xcos</link>
 
73
                </para>
 
74
            </listitem>
 
75
        </itemizedlist>
 
76
    </refsection>
 
77
    <refsection id="Description_scicos_simulate">
 
78
        <title>Description</title>
 
79
        This function is used to simulate xcos diagrams in batch
 
80
        mode. It requires the <link linkend="scicos_diagram">scs_m
 
81
            structure
 
82
        </link>
 
83
        which can be obtained by loading in Scilab the
 
84
        <literal>.xcos</literal> file (see <link linkend="importXcosDiagram">
 
85
            importXcosDiagram
 
86
        </link>
 
87
        ).
 
88
        
71
89
        <para>
72
 
          <link linkend="xcos">xcos</link>
73
 
        </para>
74
 
      </listitem>
75
 
    </itemizedlist>
76
 
  </refsection>
77
 
  <refsection id="Description_scicos_simulate">
78
 
    <title>Description</title>
79
 
    This function is used to simulate xcos diagrams in batch
80
 
    mode. It requires the <link linkend="scicos_diagram">scs_m
81
 
      structure
82
 
    </link>
83
 
    which can be obtained by loading in Scilab the
84
 
    <literal>.xcos</literal> file (see <link linkend="importXcosDiagram">
85
 
      importXcosDiagram
86
 
    </link>
87
 
    ).
88
 
    
89
 
    <para>
90
 
      The <literal>ContextValues</literal> may be used to change
91
 
      the main parameters value set in the main diagram
92
 
      context. example: if the variable <literal>A</literal> is set to 1
93
 
      in the main context of the diagram. One can change the
94
 
      <literal>A</literal> value for a <literal>scicos_simulate</literal> simulation by setting
95
 
      <programlisting role="example"><![CDATA[
 
90
            The <literal>ContextValues</literal> may be used to change
 
91
            the main parameters value set in the main diagram
 
92
            context. example: if the variable <literal>A</literal> is set to 1
 
93
            in the main context of the diagram. One can change the
 
94
            <literal>A</literal> value for a <literal>scicos_simulate</literal> simulation by setting
 
95
            <programlisting role="example"><![CDATA[
96
96
    ContextValues.A=2 
97
97
    ]]></programlisting>
98
 
    </para>
99
 
    <para> It is also possible to use variables defined inside Scilab
100
 
      directly without using the <literal>ContextValues</literal>
101
 
      argument, but for such a use the context definition must allow
102
 
      this: example, if one wants to allow simulation use the
103
 
      <literal>A</literal> Scilab variable value for the parameter
104
 
      <literal>A</literal> the diagram context definition should contain
105
 
      <programlisting role="example"><![CDATA[
 
98
        </para>
 
99
        <para> It is also possible to use variables defined inside Scilab
 
100
            directly without using the <literal>ContextValues</literal>
 
101
            argument, but for such a use the context definition must allow
 
102
            this: example, if one wants to allow simulation use the
 
103
            <literal>A</literal> Scilab variable value for the parameter
 
104
            <literal>A</literal> the diagram context definition should contain
 
105
            <programlisting role="example"><![CDATA[
106
106
    if ~exists('A') then  A=1,end
107
107
    ]]></programlisting> Note that this second solution is
108
 
      fragile because it rely on the current value of
109
 
      <literal>A</literal> in Scilab.
110
 
    </para>
111
 
  </refsection>
112
 
  <refsection id="Filecontent_scicos_simulate">
113
 
    <title>File content</title>
114
 
    <itemizedlist>
115
 
      <listitem>
116
 
        <para> SCI/modules/scicos/macros/scicos_auto/scicos_simulate.sci</para>
117
 
      </listitem>
118
 
    </itemizedlist>
119
 
  </refsection>
120
 
  <refsection id="Examples_scicos_simulate">
121
 
    <title>Examples</title>
122
 
    The xcos diagram in <literal>SCI/modules/xcos/demos/batch_simulation.xcos</literal>
123
 
    <mediaobject>
124
 
      <imageobject>
125
 
        <imagedata align="center" fileref="../../images/batch_simulation.png"/>
126
 
      </imageobject>
127
 
    </mediaobject>
128
 
    <programlisting role="example"><![CDATA[ 
 
108
            fragile because it rely on the current value of
 
109
            <literal>A</literal> in Scilab.
 
110
        </para>
 
111
    </refsection>
 
112
    <refsection id="Filecontent_scicos_simulate">
 
113
        <title>File content</title>
 
114
        <itemizedlist>
 
115
            <listitem>
 
116
                <para> SCI/modules/scicos/macros/scicos_auto/scicos_simulate.sci</para>
 
117
            </listitem>
 
118
        </itemizedlist>
 
119
    </refsection>
 
120
    <refsection id="Examples_scicos_simulate">
 
121
        <title>Examples</title>
 
122
        The xcos diagram in <literal>SCI/modules/xcos/demos/batch_simulation.xcos</literal>
 
123
        <mediaobject>
 
124
            <imageobject>
 
125
                <imagedata align="center" fileref="../../images/batch_simulation.png"/>
 
126
            </imageobject>
 
127
        </mediaobject>
 
128
        <programlisting role="example"><![CDATA[ 
129
129
importXcosDiagram("SCI/modules/xcos/demos/batch_simulation.xcos")
130
130
 
131
131
typeof(scs_m) //The diagram data structure
149
149
counter 
150
150
 
151
151
    ]]></programlisting>
152
 
  </refsection>
153
 
  <refsection id="SeeAlso_scicos_simulate">
154
 
    <title>See Also</title>
155
 
    <simplelist type="inline">
156
 
      <member>
157
 
        <link linkend="scicos_diagram">scs_m structure</link>
158
 
      </member>
159
 
      <member>
160
 
        <link linkend="importXcosDiagram"> importXcosDiagram</link>
161
 
      </member>
162
 
      <member>
163
 
        <link linkend="scicosim">scicosim: xcos batch simulation function</link>
164
 
      </member>
165
 
      <member>
166
 
        <link linkend="xcos">xcos: Block diagram editor and GUI for the hybrid simulator</link>
167
 
      </member>
168
 
      <member>
169
 
        <link linkend="steadycos">steadycos: Finds an equilibrium state of an xcos diagram</link>
170
 
      </member>
171
 
      <member>
172
 
        <link linkend="lincos">lincos: Constructs by linearization a linear state-space model from an xcos diagram</link>
173
 
      </member>
174
 
    </simplelist>
175
 
  </refsection>
 
152
    </refsection>
 
153
    <refsection id="SeeAlso_scicos_simulate">
 
154
        <title>See Also</title>
 
155
        <simplelist type="inline">
 
156
            <member>
 
157
                <link linkend="scicos_diagram">scs_m structure</link>
 
158
            </member>
 
159
            <member>
 
160
                <link linkend="importXcosDiagram"> importXcosDiagram</link>
 
161
            </member>
 
162
            <member>
 
163
                <link linkend="scicosim">scicosim: xcos batch simulation function</link>
 
164
            </member>
 
165
            <member>
 
166
                <link linkend="xcos">xcos: Block diagram editor and GUI for the hybrid simulator</link>
 
167
            </member>
 
168
            <member>
 
169
                <link linkend="steadycos">steadycos: Finds an equilibrium state of an xcos diagram</link>
 
170
            </member>
 
171
            <member>
 
172
                <link linkend="lincos">lincos: Constructs by linearization a linear state-space model from an xcos diagram</link>
 
173
            </member>
 
174
        </simplelist>
 
175
    </refsection>
176
176
</refentry>