Extern script is used to start the simulation of the extern programs by an existing script language of the operating system. Other additional elements as Input-File and Output-File are sometimes additionally required to transfer the parameters and results between the external model and OptiY . Double-click on its symbol in the workflow editor to open the property dialog of the extern script for editing:
General
Name
It is the name of the extern script. This name may be defined basically once time for the entire experiment. The script text will be saved and executed under this file name. Therefore, it is to pay attention to name-convention of the operating system.
Comment
The comment for the extern script.
Working Directory
This is the working directory to create, to store and to execute the script file on the operating system. The access rights as read and write have to be available for the user. If the directory starts with the sign "\", it will be the relative path related to the directory of its saved OptiY-File (*.opy).
Type
It declares the type of script file, which contains the text given in the script editor of the extern script: "DOS-Batch" or "PowerShell". DOS-Batch is normally set as the standard option.
Process
It declares the kind of the executing of the script. There are 2 types:
Serial The script file will be saved and executed serial. That means, the executing of the script will be exit to start the next script process.
Parallel The script file will be saved executed parallel. This is only feasible for the script type DOS-Batch, VBScript and JScript. First, subdirectories will be created for each parallel process, then all input-files and the script file will be copied into these subdirectories. The subdirectories will be defined as actual working directory to start executing of the script file. After finished all processes, the output files will be copied back to working directory of the extern script and all subdirectories with its files will be deleted.
Number of Parallel Processes
This option is visible if the process is parallel. Here, user can specify the max number of parallel executing processes. if the number is smaller than 2, the number of parallel processes depends on the optimization or DOE method and its setting parameters.
Max. Process-Time [s]
This is the max time for execution of the process in seconds. If the execution of the process is longer than the given time, the process will be killed and the next step of optimization or design of experiment can follow. Thus, user can limited the execution time of external simulation process. If "Max Process-Time" = 0, the execution time is infinite. That means, the process will be executed naturally as long as it needed. There is no time limitation for the external process and OptiY will wait until the process finish to start the next step.
Input
All inserted elements as input-file, extern script, output variables or transfer variables of the experiment are listed in the input window on the left side. Inputs to the extern script have to be selected from these elements to transfer data from OptiY to the extern simulation system. Further more, input signals can be also selected to define the computing conditions for executing of this extern script conditionally. In special case, another extern scrip can be selected to define a computing sequence in the workflow editor. Normally, working sequences are defined through arrows in the workflow editor. All input nodes for the extern script will be finished before start the executing of this extern script.
Output
All inserted elements as output-file and extern scripts are listed on the output window on the right side. The outputs for the extern script have to be selected from these elements. The executing of all output nodes will be started after finishing the executing of this extern script.
Script Editor
The script text can be input and edited here. It is frequently the commands to start the extern simulation. Regarding to the script type, the syntax should be input correctly. For example, the command "OptProblem" can be input and script type is set to "DOS-Batch" to start the program "OptProblem.exe" in a DOS-window.