Initializing help system before first use

XPRDModel

  • java.lang.Object
    • com.dashoptimization.XPRDModel


  • public class XPRDModel
    extends java.lang.Object
    A model loaded onto a remote instance
    • Field Summary

      Modifier and Type Field and Description
      java.lang.String execParams
      Execution parameters.
      static int F_APPEND
      Code for opening the file in append mode (output stream).
      static int F_ERROR
      Code for error stream.
      static int F_INPUT
      Code for input stream.
      static int F_LINBUF
      Code for enabling line buffering (output stream).
      static int F_OUTPUT
      Code for output stream.
      static int RT_BREAK
      Execution status: execution interrupted on a breakpoint.
      static int RT_DETACHED
      Execution status: remote instance detached itself.
      static int RT_ERROR
      Execution status: run time error.
      static int RT_FDCLOSED
      Execution status: connection with server lost.
      static int RT_IOERR
      Execution status: I/O error.
      static int RT_LICERR
      Execution status: licensing error.
      static int RT_MATHERR
      Execution status: mathematical error.
      static int RT_NIFCT
      Execution status: execution interrupted during a native function call.
      static int RT_NOTINIT
      Execution status: model is not initialised (unloaded?).
      static int RT_NULL
      Execution status: NULL reference error.
      static int RT_OK
      Execution status: normal termination.
      static int RT_RUNNING
      Execution status: model is running.
      static int RT_STOP
      Execution status: execution interrupted.
    • Method Summary

      Modifier and Type Method and Description
      void changeStatus(XPRDSlot slot, int status)
      Called when execution finishes.
      void clearExecParams()
      Clear the execution parameters string.
      int getExecStatus()
      Get execution status.
      int getExitCode()
      Get the result of the execution of the model.
      XPRDMosel getMosel()
      Get the Mosel instance on which this model is loaded.
      int getNumber()
      Get model number.
      int getRemoteId()
      Get model remote ID.
      int getResult()
      Get the result of the execution of the model.
      boolean isLoaded()
      Check whether this model is loaded onto an instance.
      void reset()
      Reset model.
      void resetExecParam(java.lang.String name)
      Remove the value associated to an execution parameter.
      void run()
      Run the model.
      void sendEvent(int cls, double val)
      Send an event to the model during its execution.
      void setControl(java.lang.String name, java.lang.String val)
      Set a Mosel instance control parameter for the model.
      void setDefaultStream(int wmd, java.lang.String fileName)
      Set default input/output streams.
      void setExecParam(java.lang.String name, boolean value)
      Add or update the value associated to an execution parameter.
      void setExecParam(java.lang.String name, double value)
      Add or update the value associated to an execution parameter.
      void setExecParam(java.lang.String name, int value)
      Add or update the value associated to an execution parameter.
      void setExecParam(java.lang.String name, java.lang.String value)
      Add or update the value associated to an execution parameter.
      void stop()
      Interrupt execution.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isLoaded

        public boolean isLoaded()
        Check whether this model is loaded onto an instance.
        Returns:
        true if the model is loaded onto an instance
      • setExecParam

        public void setExecParam(java.lang.String name,
                                 int value)
        Add or update the value associated to an execution parameter. This routine adds or replace the assignment name=value in the execution parameter string ( execParams).
        Parameters:
        name - parameter name
        value - parameter value
      • setExecParam

        public void setExecParam(java.lang.String name,
                                 double value)
        Add or update the value associated to an execution parameter. This routine adds or replace the assignment name=value in the execution parameter string ( execParams).
        Parameters:
        name - parameter name
        value - parameter value
      • setExecParam

        public void setExecParam(java.lang.String name,
                                 boolean value)
        Add or update the value associated to an execution parameter. This routine adds or replace the assignment name=value in the execution parameter string ( execParams).
        Parameters:
        name - parameter name
        value - parameter value
      • setExecParam

        public void setExecParam(java.lang.String name,
                                 java.lang.String value)
        Add or update the value associated to an execution parameter. This routine adds or replace the assignment name=value in the execution parameter string ( execParams).
        Parameters:
        name - parameter name
        value - parameter value
      • resetExecParam

        public void resetExecParam(java.lang.String name)
        Remove the value associated to an execution parameter. This routine removes the assignment name=value from the execution parameters string ( execParams). No operation is performed if the parameter does not appear in the string.
        Parameters:
        name - parameter name
      • clearExecParams

        public void clearExecParams()
        Clear the execution parameters string.
      • run

        public void run()
                 throws java.io.IOException
        Run the model. This method starts the execution of the model. The model parameters are initialised using execParams. Execution may be interrupted by calling stop(). After this function returns, execution status may be retrieved using getExecStatus() and result can be obtained with getExitCode() ( i.e. the parameter value of the Mosel exit procedure). The object is notified when the execution terminates.
        Throws:
        java.io.IOException - in case of IO error
      • changeStatus

        public void changeStatus(XPRDSlot slot,
                                 int status)
        Called when execution finishes. This method is for internal use only.
      • stop

        public void stop()
        Interrupt execution.
      • reset

        public void reset()
        Reset model. Restore the state of the model before it was executed: all data is released, problems are cleared.
      • getNumber

        public int getNumber()
        Get model number. An order number is assigned to the model when it is loaded into memory.
        Returns:
        model number
      • getRemoteId

        public int getRemoteId()
        Get model remote ID. Model number on the remote instance.
        Returns:
        remote model number
      • getMosel

        public XPRDMosel getMosel()
        Get the Mosel instance on which this model is loaded.
        Returns:
        Mosel instance associated to this model or null if the model is not loaded.
      • getResult

        public int getResult()
        Get the result of the execution of the model. This method returns the result of the execution of a model ( i.e. the parameter value of the exit procedure) with method run().
        Returns:
        Result as an integer. If procedure exit has not been called in the model, the default value of 0 is returned.
      • getExitCode

        public int getExitCode()
        Get the result of the execution of the model. This method returns the result of the execution of a model ( i.e. the parameter value of the exit procedure) with method run().
        Returns:
        Result as an integer. If procedure exit has not been called in the model, the default value of 0 is returned.
      • getExecStatus

        public int getExecStatus()
        Get execution status. The execution status indicates whether the execution terminated normally.
        Returns:
        Execution status as an integer:
      • setDefaultStream

        public void setDefaultStream(int wmd,
                                     java.lang.String fileName)
                              throws java.io.IOException
        Set default input/output streams. This method defines the default streams that are opened when execution of the model starts. Using an empty string as the file name implies resetting to the corresponding original default stream (defined using XPRDMosel.setDefaultStream(int, java.lang.String)).
        Parameters:
        wmd - stream to be set:
        fileName - extended file name to be used for the stream.
        Throws:
        java.io.IOException - If the stream cannot be set.
        See Also:
        XPRDMosel.setDefaultStream(int, java.lang.String)
      • setControl

        public void setControl(java.lang.String name,
                               java.lang.String val)
                        throws java.io.IOException
        Set a Mosel instance control parameter for the model.
        Parameters:
        name - name of the parameter.
        val - value.
        Throws:
        java.io.IOException - If the control cannot be set (invalid name or value).
      • sendEvent

        public void sendEvent(int cls,
                              double val)
        Send an event to the model during its execution. This function has no effect if the model cannot receive events ( e.g. it is not running or does not listen to events)
        Parameters:
        cls - event class: it must be a positive value greater than 1
        val - event value as a double (real)

© 2001-2024 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.