Global Variables for Script, Prologue, and Epilogue

In addition to the standard parameters, Isight provides special variables you can use in the Script component, the Prologue and Epilogue script of any component, or the Subflow Prologue and Subflow Epilogue scripts of any process component.

The following special variables provided by Isight cannot be renamed or deleted:

  • jobLog. Used to log messages to the Isight job log. The standard usage is:

    jobLog.logWarn("Warning - things are going wrong!");
    

    Note: The Jython print statement is sent to the jobLog variable as an “Info” level log message. The DynamicJava system print streams System.out and System.err are not reliably visible anywhere and should not be used. Always use jobLog instead.

  • localDir. A java.io.File that points to the component’s working directory. Any temporary files needed by the script should be written to this directory. A useful technique for creating a temporary file is as follows (in DynamicJava syntax):

    stream = new FileOutputStream(new File(localDir, 
    "temp.dat"));
    stream.write(myData);
    stream.close();
    
  • runtimeEnv. The complete run-time environment of the component. This variable can be used to access the JobID, UserID, etc. For a full list of the methods on this object, open the RuntimeEnv.html javadoc file from the main.html page in the following directory:

    <Isight_install_directory>/Doc/docs/api/_index

  • gradedRun. A SIMULIA Execution Engine GradeableRun object that is used with Subflow Epilogue scripts only. This object’s methods may be called to check how Isight rates each subflow run in relation to the process component’s Formulation: the subflow run’s grade, feasible or infeasible (or possibly unusable); the calculated Objective value (or Objective+Penalty value, for infeasible runs); and whether this subflow run is the best run seen so far.