Package-level declarations

Types

Link copied to clipboard

Arithmetical (geometric) crossover (§A.8): draws β ~ U(0,1) and forms the two convex combinations β·x_i + (1−β)·x_j and (1−β)·x_i + β·x_j. The solver rounds each offspring to the integer grid and keeps the parents instead of any offspring that is infeasible.

Link copied to clipboard

A batch simulation-allocation rule: it distributes an additional replication budget across the whole set of competing solutions at once (rather than one solution at a time). This is required by allocation schemes such as OCBA whose per-system effort depends on the means and variances of all the competitors. CompassSolver uses this batch path when its allocation rule implements this interface, sizing the budget from the rule's per-solution schedule and then letting the rule reallocate it.

Link copied to clipboard
class BruteForceRedundancyChecker(val tolerance: Double = HalfSpace.defaultTolerance, val maxRows: Int = DEFAULT_MAX_ROWS) : RedundantConstraintChecker

An exact, dependency-free redundancy checker for a continuous polytope based on Fourier–Motzkin elimination. A half-space a · x <= b is redundant with respect to others when the system others ∧ (a · x > b) is infeasible. Strict violation is approximated by the closed system others ∧ (-a · x <= -b - tolerance); if that system has no real solution, the target adds nothing and is redundant.

Link copied to clipboard
class BudgetRule(var replicationBudget: Int) : NgaTransitionRuleIfc

Soft-budget transition rule (§A.12): transition once the global phase has consumed at least replicationBudget simulation replications.

Link copied to clipboard
class CleanUpProcedure(val problemDefinition: ProblemDefinition, var deltaC: Double, var oneMinusAlphaC: Double = DEFAULT_CONFIDENCE, var maxReplicationsPerSystem: Int = DEFAULT_MAX_REPLICATIONS_PER_SYSTEM, var feasibilityCILevel: Double = DEFAULT_FEASIBILITY_CI_LEVEL)

The ISC clean-up (ranking & selection) phase. After the global and local phases produce a set of candidate local optima, clean-up (1) screens them with a subset-selection rule, (2) selects the best survivor — with a correct-selection guarantee when an indifference zone is supplied — and (3) reports a confidence interval for the chosen system's objective.

Link copied to clipboard
data class CleanUpResult(val best: Solution, val confidenceInterval: Interval, val usedFeasibleSubset: Boolean)

The outcome of CleanUpProcedure.cleanUp: the selected best solution, its reported confidence interval, and whether a response-feasible subset was used (false means every candidate was response-infeasible and the least-infeasible one was returned).

Link copied to clipboard
class ComparisonWithStandardProcedure(var alpha: Double = DEFAULT_ALPHA, var delta: Double, var n0: Int = DEFAULT_N0, var c: Int = 1, var maxReplications: Int = DEFAULT_MAX_REPLICATIONS)

Kim's (2005) fully-sequential comparison with a standard procedure, used by COMPASS as the local-optimality test: the current center x* is the standard, its neighbors are the alternatives, and the procedure decides — with a controlled error probability — whether any neighbor is better than x* by more than the indifference amount delta.

Link copied to clipboard
class CompassSolver @JvmOverloads constructor(problemDefinition: ProblemDefinition, evaluator: EvaluatorIfc, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = RNStreamProvider(), sampleSize: Int = defaultSampleSize, sar: SimulationAllocationRuleIfc = FixedScheduleSAR(), redundancyChecker: RedundantConstraintChecker = BruteForceRedundancyChecker(), pruneEvery: Int = defaultPruneEvery, deltaL: Double = problemDefinition.indifferenceZoneParameter, localOptimalityTest: ComparisonWithStandardProcedure? = null, maximumIterations: Int = compassDefaultMaxIterations, maxReplications: Int = defaultMaxReplications, replicationsPerEvaluation: ReplicationPerEvaluationIfc, name: String? = null) : StochasticSolver

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:

Link copied to clipboard
class DominanceRule(var alpha: Double = DEFAULT_ALPHA) : NgaTransitionRuleIfc

Dominance transition rule (§A.12.4): transition once one niche statistically dominates all of the others — its center's mean is better than every other niche center's mean by more than a Student-t margin. The per-comparison level uses the Bonferroni-style split β = (1−α)^{1/(q−1)} across the q − 1 competing niches, and the margin is t · SE with SE the independent-sampling standard error of the difference of the two centers' objective estimates. With fewer than two niches the rule does not fire (the single-niche rule covers that case).

