Salome HOME
[EDF30399] : Expose replay-dir parameter to define directory holding scenarii in...
[modules/yacs.git] / src / yacsloader / samples / optimizer_sync_py.xml
index 3da9d59c6589ec4708d120cdbe4588ce62a7f815..bd20dc81cac90333900efe6d368984b3e69829de 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='iso-8859-1' ?>
 <!--
-  Copyright (C) 2006-2014  CEA/DEN, EDF R&D
+  Copyright (C) 2006-2019  CEA/DEN, EDF R&D
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -20,7 +20,6 @@
 
 -->
 <proc name="newSchema_1">
-   <property name="DefaultStudyID" value="1"/>
    <type name="string" kind="string"/>
    <struct name="Engines/dataref">
       <member name="ref" type="string"/>
    <objref name="file" id="file"/>
    <type name="int" kind="int"/>
    <sequence name="intvec" content="int"/>
+   <struct name="stringpair">
+      <member name="name" type="string"/>
+      <member name="value" type="string"/>
+   </struct>
+   <sequence name="propvec" content="stringpair"/>
    <objref name="pyobj" id="python:obj:1.0"/>
+   <sequence name="seqboolvec" content="boolvec"/>
+   <sequence name="seqdblevec" content="dblevec"/>
+   <sequence name="seqintvec" content="intvec"/>
    <sequence name="stringvec" content="string"/>
+   <sequence name="seqstringvec" content="stringvec"/>
    <container name="DefaultContainer">
       <property name="container_name" value="FactoryServer"/>
       <property name="name" value="localhost"/>
    </container>
-   <optimizer name="OptimizerLoop0" nbranch="4" lib="algosyncexample.py" entry="myalgosync">
-      <inline name="PyFunction0">
-         <function name="myfunc">
-            <code><![CDATA[def myfunc(inputValue):
-    outputValue = int(inputValue*3+5)
-    print "Received", inputValue, ", returning", outputValue
-    return outputValue
-]]></code>
-         </function>
-         <inport name="inputValue" type="double"/>
-         <outport name="outputValue" type="int"/>
+   <optimizer name="OptimizerLoop1" nbranch="1" lib="algosyncexample.py" entry="myalgosync">
+      <inline name="PyScript7">
+         <script><code><![CDATA[o9 = int(i8)
+print("traitement:", i8)
+]]></code></script>
+         <load container="DefaultContainer"/>
+         <inport name="i8" type="double"/>
+         <outport name="o9" type="int"/>
       </inline>
    </optimizer>
+   <datanode name="DataIn3">
+      <parameter name="o4" type="int">
+         <value><int>5</int></value>
+      </parameter>
+   </datanode>
+   <outnode name="OutNode5">
+      <parameter name="i6" type="int"/>
+   </outnode>
+   <control> <fromnode>OptimizerLoop1</fromnode> <tonode>OutNode5</tonode> </control>
+   <control> <fromnode>DataIn3</fromnode> <tonode>OptimizerLoop1</tonode> </control>
+   <datalink control="false">
+      <fromnode>OptimizerLoop1</fromnode> <fromport>algoResults</fromport>
+      <tonode>OutNode5</tonode> <toport>i6</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>OptimizerLoop1</fromnode> <fromport>evalSamples</fromport>
+      <tonode>OptimizerLoop1.PyScript7</tonode> <toport>i8</toport>
+   </datalink>
    <datalink control="false">
-      <fromnode>OptimizerLoop0</fromnode> <fromport>evalSamples</fromport>
-      <tonode>OptimizerLoop0.PyFunction0</tonode> <toport>inputValue</toport>
+      <fromnode>DataIn3</fromnode> <fromport>o4</fromport>
+      <tonode>OptimizerLoop1</tonode> <toport>algoInit</toport>
    </datalink>
    <datalink control="false">
-      <fromnode>OptimizerLoop0.PyFunction0</fromnode> <fromport>outputValue</fromport>
-      <tonode>OptimizerLoop0</tonode> <toport>evalResults</toport>
+      <fromnode>OptimizerLoop1.PyScript7</fromnode> <fromport>o9</fromport>
+      <tonode>OptimizerLoop1</tonode> <toport>evalResults</toport>
    </datalink>
    <parameter>
-      <tonode>OptimizerLoop0</tonode><toport>nbBranches</toport>
-      <value><int>4</int></value>
+      <tonode>OptimizerLoop1</tonode><toport>nbBranches</toport>
+      <value><int>1</int></value>
    </parameter>
-   <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"/>
-   <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"/>
-   <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"/>
+   <presentation name="DataIn3" x="11" y="86" width="158" height="63" expanded="1" expx="11" expy="86" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="OptimizerLoop1" x="238.5" y="83.5" width="204.5" height="216" expanded="1" expx="238.5" expy="83.5" expWidth="204.5" expHeight="216" shownState="0"/>
+   <presentation name="OutNode5" x="488.5" y="84" width="158" height="63" expanded="1" expx="488.5" expy="84" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="OptimizerLoop1.PyScript7" x="42.5" y="149" width="158" height="63" expanded="1" expx="42.5" expy="149" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="__ROOT__" x="0" y="0" width="650.5" height="303.5" expanded="1" expx="0" expy="0" expWidth="650.5" expHeight="303.5" shownState="0"/>
 </proc>