The SUMO toolbox  2018a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Public Member Functions | Protected Member Functions | List of all members
PrioritySampleQueueManager Class Reference

This class implements a priority FIFO queue, points with the highest priority are fetched first. More...

Inheritance diagram for PrioritySampleQueueManager:
Inheritance graph
[legend]

Public Member Functions

 PrioritySampleQueueManager (Config config)
 
void addToInputQueue (EvaluationUnit unit)
 Add an evaluation unit to the input queue where it can be fetched by the sample evaluator. More...
 
EvaluationUnit getFromInputQueue ()
 Request a new SamplePoint from the input queue. More...
 
void cleanup ()
 
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...
 

Protected Member Functions

void flagAsPending (EvaluationUnit unit)
 

Detailed Description

This class implements a priority FIFO queue, points with the highest priority are fetched first.

Constructor & Destructor Documentation

PrioritySampleQueueManager ( Config  config)
inline

Member Function Documentation

void addToInputQueue ( EvaluationUnit  unit)
inline

Add an evaluation unit to the input queue where it can be fetched by the sample evaluator.

double averageEvaluationTime ( )
inlineinherited

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

void cleanup ( )
inline
int evaluatedSamples ( )
inlineinherited

Return the number of samples that have been evaluated already.

Returns
The number of samples.
void flagAsPending ( EvaluationUnit  unit)
inlineprotectedinherited
EvaluationUnit getFromInputQueue ( )
inline

Request a new SamplePoint from the input queue.

Returns null if the queue is empty.

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

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: