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

STaskSystem Class Reference

#include <STaskSystem.h>

Inherits SObserver, and SObservable.

Inheritance diagram for STaskSystem:

Inheritance graph
[legend]
List of all members.

Public Methods

 STaskSystem ()
virtual ~STaskSystem ()
const SClassificationgetClassification () const
double getTime () const
void setAlgorithm (SSchedAlgorithm &alg)
const SSchedAlgorithmgetAlgorithm () const
void setClassification (const SClassification &classif)
bool doSimStep ()
void reset ()
void run ()
const SJobArraygetAllJobs () const
SJobArraygetAllJobs ()
int numJobs () const
leda_set< SJob * > getHiddenJobs () const
leda_set< SJob * > getReleasedJobs () const
leda_set< SJob * > getFinishedJobs () const
leda_set< SJob * > getRunningJobs () const
leda_set< SJob * > getRejectedJobs () const
leda_set< SJob * > getAvailableJobs () const
leda_set< SJob * > getReadyJobs () const
SJobgetJob (int idx)
const SJobgetJob (int idx) const
const SPrecRelationgetPrecRelation () const
SPrecRelationgetPrecRelation ()
SPrecBrokergetPrecBroker ()
virtual STaskSystemModgetModifier ()
const leda_array< SPassiveMachines * > & getPassiveMachines () const
leda_array< SPassiveMachines * > & getPassiveMachines ()
const SMachinesgetMachines () const
SMachinesgetMachines ()
virtual void update (const SEvent &event)
bool getRandProcTimes ()
void setRelTimeDist (SProbabilityDist *dist)
SProbabilityDistgetRelTimeDist ()
void addObserver (SObserver &obs)
void deleteObserver (SObserver &obs)
void notifyObservers (const SEvent &event)

Friends

class STaskSystemMod

Detailed Description

STaskSystem is the central component where jobs, machines, precedence relation and the algorithm are combined to form a "tasksystem". Access the modifier to add or delete jobs. For changing machines or the precedence relation access the modifier of these components.
See also:
STaskSystemMod , SMachinesMod , SPassiveMachinesMod , SPrecBrokerMod


Constructor & Destructor Documentation

STaskSystem::STaskSystem  
 

Constructor

STaskSystem::~STaskSystem   [virtual]
 

Destructor. The task system owns its component and destroys them as well.


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 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

bool STaskSystem::doSimStep  
 

Advance simulation time until the next event happens, change the state of the system and call the inner loop of the algorithm

const SSchedAlgorithm& STaskSystem::getAlgorithm   const [inline]
 

Get scheduling algorithm.

SJobArray& STaskSystem::getAllJobs   [inline]
 

Get access to all jobs

Returns:
array of all jobs

const SJobArray& STaskSystem::getAllJobs   const [inline]
 

Get read-only access to all jobs

Returns:
array of all jobs

leda_set< SJob * > STaskSystem::getAvailableJobs  
 

Get available jobs (jobs that can be scheduled according to the precedence relation

const SClassification& STaskSystem::getClassification   const [inline]
 

Get the classification according to the classification scheme.

leda_set<SJob*> STaskSystem::getFinishedJobs   const [inline]
 

Get all jobs that are in state FINISHED

leda_set<SJob*> STaskSystem::getHiddenJobs   const [inline]
 

Get all jobs that are in state HIDDEN

const SJob& STaskSystem::getJob int    idx const [inline]
 

Get read-only access to a job with a certain index Precondition: 0 < idx < numJobs()

Parameters:
idx  index of a job
Returns:
reference to job with index 'idx'

SJob& STaskSystem::getJob int    idx [inline]
 

Get access to a job with a certain index. Precondition: 0 < idx < numJobs()

Parameters:
idx  index of a job
Returns:
reference to job with index 'idx'

SMachines& STaskSystem::getMachines   [inline]
 

Get access to the machines

const SMachines& STaskSystem::getMachines   const [inline]
 

Get read-only access to the machines

virtual STaskSystemMod& STaskSystem::getModifier   [inline, virtual]
 

Get access to the tasksystem modifier

leda_array<SPassiveMachines*>& STaskSystem::getPassiveMachines   [inline]
 

Get access to the passive machines

const leda_array<SPassiveMachines*>& STaskSystem::getPassiveMachines   const [inline]
 

Get read-only access to the passive machines

SPrecBroker& STaskSystem::getPrecBroker   [inline]
 

Get access to the precedence relation

SPrecRelation& STaskSystem::getPrecRelation   [inline]
 

Get access to the master-precedence-relation

const SPrecRelation& STaskSystem::getPrecRelation   const [inline]
 

Get read-only access to the master-precedence-relation

bool STaskSystem::getRandProcTimes  
 

returns if jobs' processing times are random(1) or known in advance(0)

leda_set< SJob * > STaskSystem::getReadyJobs  
 

Get ready jobs (jobs that are released and available)

leda_set<SJob*> STaskSystem::getRejectedJobs   const [inline]
 

Get all jobs that are in state REJECTED

leda_set<SJob*> STaskSystem::getReleasedJobs   const [inline]
 

Get all jobs that are in state RELEASED

SProbabilityDist * STaskSystem::getRelTimeDist  
 

returns the distribution of the jobs' release times

leda_set<SJob*> STaskSystem::getRunningJobs   const [inline]
 

Get all jobs that are in state RUNNING

double STaskSystem::getTime   const [inline]
 

Return current simulation time. If simulation is being advanced, e.g. during a call to simulateUntil() then getTime() still returns the simulation time of the last simulation step)

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()

int STaskSystem::numJobs   const [inline]
 

Return the number of jobs

void STaskSystem::reset  
 

Reset all jobs, machines and startup the algorithm.

void STaskSystem::run   [inline]
 

Reset and run the algorithm completely

void STaskSystem::setAlgorithm SSchedAlgorithm   alg
 

Set scheduling algorithm.

void STaskSystem::setClassification const SClassification   classif
 

void STaskSystem::setRelTimeDist SProbabilityDist   dist
 

sets distribution for release times of the jobs

void STaskSystem::update const SEvent   event [virtual]
 

Here the tasksystem receives events of observed components

Parameters:
event  event from observed component

Implements SObserver.


Friends And Related Function Documentation

friend class STaskSystemMod [friend]
 


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