Link copied to clipboard
class DynamicInbreeding(var m: Int = DEFAULT_M) : MatingRestrictionIfc

Dynamic-inbreeding mating (Algorithm 4, §A.7): sample m candidate partners from the pool and prefer the best candidate drawn from the same niche as the individual; if none of the sampled candidates share the individual's niche, fall back to the geometrically closest candidate. This keeps recombination local to a niche while still allowing occasional cross-niche mating.

Link copied to clipboard
data class FitnessGroup(val members: List<SharedFitness>)

A group of population members judged statistically indistinguishable in fitness.

Link copied to clipboard

Fitness sharing for the ISC global phase (§A.4). The raw fitness f (the penalized objective, minimized) is discounted by the niche size m so that members in crowded niches become less attractive: f_sh = f / m when f < 0 and f_sh = f · m when f ≥ 0 (both move f toward a worse — larger — value as m grows). The objective-estimate variance is scaled by the same m. Members not assigned to any niche form a single non-niched group whose size plays the role of m (triangular sharing).

Link copied to clipboard
class FixedScheduleSAR(val initialReplications: Int = DEFAULT_INITIAL_REPLICATIONS, val epsilon: Double = DEFAULT_EPSILON) : SimulationAllocationRuleIfc

The deterministic ISC allocation schedule: the target number of replications for a solution at iteration k grows as max(n0, ceil(n0 * (ln k)^(1 + epsilon))), and the rule returns the shortfall between that target and the replications the solution already has. The slightly-super-logarithmic growth (epsilon > 0) matches the COMPASS sample-size schedule that drives simulation error to zero while keeping total effort modest.

Link copied to clipboard
class HalfSpace(val a: DoubleArray, val b: Double)

A linear half-space in the normalized "less-than-or-equal" orientation: the set of points x satisfying a · x <= b. ISC's most-promising-area polytope, the original problem's linear constraints, and the COMPASS halfway hyperplanes are all represented uniformly as half-spaces so that membership tests, redundancy checks, and the RMD sampler can share one representation.

Link copied to clipboard
class ImprovementRule(var tG: Int = DEFAULT_TG) : NgaTransitionRuleIfc

No-improvement transition rule (§A.12): transition once the best (incumbent) solution has not improved for tG consecutive generations.

Link copied to clipboard
class ISCSolver @JvmOverloads constructor(problemDefinition: ProblemDefinition, evaluator: EvaluatorIfc, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = RNStreamProvider(), replicationsPerEvaluation: ReplicationPerEvaluationIfc, deltaC: Double = problemDefinition.indifferenceZoneParameter, deltaL: Double = deltaC, skipGlobalPhase: Boolean = false, globalPhase: NichingGeneticAlgorithmSolver? = null, localPhaseFactory: (InputMap) -> CompassSolver? = null, cleanUp: CleanUpProcedure? = null, globalBudget: Int? = null, maximumIterations: Int = iscDefaultMaxIterations, maxLocalPhaseReplications: Int = CompassSolver.defaultMaxReplications, maxCleanUpReplicationsPerSystem: Int = CleanUpProcedure.DEFAULT_MAX_REPLICATIONS_PER_SYSTEM, name: String? = null) : StochasticSolver

The three-phase Industrial Strength COMPASS (ISC) driver: a global Niching-GA exploration phase, a local COMPASS phase run once per niche seed, and a clean-up ranking-and-selection phase that screens the local optima, selects the best, and reports a confidence interval. It orchestrates the in-package NichingGeneticAlgorithmSolver, CompassSolver, and CleanUpProcedure as a phase state machine: each mainIteration advances one macro-step (run the global phase, run one local search, or finish with clean-up).

Link copied to clipboard
class LinearRankingSelection(var eta: Double = DEFAULT_ETA)

Linear-ranking selection-probability assignment for the ISC global phase (§A.5). Members are ranked best-first by shared fitness; rank i (1 = best, N = worst) receives the Baker linear rank probability p_i = (1/N)(η − 2(η−1)(i−1)/(N−1)), where the selection pressure η ∈ [1,2] is the expected number of offspring of the best individual. These probabilities are then made group-average: every member of a noise-aware FitnessGroup receives the average rank probability of that group, so statistically indistinguishable members are selected with equal probability. The probabilities sum to one.

Link copied to clipboard
fun interface MatingRestrictionIfc

