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

SGanttChart Class Reference

#include <SGanttChart.h>

List of all members.

Public Methods

 NOCOPY (SGanttChart)
 DUMMYIO (SGanttChart)
 SGanttChart (STaskSystem &ts)
 ~SGanttChart ()
void jobAllocated (int jobIdx, int machine, double time, int operation=-1)
void jobDeallocated (int jobIdx, int machine, double time)
int getJob (int mach, double time, int &operation) const
int getMachine (int jobIdx, double time, int operation=-1) const
int getExecInfo (int jobIdx, leda_array< double > &start, leda_array< double > &end, leda_array< int > &machine, leda_array< int > &operation) const
const leda_list< double > & getTimeSteps () const
void reset ()


Detailed Description

A Gantt chart contains all information about what time a job was allocated and deallocated, on which machine a job was processed and how often a job was running.


Constructor & Destructor Documentation

SGanttChart::SGanttChart STaskSystem   ts
 

Constructor

Parameters:
ts  a reference to the tasksystem

SGanttChart::~SGanttChart  
 

Destructor


Member Function Documentation

SGanttChart::DUMMYIO SGanttChart   
 

int SGanttChart::getExecInfo int    jobIdx,
leda_array< double > &    start,
leda_array< double > &    end,
leda_array< int > &    machine,
leda_array< int > &    operation
const
 

Get the information about when and where a job has been executed. For each interval 0..i of an execution of the job, start-time, end-time, the executing machine and (with shop jobs) the executed operation will be copied to the corresponding start[i], end[i], machine[i] and operation[i], if job is not a shop job, operation[i] will return -1; All information of the arrays will be deleted before filling them.

Parameters:
jobIdx  index of job
start  will return start time of execution interval i
end  will return end time of execution interval i
machine  will return the machine where the job was executed
operation  will return the executed operation of the job
Returns:
the number of execution intervals of the job ( = size of the arrays )

int SGanttChart::getJob int    mach,
double    time,
int &    operation
const
 

Get the index of the job, that was running on machine 'mach' while time step 'time'. If the job is a shop job, 'operation' will return the operation processed at that time, -1 if not a shop job; NOTE: If in time step 'time' a old job was deallocated and a new job was allocated, then it returns the old job

Parameters:
mach  position of machine
time  the time step
operation  will be filled with the operation of the shop job, -1 if job is not a shop job
Returns:
The index of the job that was running on machine 'mach' at time step 'time', -1 if no job was running

int SGanttChart::getMachine int    jobIdx,
double    time,
int    operation = -1
const
 

Get the machine, that executed job 'jobIdx' at the specified time step. With shop jobs you also have to specify the operation NOTE: if at timestep time the job was deallocated from machine 'old' and allocated on machine 'new', the 'old' one will be returned

Parameters:
jobIdx  index of the job
time  the time step
operation  the operation of the job ( only has to be specified when the job was executed in a shop environment )
Returns:
The position of the machine that executed 'operation` of job 'jobIdx' at time step 'time', -1 if such a job wasn't executed at that time.

const leda_list<double>& SGanttChart::getTimeSteps   const [inline]
 

Get a list of all time steps at which jobs have been deallocated. this list can be used to create the time axis of the Gantt Chart and to iterate the time for getJob(); NOTE: timeStep 0 is not in this list

Returns:
list of all time steps (except time step 0)

void SGanttChart::jobAllocated int    jobIdx,
int    machine,
double    time,
int    operation = -1
 

Inform the chart that a job has been allocated

Parameters:
jobIdx  index of allocated job
machine  position of machine the job is running on
time  the time when the job has been allocated
operation  which operation of a job is been processed ( only valid for jobs in a shop environment )

void SGanttChart::jobDeallocated int    jobIdx,
int    machine,
double    time
 

Inform the chart that a job has been deallocated

Parameters:
jobIdx  index of deallocated job
machine  position of machine the job was running on
time  the time when the job has been deallocated

SGanttChart::NOCOPY SGanttChart   
 

void SGanttChart::reset  
 

Reset datastructures. Do this at the beginning of a new schedule or when the number of jobs or machines has changed


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