RandomRestartSolver

constructor(restartingSolver: Solver, maxNumRestarts: Int = defaultMaxRestarts, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = RNStreamProvider(), name: String? = null)(source)

Constructs a sequential random-restart solver around an existing inner solver instance. This is the historical constructor: the instance is reused for every restart, one restart at a time.

Parameters

restartingSolver

The solver to be used for the randomized restarts.

maxNumRestarts

The maximum number of restarts to be performed.

streamNum

The random number stream number to be used for this solver.

streamProvider

The random number stream provider to be used for this solver.

name

Optional name identifier for this instance of the solver.


constructor(problemDefinition: ProblemDefinition, evaluator: EvaluatorIfc, solverFactory: SolverFactoryIfc, memberEvaluatorFactory: MemberEvaluatorFactoryIfc? = null, maxNumRestarts: Int = defaultMaxRestarts, concurrentRestarts: Int = 1, concurrentOptions: ConcurrentRunOptions = ConcurrentRunOptions(), replicationsPerEvaluation: ReplicationPerEvaluationIfc = FixedReplicationsPerEvaluation(defaultReplicationsPerEvaluation), streamNum: Int = 0, streamProvider: RNStreamProviderIfc = RNStreamProvider(), name: String? = null)(source)

Constructs a factory-based random-restart solver, capable of running restarts concurrently.

Parameters

problemDefinition

the problem being solved

evaluator

the outer solver's evaluator; used to evaluate the initial point and the optional confirmation stage. With concurrentRestarts = 1 it is also the evaluator of the (single, reused) inner solver instance created from the factory.

solverFactory

creates the inner solver instances; see SolverFactoryIfc

memberEvaluatorFactory

provisions per-restart evaluation resources; required when concurrentRestarts > 1

maxNumRestarts

the maximum number of restarts to be performed

concurrentRestarts

the number of restarts allowed to run at the same time; 1 (the default) preserves the sequential behavior

concurrentOptions

stream-block size and optional confirmation stage; see ConcurrentRunOptions

replicationsPerEvaluation

the replication strategy for the outer solver's own evaluations (the initial point)

streamNum

the random number stream number for the outer restart driver

streamProvider

the stream provider for the outer restart driver

name

optional name identifier for this instance of the solver