Module org.maxicp

Class ModelStructureAnalyzer

java.lang.Object
org.maxicp.search.blackbox.ModelStructureAnalyzer

public final class ModelStructureAnalyzer extends Object
Generic, problem-independent structural analyzer for a constraint model.

Inspects the constraint hypergraph, functional equality definitions, and objective AST to derive:

  • Primary vs. secondary (functionally defined or degree-≤1 objective-slack) decision variables,
  • Initial structural variable weights and primal constraint-graph adjacency lists,
  • Per-variable objective polarities (-1 prefer min, +1 prefer max, 0 neutral),
  • Dominated degree-≤1 table-slack variables that can be assigned their optimal bound once primary variables are fixed.
  • Method Details

    • analyze

      public static ModelStructureAnalyzer analyze(ModelDispatcher model, List<IntExpression> vars, Objective objective)
    • nVars

      public int nVars()
    • primaryIndices

      public int[] primaryIndices()
    • secondaryIndices

      public int[] secondaryIndices()
    • isSecondary

      public boolean isSecondary(int varIndex)
    • dominantSlackIndices

      public int[] dominantSlackIndices()
    • constraintDegree

      public int constraintDegree(int varIndex)
    • structuralWeight

      public double structuralWeight(int varIndex)
    • objectivePolarity

      public int objectivePolarity(int varIndex)
    • objectiveValueCosts

      public long[] objectiveValueCosts(int varIndex)
    • neighbors

      public int[] neighbors(int varIndex)