Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

SShopJob Class Reference

#include <SShopJob.h>

Inherits SJob.

Inherited by SAtomarJob.

Inheritance diagram for SShopJob:

Inheritance graph
[legend]
List of all members.

Public Types

enum  State {
  HIDDEN, RELEASED, RUNNING, FINISHED,
  REJECTED
}

Public Methods

 SShopJob (SProbabilityDist *dist)
 SShopJob (double proctime)
virtual ~SShopJob ()
virtual void process (SMachines &machines, double duration)
virtual void reset ()
bool isOpFinished (int op) const
int getFinishedOper () const
int getCurrOper () const
void setCurrOper (int newOp, const SMachines &mach)
double getRemOpProcTime () const
virtual SJobModgetModifier ()
int getIndex () const
virtual double getProcTime ()
virtual double getRemProcTime () const
bool isFinished () const
double getReleaseTime () const
double getDueTime () const
double getStartTime (int operation=0) const
const leda_array< double > & getStartTimes () const
const STopologygetTopology () const
const double getWeight () const
State getState () const
virtual void setState (State s)
bool getOverDue () const
virtual void setOverDue ()
virtual double getNextEventTime (double currTime) const
void simulate (double oldTime, double newTime)
double getExpProcTime ()
SProbabilityDistgetProcTimeDist ()
bool hasRandProcTime ()
virtual leda_string getClassifier () const=0
virtual bool isInstanceOf (const leda_string &classifier) const=0
virtual void assureInstanceOf (const leda_string &classifier) const=0
void addObserver (SObserver &obs)
void deleteObserver (SObserver &obs)
void notifyObservers (const SEvent &event)

Public Attributes

SPref_pref

Protected Methods

void advanceProcTime (double by)
const SPrefgetPref () const

Detailed Description

A shop job works with the SJobShop-, SFlowShop-,SOpenShop- and SSingle-Environment. A shop job is a job, divided up in one or more operations. Each operation has its own processing time, but the sum of all partial processing times must be equal to the job's processing time. The order of processing operations and what machine processes an operation is fixed by the environment. Therefore, almost every property of a shop job concerning the operations is stored by the environment.

See also:
SEnvironment , SGeneralShop


Member Enumeration Documentation

enum SJob::State [inherited]
 

Defined states of a job: HIDDEN (not yet released and so cannot be scheduled), RELEASED (can be scheduled, but is not running at the moment), RUNNING, FINISHED (job is completely finished i.e. for shop jobs all operations are finished)

Enumeration values:
HIDDEN 
RELEASED 
RUNNING 
FINISHED 
REJECTED 


Constructor & Destructor Documentation

SShopJob::SShopJob SProbabilityDist   dist
 

Constructor. Note: The classifier string for a shop job is "shop".

SShopJob::SShopJob double    proctime
 

virtual SShopJob::~SShopJob   [inline, virtual]
 


Member Function Documentation

void SObservable::addObserver SObserver   obs [inline, inherited]
 

Here another component can register himself as observer of this component

Parameters:
obs  observer that wants to be notified of events created by this class

void SJob::advanceProcTime double    by [protected, inherited]
 

Record the amount of time for which the job has already been processed. The job is finished if the total processing time is reached. Called by process()

virtual void STypeInfo::assureInstanceOf const leda_string &    classifier const [pure virtual, inherited]
 

The same as isInstanceOf(), only that the program is stopped with an error in case of failure

Parameters:
classifier  e.g. "P", "Q", "R", etc

void SObservable::deleteObserver SObserver   obs [inline, inherited]
 

Here another component can delete himself from the list of observers of this component

Parameters:
obs  observer that doesn't want to be notified anymore

virtual leda_string STypeInfo::getClassifier   [pure virtual, inherited]
 

Get the classifier of the object, using the classification scheme. E.g. "P" for Identical Processors

Returns:
classifier string

int SShopJob::getCurrOper   const [inline]
 

Get the operation, which is currently processed if job is running, or get the operation, which will be processed next if job is not running

Returns:
"current" operation

double SJob::getDueTime   const [inline, inherited]
 

Get time when the execution of the job must be finished (= due date).

double SJob::getExpProcTime   [inline, inherited]
 

int SShopJob::getFinishedOper   const [inline]
 

Get the number of operations which have already been executed.

