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

SSampleGen Class Reference

#include <SSampleGen.h>

List of all members.

Public Types

enum  ErrorCode {
  NOERROR, NUMMACHLOW, UNKNOWNENV, MESHSIZELOW,
  UNKNOWNTOPO, UNKNOWNPREC, NUMJOBSLOW
}

Public Methods

 SSampleGen ()
 ~SSampleGen ()
void setMachEnvironment (const leda_string &envClassifier)
const leda_string & getMachEnvironment () const
void setMachNumOfMachines (int numMach)
int getMachNumOfMachines () const
void setMachTopology (const leda_string &topoClassifier, int meshW=-1, int meshH=-1)
const leda_string & getMachTopology (int &retMeshW, int &retMeshH) const
void setJobNumOfJobs (int numJobs)
int getJobNumOfJobs () const
void setJobNumOfMsgs (int numMsgs)
int getJobNumOfMsgs () const
void setProcTimeDist (SProbabilityDist::Type type, double lower, double upper)
void setRelTimeDist (SProbabilityDist *pDist)
SProbabilityDist::Type getJobProcTimeDist () const
void setMsgDist (bool zipf)
void setPrecRelation (const leda_string &precRelation)
const leda_string & getPrecRelation () const
STaskSystemsample ()
void reset ()
ErrorCode getError () const
void setRandProcTimes (bool set)
void setRandRelTimes (bool set)


Detailed Description

Generator for problem instances. Specify at least the number of machines, the type of environment and the number of jobs. All other properties of a tasksystem will be preset with defaults. You can reset the generator in order to fall back to the default values again.


Member Enumeration Documentation

enum SSampleGen::ErrorCode
 

Error codes: NOERROR ( no error occured ) , NUMMACHLOW ( number of machines was < 1 ) , UNKNOWNENV ( requested unknown environment ) , MESHSIZELOW ( width or height of mesh topology was < 1 ) , UNKNOWNTOPO ( requested unknown topology ) , UNKNOWNPREC ( requested unknown precedence relation ) , NUMJOBSLOW ( number of jobs is < 1 )

Enumeration values:
NOERROR 
NUMMACHLOW 
UNKNOWNENV 
MESHSIZELOW 
UNKNOWNTOPO 
UNKNOWNPREC 
NUMJOBSLOW 


Constructor & Destructor Documentation

SSampleGen::SSampleGen  
 

Constructor

SSampleGen::~SSampleGen  
 

Destructor.


Member Function Documentation

ErrorCode SSampleGen::getError   const [inline]
 

If sample() succeeded getError() will return NOERROR, otherwise the error code explains why sample() failed.

Returns:
error code

int SSampleGen::getJobNumOfJobs   const [inline]
 

Get number of jobs.

int SSampleGen::getJobNumOfMsgs   const [inline]
 

Get number of messages.

SProbabilityDist::Type SSampleGen::getJobProcTimeDist  
 

Get type of probability distribution

const leda_string& SSampleGen::getMachEnvironment   const [inline]
 

Get the current classifier for the environment.

int SSampleGen::getMachNumOfMachines   const [inline]
 

Get the current number of machines.

const leda_string& SSampleGen::getMachTopology int &    retMeshW,
int &    retMeshH
const [inline]
 

Get current topology classifier

Parameters:
retMeshW  returns mesh width (-1 if not a mesh)
retMeshH  return mesh height (-1 if not a mesh)
Returns:
topology classifier

const leda_string& SSampleGen::getPrecRelation   const [inline]
 

Get classifier of precedence relation.

void SSampleGen::reset  
 

Reset to default values.

STaskSystem * SSampleGen::sample  
 

Create a sample tasksystem based on the parameters that you have set before. You must have set at least the number of machines, the type of environment and the number of jobs. If you did not specify the topology "line" is assumed. If you did not specify the kind of precedence relation, "dag" is assumed. If you did not set the probability distribution for the processing times of jobs, "uniform" with bound [1;1] is assumed. If you have set not enough parameters or a tasksystem could not be generated with the specified parameters, it doesn't sample a tasksystem and returns NULL. You can get additional information, why sample() failed with calling getError(). Note: The generator does not own the tasksytem, i.e. you have to destroy it yourself, if sample() succeeds.

Returns:
pointer to the sucessfully generated tasksystem, otherwise NULL
See also:
getError()

void SSampleGen::setJobNumOfJobs int    numJobs [inline]
 

Set number of jobs.

Parameters:
numJobs  number of jobs

void SSampleGen::setJobNumOfMsgs int    numMsgs [inline]
 

Set number of messages, only for broadcast!

Parameters:
numJobs  number of jobs

void SSampleGen::setMachEnvironment const leda_string &    envClassifier [inline]
 

Set environment of machines.

Parameters:
envClassifier  according to the classification scheme: "P" = Identical processors, "Q" = Uniform , "R" = Unrelated, "O" = Open shop system, "F" = Flow shop , "J" = Job shop system "1" = single processor, "B" = Broadcast

void SSampleGen::setMachNumOfMachines int    numMach [inline]
 

Set number of machines.

Parameters:
numMach  number of machines (> 0)

void SSampleGen::setMachTopology const leda_string &    topoClassifier,
int    meshW = -1,
int    meshH = -1
[inline]
 

Set topology of machines.

Parameters:
topoClassifier  "single", "line", "set", "mesh"
meshW  width of mesh (if "mesh" is chosen, otherwise ignored)
meshH  height of mesh (if "mesh" is chosen, otherwise ignored)

void SSampleGen::setMsgDist bool    zipf
 

Set probability distribution for the messages (which msg is requested with which prob.)

Parameters:
zipf  true=use Zipf distrib for messages, false=use uniform distrib

void SSampleGen::setPrecRelation const leda_string &    precRelation [inline]
 

Set classifier of precedence relation.

Parameters:
type  "dag", "interval"

void SSampleGen::setProcTimeDist SProbabilityDist::Type    type,
double    lower,
double    upper
 

Set probability distribution for relative processing times for all jobs.

void SSampleGen::setRandProcTimes bool    set
 

No descriptions

void SSampleGen::setRandRelTimes bool    set
 

No descriptions

void SSampleGen::setRelTimeDist SProbabilityDist   pDist
 

Distribution for the release times


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