]> SALOME platform Git repositories - modules/yacs.git/blob - src/yacsloader/samples/optimizer_sync_py.xml
Salome HOME
Synchronize adm files
[modules/yacs.git] / src / yacsloader / samples / optimizer_sync_py.xml
1 <?xml version='1.0' encoding='iso-8859-1' ?>
2 <!--
3   Copyright (C) 2006-2014  CEA/DEN, EDF R&D
4
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9
10   This library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, write to the Free Software
17   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18
19   See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20
21 -->
22 <proc name="newSchema_1">
23    <property name="DefaultStudyID" value="1"/>
24    <type name="string" kind="string"/>
25    <struct name="Engines/dataref">
26       <member name="ref" type="string"/>
27    </struct>
28    <type name="bool" kind="bool"/>
29    <sequence name="boolvec" content="bool"/>
30    <type name="double" kind="double"/>
31    <sequence name="dblevec" content="double"/>
32    <objref name="file" id="file"/>
33    <type name="int" kind="int"/>
34    <sequence name="intvec" content="int"/>
35    <objref name="pyobj" id="python:obj:1.0"/>
36    <sequence name="stringvec" content="string"/>
37    <container name="DefaultContainer">
38       <property name="container_name" value="FactoryServer"/>
39       <property name="name" value="localhost"/>
40    </container>
41    <optimizer name="OptimizerLoop0" nbranch="4" lib="algosyncexample.py" entry="myalgosync">
42       <inline name="PyFunction0">
43          <function name="myfunc">
44             <code><![CDATA[def myfunc(inputValue):
45     outputValue = int(inputValue*3+5)
46     print "Received", inputValue, ", returning", outputValue
47     return outputValue
48 ]]></code>
49          </function>
50          <inport name="inputValue" type="double"/>
51          <outport name="outputValue" type="int"/>
52       </inline>
53    </optimizer>
54    <datalink control="false">
55       <fromnode>OptimizerLoop0</fromnode> <fromport>evalSamples</fromport>
56       <tonode>OptimizerLoop0.PyFunction0</tonode> <toport>inputValue</toport>
57    </datalink>
58    <datalink control="false">
59       <fromnode>OptimizerLoop0.PyFunction0</fromnode> <fromport>outputValue</fromport>
60       <tonode>OptimizerLoop0</tonode> <toport>evalResults</toport>
61    </datalink>
62    <parameter>
63       <tonode>OptimizerLoop0</tonode><toport>nbBranches</toport>
64       <value><int>4</int></value>
65    </parameter>
66    <presentation name="OptimizerLoop0.PyFunction0" x="6" y="111.5" width="158" height="63" expanded="1" expx="6" expy="111.5" expWidth="158" expHeight="63" shownState="0"/>
67    <presentation name="OptimizerLoop0" x="6" y="34" width="168" height="178.5" expanded="1" expx="6" expy="34" expWidth="168" expHeight="178.5" shownState="0"/>
68    <presentation name="__ROOT__" x="0" y="0" width="178" height="216.5" expanded="1" expx="0" expy="0" expWidth="178" expHeight="216.5" shownState="0"/>
69 </proc>