com.altair.hwm.comm.loadsubmission.jobservices
Class HWMOptistructJob

java.lang.Object
  extended by com.altair.hwm.comm.loadsubmission.jobservices.HWMOptistructJob
All Implemented Interfaces:
IHWMJob, java.io.Externalizable, java.io.Serializable

public class HWMOptistructJob
extends java.lang.Object
implements IHWMJob, java.io.Externalizable

Title: HWMOptistructJob Description: Class for Optistruct Job Has methods to update a job id , job status and set command parameters for running this job from a batch file. Supports master deck and include files. Knows about the output directory where results for this job are stored Company: Altair Engineering, Inc.

See Also:
Serialized Form

Constructor Summary
HWMOptistructJob()
          HWMOptistructJob - constructor to create a new optistruct job
 
Method Summary
 void AddFile(java.io.File solverDeckFile)
          Adds a file to this job First file is usually the deck file
 void AddJobParams(java.util.Vector vectJobParams)
          Adds a vector of job related parameters for the job.
 void AddPostProcessingParams(java.util.Vector vectPostParams)
          Adds a vector of post processor parameters for the job.
 void AddSolverParams(java.util.Vector vectSolverParams)
          Adds a vector of solver parameters for the job.
 java.util.Vector GetFiles()
          Gets deck and include files managed by this job
 java.lang.String GetJobCommand()
          GetJobCommand - gets the command string to be executed
 java.lang.String GetJobID()
          GetJobID - returns a String that is the jobID
 int GetJobIdAsInt()
          GetJobID - get the id of the job
 java.lang.String GetJobOutputDir()
          GetJobOutputDir - get full path to output directory
 IHWMJobStatus GetJobStatus()
          GetJobStatus - Gets the job status stored on this job
 java.lang.String GetName()
          Gets the name of the job.
 java.lang.String GetSolverPath()
          GetSolverPath - get the solver path for this job
 void readExternal(java.io.ObjectInput in)
          read the job object from a binary file
 void RemoveFile(java.io.File solverDeckFile)
          This method removes a solver deck file to a job.
 void RemoveJobParams(java.util.Vector vectJobParams)
          Removes a vector of job related parameters for the job.
 void RemovePostProcessingParams(java.util.Vector vectPostParams)
          Removes a vector of post processor parameters for the job.
 void RemoveSolverParams(java.util.Vector vectSolverParams)
          Removes a vector of solver parameters from the job.
 void SetAsMaster(java.io.File solverDeckFile)
          Sets the specified deck file as the master file.
 void SetCommandParameters()
          Set the command parameters on the job
 void SetJobID(java.lang.String strJobID)
          SetJobID - sets job id as a int on the job object
 void SetName(java.lang.String strName)
          Sets the name of the Job instance.
 void SetOutputDir(java.io.File jobDir)
          Set the results output directory for this job
 void SetSolverPath(java.lang.String solverpath)
          SetSolverPath - set the full path to optistruct Solver
 void UpdateJobStatus(IHWMJobStatus jobStatus)
          UpdateJobStatus - updates the status on this job
 void writeExternal(java.io.ObjectOutput out)
          Writes the job object to a binary file Called by HWMProcessOutputReader
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HWMOptistructJob

public HWMOptistructJob()
HWMOptistructJob - constructor to create a new optistruct job

Method Detail

GetJobIdAsInt

public int GetJobIdAsInt()
GetJobID - get the id of the job

Parameters:
-

GetJobOutputDir

public java.lang.String GetJobOutputDir()
GetJobOutputDir - get full path to output directory

Returns:
String - full path to output directory under Results folder

SetJobID

public void SetJobID(java.lang.String strJobID)
SetJobID - sets job id as a int on the job object

Parameters:
strJobID - - a job ID as String

SetOutputDir

public void SetOutputDir(java.io.File jobDir)
Set the results output directory for this job

Parameters:
jobDir - - job output directory where results are to be stored

GetJobID

public java.lang.String GetJobID()
GetJobID - returns a String that is the jobID

Specified by:
GetJobID in interface IHWMJob
Returns:
strJobID - String which is the job ID

AddFile

public void AddFile(java.io.File solverDeckFile)
Adds a file to this job First file is usually the deck file

Specified by:
AddFile in interface IHWMJob
Parameters:
solverDeckFile -

GetFiles

public java.util.Vector GetFiles()
Gets deck and include files managed by this job

Returns:
m_Files - Vector of deck and include files

RemoveFile

public void RemoveFile(java.io.File solverDeckFile)
                throws java.lang.Exception
Description copied from interface: IHWMJob
This method removes a solver deck file to a job. Removing multiple files from a job definition is to be allowed.

Specified by:
RemoveFile in interface IHWMJob
Parameters:
solverDeckFile - The solver deck file to be removed from the job.
Throws:
java.lang.Exception

SetAsMaster

