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

An evaluation unit encapsulate a sample point for evaluation. More...

Classes

enum  EvaluationState
 The EvaluationState includes all the different states a unit can be in: EVALUATED: The point was evaluated correctly. More...
 

Public Member Functions

 EvaluationUnit (SamplePoint in)
 Create a new evaluation unit. More...
 
long getId ()
 Get the id of the evaluation unit. More...
 
int hashCode ()
 
boolean equals (Long id)
 
String toString ()
 
SamplePoint getInputSample ()
 Return the sample that was submitted for evaluation. More...
 
SamplePoint[] getOutputSamples ()
 Return a list of all the output samples. More...
 
void addOutputSamples (SamplePoint[] samples)
 Add evaluated samples. More...
 
void addOutputSample (SamplePoint sample)
 Add evaluated sample. More...
 
long getCreationTime ()
 Get the time at which the unit was created. More...
 
void setAddTime ()
 Set the time at which this unit was placed on the intput queue. More...
 
void setEvaluationStartTime ()
 Set the time at which evaluation of the unit started. More...
 
void setEvaluationFinishedTime ()
 Set the time at which evaluation of the unit finished. More...
 
void setCompletionTime ()
 Set the completion time of this unit. More...
 
long getAge ()
 Return time in milliseconds that has passed since it has been created. More...
 
long getPendingTime ()
 Return time in milliseconds that has passed since it was added to the input queue. More...
 
long getElapsedEvaluationTime ()
 Get the time in milliseconds that has passed between start of evaluation of the unit and completion of the evaluation process. More...
 
long getInputOutputTime ()
 Get the time it took from the moment the unit was added to the input queue to the moment it was waiting to be fetched. More...
 
void setBatchSize (int size)
 Set the size of the batch this unit belongs to. More...
 
EvaluationState getState ()
 Get the evaluation state. More...
 
void setState (EvaluationState s)
 Set the evaluation state. More...
 

Detailed Description

An evaluation unit encapsulate a sample point for evaluation.

Important is that a single input point may result in multiple output points when evaluated. This happens, for example, if an input dimension is auto sampled by the simulator.

Constructor & Destructor Documentation

EvaluationUnit ( SamplePoint  in)
inline

Create a new evaluation unit.

Member Function Documentation

void addOutputSample ( SamplePoint  sample)
inline

Add evaluated sample.

void addOutputSamples ( SamplePoint[]  samples)
inline

Add evaluated samples.

boolean equals ( Long  id)
inline
long getAge ( )
inline

Return time in milliseconds that has passed since it has been created.

long getCreationTime ( )
inline

Get the time at which the unit was created.

Returns
Creation time in milliseconds.
long getElapsedEvaluationTime ( )
inline

Get the time in milliseconds that has passed between start of evaluation of the unit and completion of the evaluation process.

Returns
Elapsed time in milliseconds.
long getId ( )
inline

Get the id of the evaluation unit.

Returns
the unique id
long getInputOutputTime ( )
inline

Get the time it took from the moment the unit was added to the input queue to the moment it was waiting to be fetched.

SamplePoint getInputSample ( )
inline

Return the sample that was submitted for evaluation.

SamplePoint [] getOutputSamples ( )
inline

Return a list of all the output samples.

Can be identical to input sample.

long getPendingTime ( )
inline

Return time in milliseconds that has passed since it was added to the input queue.

EvaluationState getState ( )
inline

Get the evaluation state.

int hashCode ( )
inline
void setAddTime ( )
inline

Set the time at which this unit was placed on the intput queue.

void setBatchSize ( int  size)
inline

Set the size of the batch this unit belongs to.

void setCompletionTime ( )
inline

Set the completion time of this unit.

Should be called when the sample arrives in the evaluation queue

void setEvaluationFinishedTime ( )
inline

Set the time at which evaluation of the unit finished.

void setEvaluationStartTime ( )
inline

Set the time at which evaluation of the unit started.

void setState ( EvaluationState  s)
inline

Set the evaluation state.

String toString ( )
inline

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