Mating-restriction strategy for the ISC global phase: given an individual chosen to reproduce, pick a partner. Restricting mates to the same niche preserves the niche structure during recombination.

Link copied to clipboard
class MostPromisingArea(val problemDefinition: ProblemDefinition, val center: DoubleArray, val visited: List<DoubleArray>)

The COMPASS most-promising-area (MPA) around a current best (center) point x*. The MPA is the set of feasible points that are at least as close to x* as to every other point visited so far. Geometrically it is the intersection of:

Link copied to clipboard
fun interface NgaCrossoverIfc

Recombination strategy for the ISC global phase. Produces offspring coordinate vectors from two parent coordinate vectors; the solver rounds the result to the integer grid and discards offspring that are infeasible (keeping the parents in that case).

Link copied to clipboard
fun interface NgaMutationIfc

Mutation strategy for the ISC global phase. Perturbs a single coordinate vector; the solver rounds the result to the integer grid and enforces feasibility.

Link copied to clipboard
fun interface NgaTransitionRuleIfc

A global→local transition rule (§A.12): decides when the ISC global phase (the Niching GA) should stop so that the local COMPASS phase can begin. The Niching GA transitions when any of its configured rules fires.

Link copied to clipboard
data class Niche(val center: Solution, val members: List<Solution>)

A niche discovered by the Industrial Strength COMPASS global phase: a center "seed" solution and the population members clustered around it (within the niche radius). The center is the best solution in the niche and is used as the start for a COMPASS local search.

Link copied to clipboard
class NicheIdentifier(val checker: RedundantConstraintChecker = BruteForceRedundancyChecker())

Niche identification for the ISC global phase (Algorithm 2). Operating over the population (not all of the feasible region), it finds the niche centers L: population members that are at least as good as every one of their active neighbors. A member j is an active neighbor of i when the COMPASS halfway hyperplane separating i from j actively bounds i's most-promising area — i.e. it is not redundant given i's other halfway hyperplanes and the problem's original linear constraints. This is exactly the active-set structure the COMPASS pruner uses, so it is reused here via the same RedundantConstraintChecker.

Link copied to clipboard
data class NicheResult(val niches: List<Niche>, val radius: Double, val count: Int)

The result of niche identification (ISC Algorithm 2): the identified niches, the niche radius r, and the niche count q = |L|.

Link copied to clipboard
class NichingGeneticAlgorithmSolver @JvmOverloads constructor(problemDefinition: ProblemDefinition, evaluator: EvaluatorIfc, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = RNStreamProvider(), populationSize: Int = defaultPopulationSize, val nicheIdentifier: NicheIdentifier = NicheIdentifier(), val fitnessSharing: FitnessSharing = FitnessSharing(), val grouping: NoiseGroupingProcedure = NoiseGroupingProcedure(), val ranking: LinearRankingSelection = LinearRankingSelection(), val sampling: StochasticUniversalSampling = StochasticUniversalSampling(), val mating: MatingRestrictionIfc = DynamicInbreeding(), val crossover: NgaCrossoverIfc = ArithmeticalCrossover(), val mutation: NgaMutationIfc = UniformMutation(), var conserveNicheCenters: Boolean = false, transitionRules: List<NgaTransitionRuleIfc> = listOf(SingleNicheRule(), ImprovementRule()), maxIterations: Int = ngaDefaultMaxIterations, replicationsPerEvaluation: ReplicationPerEvaluationIfc, name: String? = null) : StochasticSolver

The Niching Genetic Algorithm (NGA), the global exploration phase of Industrial Strength COMPASS (ISC Algorithm 1). It maintains a population of integer-feasible solutions and, each generation:

Link copied to clipboard
class NoiseGroupingProcedure(var alphaG: Double = DEFAULT_ALPHA_G, var gm: Int = DEFAULT_GM)

Noise-aware grouping for the ISC global phase (Algorithm 3). Because fitness is estimated with simulation noise, members whose shared-fitness differences fall within a studentized-range threshold R = Q^{1−α_G} · S / √n̄ are treated as one group and later given a common (group-average) selection probability. Here Q^{1−α_G} is the studentized-range quantile (Tukey.invCDF), S is the pooled standard deviation of the (variance-scaled) fitness estimates, and is the average replication count. At most gm groups are formed; once that many groups exist all remaining members join the last group.

Link copied to clipboard
class NonUniformMutation(var b: Double = DEFAULT_B, var bigK: Int = DEFAULT_K, var p3: Double = DEFAULT_P3) : NgaMutationIfc

