The SUMO toolbox  2018a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | List of all members
DefaultSampleQueueManager Class Referenceabstract
Inheritance diagram for DefaultSampleQueueManager:
Inheritance graph
[legend]

Public Member Functions

 DefaultSampleQueueManager (Config config)
 
EvaluationUnit requestNewSample ()
 Get a point from the input queue. More...
 
void submitNewSamples (SamplePoint[] points)
 Prepare the passed sample points for evaluation and add them to the queue. More...
 
void submitNewSample (SamplePoint point)
 Add & process one new sample. More...
 
int pendingSamples ()
 Return the number of samples that are currently waiting to be evaluated. More...
 
int evaluatedSamples ()
 Return the number of samples that have been evaluated already. More...
 
double averageEvaluationTime ()
 Get the average time it takes to evaluate one single sample. More...
 
void submitEvaluatedSample (EvaluationUnit unit)
 Signal that a set of samples have been evaluated Valid termination states include: EVALUATED: The point was evaluated correctly. More...
 
SamplePoint requestEvaluatedSample ()
 Get a newly evaluated sample. More...
 
void cleanup ()
 

Protected Member Functions

abstract EvaluationUnit getFromInputQueue ()
 
abstract void addToInputQueue (EvaluationUnit unit)
 Add a new evaluation unit to the input queue. More...
 
void flagAsPending (EvaluationUnit unit)
 

Constructor & Destructor Documentation

DefaultSampleQueueManager ( Config  config)
inline

Member Function Documentation

abstract void addToInputQueue ( EvaluationUnit  unit)
abstractprotectedinherited

Add a new evaluation unit to the input queue.

double averageEvaluationTime ( )
inlineinherited

Get the average time it takes to evaluate one single sample.

void cleanup ( )
inlineinherited
int evaluatedSamples ( )
inlineinherited

Return the number of samples that have been evaluated already.

Returns
The number of samples.
void flagAsPending ( EvaluationUnit  unit)
inlineprotectedinherited
abstract EvaluationUnit getFromInputQueue ( )
abstractprotected
int pendingSamples ( )
inlineinherited

Return the number of samples that are currently waiting to be evaluated.

Returns
The number of samples.
SamplePoint requestEvaluatedSample ( )
inlineinherited

Get a newly evaluated sample.

Returns null if the queue is empty.

Returns
The evaluated sample.
EvaluationUnit requestNewSample ( )
inline

Get a point from the input queue.

void submitEvaluatedSample ( EvaluationUnit  unit)
inlineinherited

Signal that a set of samples have been evaluated Valid termination states include: EVALUATED: The point was evaluated correctly.

AGAIN: The point wasn't evaluated, but might succeed a next time (for cluster failover, reintroduce in new samples queue). FAILED: The point can't be evaluated.

void submitNewSample ( SamplePoint  point)
inlineinherited

Add & process one new sample.

Parameters
pointThe sample to be submitted.
void submitNewSamples ( SamplePoint[]  points)
inlineinherited

Prepare the passed sample points for evaluation and add them to the queue.


The documentation for this class was generated from the following file: