C# Class SwarmOps.FitnessTraceQuartiles

Store fitness-values at intervals during optimization runs and write their quartiles to a file afterwards. This only supports a fixed number of optimization runs and iterations per run which must therefore be known in advance. Keep the number of intervals small because it requires much memory.
A matrix of fitness values is being stored and their quartiles computed after optimization.
Inheritance: FitnessTrace
Mostra file Open project: DanWBR/dwsim3 Class Usage Examples

Protected Properties

Property Type Description
Trace List[]

Public Methods

Method Description
Clear ( ) : void

Clear the stored fitness trace.

FitnessTraceQuartiles ( int numRuns, int numIterations, int numIntervals ) : System.Collections.Generic

Construct a new object.

FitnessTraceQuartiles ( int numRuns, int numIterations, int numIntervals, FitnessTrace chainedFitnessTrace ) : System.Collections.Generic

Construct a new object.

Write ( TextWriter writer ) : void

Write fitness-trace to a TextWriter stream.

Protected Methods

Method Description
Log ( int index, double fitness, bool feasible ) : void

Log a fitness.

Method Details

Clear() public method

Clear the stored fitness trace.
public Clear ( ) : void
return void

FitnessTraceQuartiles() public method

Construct a new object.
public FitnessTraceQuartiles ( int numRuns, int numIterations, int numIntervals ) : System.Collections.Generic
numRuns int Number of optimization to be performed.
numIterations int Number of iterations per optimization run.
numIntervals int Approximate number of intervals to show quartiles.
return System.Collections.Generic

FitnessTraceQuartiles() public method

Construct a new object.
public FitnessTraceQuartiles ( int numRuns, int numIterations, int numIntervals, FitnessTrace chainedFitnessTrace ) : System.Collections.Generic
numRuns int Number of optimization to be performed.
numIterations int Number of iterations per optimization run.
numIntervals int Approximate number of intervals to show quartiles.
chainedFitnessTrace FitnessTrace Chained FitnessTrace object.
return System.Collections.Generic

Log() protected method

Log a fitness.
protected Log ( int index, double fitness, bool feasible ) : void
index int Index into fitness-trace, mapped from optimization iteration.
fitness double Fitness value to log.
feasible bool Feasibility (constraint satisfaction) to log.
return void

Write() public method

Write fitness-trace to a TextWriter stream.
public Write ( TextWriter writer ) : void
writer System.IO.TextWriter
return void

Property Details

Trace protected_oe property

Matrix for storage of the fitness trace.
protected List[] Trace
return List[]