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

Public Member Functions

 MatlabDataSource (Config config) throws DataSourceException
 Constructor. More...
 
void evaluate (EvaluationUnitBatch batch) throws DataSourceException
 
int getNumThreads ()
 
void cleanup ()
 Cleanup procedure called when the sample queue thread is aborted. More...
 
EvaluationUnitBatch requestNewBatch ()
 Request a new batch of SamplePoints from the queue. More...
 
void setBatchSize (int size)
 
void submitSamplesForEvaluation (SamplePoint[] points)
 Schedule points for evaluation. More...
 
SamplePoint fetchEvaluatedSample ()
 Get the next evaluated point. More...
 
int getNumPendingSamples ()
 Return the number of poitns pending evaluation. More...
 
int getNumEvaluatedSamples ()
 Return the number of evaluated points waiting to be fetched. More...
 
double getAverageEvaluationTime ()
 Return the average evaluation time (in seconds) for one data point. More...
 
DataSourceStatus getStatus ()
 Returns default status. More...
 
int getInputDimension ()
 
int getOutputDimension ()
 

Static Public Attributes

static final int MAX_THREADS = 20
 Max number of threads. More...
 

Protected Member Functions

void startThreads ()
 
final void submitEvaluatedBatch (EvaluationUnitBatch batch)
 This function is called by the derived subclass whenever a successfully evaluated batch of points needs to be added to the queue. More...
 
final void submitFailedBatch (EvaluationUnitBatch batch)
 This function is called by the derived subclass whenever a FAILED batch of points needs to be added to the queue. More...
 
AbstractSampleQueueManager getSampleQueueManager ()
 Get the sample queue manager for this sample evaluator. More...
 

Constructor & Destructor Documentation

MatlabDataSource ( Config  config) throws DataSourceException
inline

Constructor.

Configures the sample evaluator, also configures the superclass.

Parameters
contextThe global context configuration data.
configThe configuration data of this specific part of the toolbox.
Exceptions
DataSourceException

Member Function Documentation

void cleanup ( )
inlineinherited

Cleanup procedure called when the sample queue thread is aborted.

Stops all threads

Implements DataSource.

void evaluate ( EvaluationUnitBatch  batch) throws DataSourceException
inline
SamplePoint fetchEvaluatedSample ( )
inlineinherited

Get the next evaluated point.

Implements DataSource.

double getAverageEvaluationTime ( )
inlineinherited

Return the average evaluation time (in seconds) for one data point.

Implements DataSource.

int getInputDimension ( )
inlineinherited
int getNumEvaluatedSamples ( )
inlineinherited

Return the number of evaluated points waiting to be fetched.

Implements DataSource.

int getNumPendingSamples ( )
inlineinherited

Return the number of poitns pending evaluation.

Implements DataSource.

int getNumThreads ( )
inlineinherited
int getOutputDimension ( )
inlineinherited
AbstractSampleQueueManager getSampleQueueManager ( )
inlineprotectedinherited

Get the sample queue manager for this sample evaluator.

DataSourceStatus getStatus ( )
inlineinherited

Returns default status.

Can be overrided if other than default behaviour is desired.

Implements DataSource.

EvaluationUnitBatch requestNewBatch ( )
inlineinherited

Request a new batch of SamplePoints from the queue.

Returns null if the queue is empty.

void setBatchSize ( int  size)
inlineinherited
void startThreads ( )
inlineprotectedinherited
final void submitEvaluatedBatch ( EvaluationUnitBatch  batch)
inlineprotectedinherited

This function is called by the derived subclass whenever a successfully evaluated batch of points needs to be added to the queue.

Parameters
pointEvaluated point to be added.
final void submitFailedBatch ( EvaluationUnitBatch  batch)
inlineprotectedinherited

This function is called by the derived subclass whenever a FAILED batch of points needs to be added to the queue.

void submitSamplesForEvaluation ( SamplePoint[]  points)
inlineinherited

Schedule points for evaluation.

Implements DataSource.

Member Data Documentation

final int MAX_THREADS = 20
staticinherited

Max number of threads.


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