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

SOptCriterionLog Class Reference

#include <SOptCriterionLog.h>

Inherits SLogger.

Inheritance diagram for SOptCriterionLog:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Type { MAX, SUM, MEAN }
enum  Criterion {
  COMPLETION, FLOW, LATENESS, TARDINESS,
  EARLINESS, NUMTARDYTASKS
}

Public Methods

 SOptCriterionLog (STaskSystem &ts, bool registerAsObserver=true)
 ~SOptCriterionLog ()
virtual void feedEvent (const SEvent &event)
double getValue (Criterion crit, Type type=MAX, bool weighted=false) const
double getMakeSpan () const
double getMeanFlowTime () const
double getMaxLateness () const
double getCompletionTime (int job) const
void reset ()
virtual void update (const SEvent &event)

Detailed Description

A class for evaluating a schedule by optimality criteria. The optimality criterion logger stores the information about the time a job was completed and therefore can compute all kinds of optimality criteria in order to evaluate a schedule. The logger registers as observer, but can also be used as a "dependent logger", then it doesn't register as observer and must be fed via feedEvent(). On JOBRESET, JOBSADDED, JOBSDELETED it resets its internal datastructure.


Member Enumeration Documentation

enum SOptCriterionLog::Criterion
 

Criteria: COMPLETION, FLOW, LATENESS, TARDINESS, EARLINESS, NUMTARDYTASKS

Enumeration values:
COMPLETION 
FLOW 
LATENESS 
TARDINESS 
EARLINESS 
NUMTARDYTASKS 

enum SOptCriterionLog::Type
 

Functions: MAX, SUM, MEAN

Enumeration values:
MAX 
SUM 
MEAN 


Constructor & Destructor Documentation

SOptCriterionLog::SOptCriterionLog STaskSystem   ts,
bool    registerAsObserver = true
 

Constructor

Parameters:
ts  a reference to the tasksystem
registerAsObserver  stand-alone logger (true) or dependent (false)

SOptCriterionLog::~SOptCriterionLog  
 

Destructor


Member Function Documentation

void SOptCriterionLog::feedEvent const SEvent   event [virtual]
 

Here the logger must be fed with events when it is a dependent logger

Parameters:
event  an event that is sent by another logger

Implements SLogger.

double SOptCriterionLog::getCompletionTime int    job const [inline]
 

Get the completion time of a job

Parameters:
job  index of a job

double SOptCriterionLog::getMakeSpan   const [inline]
 

Frequently used criterion: make span ( = maximum completion time)

Returns:
getValue(COMPLETION, MAX, false)

double SOptCriterionLog::getMaxLateness   const [inline]
 

Frequently used criterion: maximum lateness

Returns:
getValue(LATENESS, MAX, false)

double SOptCriterionLog::getMeanFlowTime   const [inline]
 

Frequently used criterion: mean flow time

Returns:
getValue(FLOW, MEAN, false)

double SOptCriterionLog::getValue Criterion    crit,
Type    type = MAX,
bool    weighted = false
const
 

Get the value for a specified optimality criterion. You can mix every criterion with MAX, SUM or MEAN and weighted as you like, even if it doesn't make sense; You can use this method also when scheduling is in progress, but remember that only finished jobs will be considered; NOTE: with NUMTARDYTASKS the type (MAX,SUM,MEAN) doesn't matter

Parameters:
crit  one of the optimality criteria
type  one of the function types
weighted  whether to take weights of jobs into account or not
Returns:
the value of the criterion specified by the parameters

void SOptCriterionLog::reset  
 

Adjust internal data structure to number of jobs in tasksystem and reset data structure to default values. Call it when the number of jobs have changed.

virtual void SLogger::update const SEvent   event [inline, virtual, inherited]
 

Here the logger receives events when it is a stand-alone logger

Parameters:
event  an event created by one of the observed components

Implements SObserver.

Reimplemented in SGanttLog.


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