Non-uniform (Michalewicz) mutation (§A.9): each coordinate is, with probability p3, perturbed by Δ(k, y) = y · U(0,1) · max(0.005, (1 − k/K)^b), where k is the current generation, y is the distance to the chosen bound, and the perturbation direction (toward the upper or lower bound) is chosen with equal probability. The step shrinks as the generation count k approaches bigK, focusing the search late in the run.

Link copied to clipboard
class OcbaSAR(val initialReplications: Int = FixedScheduleSAR.DEFAULT_INITIAL_REPLICATIONS, val epsilon: Double = FixedScheduleSAR.DEFAULT_EPSILON, val varianceFloor: Double = DEFAULT_VARIANCE_FLOOR, val deltaFloor: Double = DEFAULT_DELTA_FLOOR) : SimulationAllocationRuleIfc, BatchAllocationRuleIfc

The Optimal Computing Budget Allocation (OCBA) simulation-allocation rule (ISC appendix Algorithm 7). Given the current sample means and variances of the competing solutions, OCBA distributes a replication budget to maximize the probability of correct selection: more effort goes to systems that are close to the current best (small mean gap) and noisy (large variance), with the best system itself sampled in proportion to the aggregate competition. For minimization, with best b = argmin X̄_i, the allocation satisfies

Link copied to clipboard

Strategy for deciding whether a candidate linear constraint is redundant given a set of other linear constraints. A constraint a · x <= b is redundant with respect to a set S of half-spaces when every point satisfying S already satisfies it — i.e. removing it does not change the feasible region. ISC uses this to prune the most-promising-area polytope so the RMD sampler walks only over the constraints that actually bind.

Link copied to clipboard
class RmdSampler(val problemDefinition: ProblemDefinition, val rnStream: RNStreamIfc, val defaultWarmUp: Int = DEFAULT_WARM_UP)

A coordinate-direction (RMD — random multidimensional) sampler that draws points approximately uniformly from a MostPromisingArea. Starting from a point known to lie in the MPA, the sampler repeatedly picks a random coordinate and resamples that coordinate from its feasible interval, holding the others fixed — a Gibbs-style walk over the polytope. After a warm-up of such moves the current point is returned.

Link copied to clipboard
data class SharedFitness(val solution: Solution, val sharedFitness: Double, val sharedVariance: Double, val nicheSize: Int)

A population member's shared (niche-discounted) fitness.

Link copied to clipboard
class SimplexRedundancyChecker(val tolerance: Double = HalfSpace.defaultTolerance, val maxIterations: Int = DEFAULT_MAX_ITERATIONS) : RedundantConstraintChecker

A linear-programming–backed redundancy checker built on Hipparchus's SimplexSolver. A half-space a · x <= b is redundant with respect to a set of other half-spaces exactly when the largest value of a · x over the region defined by the others does not exceed b. This checker therefore solves the LP max a · x s.t. others and declares the target redundant when the optimum is <= b (within tolerance):

Link copied to clipboard

Strategy for deciding how many additional simulation replications a solution should receive at a given COMPASS iteration. ISC increases each surviving point's simulation effort as the search proceeds so that estimation noise shrinks fast enough to guarantee convergence. A rule maps the current iteration count and a solution's accumulated replications to the number of extra replications to request now (never negative).

Link copied to clipboard

Single-niche transition rule (§A.12): transition once only one niche remains, since further global exploration cannot separate additional basins.

Link copied to clipboard
data class StandardComparisonResult(val standardIsBest: Boolean, val winner: Solution, val finalStandard: Solution, val observations: Map<InputMap, Int>)

The outcome of a ComparisonWithStandardProcedure run.

Link copied to clipboard

Stochastic Universal Sampling (§A.5): draws individuals proportionally to their selection probabilities using a single random start and n equally-spaced pointers, giving lower-variance sampling than independent roulette spins. A run is reproducible for a fixed random stream.

Link copied to clipboard
class UniformMutation(var mutationProbability: Double? = null) : NgaMutationIfc

Uniform mutation (§A.9): each coordinate is, with probability p4 = 1/d, reset to a value drawn uniformly over its range. Because every value remains reachable with positive probability, uniform mutation preserves the NGA's global-convergence guarantee.

Functions

Link copied to clipboard

Merges two solutions that share the same input point into one solution whose objective and response estimates pool the replications of both (via EstimatedResponse.merge). Used by COMPASS to accumulate simulation effort on a visited point across iterations.