psdi.app.jobplan.virtual

Class Simulation

    • Constructor Detail

      • Simulation

        public Simulation(MboSet ms)
                   throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • calculateDynamicJobPlan

        public void calculateDynamicJobPlan()
                                     throws java.rmi.RemoteException,
                                            MXException
        Main calculation Entry Point For each resource, we trigger the calculation of the dynamic resources values Each resource : All Tasks, All labors, All materials, All Tools, All Services, And the workorder itself For each records of the mbosets, it call the corresponding calculation method, according to the field CALCMETHOD, on the Job Plan record ( For TASKS -> JOBTASK.CALCMETHOD, For LABOR -> JOBLABOR.CALCMETHOD, For MATERIAL -> JOBMATERIAL.CALCMETHOD, For TOOL -> JOBTOOL.CALCMETHOD, FOR SERVICE -> JOBSERVICE.CALCMETHOD, FOR WORKODER -> JOBPLAN.CALCMETHOD ) with parameters : mbo is the workplan record (wplabor, wpmaterial, wptool, wpservice, workorder) job plan associated record ( wplabor -> joblabor, wpmaterial -> jobmaterial, wptool -> jobtool, wpservice -> jobservice, workorder -> jobplan ) calculatedField : the names of the fields on the mbo and job plan associated records that must be used to set and retrieve the values Example : if JOBRESOURCE.CALCAPPLYTO = HOURS, then we will return for WPLABOR the fields WPLABOR.LABORHRS and JOBLABOR.LABORHRS Example : if JOBRESOURCE.CALCAPPLYTO = HOURS, then we will return for WORKORDER the fields WORKORDER.ESTDUR and JOBPLAN.TASKDURATION
        Specified by:
        calculateDynamicJobPlan in interface SimulationRemote
        Throws:
        MXApplicationException - if the workorder is not WAPPR
        java.rmi.RemoteException
        MXException
      • mustApplyLinearCalculation

        public boolean mustApplyLinearCalculation()
                                           throws java.rmi.RemoteException,
                                                  MXException
        Method use to detect if the job plan is set as dynamic and should be apply using the length of the workorder (startmeasure and endmeasure) or not. If not, the TOTAL WORK UNITS of the jobresources will be use to calculate the results.
        Returns:
        true if the jobplan is dynamic and should apply the linear calculation. Otherwise return false
        Throws:
        java.rmi.RemoteException
        MXException
      • calculateTotalWorkUnits

        public void calculateTotalWorkUnits()
                                     throws java.rmi.RemoteException,
                                            MXException
        Calculate the total length of attributes : for each linear asset in the multiassetlocci set, we add the absolute value for endmeasure - startmeasure (cause the endmeasure is not necessarely lower than the startmeasure)
        Update the field TOTALWORKUNITS
        If some assets are not linear, they are skipped, and a warning is added to the ALLMULTIASSETLOCCI set
        Specified by:
        calculateTotalWorkUnits in interface SimulationRemote
        Throws:
        java.rmi.RemoteException
        MXException