For the extern simulation program named "ExSim", the script file "ExSim.xml" has to be created. The scripting language depends on the extern program. The user template is the xml format containing following text:
<UserTemplate>
<ScriptEngine>C:\Program Files (x86)\IronPython 2.7\ipy.exe</ScriptEngine>
<Command>"ScriptEngine" -R "ScriptFile" -B</Command>
<FileType>py</FileType>
<OpenFile>Script to open file and list all paramaters and results</OpenFile>
<SetOptions></SetOptions>
<ListParameters></ListParameters>
<ListResults></ListResults>
<StartSim>Script to open file, set parameters, start simulation and read results</StartSim>
</UserTemplate>
The <ScriptEngine> is the file path name of the extern scripting engine. <Command> is the DOS-Batch command to call the extern script engine to perform the script file with the name as ScriptFile. ScriptEgine, ScriptFile, ModelFile and ModelPath are reserved words and they will be replaced by corresponding text internally. <FileType> is the file type of the scriptfile. <OpenFile> is the script to open the model and list all parameters and results of the model. <StartSim> is the script to open the model, set parameters to the model, start simulation and reads the model results.<ListParameters> and <ListResults> should be empty.
After
the template file "ExSim.xml" is saved into system folder of OptiY (...\OptiY
GmbH\OptiY x.x\UserIntegration\ExSim.xml),
We can start OptiY and see in the menu: Insert/Simulation Model the item
ExSim of the extern simulation program. It can now insert it into OptiY.