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

This class processes new samples and stores them, so that they can later be requested in both simulator and toolbox space. More...

Public Member Functions

function SampleManager (var config)
 Class constructor. More...
 
function getNrSamples ()
 Gets the number of samples in the manager. More...
 
function getTriangulationObj ()
 Returns the triangulation object. More...
 
function addAutoSampledDimensions (var samples)
 Adds auto sampled dimensions to a sample matrix. More...
 
function add (var newSampesUnfiltered, var newValuesUnfiltered, var newSampleIds)
 Adds new samples to the manager. More...
 
function getInModelSpace ()
 Returns the samples and values in model space format. More...
 
function getInSimulatorSpace ()
 Returns the samples and values in simulator space format. More...
 
function getTransformationValues ()
 Transformation variables. More...
 
function linearEquationToModelSpace (var A, var B)
 Transforms a linear equation. More...
 
function prepareForEvaluation (var filteredSamples, var priorities)
 Prepares samples for evaluation. More...
 
function saveToDisk (var outputDirectory)
 Saves the current sampleset to disk. More...
 

Detailed Description

This class processes new samples and stores them, so that they can later be requested in both simulator and toolbox space.

This class handles all the post-processing needed to a/ filter the correct outputs b/ convert real/imaginary parts of a complex number to either the modulus, the phase, a complex number, or the real/imaginary parts.

Constructor & Destructor Documentation

function SampleManager ( var  config)
inline

Class constructor.

Parameters
configNodeConfig object
Returns
Instance of the SampleManager class

Member Function Documentation

function add ( var  newSamplesUnfiltered,
var  newValuesUnfiltered,
var  newSampleIds 
)

Adds new samples to the manager.

Adds newly evaluated samples to the list.

Return values
numAddednumber of samples added
numDuplicatenumber of duplicate samples
numInvalidnumber of invalid samples
numOutOfRangenumber of samples that are not in the defined input range

These samples must be passed in unfiltered form (ie: they must be in simulator space).

Todo:
Dummy values don't work at the moment:
  • samples -> prepareForEvaluation -> might give duplicates that are evaluated twice. If we remove dups before evaluation we should keep track of the removed ones... too much work
  • add: removeDups should be done on M3 space samples, as simulator space samples are thrown away which are in fact unique samples (with their dummy values). too much work conclusion: dummy values don't work
Todo:
multiobjective case -> keep record of best pareto front ?
function addAutoSampledDimensions ( var  samples)

Adds auto sampled dimensions to a sample matrix.

Add auto-sampled dimensions to a sample set which was sampled without being aware of the existing of these auto-sampled dimensions.

Parameters
samplessample Matrix
Return values
newSamplesupdated sample matrix
function getInModelSpace ( )

Returns the samples and values in model space format.

Get the current list of evaluated samples in model space.

Return values
samplessample matrix
valuesvalue matrix
function getInSimulatorSpace ( )

Returns the samples and values in simulator space format.

Get the current list of evaluated samples in simulator space.

Return values
samplesUnfilteredsample matrix
valuesUnfilteredvalue matrix
function getNrSamples ( )
inline

Gets the number of samples in the manager.

Return values
nrValidnumber of valid samples
nrFailednumber of failed samples
function getTransformationValues ( )

Transformation variables.

Get transformation values.

Return values
transfmatrix with translate (1st row) and scale (2nd row) variables
function getTriangulationObj ( )
inline

Returns the triangulation object.

Return values
tTriangulation object
function linearEquationToModelSpace ( var  A,
var  B 
)

Transforms a linear equation.

Converts coefficients of the linear (in)equation Ax = B to model space.

Parameters
ALeft side of the linear equation
BRight side of the linear equation
Return values
newAupdated A
newBupdated B
  • Transformation
  • insert dummy values
  • input select
function prepareForEvaluation ( var  filteredSamples,
var  priorities 
)

Prepares samples for evaluation.

Prepare newly selected sample points for evaluation.

Parameters
filteredSamplessample matrix
prioritiesassociated priorities
Return values
samplesprepared samples
function saveToDisk ( var  outputDirectory)

Saves the current sampleset to disk.

Store succesful & failed samples to disk.

Parameters
outputDirectoryThe directory to save them in

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