CrossEntropySolver

constructor(problemDefinition: ProblemDefinition, evaluator: EvaluatorIfc, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = RNStreamProvider(), ceSampler: CESampler = CENormalSampler(problemDefinition), maxIterations: Int = ceDefaultMaxIterations, replicationsPerEvaluation: ReplicationPerEvaluationIfc, solutionEqualityChecker: SolutionEqualityIfc = InputsAndConfidenceIntervalEquality(), name: String? = null)(source)

Parameters

evaluator

The evaluator responsible for assessing the quality of solutions. Must implement the EvaluatorIfc interface.

streamNum

the single random number stream number for the solver; defaults to 0 (the next available stream). The solver's base stream uses this number, and the attached sampler is given the next available stream from the same provider, so the base and the sampler are distinct.

streamProvider

the provider of random number streams; defaults to a fresh RNStreamProvider, so each solver has its own streams.

ceSampler

the cross-entropy sampler (reference distribution). By default this is a CENormalSampler. The supplied sampler is attached to this solver (adopted onto the solver's provider), so a sampler can be built and exercised standalone and then handed to the solver. The sampler cannot be changed while the solver is running.

maxIterations

The maximum number of iterations allowed for the search process.

replicationsPerEvaluation

Strategy to determine the number of replications to perform for each evaluation.

solutionEqualityChecker

Used when testing if solutions have converged for equality between solutions. The default is InputsAndConfidenceIntervalEquality, which checks if the inputs are the same and their is no statistical difference between the solutions

name

Optional name identifier for this instance of solver.


constructor(problemDefinition: ProblemDefinition, evaluator: EvaluatorIfc, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = RNStreamProvider(), ceSampler: CESampler = CENormalSampler(problemDefinition), maxIterations: Int = ceDefaultMaxIterations, replicationsPerEvaluation: Int = defaultReplicationsPerEvaluation, solutionEqualityChecker: SolutionEqualityIfc = InputsAndConfidenceIntervalEquality(), name: String? = null)(source)

Constructs an instance of CrossEntropySolver with specified parameters.

Parameters

evaluator

The evaluator responsible for assessing the quality of solutions. Must implement the EvaluatorIfc interface.

streamNum

the single random number stream number for the solver; defaults to 0 (the next available stream).

streamProvider

the provider of random number streams; defaults to a fresh RNStreamProvider, so each solver has its own streams.

ceSampler

the cross-entropy sampler (reference distribution). By default this is a CENormalSampler; it is attached to this solver (adopted onto the solver's provider).

maxIterations

The maximum number of iterations allowed for the search process.

replicationsPerEvaluation

The number of replications to perform for each evaluation of a solution.

name

Optional name identifier for this instance of the solver.