public void SetAsMaster(java.io.File solverDeckFile)
                 throws java.lang.Exception
Description copied from interface: IHWMJob
Sets the specified deck file as the master file.

Specified by:
SetAsMaster in interface IHWMJob
Parameters:
solverDeckFile - The specified deck file to be set as the master file.
Throws:
java.lang.Exception

AddSolverParams

public void AddSolverParams(java.util.Vector vectSolverParams)
                     throws java.lang.Exception
Description copied from interface: IHWMJob
Adds a vector of solver parameters for the job. Ex of solver params : adding subroutine nams etc.

Specified by:
AddSolverParams in interface IHWMJob
Parameters:
vectSolverParams - A vector of solver parameters to be added for the job.
Throws:
java.lang.Exception

RemoveSolverParams

public void RemoveSolverParams(java.util.Vector vectSolverParams)
                        throws java.lang.Exception
Description copied from interface: IHWMJob
Removes a vector of solver parameters from the job. Ex of solver params : adding subroutine nams etc.

Specified by:
RemoveSolverParams in interface IHWMJob
Parameters:
vectSolverParams - A vector of solver parameters to be removed from the job.
Throws:
java.lang.Exception

AddJobParams

public void AddJobParams(java.util.Vector vectJobParams)
                  throws java.lang.Exception
Description copied from interface: IHWMJob
Adds a vector of job related parameters for the job. Ex of a job related params: memory required, solver version etc

Specified by:
AddJobParams in interface IHWMJob
Parameters:
vectJobParams - A vector of job parameters to be added for the job.
Throws:
java.lang.Exception

RemoveJobParams

public void RemoveJobParams(java.util.Vector vectJobParams)
                     throws java.lang.Exception
Description copied from interface: IHWMJob
Removes a vector of job related parameters for the job. Ex of a job related params: memory required, solver version etc

Specified by:
RemoveJobParams in interface IHWMJob
Parameters:
vectJobParams - A vector of job parameters to be removed from the job.
Throws:
java.lang.Exception

AddPostProcessingParams

public void AddPostProcessingParams(java.util.Vector vectPostParams)
                             throws java.lang.Exception
Description copied from interface: IHWMJob
Adds a vector of post processor parameters for the job. ex: some arguments or an executable which will take existing solver output file and create another set of files.

Specified by:
AddPostProcessingParams in interface IHWMJob
Parameters:
vectPostParams - A vector of post processor parameters to be added for the job.
Throws:
java.lang.Exception

RemovePostProcessingParams

public void RemovePostProcessingParams(java.util.Vector vectPostParams)
                                throws java.lang.Exception
Description copied from interface: IHWMJob
Removes a vector of post processor parameters for the job. ex: some arguments or an executable which will take existing solver output file and create another set of files.

Specified by:
RemovePostProcessingParams in interface IHWMJob
Parameters:
vectPostParams - A vector of post processor parameters to be removed from the job.
Throws:
java.lang.Exception

GetJobStatus

public IHWMJobStatus GetJobStatus()
                           throws java.lang.Exception
GetJobStatus - Gets the job status stored on this job

Specified by:
GetJobStatus in interface IHWMJob
Returns:
IHWMJobStatus
Throws:
java.lang.Exception

UpdateJobStatus

public void UpdateJobStatus(IHWMJobStatus jobStatus)
UpdateJobStatus - updates the status on this job

Parameters:
jobStatus -

SetName

public void SetName(java.lang.String strName)
             throws java.lang.Exception
Description copied from interface: IHWMJob
Sets the name of the Job instance.

Specified by:
SetName in interface IHWMJob
Parameters:
strName - The name of the job to be set.
Throws:
java.lang.Exception

GetName

public java.lang.String GetName()
                         throws java.lang.Exception
Description copied from interface: IHWMJob
Gets the name of the job.

Specified by:
GetName in interface IHWMJob
Returns:
A string representing the name of the job.
Throws:
java.lang.Exception

SetCommandParameters

public void SetCommandParameters()
                          throws java.lang.Exception
Set the command parameters on the job

Parameters:
strOptistructPath - - full path to optistruct
strDeckFile - - the deck file to be solved
outFile - - output directory where results are stored
Throws:
java.lang.Exception

GetJobCommand

public java.lang.String GetJobCommand()
GetJobCommand - gets the command string to be executed

Returns:
String job command name

SetSolverPath

public void SetSolverPath(java.lang.String solverpath)
SetSolverPath - set the full path to optistruct Solver

Parameters:
path - - path to batch file that invokes the solver

GetSolverPath

public java.lang.String GetSolverPath()
GetSolverPath - get the solver path for this job

Returns:

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Writes the job object to a binary file Called by HWMProcessOutputReader

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out -
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
read the job object from a binary file

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
in -
Throws:
java.io.IOException
java.lang.ClassNotFoundException