Returns:
number of finished operations

int SJob::getIndex   const [inline, inherited]
 

Get the index of the job.

virtual SJobMod& SShopJob::getModifier   [inline, virtual]
 

Get access to the modifier

Returns:
the modifier
See also:
SShopJobMod

Implements SJob.

Reimplemented in SAtomarJob.

double SJob::getNextEventTime double    currTime const [virtual, inherited]
 

Return the next time an event will happen after the current time

Parameters:
currTime  the current simulation time
Returns:
the time when the next event will by generated the job

bool SJob::getOverDue   const [inline, inherited]
 

Return if job has passed its due date

const SPref& SJob::getPref   const [inline, protected, inherited]
 

get read-only access to the preferences instance

double SJob::getProcTime   [virtual, inherited]
 

Get total relative processing time of the job. Interpreted according to the job model: it is assumed that the whole job is executed with normalized speed

Reimplemented in SMalleableJob.

SProbabilityDist * SJob::getProcTimeDist   [inherited]
 

No descriptions

double SJob::getReleaseTime   const [inline, inherited]
 

Get time when the job becomes released.

double SShopJob::getRemOpProcTime   const [inline]
 

Get the time remaining in this operation

virtual double SJob::getRemProcTime   const [inline, virtual, inherited]
 

Get remaining relative processing time of the job. I Interpreted according to the job model.

double SJob::getStartTime int    operation = 0 const [inline, inherited]
 

Get time when the job gets running.

const leda_array<double>& SJob::getStartTimes   const [inline, inherited]
 

Get all start times.

State SJob::getState   const [inline, inherited]
 

Get the state of the job

const STopology& SJob::getTopology   const [inline, inherited]
 

Get topology of job

const double SJob::getWeight   const [inline, inherited]
 

bool SJob::hasRandProcTime   [inherited]
 

No descriptions

bool SJob::isFinished   const [inline, inherited]
 

Return if job is finished. A job is finished if its remaining relative processing time is zero.

virtual bool STypeInfo::isInstanceOf const leda_string &    classifier const [pure virtual, inherited]
 

Checks whether the object is an instance of the specified or a specialized class

Parameters:
classifier  e.g. "P", "Q", "R", etc
Returns:
true if the object can be casted to the specified class

bool SShopJob::isOpFinished int    op const [inline]
 

Returns, if the specified operation of job is finished. Note: If you call this method when simulation is not running, you will always get false.

Returns:
true, if operation op is finished, false otherwise

void SObservable::notifyObservers const SEvent   event [inline, inherited]
 

Inform all observers of this component about an event. The Observers will receive this event by their SObserver::update()-method.

Parameters:
event  an event that is sent to all observers of this component
See also:
SObserver::update()

void SShopJob::process SMachines   machines,
double    duration
[virtual]
 

Advances the processing time, generates JOBPHASEFINISHED and JOBFINISHED events if necessary, and changes the next operation, if an operation is finished. The default setting of the new operation is to take the unfinished operation with the lowest number.

Implements SJob.

Reimplemented in SAtomarJob.

void SShopJob::reset   [virtual]
 

Reset shop job and call SJob::reset()

Reimplemented from SJob.

void SShopJob::setCurrOper int    newOp,
const SMachines   mach
 

Prepares the job for the execution of the next operation. Attention: The settings must correspond to the type of the environment (this is checked by process() )

void SJob::setOverDue   [virtual, inherited]
 

Do not call this from the outside. Should only be called by simulate()

void SJob::setState State    s [virtual, inherited]
 

Do not call this from the outside. Set the new state and generate JOBSTATECHANGED, only used by SMachines!!

void SJob::simulate double    oldTime,
double    newTime
[inherited]
 

Advance the simulation time until the next time step. CAUTION: This method does not simulate the processing of the job on a machine. This is done by process() which is called by SMachines::simulate(). simulate() only handles events which concern the job itself (not the pair job/machine), e.g. release time and due date

Parameters:
oldTime  the time from which the simulation time is advanced.
newTime  the time up to which the simulation time is advanced.


Member Data Documentation

SPref& SJob::_pref [inherited]
 

reference to preference instance


The documentation for this class was generated from the following files:
Generated on Thu May 22 16:50:54 2003 for Sketch-it! by doxygen1.2.18