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

SAtomarJob Class Reference

#include <SAtomarJob.h>

Inherits SShopJob, and SParallelJob.

Inheritance diagram for SAtomarJob:

Inheritance graph
[legend]
List of all members.

Public Types

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

Public Methods

 SAtomarJob (SProbabilityDist *dist)
 SAtomarJob (double proctime)
virtual ~SAtomarJob ()
virtual void process (SMachines &machines, double duration)
virtual SJobMod & getModifier ()
virtual void reset ()
bool isOpFinished (int op) const
int getFinishedOper () const
int getCurrOper () const
void setCurrOper (int newOp, const SMachines &mach)
double getRemOpProcTime () const
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 STopology & getTopology () 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 ()
SProbabilityDist * getProcTimeDist ()
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 SPref & getPref () const

Friends

class SAtomarJobMod

Detailed Description

An atomar job works only on SUnrelated-, SUniform-, SIdentical- and SSingle-Environment. The classifier for this kind of job is "atomar".
See also:
SAtomarJobMod.


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

SAtomarJob::SAtomarJob (  SProbabilityDist *    dist ) 
 

Constructor.

SAtomarJob::SAtomarJob (  double    proctime ) 
 

Constructor

SAtomarJob::~SAtomarJob (    )  [virtual]
 

Destructor.


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, inherited]
 

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, inherited]
 

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& SAtomarJob::getModifier (    )  [inline, virtual]
 

Get access to the modifier.

Reimplemented from SParallelJob.

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, inherited]
 

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, inherited]
 

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 SAtomarJob::process (  SMachines &    machines,
double    duration
)  [virtual]
 

This method is called by SMachines during simulateUntil(). See SJob::process() for more details.

See also:
SJob::process() , SMachines::simulateUntil()

Reimplemented from SParallelJob.

void SShopJob::reset (    )  [virtual, inherited]
 

Reset shop job and call SJob::reset()

Reimplemented from SJob.

void SShopJob::setCurrOper (  int    newOp,
const SMachines &    mach
)  [inherited]
 

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.


Friends And Related Function Documentation

friend class SAtomarJobMod [friend]
 


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:41 2003 for Sketch-it! by doxygen1.2.18