Compass Solver
The COMPASS local phase of Industrial Strength COMPASS (ISC): a noise-tolerant local search over integer-ordered variables that converges to a locally optimal solution. Each iteration:
forms the most-promising area (MPA) around the current sample-best
x*from the points visited so far (see MostPromisingArea);draws sampleSize candidate points from the MPA with the RmdSampler and adds the feasible von Neumann neighbors of
x*;allocates simulation replications to the candidates and to the previously visited points via the SimulationAllocationRuleIfc (an increasing schedule that drives estimation noise down);
updates
x*to the best of all visited solutions.
Stopping (and the indifference-zone δ_L). The search stops when the MPA collapses to a singleton — no feasible neighbor of x* lies inside the MPA. If deltaL is positive, that singleton condition triggers Kim's (2005) fully-sequential local-optimality test (ComparisonWithStandardProcedure) comparing x* against its feasible neighbors; the search terminates only when x* is confirmed locally optimal, otherwise it moves to the better neighbor and continues. If deltaL == 0 (the degraded mode documented for ISC), the local-optimality guarantee is intentionally dropped: the search stops on the MPA-singleton condition alone, bounded by maximumIterations and the allocation schedule. A positive δ_L is required to obtain the local-optimality guarantee.
All randomness is drawn through the solver's single random number stream (rnStream), so a run is reproducible for a fixed stream number. The best solution found is tracked automatically by the base class through the currentSolution setter.
Requires an integer-ordered problem definition. COMPASS searches an integer lattice — its von Neumann neighborhood moves in unit steps — so every input must have granularity 1.0. The constructor throws an IllegalArgumentException when the problem is not integer-ordered.
Parameters
the problem being solved
the evaluator responsible for assessing the quality of solutions
the random number stream number; 0 (the default) means the next available stream
the provider of random number streams; defaults to a fresh RNStreamProvider
the number of MPA candidate points drawn each iteration (the paper's m_L)
the simulation-allocation rule; defaults to FixedScheduleSAR
the constraint-pruning strategy; defaults to BruteForceRedundancyChecker
prune the MPA's halfway hyperplanes every this many iterations (the paper's c_p)
the local-optimality indifference zone δ_L; defaults to the problem's indifference-zone parameter (ISC appendix Table III: δ_L default δ_C); 0.0 selects degraded mode (stop on the MPA-singleton condition with no local-optimality test)
the Kim (2005) test used when deltaL> 0; built from deltaL if null
the maximum number of COMPASS iterations
the cap on the total replications a single COMPASS run may request; defaults to defaultMaxReplications. A best-effort safety valve bounding a run on a noisy, flat landscape.
strategy for the number of replications per (new-point) evaluation
an optional name for the solver
Constructors
Constructs a COMPASS solver using a fixed number of replications per new-point evaluation.
Properties
Structured, ordered snapshot of the solver's configuration — the same fields the toString implementations expose, in a form that downstream consumers can iterate (reporting, machine-readable summary artifacts, "compare two runs" tooling).
The current locally-best solution discovered by COMPASS.
The cap on the total number of replications a single COMPASS run may request. When the accumulated request count reaches this cap the search stops (best-effort), bounding the run even when a noisy, flat landscape would otherwise keep the search moving. Must be >= 1. Complements the per-iteration maxIterations ceiling and the local-optimality test's own per-system cap.
Prune the MPA's halfway hyperplanes every this many iterations. Must be >= 1.
The constraint-pruning strategy. Cannot be changed while the solver is running.
The number of MPA candidate points drawn each iteration. Must be >= 1.
The simulation-allocation rule. Cannot be changed while the solver is running.
An explicit starting point (e.g., a niche seed from the ISC global phase). When set, it takes precedence over the inherited startingPoint. When seed is null, the inherited startingPoint is used if it was supplied; otherwise the startingPoint() function provides a random feasible point or the configured generator's point.
A read-only snapshot of the visited points and their accumulated solutions.
Functions
A hook for subclasses to inject their specific internal state metrics into the snapshot without having to override the entire makeSolverStateSnapshot method.
Subclasses may implement this function to prepare the solver before running the first iteration. Generally, it is sufficient to just implement the startingPoint() function.
Subclasses should implement this function to determine if the solver should continue running iterations. This will likely include some implementation of stopping criteria. This function should implement stopping criteria based on the quality of the solution. The number of iterations, compared to the maximum number of iterations, is automatically checked after each step in the iterative process. Unless overridden, this function returns false by default, which indicates that the solution quality criteria have not been satisfied. This will cause the solver to iterate through all iterations of the solution process up to the maximum number of iterations. Alternatively, the user can specify an instance of the SolutionQualityEvaluatorIfc interface to determine if the solution quality has been reached.
This function should contain the logic that iteratively executes until the maximum number of iterations is reached or until the stopping criteria is met. The base implementation calls nextPoint() to determine the next point to evaluate, requests an evaluation of the point, and then updates the current solution if the resulting solution is better than the current solution. Generally, implementing startingPoint() and nextPoint() should be adequate. The property iterationCounter represents the current iteration within the mainIteration() function. That is, the value of iterationCounter is incremented prior to the execution of the mainIteration() function.