All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.ortools.constraintsolver.Solver Maven / Gradle / Ivy

The newest version!
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.12
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.google.ortools.constraintsolver;

import com.google.ortools.constraintsolver.ConstraintSolverParameters;
import com.google.ortools.constraintsolver.RegularLimitParameters;

// Used to wrap DisplayCallback (std::function)
// see https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html
import java.util.function.Supplier;
// Used to wrap std::function
// see https://docs.oracle.com/javase/8/docs/api/java/util/function/BooleanSupplier.html
import java.util.function.BooleanSupplier;

// Used to wrap IndexEvaluator1 (std::function)
// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongUnaryOperator.html
import java.util.function.LongUnaryOperator;
// Used to wrap IndexEvaluator2 (std::function)
// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongBinaryOperator.html
import java.util.function.LongBinaryOperator;
// Used to wrap IndexEvaluator3 (std::function)
// note: Java does not provide TernaryOperator so we provide it.
import com.google.ortools.constraintsolver.LongTernaryOperator;
// Used to wrap std::function
// note: Java does not provide it, so we provide it.
import com.google.ortools.constraintsolver.IntIntToLongFunction;

// Used to wrap IndexFilter1 (std::function)
// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongPredicate.html
import java.util.function.LongPredicate;

// Used to wrap std::function
// note: Java does not provide TernaryPredicate so we provide it
import com.google.ortools.constraintsolver.LongTernaryPredicate;

// Used to wrap std::function
// see https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html
import java.util.function.Consumer;

// Used to wrap ObjectiveWatcher (std::function)
// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongConsumer.html
import java.util.function.LongConsumer;

// Used to wrap Closure (std::function)
// see https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html
import java.lang.Runnable;

public class Solver {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected Solver(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Solver obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        mainJNI.delete_Solver(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  /**
   * This exceptions signal that a failure has been raised in the C++ world.
   */
  public static class FailException extends Exception {
    public FailException() {
      super();
    }

    public FailException(String message) {
      super(message);
    }
  }

  public IntVar[] makeIntVarArray(int count, long min, long max) {
    IntVar[] array = new IntVar[count];
    for (int i = 0; i < count; ++i) {
      array[i] = makeIntVar(min, max);
    }
    return array;
  }

  public IntVar[] makeIntVarArray(int count, long min, long max, String name) {
    IntVar[] array = new IntVar[count];
    for (int i = 0; i < count; ++i) {
      String var_name = name + i;
      array[i] = makeIntVar(min, max, var_name);
    }
    return array;
  }

  public IntVar[] makeBoolVarArray(int count) {
    IntVar[] array = new IntVar[count];
    for (int i = 0; i < count; ++i) {
      array[i] = makeBoolVar();
    }
    return array;
  }

  public IntVar[] makeBoolVarArray(int count, String name) {
    IntVar[] array = new IntVar[count];
    for (int i = 0; i < count; ++i) {
      String var_name = name + i;
      array[i] = makeBoolVar(var_name);
    }
    return array;
  }

  public IntervalVar[] makeFixedDurationIntervalVarArray(int count,
                                                         long start_min,
                                                         long start_max,
                                                         long duration,
                                                         boolean optional) {
    IntervalVar[] array = new IntervalVar[count];
    for (int i = 0; i < count; ++i) {
      array[i] = makeFixedDurationIntervalVar(start_min,
                                              start_max,
                                              duration,
                                              optional,
                                              "");
    }
    return array;
  }

  public IntervalVar[] makeFixedDurationIntervalVarArray(int count,
                                                         long start_min,
                                                         long start_max,
                                                         long duration,
                                                         boolean optional,
                                                         String name) {
    IntervalVar[] array = new IntervalVar[count];
    for (int i = 0; i < count; ++i) {
      array[i] = makeFixedDurationIntervalVar(start_min,
                                              start_max,
                                              duration,
                                              optional,
                                              name + i);
    }
    return array;
  }

  static public class IntegerCastInfo {
    private transient long swigCPtr;
    protected transient boolean swigCMemOwn;
  
    protected IntegerCastInfo(long cPtr, boolean cMemoryOwn) {
      swigCMemOwn = cMemoryOwn;
      swigCPtr = cPtr;
    }
  
    protected static long getCPtr(IntegerCastInfo obj) {
      return (obj == null) ? 0 : obj.swigCPtr;
    }
  
    protected void finalize() {
      delete();
    }
  
    public synchronized void delete() {
      if (swigCPtr != 0) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          mainJNI.delete_Solver_IntegerCastInfo(swigCPtr);
        }
        swigCPtr = 0;
      }
    }
  
    public IntegerCastInfo() {
      this(mainJNI.new_Solver_IntegerCastInfo__SWIG_0(), true);
    }
  
    public IntegerCastInfo(IntVar v, IntExpr e, Constraint c) {
      this(mainJNI.new_Solver_IntegerCastInfo__SWIG_1(IntVar.getCPtr(v), v, IntExpr.getCPtr(e), e, Constraint.getCPtr(c), c), true);
    }
  
    public void setVariable(IntVar value) {
      mainJNI.Solver_IntegerCastInfo_variable_set(swigCPtr, this, IntVar.getCPtr(value), value);
    }
  
    public IntVar getVariable() {
      long cPtr = mainJNI.Solver_IntegerCastInfo_variable_get(swigCPtr, this);
      return (cPtr == 0) ? null : new IntVar(cPtr, false);
    }
  
    public void setExpression(IntExpr value) {
      mainJNI.Solver_IntegerCastInfo_expression_set(swigCPtr, this, IntExpr.getCPtr(value), value);
    }
  
    public IntExpr getExpression() {
      long cPtr = mainJNI.Solver_IntegerCastInfo_expression_get(swigCPtr, this);
      return (cPtr == 0) ? null : new IntExpr(cPtr, false);
    }
  
    public void setMaintainer(Constraint value) {
      mainJNI.Solver_IntegerCastInfo_maintainer_set(swigCPtr, this, Constraint.getCPtr(value), value);
    }
  
    public Constraint getMaintainer() {
      long cPtr = mainJNI.Solver_IntegerCastInfo_maintainer_get(swigCPtr, this);
      return (cPtr == 0) ? null : new Constraint(cPtr, false);
    }
  
  }

  public Solver(String name) {
    this(mainJNI.new_Solver__SWIG_0(name), true);
  }

  public Solver(String name, com.google.ortools.constraintsolver.ConstraintSolverParameters parameters) {
    this(mainJNI.new_Solver__SWIG_1(name, parameters.toByteArray()), true);
  }

  public com.google.ortools.constraintsolver.ConstraintSolverParameters parameters() {
  byte[] buf = mainJNI.Solver_parameters(swigCPtr, this);
  if (buf == null || buf.length == 0) {
    return null;
  }
  try {
    return com.google.ortools.constraintsolver.ConstraintSolverParameters.parseFrom(buf);
  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
    throw new RuntimeException(
        "Unable to parse com.google.ortools.constraintsolver.ConstraintSolverParameters protocol message.");
  }
}

  public static com.google.ortools.constraintsolver.ConstraintSolverParameters defaultSolverParameters() {
  byte[] buf = mainJNI.Solver_defaultSolverParameters();
  if (buf == null || buf.length == 0) {
    return null;
  }
  try {
    return com.google.ortools.constraintsolver.ConstraintSolverParameters.parseFrom(buf);
  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
    throw new RuntimeException(
        "Unable to parse com.google.ortools.constraintsolver.ConstraintSolverParameters protocol message.");
  }
}

  public void addConstraint(Constraint c) {
    mainJNI.Solver_addConstraint(swigCPtr, this, Constraint.getCPtr(c), c);
  }

  public void addCastConstraint(CastConstraint constraint, IntVar target_var, IntExpr expr) {
    mainJNI.Solver_addCastConstraint(swigCPtr, this, CastConstraint.getCPtr(constraint), constraint, IntVar.getCPtr(target_var), target_var, IntExpr.getCPtr(expr), expr);
  }

  public boolean solve(DecisionBuilder db, SearchMonitor[] monitors) {
    return mainJNI.Solver_solve__SWIG_0(swigCPtr, this, DecisionBuilder.getCPtr(db), db, monitors);
  }

  public boolean solve(DecisionBuilder db) {
    return mainJNI.Solver_solve__SWIG_1(swigCPtr, this, DecisionBuilder.getCPtr(db), db);
  }

  public boolean solve(DecisionBuilder db, SearchMonitor m1) {
    return mainJNI.Solver_solve__SWIG_2(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(m1), m1);
  }

  public boolean solve(DecisionBuilder db, SearchMonitor m1, SearchMonitor m2) {
    return mainJNI.Solver_solve__SWIG_3(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(m1), m1, SearchMonitor.getCPtr(m2), m2);
  }

  public boolean solve(DecisionBuilder db, SearchMonitor m1, SearchMonitor m2, SearchMonitor m3) {
    return mainJNI.Solver_solve__SWIG_4(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(m1), m1, SearchMonitor.getCPtr(m2), m2, SearchMonitor.getCPtr(m3), m3);
  }

  public boolean solve(DecisionBuilder db, SearchMonitor m1, SearchMonitor m2, SearchMonitor m3, SearchMonitor m4) {
    return mainJNI.Solver_solve__SWIG_5(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(m1), m1, SearchMonitor.getCPtr(m2), m2, SearchMonitor.getCPtr(m3), m3, SearchMonitor.getCPtr(m4), m4);
  }

  public void newSearch(DecisionBuilder db, SearchMonitor[] monitors) {
    mainJNI.Solver_newSearch__SWIG_0(swigCPtr, this, DecisionBuilder.getCPtr(db), db, monitors);
  }

  public void newSearch(DecisionBuilder db) {
    mainJNI.Solver_newSearch__SWIG_1(swigCPtr, this, DecisionBuilder.getCPtr(db), db);
  }

  public void newSearch(DecisionBuilder db, SearchMonitor m1) {
    mainJNI.Solver_newSearch__SWIG_2(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(m1), m1);
  }

  public void newSearch(DecisionBuilder db, SearchMonitor m1, SearchMonitor m2) {
    mainJNI.Solver_newSearch__SWIG_3(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(m1), m1, SearchMonitor.getCPtr(m2), m2);
  }

  public void newSearch(DecisionBuilder db, SearchMonitor m1, SearchMonitor m2, SearchMonitor m3) {
    mainJNI.Solver_newSearch__SWIG_4(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(m1), m1, SearchMonitor.getCPtr(m2), m2, SearchMonitor.getCPtr(m3), m3);
  }

  public void newSearch(DecisionBuilder db, SearchMonitor m1, SearchMonitor m2, SearchMonitor m3, SearchMonitor m4) {
    mainJNI.Solver_newSearch__SWIG_5(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(m1), m1, SearchMonitor.getCPtr(m2), m2, SearchMonitor.getCPtr(m3), m3, SearchMonitor.getCPtr(m4), m4);
  }

  public boolean nextSolution() {
    return mainJNI.Solver_nextSolution(swigCPtr, this);
  }

  public void restartSearch() {
    mainJNI.Solver_restartSearch(swigCPtr, this);
  }

  public void endSearch() {
    mainJNI.Solver_endSearch(swigCPtr, this);
  }

  public boolean solveAndCommit(DecisionBuilder db, SearchMonitor[] monitors) {
    return mainJNI.Solver_solveAndCommit__SWIG_0(swigCPtr, this, DecisionBuilder.getCPtr(db), db, monitors);
  }

  public boolean solveAndCommit(DecisionBuilder db) {
    return mainJNI.Solver_solveAndCommit__SWIG_1(swigCPtr, this, DecisionBuilder.getCPtr(db), db);
  }

  public boolean solveAndCommit(DecisionBuilder db, SearchMonitor m1) {
    return mainJNI.Solver_solveAndCommit__SWIG_2(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(m1), m1);
  }

  public boolean solveAndCommit(DecisionBuilder db, SearchMonitor m1, SearchMonitor m2) {
    return mainJNI.Solver_solveAndCommit__SWIG_3(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(m1), m1, SearchMonitor.getCPtr(m2), m2);
  }

  public boolean solveAndCommit(DecisionBuilder db, SearchMonitor m1, SearchMonitor m2, SearchMonitor m3) {
    return mainJNI.Solver_solveAndCommit__SWIG_4(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(m1), m1, SearchMonitor.getCPtr(m2), m2, SearchMonitor.getCPtr(m3), m3);
  }

  public boolean checkAssignment(Assignment solution) {
    return mainJNI.Solver_checkAssignment(swigCPtr, this, Assignment.getCPtr(solution), solution);
  }

  public boolean checkConstraint(Constraint ct) {
    return mainJNI.Solver_checkConstraint(swigCPtr, this, Constraint.getCPtr(ct), ct);
  }

  public int state() {
    return mainJNI.Solver_state(swigCPtr, this);
  }

  public void fail() {
    mainJNI.Solver_fail(swigCPtr, this);
  }

  public String toString() {
    return mainJNI.Solver_toString(swigCPtr, this);
  }

  public static long memoryUsage() {
    return mainJNI.Solver_memoryUsage();
  }

  public long wallTime() {
    return mainJNI.Solver_wallTime(swigCPtr, this);
  }

  public long branches() {
    return mainJNI.Solver_branches(swigCPtr, this);
  }

  public long solutions() {
    return mainJNI.Solver_solutions(swigCPtr, this);
  }

  public long unchecked_solutions() {
    return mainJNI.Solver_unchecked_solutions(swigCPtr, this);
  }

  public long demon_runs(int p) {
    return mainJNI.Solver_demon_runs(swigCPtr, this, p);
  }

  public long failures() {
    return mainJNI.Solver_failures(swigCPtr, this);
  }

  public long neighbors() {
    return mainJNI.Solver_neighbors(swigCPtr, this);
  }

  public long filteredNeighbors() {
    return mainJNI.Solver_filteredNeighbors(swigCPtr, this);
  }

  public long acceptedNeighbors() {
    return mainJNI.Solver_acceptedNeighbors(swigCPtr, this);
  }

  public long stamp() {
    return mainJNI.Solver_stamp(swigCPtr, this);
  }

  public long fail_stamp() {
    return mainJNI.Solver_fail_stamp(swigCPtr, this);
  }

  public int optimization_direction() {
    return mainJNI.Solver_optimization_direction(swigCPtr, this);
  }

  public void set_optimization_direction(int direction) {
    mainJNI.Solver_set_optimization_direction(swigCPtr, this, direction);
  }

  public IntVar makeIntVar(long min, long max, String name) {
    long cPtr = mainJNI.Solver_makeIntVar__SWIG_0(swigCPtr, this, min, max, name);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIntVar(long[] values, String name) {
    long cPtr = mainJNI.Solver_makeIntVar__SWIG_1(swigCPtr, this, values, name);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIntVar(int[] values, String name) {
    long cPtr = mainJNI.Solver_makeIntVar__SWIG_2(swigCPtr, this, values, name);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIntVar(long min, long max) {
    long cPtr = mainJNI.Solver_makeIntVar__SWIG_3(swigCPtr, this, min, max);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIntVar(long[] values) {
    long cPtr = mainJNI.Solver_makeIntVar__SWIG_4(swigCPtr, this, values);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIntVar(int[] values) {
    long cPtr = mainJNI.Solver_makeIntVar__SWIG_5(swigCPtr, this, values);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeBoolVar(String name) {
    long cPtr = mainJNI.Solver_makeBoolVar__SWIG_0(swigCPtr, this, name);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeBoolVar() {
    long cPtr = mainJNI.Solver_makeBoolVar__SWIG_1(swigCPtr, this);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIntConst(long val, String name) {
    long cPtr = mainJNI.Solver_makeIntConst__SWIG_0(swigCPtr, this, val, name);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIntConst(long val) {
    long cPtr = mainJNI.Solver_makeIntConst__SWIG_1(swigCPtr, this, val);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntExpr makeSum(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeSum__SWIG_0(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeSum(IntExpr expr, long value) {
    long cPtr = mainJNI.Solver_makeSum__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeSum(IntVar[] vars) {
    long cPtr = mainJNI.Solver_makeSum__SWIG_2(swigCPtr, this, vars);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeScalProd(IntVar[] vars, long[] coefs) {
    long cPtr = mainJNI.Solver_makeScalProd__SWIG_0(swigCPtr, this, vars, coefs);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeScalProd(IntVar[] vars, int[] coefs) {
    long cPtr = mainJNI.Solver_makeScalProd__SWIG_1(swigCPtr, this, vars, coefs);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeDifference(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeDifference__SWIG_0(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeDifference(long value, IntExpr expr) {
    long cPtr = mainJNI.Solver_makeDifference__SWIG_1(swigCPtr, this, value, IntExpr.getCPtr(expr), expr);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeOpposite(IntExpr expr) {
    long cPtr = mainJNI.Solver_makeOpposite(swigCPtr, this, IntExpr.getCPtr(expr), expr);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeProd(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeProd__SWIG_0(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeProd(IntExpr expr, long value) {
    long cPtr = mainJNI.Solver_makeProd__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeDiv(IntExpr expr, long value) {
    long cPtr = mainJNI.Solver_makeDiv__SWIG_0(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeDiv(IntExpr numerator, IntExpr denominator) {
    long cPtr = mainJNI.Solver_makeDiv__SWIG_1(swigCPtr, this, IntExpr.getCPtr(numerator), numerator, IntExpr.getCPtr(denominator), denominator);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeAbs(IntExpr expr) {
    long cPtr = mainJNI.Solver_makeAbs(swigCPtr, this, IntExpr.getCPtr(expr), expr);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeSquare(IntExpr expr) {
    long cPtr = mainJNI.Solver_makeSquare(swigCPtr, this, IntExpr.getCPtr(expr), expr);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makePower(IntExpr expr, long n) {
    long cPtr = mainJNI.Solver_makePower(swigCPtr, this, IntExpr.getCPtr(expr), expr, n);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeElement(long[] values, IntVar index) {
    long cPtr = mainJNI.Solver_makeElement__SWIG_0(swigCPtr, this, values, IntVar.getCPtr(index), index);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeElement(int[] values, IntVar index) {
    long cPtr = mainJNI.Solver_makeElement__SWIG_1(swigCPtr, this, values, IntVar.getCPtr(index), index);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeElement(LongUnaryOperator values, IntVar index) {
    long cPtr = mainJNI.Solver_makeElement__SWIG_2(swigCPtr, this, values, IntVar.getCPtr(index), index);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeMonotonicElement(LongUnaryOperator values, boolean increasing, IntVar index) {
    long cPtr = mainJNI.Solver_makeMonotonicElement(swigCPtr, this, values, increasing, IntVar.getCPtr(index), index);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeElement(LongBinaryOperator values, IntVar index1, IntVar index2) {
    long cPtr = mainJNI.Solver_makeElement__SWIG_3(swigCPtr, this, values, IntVar.getCPtr(index1), index1, IntVar.getCPtr(index2), index2);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeElement(IntVar[] vars, IntVar index) {
    long cPtr = mainJNI.Solver_makeElement__SWIG_4(swigCPtr, this, vars, IntVar.getCPtr(index), index);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeIndexExpression(IntVar[] vars, long value) {
    long cPtr = mainJNI.Solver_makeIndexExpression(swigCPtr, this, vars, value);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public Constraint makeIfThenElseCt(IntVar condition, IntExpr then_expr, IntExpr else_expr, IntVar target_var) {
    long cPtr = mainJNI.Solver_makeIfThenElseCt(swigCPtr, this, IntVar.getCPtr(condition), condition, IntExpr.getCPtr(then_expr), then_expr, IntExpr.getCPtr(else_expr), else_expr, IntVar.getCPtr(target_var), target_var);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public IntExpr makeMin(IntVar[] vars) {
    long cPtr = mainJNI.Solver_makeMin__SWIG_0(swigCPtr, this, vars);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeMin(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeMin__SWIG_1(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeMin(IntExpr expr, long value) {
    long cPtr = mainJNI.Solver_makeMin__SWIG_2(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeMin(IntExpr expr, int value) {
    long cPtr = mainJNI.Solver_makeMin__SWIG_3(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeMax(IntVar[] vars) {
    long cPtr = mainJNI.Solver_makeMax__SWIG_0(swigCPtr, this, vars);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeMax(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeMax__SWIG_1(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeMax(IntExpr expr, long value) {
    long cPtr = mainJNI.Solver_makeMax__SWIG_2(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeMax(IntExpr expr, int value) {
    long cPtr = mainJNI.Solver_makeMax__SWIG_3(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeConvexPiecewiseExpr(IntExpr expr, long early_cost, long early_date, long late_date, long late_cost) {
    long cPtr = mainJNI.Solver_makeConvexPiecewiseExpr(swigCPtr, this, IntExpr.getCPtr(expr), expr, early_cost, early_date, late_date, late_cost);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeSemiContinuousExpr(IntExpr expr, long fixed_charge, long step) {
    long cPtr = mainJNI.Solver_makeSemiContinuousExpr(swigCPtr, this, IntExpr.getCPtr(expr), expr, fixed_charge, step);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeModulo(IntExpr x, long mod) {
    long cPtr = mainJNI.Solver_makeModulo__SWIG_0(swigCPtr, this, IntExpr.getCPtr(x), x, mod);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeModulo(IntExpr x, IntExpr mod) {
    long cPtr = mainJNI.Solver_makeModulo__SWIG_1(swigCPtr, this, IntExpr.getCPtr(x), x, IntExpr.getCPtr(mod), mod);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntExpr makeConditionalExpression(IntVar condition, IntExpr expr, long unperformed_value) {
    long cPtr = mainJNI.Solver_makeConditionalExpression(swigCPtr, this, IntVar.getCPtr(condition), condition, IntExpr.getCPtr(expr), expr, unperformed_value);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public Constraint makeTrueConstraint() {
    long cPtr = mainJNI.Solver_makeTrueConstraint(swigCPtr, this);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeFalseConstraint() {
    long cPtr = mainJNI.Solver_makeFalseConstraint__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeFalseConstraint(String explanation) {
    long cPtr = mainJNI.Solver_makeFalseConstraint__SWIG_1(swigCPtr, this, explanation);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIsEqualCstCt(IntExpr var, long value, IntVar boolvar) {
    long cPtr = mainJNI.Solver_makeIsEqualCstCt(swigCPtr, this, IntExpr.getCPtr(var), var, value, IntVar.getCPtr(boolvar), boolvar);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public IntVar makeIsEqualCstVar(IntExpr var, long value) {
    long cPtr = mainJNI.Solver_makeIsEqualCstVar(swigCPtr, this, IntExpr.getCPtr(var), var, value);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public Constraint makeIsEqualVar(IntExpr v1, IntExpr v2, IntVar b) {
    long cPtr = mainJNI.Solver_makeIsEqualVar__SWIG_0(swigCPtr, this, IntExpr.getCPtr(v1), v1, IntExpr.getCPtr(v2), v2, IntVar.getCPtr(b), b);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public IntVar makeIsEqualVar(IntExpr v1, IntExpr v2) {
    long cPtr = mainJNI.Solver_makeIsEqualVar__SWIG_1(swigCPtr, this, IntExpr.getCPtr(v1), v1, IntExpr.getCPtr(v2), v2);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public Constraint makeEquality(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeEquality__SWIG_0(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeEquality(IntExpr expr, long value) {
    long cPtr = mainJNI.Solver_makeEquality__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeEquality(IntExpr expr, int value) {
    long cPtr = mainJNI.Solver_makeEquality__SWIG_2(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIsDifferentCstCt(IntExpr var, long value, IntVar boolvar) {
    long cPtr = mainJNI.Solver_makeIsDifferentCstCt__SWIG_0(swigCPtr, this, IntExpr.getCPtr(var), var, value, IntVar.getCPtr(boolvar), boolvar);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public IntVar makeIsDifferentCstVar(IntExpr var, long value) {
    long cPtr = mainJNI.Solver_makeIsDifferentCstVar__SWIG_0(swigCPtr, this, IntExpr.getCPtr(var), var, value);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIsDifferentCstVar(IntExpr v1, IntExpr v2) {
    long cPtr = mainJNI.Solver_makeIsDifferentCstVar__SWIG_1(swigCPtr, this, IntExpr.getCPtr(v1), v1, IntExpr.getCPtr(v2), v2);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public Constraint makeIsDifferentCstCt(IntExpr v1, IntExpr v2, IntVar b) {
    long cPtr = mainJNI.Solver_makeIsDifferentCstCt__SWIG_1(swigCPtr, this, IntExpr.getCPtr(v1), v1, IntExpr.getCPtr(v2), v2, IntVar.getCPtr(b), b);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNonEquality(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeNonEquality__SWIG_0(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNonEquality(IntExpr expr, long value) {
    long cPtr = mainJNI.Solver_makeNonEquality__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNonEquality(IntExpr expr, int value) {
    long cPtr = mainJNI.Solver_makeNonEquality__SWIG_2(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIsLessOrEqualCstCt(IntExpr var, long value, IntVar boolvar) {
    long cPtr = mainJNI.Solver_makeIsLessOrEqualCstCt(swigCPtr, this, IntExpr.getCPtr(var), var, value, IntVar.getCPtr(boolvar), boolvar);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public IntVar makeIsLessOrEqualCstVar(IntExpr var, long value) {
    long cPtr = mainJNI.Solver_makeIsLessOrEqualCstVar(swigCPtr, this, IntExpr.getCPtr(var), var, value);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIsLessOrEqualVar(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeIsLessOrEqualVar(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public Constraint makeIsLessOrEqualCt(IntExpr left, IntExpr right, IntVar b) {
    long cPtr = mainJNI.Solver_makeIsLessOrEqualCt(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right, IntVar.getCPtr(b), b);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeLessOrEqual(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeLessOrEqual__SWIG_0(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeLessOrEqual(IntExpr expr, long value) {
    long cPtr = mainJNI.Solver_makeLessOrEqual__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeLessOrEqual(IntExpr expr, int value) {
    long cPtr = mainJNI.Solver_makeLessOrEqual__SWIG_2(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIsGreaterOrEqualCstCt(IntExpr var, long value, IntVar boolvar) {
    long cPtr = mainJNI.Solver_makeIsGreaterOrEqualCstCt(swigCPtr, this, IntExpr.getCPtr(var), var, value, IntVar.getCPtr(boolvar), boolvar);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public IntVar makeIsGreaterOrEqualCstVar(IntExpr var, long value) {
    long cPtr = mainJNI.Solver_makeIsGreaterOrEqualCstVar(swigCPtr, this, IntExpr.getCPtr(var), var, value);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIsGreaterOrEqualVar(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeIsGreaterOrEqualVar(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public Constraint makeIsGreaterOrEqualCt(IntExpr left, IntExpr right, IntVar b) {
    long cPtr = mainJNI.Solver_makeIsGreaterOrEqualCt(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right, IntVar.getCPtr(b), b);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeGreaterOrEqual(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeGreaterOrEqual__SWIG_0(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeGreaterOrEqual(IntExpr expr, long value) {
    long cPtr = mainJNI.Solver_makeGreaterOrEqual__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeGreaterOrEqual(IntExpr expr, int value) {
    long cPtr = mainJNI.Solver_makeGreaterOrEqual__SWIG_2(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIsGreaterCstCt(IntExpr v, long c, IntVar b) {
    long cPtr = mainJNI.Solver_makeIsGreaterCstCt(swigCPtr, this, IntExpr.getCPtr(v), v, c, IntVar.getCPtr(b), b);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public IntVar makeIsGreaterCstVar(IntExpr var, long value) {
    long cPtr = mainJNI.Solver_makeIsGreaterCstVar(swigCPtr, this, IntExpr.getCPtr(var), var, value);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIsGreaterVar(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeIsGreaterVar(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public Constraint makeIsGreaterCt(IntExpr left, IntExpr right, IntVar b) {
    long cPtr = mainJNI.Solver_makeIsGreaterCt(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right, IntVar.getCPtr(b), b);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeGreater(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeGreater__SWIG_0(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeGreater(IntExpr expr, long value) {
    long cPtr = mainJNI.Solver_makeGreater__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeGreater(IntExpr expr, int value) {
    long cPtr = mainJNI.Solver_makeGreater__SWIG_2(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIsLessCstCt(IntExpr v, long c, IntVar b) {
    long cPtr = mainJNI.Solver_makeIsLessCstCt(swigCPtr, this, IntExpr.getCPtr(v), v, c, IntVar.getCPtr(b), b);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public IntVar makeIsLessCstVar(IntExpr var, long value) {
    long cPtr = mainJNI.Solver_makeIsLessCstVar(swigCPtr, this, IntExpr.getCPtr(var), var, value);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIsLessVar(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeIsLessVar(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public Constraint makeIsLessCt(IntExpr left, IntExpr right, IntVar b) {
    long cPtr = mainJNI.Solver_makeIsLessCt(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right, IntVar.getCPtr(b), b);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeLess(IntExpr left, IntExpr right) {
    long cPtr = mainJNI.Solver_makeLess__SWIG_0(swigCPtr, this, IntExpr.getCPtr(left), left, IntExpr.getCPtr(right), right);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeLess(IntExpr expr, long value) {
    long cPtr = mainJNI.Solver_makeLess__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeLess(IntExpr expr, int value) {
    long cPtr = mainJNI.Solver_makeLess__SWIG_2(swigCPtr, this, IntExpr.getCPtr(expr), expr, value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeSumLessOrEqual(IntVar[] vars, long cst) {
    long cPtr = mainJNI.Solver_makeSumLessOrEqual(swigCPtr, this, vars, cst);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeSumGreaterOrEqual(IntVar[] vars, long cst) {
    long cPtr = mainJNI.Solver_makeSumGreaterOrEqual(swigCPtr, this, vars, cst);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeSumEquality(IntVar[] vars, long cst) {
    long cPtr = mainJNI.Solver_makeSumEquality__SWIG_0(swigCPtr, this, vars, cst);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeSumEquality(IntVar[] vars, IntVar var) {
    long cPtr = mainJNI.Solver_makeSumEquality__SWIG_1(swigCPtr, this, vars, IntVar.getCPtr(var), var);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeScalProdEquality(IntVar[] vars, long[] coefficients, long cst) {
    long cPtr = mainJNI.Solver_makeScalProdEquality__SWIG_0(swigCPtr, this, vars, coefficients, cst);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeScalProdEquality(IntVar[] vars, int[] coefficients, long cst) {
    long cPtr = mainJNI.Solver_makeScalProdEquality__SWIG_1(swigCPtr, this, vars, coefficients, cst);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeScalProdEquality(IntVar[] vars, long[] coefficients, IntVar target) {
    long cPtr = mainJNI.Solver_makeScalProdEquality__SWIG_2(swigCPtr, this, vars, coefficients, IntVar.getCPtr(target), target);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeScalProdEquality(IntVar[] vars, int[] coefficients, IntVar target) {
    long cPtr = mainJNI.Solver_makeScalProdEquality__SWIG_3(swigCPtr, this, vars, coefficients, IntVar.getCPtr(target), target);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeScalProdGreaterOrEqual(IntVar[] vars, long[] coeffs, long cst) {
    long cPtr = mainJNI.Solver_makeScalProdGreaterOrEqual__SWIG_0(swigCPtr, this, vars, coeffs, cst);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeScalProdGreaterOrEqual(IntVar[] vars, int[] coeffs, long cst) {
    long cPtr = mainJNI.Solver_makeScalProdGreaterOrEqual__SWIG_1(swigCPtr, this, vars, coeffs, cst);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeScalProdLessOrEqual(IntVar[] vars, long[] coefficients, long cst) {
    long cPtr = mainJNI.Solver_makeScalProdLessOrEqual__SWIG_0(swigCPtr, this, vars, coefficients, cst);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeScalProdLessOrEqual(IntVar[] vars, int[] coefficients, long cst) {
    long cPtr = mainJNI.Solver_makeScalProdLessOrEqual__SWIG_1(swigCPtr, this, vars, coefficients, cst);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeMinEquality(IntVar[] vars, IntVar min_var) {
    long cPtr = mainJNI.Solver_makeMinEquality(swigCPtr, this, vars, IntVar.getCPtr(min_var), min_var);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeMaxEquality(IntVar[] vars, IntVar max_var) {
    long cPtr = mainJNI.Solver_makeMaxEquality(swigCPtr, this, vars, IntVar.getCPtr(max_var), max_var);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeElementEquality(long[] vals, IntVar index, IntVar target) {
    long cPtr = mainJNI.Solver_makeElementEquality__SWIG_0(swigCPtr, this, vals, IntVar.getCPtr(index), index, IntVar.getCPtr(target), target);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeElementEquality(int[] vals, IntVar index, IntVar target) {
    long cPtr = mainJNI.Solver_makeElementEquality__SWIG_1(swigCPtr, this, vals, IntVar.getCPtr(index), index, IntVar.getCPtr(target), target);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeElementEquality(IntVar[] vars, IntVar index, IntVar target) {
    long cPtr = mainJNI.Solver_makeElementEquality__SWIG_2(swigCPtr, this, vars, IntVar.getCPtr(index), index, IntVar.getCPtr(target), target);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeElementEquality(IntVar[] vars, IntVar index, long target) {
    long cPtr = mainJNI.Solver_makeElementEquality__SWIG_3(swigCPtr, this, vars, IntVar.getCPtr(index), index, target);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeAbsEquality(IntVar var, IntVar abs_var) {
    long cPtr = mainJNI.Solver_makeAbsEquality(swigCPtr, this, IntVar.getCPtr(var), var, IntVar.getCPtr(abs_var), abs_var);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIndexOfConstraint(IntVar[] vars, IntVar index, long target) {
    long cPtr = mainJNI.Solver_makeIndexOfConstraint(swigCPtr, this, vars, IntVar.getCPtr(index), index, target);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Demon makeConstraintInitialPropagateCallback(Constraint ct) {
    long cPtr = mainJNI.Solver_makeConstraintInitialPropagateCallback(swigCPtr, this, Constraint.getCPtr(ct), ct);
    return (cPtr == 0) ? null : new Demon(cPtr, false);
  }

  public Demon makeDelayedConstraintInitialPropagateCallback(Constraint ct) {
    long cPtr = mainJNI.Solver_makeDelayedConstraintInitialPropagateCallback(swigCPtr, this, Constraint.getCPtr(ct), ct);
    return (cPtr == 0) ? null : new Demon(cPtr, false);
  }

  public Demon makeClosureDemon(Runnable closure) {
    long cPtr = mainJNI.Solver_makeClosureDemon(swigCPtr, this, closure);
    return (cPtr == 0) ? null : new Demon(cPtr, false);
  }

  public Constraint makeBetweenCt(IntExpr expr, long l, long u) {
    long cPtr = mainJNI.Solver_makeBetweenCt(swigCPtr, this, IntExpr.getCPtr(expr), expr, l, u);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNotBetweenCt(IntExpr expr, long l, long u) {
    long cPtr = mainJNI.Solver_makeNotBetweenCt(swigCPtr, this, IntExpr.getCPtr(expr), expr, l, u);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIsBetweenCt(IntExpr expr, long l, long u, IntVar b) {
    long cPtr = mainJNI.Solver_makeIsBetweenCt(swigCPtr, this, IntExpr.getCPtr(expr), expr, l, u, IntVar.getCPtr(b), b);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public IntVar makeIsBetweenVar(IntExpr v, long l, long u) {
    long cPtr = mainJNI.Solver_makeIsBetweenVar(swigCPtr, this, IntExpr.getCPtr(v), v, l, u);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public Constraint makeMemberCt(IntExpr expr, long[] values) {
    long cPtr = mainJNI.Solver_makeMemberCt__SWIG_0(swigCPtr, this, IntExpr.getCPtr(expr), expr, values);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeMemberCt(IntExpr expr, int[] values) {
    long cPtr = mainJNI.Solver_makeMemberCt__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, values);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNotMemberCt(IntExpr expr, long[] values) {
    long cPtr = mainJNI.Solver_makeNotMemberCt__SWIG_0(swigCPtr, this, IntExpr.getCPtr(expr), expr, values);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNotMemberCt(IntExpr expr, int[] values) {
    long cPtr = mainJNI.Solver_makeNotMemberCt__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, values);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNotMemberCt(IntExpr expr, long[] starts, long[] ends) {
    long cPtr = mainJNI.Solver_makeNotMemberCt__SWIG_2(swigCPtr, this, IntExpr.getCPtr(expr), expr, starts, ends);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNotMemberCt(IntExpr expr, int[] starts, int[] ends) {
    long cPtr = mainJNI.Solver_makeNotMemberCt__SWIG_3(swigCPtr, this, IntExpr.getCPtr(expr), expr, starts, ends);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIsMemberCt(IntExpr expr, long[] values, IntVar boolvar) {
    long cPtr = mainJNI.Solver_makeIsMemberCt__SWIG_0(swigCPtr, this, IntExpr.getCPtr(expr), expr, values, IntVar.getCPtr(boolvar), boolvar);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIsMemberCt(IntExpr expr, int[] values, IntVar boolvar) {
    long cPtr = mainJNI.Solver_makeIsMemberCt__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, values, IntVar.getCPtr(boolvar), boolvar);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public IntVar makeIsMemberVar(IntExpr expr, long[] values) {
    long cPtr = mainJNI.Solver_makeIsMemberVar__SWIG_0(swigCPtr, this, IntExpr.getCPtr(expr), expr, values);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar makeIsMemberVar(IntExpr expr, int[] values) {
    long cPtr = mainJNI.Solver_makeIsMemberVar__SWIG_1(swigCPtr, this, IntExpr.getCPtr(expr), expr, values);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public Constraint makeCount(IntVar[] vars, long value, long max_count) {
    long cPtr = mainJNI.Solver_makeCount__SWIG_0(swigCPtr, this, vars, value, max_count);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeCount(IntVar[] vars, long value, IntVar max_count) {
    long cPtr = mainJNI.Solver_makeCount__SWIG_1(swigCPtr, this, vars, value, IntVar.getCPtr(max_count), max_count);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeDistribute(IntVar[] vars, long[] values, IntVar[] cards) {
    long cPtr = mainJNI.Solver_makeDistribute__SWIG_0(swigCPtr, this, vars, values, cards);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeDistribute(IntVar[] vars, int[] values, IntVar[] cards) {
    long cPtr = mainJNI.Solver_makeDistribute__SWIG_1(swigCPtr, this, vars, values, cards);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeDistribute(IntVar[] vars, IntVar[] cards) {
    long cPtr = mainJNI.Solver_makeDistribute__SWIG_2(swigCPtr, this, vars, cards);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeDistribute(IntVar[] vars, long card_min, long card_max, long card_size) {
    long cPtr = mainJNI.Solver_makeDistribute__SWIG_3(swigCPtr, this, vars, card_min, card_max, card_size);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeDistribute(IntVar[] vars, long[] card_min, long[] card_max) {
    long cPtr = mainJNI.Solver_makeDistribute__SWIG_4(swigCPtr, this, vars, card_min, card_max);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeDistribute(IntVar[] vars, int[] card_min, int[] card_max) {
    long cPtr = mainJNI.Solver_makeDistribute__SWIG_5(swigCPtr, this, vars, card_min, card_max);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeDistribute(IntVar[] vars, long[] values, long[] card_min, long[] card_max) {
    long cPtr = mainJNI.Solver_makeDistribute__SWIG_6(swigCPtr, this, vars, values, card_min, card_max);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeDistribute(IntVar[] vars, int[] values, int[] card_min, int[] card_max) {
    long cPtr = mainJNI.Solver_makeDistribute__SWIG_7(swigCPtr, this, vars, values, card_min, card_max);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeDeviation(IntVar[] vars, IntVar deviation_var, long total_sum) {
    long cPtr = mainJNI.Solver_makeDeviation(swigCPtr, this, vars, IntVar.getCPtr(deviation_var), deviation_var, total_sum);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeAllDifferent(IntVar[] vars) {
    long cPtr = mainJNI.Solver_makeAllDifferent__SWIG_0(swigCPtr, this, vars);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeAllDifferent(IntVar[] vars, boolean stronger_propagation) {
    long cPtr = mainJNI.Solver_makeAllDifferent__SWIG_1(swigCPtr, this, vars, stronger_propagation);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeAllDifferentExcept(IntVar[] vars, long escape_value) {
    long cPtr = mainJNI.Solver_makeAllDifferentExcept(swigCPtr, this, vars, escape_value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeSortingConstraint(IntVar[] vars, IntVar[] sorted) {
    long cPtr = mainJNI.Solver_makeSortingConstraint(swigCPtr, this, vars, sorted);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeLexicalLess(IntVar[] left, IntVar[] right) {
    long cPtr = mainJNI.Solver_makeLexicalLess(swigCPtr, this, left, right);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeLexicalLessOrEqual(IntVar[] left, IntVar[] right) {
    long cPtr = mainJNI.Solver_makeLexicalLessOrEqual(swigCPtr, this, left, right);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeInversePermutationConstraint(IntVar[] left, IntVar[] right) {
    long cPtr = mainJNI.Solver_makeInversePermutationConstraint(swigCPtr, this, left, right);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIndexOfFirstMaxValueConstraint(IntVar index, IntVar[] vars) {
    long cPtr = mainJNI.Solver_makeIndexOfFirstMaxValueConstraint(swigCPtr, this, IntVar.getCPtr(index), index, vars);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIndexOfFirstMinValueConstraint(IntVar index, IntVar[] vars) {
    long cPtr = mainJNI.Solver_makeIndexOfFirstMinValueConstraint(swigCPtr, this, IntVar.getCPtr(index), index, vars);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNullIntersect(IntVar[] first_vars, IntVar[] second_vars) {
    long cPtr = mainJNI.Solver_makeNullIntersect(swigCPtr, this, first_vars, second_vars);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNullIntersectExcept(IntVar[] first_vars, IntVar[] second_vars, long escape_value) {
    long cPtr = mainJNI.Solver_makeNullIntersectExcept(swigCPtr, this, first_vars, second_vars, escape_value);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNoCycle(IntVar[] nexts, IntVar[] active, LongPredicate sink_handler) {
    long cPtr = mainJNI.Solver_makeNoCycle__SWIG_0(swigCPtr, this, nexts, active, sink_handler);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNoCycle(IntVar[] nexts, IntVar[] active) {
    long cPtr = mainJNI.Solver_makeNoCycle__SWIG_1(swigCPtr, this, nexts, active);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNoCycle(IntVar[] nexts, IntVar[] active, LongPredicate sink_handler, boolean assume_paths) {
    long cPtr = mainJNI.Solver_makeNoCycle__SWIG_2(swigCPtr, this, nexts, active, sink_handler, assume_paths);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeCircuit(IntVar[] nexts) {
    long cPtr = mainJNI.Solver_makeCircuit(swigCPtr, this, nexts);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeSubCircuit(IntVar[] nexts) {
    long cPtr = mainJNI.Solver_makeSubCircuit(swigCPtr, this, nexts);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makePathCumul(IntVar[] nexts, IntVar[] active, IntVar[] cumuls, IntVar[] transits) {
    long cPtr = mainJNI.Solver_makePathCumul__SWIG_0(swigCPtr, this, nexts, active, cumuls, transits);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeDelayedPathCumul(IntVar[] nexts, IntVar[] active, IntVar[] cumuls, IntVar[] transits) {
    long cPtr = mainJNI.Solver_makeDelayedPathCumul(swigCPtr, this, nexts, active, cumuls, transits);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makePathCumul(IntVar[] nexts, IntVar[] active, IntVar[] cumuls, LongBinaryOperator transit_evaluator) {
    long cPtr = mainJNI.Solver_makePathCumul__SWIG_1(swigCPtr, this, nexts, active, cumuls, transit_evaluator);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makePathCumul(IntVar[] nexts, IntVar[] active, IntVar[] cumuls, IntVar[] slacks, LongBinaryOperator transit_evaluator) {
    long cPtr = mainJNI.Solver_makePathCumul__SWIG_2(swigCPtr, this, nexts, active, cumuls, slacks, transit_evaluator);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makePathConnected(IntVar[] nexts, long[] sources, long[] sinks, IntVar[] status) {
    long cPtr = mainJNI.Solver_makePathConnected(swigCPtr, this, nexts, sources, sinks, status);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeMapDomain(IntVar var, IntVar[] actives) {
    long cPtr = mainJNI.Solver_makeMapDomain(swigCPtr, this, IntVar.getCPtr(var), var, actives);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeAllowedAssignment(IntVar[] vars, IntTupleSet tuples) {
    long cPtr = mainJNI.Solver_makeAllowedAssignment(swigCPtr, this, vars, IntTupleSet.getCPtr(tuples), tuples);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeTransitionConstraint(IntVar[] vars, IntTupleSet transition_table, long initial_state, long[] final_states) {
    long cPtr = mainJNI.Solver_makeTransitionConstraint__SWIG_0(swigCPtr, this, vars, IntTupleSet.getCPtr(transition_table), transition_table, initial_state, final_states);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeTransitionConstraint(IntVar[] vars, IntTupleSet transition_table, long initial_state, int[] final_states) {
    long cPtr = mainJNI.Solver_makeTransitionConstraint__SWIG_1(swigCPtr, this, vars, IntTupleSet.getCPtr(transition_table), transition_table, initial_state, final_states);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNonOverlappingBoxesConstraint(IntVar[] x_vars, IntVar[] y_vars, IntVar[] x_size, IntVar[] y_size) {
    long cPtr = mainJNI.Solver_makeNonOverlappingBoxesConstraint__SWIG_0(swigCPtr, this, x_vars, y_vars, x_size, y_size);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNonOverlappingBoxesConstraint(IntVar[] x_vars, IntVar[] y_vars, long[] x_size, long[] y_size) {
    long cPtr = mainJNI.Solver_makeNonOverlappingBoxesConstraint__SWIG_1(swigCPtr, this, x_vars, y_vars, x_size, y_size);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNonOverlappingBoxesConstraint(IntVar[] x_vars, IntVar[] y_vars, int[] x_size, int[] y_size) {
    long cPtr = mainJNI.Solver_makeNonOverlappingBoxesConstraint__SWIG_2(swigCPtr, this, x_vars, y_vars, x_size, y_size);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNonOverlappingNonStrictBoxesConstraint(IntVar[] x_vars, IntVar[] y_vars, IntVar[] x_size, IntVar[] y_size) {
    long cPtr = mainJNI.Solver_makeNonOverlappingNonStrictBoxesConstraint__SWIG_0(swigCPtr, this, x_vars, y_vars, x_size, y_size);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNonOverlappingNonStrictBoxesConstraint(IntVar[] x_vars, IntVar[] y_vars, long[] x_size, long[] y_size) {
    long cPtr = mainJNI.Solver_makeNonOverlappingNonStrictBoxesConstraint__SWIG_1(swigCPtr, this, x_vars, y_vars, x_size, y_size);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeNonOverlappingNonStrictBoxesConstraint(IntVar[] x_vars, IntVar[] y_vars, int[] x_size, int[] y_size) {
    long cPtr = mainJNI.Solver_makeNonOverlappingNonStrictBoxesConstraint__SWIG_2(swigCPtr, this, x_vars, y_vars, x_size, y_size);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Pack makePack(IntVar[] vars, int number_of_bins) {
    long cPtr = mainJNI.Solver_makePack(swigCPtr, this, vars, number_of_bins);
    return (cPtr == 0) ? null : new Pack(cPtr, false);
  }

  public IntervalVar makeFixedDurationIntervalVar(long start_min, long start_max, long duration, boolean optional, String name) {
    long cPtr = mainJNI.Solver_makeFixedDurationIntervalVar__SWIG_0(swigCPtr, this, start_min, start_max, duration, optional, name);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public IntervalVar makeFixedDurationIntervalVar(IntVar start_variable, long duration, String name) {
    long cPtr = mainJNI.Solver_makeFixedDurationIntervalVar__SWIG_1(swigCPtr, this, IntVar.getCPtr(start_variable), start_variable, duration, name);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public IntervalVar makeFixedDurationIntervalVar(IntVar start_variable, long duration, IntVar performed_variable, String name) {
    long cPtr = mainJNI.Solver_makeFixedDurationIntervalVar__SWIG_2(swigCPtr, this, IntVar.getCPtr(start_variable), start_variable, duration, IntVar.getCPtr(performed_variable), performed_variable, name);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public IntervalVar makeFixedInterval(long start, long duration, String name) {
    long cPtr = mainJNI.Solver_makeFixedInterval(swigCPtr, this, start, duration, name);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public IntervalVar makeIntervalVar(long start_min, long start_max, long duration_min, long duration_max, long end_min, long end_max, boolean optional, String name) {
    long cPtr = mainJNI.Solver_makeIntervalVar(swigCPtr, this, start_min, start_max, duration_min, duration_max, end_min, end_max, optional, name);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public IntervalVar makeMirrorInterval(IntervalVar interval_var) {
    long cPtr = mainJNI.Solver_makeMirrorInterval(swigCPtr, this, IntervalVar.getCPtr(interval_var), interval_var);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public IntervalVar makeFixedDurationStartSyncedOnStartIntervalVar(IntervalVar interval_var, long duration, long offset) {
    long cPtr = mainJNI.Solver_makeFixedDurationStartSyncedOnStartIntervalVar(swigCPtr, this, IntervalVar.getCPtr(interval_var), interval_var, duration, offset);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public IntervalVar makeFixedDurationStartSyncedOnEndIntervalVar(IntervalVar interval_var, long duration, long offset) {
    long cPtr = mainJNI.Solver_makeFixedDurationStartSyncedOnEndIntervalVar(swigCPtr, this, IntervalVar.getCPtr(interval_var), interval_var, duration, offset);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public IntervalVar makeFixedDurationEndSyncedOnStartIntervalVar(IntervalVar interval_var, long duration, long offset) {
    long cPtr = mainJNI.Solver_makeFixedDurationEndSyncedOnStartIntervalVar(swigCPtr, this, IntervalVar.getCPtr(interval_var), interval_var, duration, offset);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public IntervalVar makeFixedDurationEndSyncedOnEndIntervalVar(IntervalVar interval_var, long duration, long offset) {
    long cPtr = mainJNI.Solver_makeFixedDurationEndSyncedOnEndIntervalVar(swigCPtr, this, IntervalVar.getCPtr(interval_var), interval_var, duration, offset);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public IntervalVar makeIntervalRelaxedMin(IntervalVar interval_var) {
    long cPtr = mainJNI.Solver_makeIntervalRelaxedMin(swigCPtr, this, IntervalVar.getCPtr(interval_var), interval_var);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public IntervalVar makeIntervalRelaxedMax(IntervalVar interval_var) {
    long cPtr = mainJNI.Solver_makeIntervalRelaxedMax(swigCPtr, this, IntervalVar.getCPtr(interval_var), interval_var);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public Constraint makeIntervalVarRelation(IntervalVar t, int r, long d) {
    long cPtr = mainJNI.Solver_makeIntervalVarRelation__SWIG_0(swigCPtr, this, IntervalVar.getCPtr(t), t, r, d);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIntervalVarRelation(IntervalVar t1, int r, IntervalVar t2) {
    long cPtr = mainJNI.Solver_makeIntervalVarRelation__SWIG_1(swigCPtr, this, IntervalVar.getCPtr(t1), t1, r, IntervalVar.getCPtr(t2), t2);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeIntervalVarRelationWithDelay(IntervalVar t1, int r, IntervalVar t2, long delay) {
    long cPtr = mainJNI.Solver_makeIntervalVarRelationWithDelay(swigCPtr, this, IntervalVar.getCPtr(t1), t1, r, IntervalVar.getCPtr(t2), t2, delay);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeTemporalDisjunction(IntervalVar t1, IntervalVar t2, IntVar alt) {
    long cPtr = mainJNI.Solver_makeTemporalDisjunction__SWIG_0(swigCPtr, this, IntervalVar.getCPtr(t1), t1, IntervalVar.getCPtr(t2), t2, IntVar.getCPtr(alt), alt);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeTemporalDisjunction(IntervalVar t1, IntervalVar t2) {
    long cPtr = mainJNI.Solver_makeTemporalDisjunction__SWIG_1(swigCPtr, this, IntervalVar.getCPtr(t1), t1, IntervalVar.getCPtr(t2), t2);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public DisjunctiveConstraint makeDisjunctiveConstraint(IntervalVar[] intervals, String name) {
    long cPtr = mainJNI.Solver_makeDisjunctiveConstraint(swigCPtr, this, intervals, name);
    return (cPtr == 0) ? null : new DisjunctiveConstraint(cPtr, false);
  }

  public DisjunctiveConstraint makeStrictDisjunctiveConstraint(IntervalVar[] intervals, String name) {
    long cPtr = mainJNI.Solver_makeStrictDisjunctiveConstraint(swigCPtr, this, intervals, name);
    return (cPtr == 0) ? null : new DisjunctiveConstraint(cPtr, false);
  }

  public Constraint makeCumulative(IntervalVar[] intervals, long[] demands, long capacity, String name) {
    long cPtr = mainJNI.Solver_makeCumulative__SWIG_0(swigCPtr, this, intervals, demands, capacity, name);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeCumulative(IntervalVar[] intervals, int[] demands, long capacity, String name) {
    long cPtr = mainJNI.Solver_makeCumulative__SWIG_1(swigCPtr, this, intervals, demands, capacity, name);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeCumulative(IntervalVar[] intervals, long[] demands, IntVar capacity, String name) {
    long cPtr = mainJNI.Solver_makeCumulative__SWIG_2(swigCPtr, this, intervals, demands, IntVar.getCPtr(capacity), capacity, name);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeCumulative(IntervalVar[] intervals, int[] demands, IntVar capacity, String name) {
    long cPtr = mainJNI.Solver_makeCumulative__SWIG_3(swigCPtr, this, intervals, demands, IntVar.getCPtr(capacity), capacity, name);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeCumulative(IntervalVar[] intervals, IntVar[] demands, long capacity, String name) {
    long cPtr = mainJNI.Solver_makeCumulative__SWIG_4(swigCPtr, this, intervals, demands, capacity, name);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeCumulative(IntervalVar[] intervals, IntVar[] demands, IntVar capacity, String name) {
    long cPtr = mainJNI.Solver_makeCumulative__SWIG_5(swigCPtr, this, intervals, demands, IntVar.getCPtr(capacity), capacity, name);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeCover(IntervalVar[] vars, IntervalVar target_var) {
    long cPtr = mainJNI.Solver_makeCover(swigCPtr, this, vars, IntervalVar.getCPtr(target_var), target_var);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Constraint makeEquality(IntervalVar var1, IntervalVar var2) {
    long cPtr = mainJNI.Solver_makeEquality__SWIG_3(swigCPtr, this, IntervalVar.getCPtr(var1), var1, IntervalVar.getCPtr(var2), var2);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public Assignment makeAssignment() {
    long cPtr = mainJNI.Solver_makeAssignment__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new Assignment(cPtr, false);
  }

  public Assignment makeAssignment(Assignment a) {
    long cPtr = mainJNI.Solver_makeAssignment__SWIG_1(swigCPtr, this, Assignment.getCPtr(a), a);
    return (cPtr == 0) ? null : new Assignment(cPtr, false);
  }

  public SolutionCollector makeFirstSolutionCollector(Assignment assignment) {
    long cPtr = mainJNI.Solver_makeFirstSolutionCollector__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
    return (cPtr == 0) ? null : new SolutionCollector(cPtr, false);
  }

  public SolutionCollector makeFirstSolutionCollector() {
    long cPtr = mainJNI.Solver_makeFirstSolutionCollector__SWIG_1(swigCPtr, this);
    return (cPtr == 0) ? null : new SolutionCollector(cPtr, false);
  }

  public SolutionCollector makeLastSolutionCollector(Assignment assignment) {
    long cPtr = mainJNI.Solver_makeLastSolutionCollector__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
    return (cPtr == 0) ? null : new SolutionCollector(cPtr, false);
  }

  public SolutionCollector makeLastSolutionCollector() {
    long cPtr = mainJNI.Solver_makeLastSolutionCollector__SWIG_1(swigCPtr, this);
    return (cPtr == 0) ? null : new SolutionCollector(cPtr, false);
  }

  public SolutionCollector makeBestValueSolutionCollector(Assignment assignment, boolean maximize) {
    long cPtr = mainJNI.Solver_makeBestValueSolutionCollector__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment, maximize);
    return (cPtr == 0) ? null : new SolutionCollector(cPtr, false);
  }

  public SolutionCollector makeBestValueSolutionCollector(boolean maximize) {
    long cPtr = mainJNI.Solver_makeBestValueSolutionCollector__SWIG_1(swigCPtr, this, maximize);
    return (cPtr == 0) ? null : new SolutionCollector(cPtr, false);
  }

  public SolutionCollector makeNBestValueSolutionCollector(Assignment assignment, int solution_count, boolean maximize) {
    long cPtr = mainJNI.Solver_makeNBestValueSolutionCollector__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment, solution_count, maximize);
    return (cPtr == 0) ? null : new SolutionCollector(cPtr, false);
  }

  public SolutionCollector makeNBestValueSolutionCollector(int solution_count, boolean maximize) {
    long cPtr = mainJNI.Solver_makeNBestValueSolutionCollector__SWIG_1(swigCPtr, this, solution_count, maximize);
    return (cPtr == 0) ? null : new SolutionCollector(cPtr, false);
  }

  public SolutionCollector makeAllSolutionCollector(Assignment assignment) {
    long cPtr = mainJNI.Solver_makeAllSolutionCollector__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
    return (cPtr == 0) ? null : new SolutionCollector(cPtr, false);
  }

  public SolutionCollector makeAllSolutionCollector() {
    long cPtr = mainJNI.Solver_makeAllSolutionCollector__SWIG_1(swigCPtr, this);
    return (cPtr == 0) ? null : new SolutionCollector(cPtr, false);
  }

  public OptimizeVar makeMinimize(IntVar v, long step) {
    long cPtr = mainJNI.Solver_makeMinimize(swigCPtr, this, IntVar.getCPtr(v), v, step);
    return (cPtr == 0) ? null : new OptimizeVar(cPtr, false);
  }

  public OptimizeVar makeMaximize(IntVar v, long step) {
    long cPtr = mainJNI.Solver_makeMaximize(swigCPtr, this, IntVar.getCPtr(v), v, step);
    return (cPtr == 0) ? null : new OptimizeVar(cPtr, false);
  }

  public OptimizeVar makeOptimize(boolean maximize, IntVar v, long step) {
    long cPtr = mainJNI.Solver_makeOptimize(swigCPtr, this, maximize, IntVar.getCPtr(v), v, step);
    return (cPtr == 0) ? null : new OptimizeVar(cPtr, false);
  }

  public OptimizeVar makeWeightedMinimize(IntVar[] sub_objectives, long[] weights, long step) {
    long cPtr = mainJNI.Solver_makeWeightedMinimize__SWIG_0(swigCPtr, this, sub_objectives, weights, step);
    return (cPtr == 0) ? null : new OptimizeVar(cPtr, false);
  }

  public OptimizeVar makeWeightedMinimize(IntVar[] sub_objectives, int[] weights, long step) {
    long cPtr = mainJNI.Solver_makeWeightedMinimize__SWIG_1(swigCPtr, this, sub_objectives, weights, step);
    return (cPtr == 0) ? null : new OptimizeVar(cPtr, false);
  }

  public OptimizeVar makeWeightedMaximize(IntVar[] sub_objectives, long[] weights, long step) {
    long cPtr = mainJNI.Solver_makeWeightedMaximize__SWIG_0(swigCPtr, this, sub_objectives, weights, step);
    return (cPtr == 0) ? null : new OptimizeVar(cPtr, false);
  }

  public OptimizeVar makeWeightedMaximize(IntVar[] sub_objectives, int[] weights, long step) {
    long cPtr = mainJNI.Solver_makeWeightedMaximize__SWIG_1(swigCPtr, this, sub_objectives, weights, step);
    return (cPtr == 0) ? null : new OptimizeVar(cPtr, false);
  }

  public OptimizeVar makeWeightedOptimize(boolean maximize, IntVar[] sub_objectives, long[] weights, long step) {
    long cPtr = mainJNI.Solver_makeWeightedOptimize__SWIG_0(swigCPtr, this, maximize, sub_objectives, weights, step);
    return (cPtr == 0) ? null : new OptimizeVar(cPtr, false);
  }

  public OptimizeVar makeWeightedOptimize(boolean maximize, IntVar[] sub_objectives, int[] weights, long step) {
    long cPtr = mainJNI.Solver_makeWeightedOptimize__SWIG_1(swigCPtr, this, maximize, sub_objectives, weights, step);
    return (cPtr == 0) ? null : new OptimizeVar(cPtr, false);
  }

  public SearchMonitor makeTabuSearch(boolean maximize, IntVar v, long step, IntVar[] vars, long keep_tenure, long forbid_tenure, double tabu_factor) {
    long cPtr = mainJNI.Solver_makeTabuSearch(swigCPtr, this, maximize, IntVar.getCPtr(v), v, step, vars, keep_tenure, forbid_tenure, tabu_factor);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeGenericTabuSearch(boolean maximize, IntVar v, long step, IntVar[] tabu_vars, long forbid_tenure) {
    long cPtr = mainJNI.Solver_makeGenericTabuSearch(swigCPtr, this, maximize, IntVar.getCPtr(v), v, step, tabu_vars, forbid_tenure);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeSimulatedAnnealing(boolean maximize, IntVar v, long step, long initial_temperature) {
    long cPtr = mainJNI.Solver_makeSimulatedAnnealing(swigCPtr, this, maximize, IntVar.getCPtr(v), v, step, initial_temperature);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeGuidedLocalSearch(boolean maximize, IntVar objective, LongBinaryOperator objective_function, long step, IntVar[] vars, double penalty_factor) {
    long cPtr = mainJNI.Solver_makeGuidedLocalSearch__SWIG_0(swigCPtr, this, maximize, IntVar.getCPtr(objective), objective, objective_function, step, vars, penalty_factor);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeGuidedLocalSearch(boolean maximize, IntVar objective, LongTernaryOperator objective_function, long step, IntVar[] vars, IntVar[] secondary_vars, double penalty_factor) {
    long cPtr = mainJNI.Solver_makeGuidedLocalSearch__SWIG_1(swigCPtr, this, maximize, IntVar.getCPtr(objective), objective, objective_function, step, vars, secondary_vars, penalty_factor);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeLubyRestart(int scale_factor) {
    long cPtr = mainJNI.Solver_makeLubyRestart(swigCPtr, this, scale_factor);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeConstantRestart(int frequency) {
    long cPtr = mainJNI.Solver_makeConstantRestart(swigCPtr, this, frequency);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public RegularLimit makeTimeLimit(long time_in_ms) {
    long cPtr = mainJNI.Solver_makeTimeLimit(swigCPtr, this, time_in_ms);
    return (cPtr == 0) ? null : new RegularLimit(cPtr, false);
  }

  public RegularLimit makeBranchesLimit(long branches) {
    long cPtr = mainJNI.Solver_makeBranchesLimit(swigCPtr, this, branches);
    return (cPtr == 0) ? null : new RegularLimit(cPtr, false);
  }

  public RegularLimit makeFailuresLimit(long failures) {
    long cPtr = mainJNI.Solver_makeFailuresLimit(swigCPtr, this, failures);
    return (cPtr == 0) ? null : new RegularLimit(cPtr, false);
  }

  public RegularLimit makeSolutionsLimit(long solutions) {
    long cPtr = mainJNI.Solver_makeSolutionsLimit(swigCPtr, this, solutions);
    return (cPtr == 0) ? null : new RegularLimit(cPtr, false);
  }

  public RegularLimit makeLimit(long time, long branches, long failures, long solutions) {
    long cPtr = mainJNI.Solver_makeLimit__SWIG_0(swigCPtr, this, time, branches, failures, solutions);
    return (cPtr == 0) ? null : new RegularLimit(cPtr, false);
  }

  public RegularLimit makeLimit(long time, long branches, long failures, long solutions, boolean smart_time_check) {
    long cPtr = mainJNI.Solver_makeLimit__SWIG_1(swigCPtr, this, time, branches, failures, solutions, smart_time_check);
    return (cPtr == 0) ? null : new RegularLimit(cPtr, false);
  }

  public RegularLimit makeLimit(long time, long branches, long failures, long solutions, boolean smart_time_check, boolean cumulative) {
    long cPtr = mainJNI.Solver_makeLimit__SWIG_2(swigCPtr, this, time, branches, failures, solutions, smart_time_check, cumulative);
    return (cPtr == 0) ? null : new RegularLimit(cPtr, false);
  }

  public RegularLimit makeLimit(com.google.ortools.constraintsolver.RegularLimitParameters proto) {
    long cPtr = mainJNI.Solver_makeLimit__SWIG_3(swigCPtr, this, proto.toByteArray());
    return (cPtr == 0) ? null : new RegularLimit(cPtr, false);
  }

  public com.google.ortools.constraintsolver.RegularLimitParameters makeDefaultRegularLimitParameters() {
  byte[] buf = mainJNI.Solver_makeDefaultRegularLimitParameters(swigCPtr, this);
  if (buf == null || buf.length == 0) {
    return null;
  }
  try {
    return com.google.ortools.constraintsolver.RegularLimitParameters.parseFrom(buf);
  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
    throw new RuntimeException(
        "Unable to parse com.google.ortools.constraintsolver.RegularLimitParameters protocol message.");
  }
}

  public SearchLimit makeLimit(SearchLimit limit_1, SearchLimit limit_2) {
    long cPtr = mainJNI.Solver_makeLimit__SWIG_4(swigCPtr, this, SearchLimit.getCPtr(limit_1), limit_1, SearchLimit.getCPtr(limit_2), limit_2);
    return (cPtr == 0) ? null : new SearchLimit(cPtr, false);
  }

  public SearchLimit makeCustomLimit(BooleanSupplier limiter) {
    long cPtr = mainJNI.Solver_makeCustomLimit(swigCPtr, this, limiter);
    return (cPtr == 0) ? null : new SearchLimit(cPtr, false);
  }

  public SearchMonitor makeSearchLog(int branch_period) {
    long cPtr = mainJNI.Solver_makeSearchLog__SWIG_0(swigCPtr, this, branch_period);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeSearchLog(int branch_period, IntVar var) {
    long cPtr = mainJNI.Solver_makeSearchLog__SWIG_1(swigCPtr, this, branch_period, IntVar.getCPtr(var), var);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeSearchLog(int branch_period, Supplier display_callback) {
    long cPtr = mainJNI.Solver_makeSearchLog__SWIG_2(swigCPtr, this, branch_period, display_callback);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeSearchLog(int branch_period, IntVar var, Supplier display_callback) {
    long cPtr = mainJNI.Solver_makeSearchLog__SWIG_3(swigCPtr, this, branch_period, IntVar.getCPtr(var), var, display_callback);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeSearchLog(int branch_period, OptimizeVar opt_var) {
    long cPtr = mainJNI.Solver_makeSearchLog__SWIG_4(swigCPtr, this, branch_period, OptimizeVar.getCPtr(opt_var), opt_var);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeSearchLog(int branch_period, OptimizeVar opt_var, Supplier display_callback) {
    long cPtr = mainJNI.Solver_makeSearchLog__SWIG_5(swigCPtr, this, branch_period, OptimizeVar.getCPtr(opt_var), opt_var, display_callback);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeSearchTrace(String prefix) {
    long cPtr = mainJNI.Solver_makeSearchTrace(swigCPtr, this, prefix);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeEnterSearchCallback(Runnable callback) {
    long cPtr = mainJNI.Solver_makeEnterSearchCallback(swigCPtr, this, callback);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeExitSearchCallback(Runnable callback) {
    long cPtr = mainJNI.Solver_makeExitSearchCallback(swigCPtr, this, callback);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeAtSolutionCallback(Runnable callback) {
    long cPtr = mainJNI.Solver_makeAtSolutionCallback(swigCPtr, this, callback);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public ModelVisitor makePrintModelVisitor() {
    long cPtr = mainJNI.Solver_makePrintModelVisitor(swigCPtr, this);
    return (cPtr == 0) ? null : new ModelVisitor(cPtr, false);
  }

  public ModelVisitor makeStatisticsModelVisitor() {
    long cPtr = mainJNI.Solver_makeStatisticsModelVisitor(swigCPtr, this);
    return (cPtr == 0) ? null : new ModelVisitor(cPtr, false);
  }

  public SearchMonitor makeSymmetryManager(SymmetryBreaker[] visitors) {
    long cPtr = mainJNI.Solver_makeSymmetryManager__SWIG_0(swigCPtr, this, visitors);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeSymmetryManager(SymmetryBreaker v1) {
    long cPtr = mainJNI.Solver_makeSymmetryManager__SWIG_1(swigCPtr, this, SymmetryBreaker.getCPtr(v1), v1);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeSymmetryManager(SymmetryBreaker v1, SymmetryBreaker v2) {
    long cPtr = mainJNI.Solver_makeSymmetryManager__SWIG_2(swigCPtr, this, SymmetryBreaker.getCPtr(v1), v1, SymmetryBreaker.getCPtr(v2), v2);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeSymmetryManager(SymmetryBreaker v1, SymmetryBreaker v2, SymmetryBreaker v3) {
    long cPtr = mainJNI.Solver_makeSymmetryManager__SWIG_3(swigCPtr, this, SymmetryBreaker.getCPtr(v1), v1, SymmetryBreaker.getCPtr(v2), v2, SymmetryBreaker.getCPtr(v3), v3);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public SearchMonitor makeSymmetryManager(SymmetryBreaker v1, SymmetryBreaker v2, SymmetryBreaker v3, SymmetryBreaker v4) {
    long cPtr = mainJNI.Solver_makeSymmetryManager__SWIG_4(swigCPtr, this, SymmetryBreaker.getCPtr(v1), v1, SymmetryBreaker.getCPtr(v2), v2, SymmetryBreaker.getCPtr(v3), v3, SymmetryBreaker.getCPtr(v4), v4);
    return (cPtr == 0) ? null : new SearchMonitor(cPtr, false);
  }

  public Decision makeAssignVariableValue(IntVar var, long val) {
    long cPtr = mainJNI.Solver_makeAssignVariableValue(swigCPtr, this, IntVar.getCPtr(var), var, val);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public Decision makeVariableLessOrEqualValue(IntVar var, long value) {
    long cPtr = mainJNI.Solver_makeVariableLessOrEqualValue(swigCPtr, this, IntVar.getCPtr(var), var, value);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public Decision makeVariableGreaterOrEqualValue(IntVar var, long value) {
    long cPtr = mainJNI.Solver_makeVariableGreaterOrEqualValue(swigCPtr, this, IntVar.getCPtr(var), var, value);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public Decision makeSplitVariableDomain(IntVar var, long val, boolean start_with_lower_half) {
    long cPtr = mainJNI.Solver_makeSplitVariableDomain(swigCPtr, this, IntVar.getCPtr(var), var, val, start_with_lower_half);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public Decision makeAssignVariableValueOrFail(IntVar var, long value) {
    long cPtr = mainJNI.Solver_makeAssignVariableValueOrFail(swigCPtr, this, IntVar.getCPtr(var), var, value);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public Decision MakeAssignVariableValueOrDoNothing(IntVar var, long value) {
    long cPtr = mainJNI.Solver_MakeAssignVariableValueOrDoNothing(swigCPtr, this, IntVar.getCPtr(var), var, value);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public Decision makeAssignVariablesValues(IntVar[] vars, long[] values) {
    long cPtr = mainJNI.Solver_makeAssignVariablesValues(swigCPtr, this, vars, values);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public Decision makeFailDecision() {
    long cPtr = mainJNI.Solver_makeFailDecision(swigCPtr, this);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public Decision makeDecision(Consumer apply, Consumer refute) {
    long cPtr = mainJNI.Solver_makeDecision(swigCPtr, this, apply, refute);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public DecisionBuilder compose(DecisionBuilder db1, DecisionBuilder db2) {
    long cPtr = mainJNI.Solver_compose__SWIG_0(swigCPtr, this, DecisionBuilder.getCPtr(db1), db1, DecisionBuilder.getCPtr(db2), db2);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder compose(DecisionBuilder db1, DecisionBuilder db2, DecisionBuilder db3) {
    long cPtr = mainJNI.Solver_compose__SWIG_1(swigCPtr, this, DecisionBuilder.getCPtr(db1), db1, DecisionBuilder.getCPtr(db2), db2, DecisionBuilder.getCPtr(db3), db3);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder compose(DecisionBuilder db1, DecisionBuilder db2, DecisionBuilder db3, DecisionBuilder db4) {
    long cPtr = mainJNI.Solver_compose__SWIG_2(swigCPtr, this, DecisionBuilder.getCPtr(db1), db1, DecisionBuilder.getCPtr(db2), db2, DecisionBuilder.getCPtr(db3), db3, DecisionBuilder.getCPtr(db4), db4);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder compose(DecisionBuilder[] dbs) {
    long cPtr = mainJNI.Solver_compose__SWIG_3(swigCPtr, this, dbs);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder tryDecisions(DecisionBuilder db1, DecisionBuilder db2) {
    long cPtr = mainJNI.Solver_tryDecisions__SWIG_0(swigCPtr, this, DecisionBuilder.getCPtr(db1), db1, DecisionBuilder.getCPtr(db2), db2);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder tryDecisions(DecisionBuilder db1, DecisionBuilder db2, DecisionBuilder db3) {
    long cPtr = mainJNI.Solver_tryDecisions__SWIG_1(swigCPtr, this, DecisionBuilder.getCPtr(db1), db1, DecisionBuilder.getCPtr(db2), db2, DecisionBuilder.getCPtr(db3), db3);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder tryDecisions(DecisionBuilder db1, DecisionBuilder db2, DecisionBuilder db3, DecisionBuilder db4) {
    long cPtr = mainJNI.Solver_tryDecisions__SWIG_2(swigCPtr, this, DecisionBuilder.getCPtr(db1), db1, DecisionBuilder.getCPtr(db2), db2, DecisionBuilder.getCPtr(db3), db3, DecisionBuilder.getCPtr(db4), db4);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder tryDecisions(DecisionBuilder[] dbs) {
    long cPtr = mainJNI.Solver_tryDecisions__SWIG_3(swigCPtr, this, dbs);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar[] vars, int var_str, int val_str) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_0(swigCPtr, this, vars, var_str, val_str);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar[] vars, LongUnaryOperator var_evaluator, int val_str) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_1(swigCPtr, this, vars, var_evaluator, val_str);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar[] vars, int var_str, LongBinaryOperator value_evaluator) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_2(swigCPtr, this, vars, var_str, value_evaluator);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar[] vars, int var_str, LongTernaryPredicate var_val1_val2_comparator) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_3(swigCPtr, this, vars, var_str, var_val1_val2_comparator);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar[] vars, LongUnaryOperator var_evaluator, LongBinaryOperator value_evaluator) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_4(swigCPtr, this, vars, var_evaluator, value_evaluator);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar[] vars, int var_str, LongBinaryOperator value_evaluator, LongUnaryOperator tie_breaker) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_5(swigCPtr, this, vars, var_str, value_evaluator, tie_breaker);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar[] vars, LongUnaryOperator var_evaluator, LongBinaryOperator value_evaluator, LongUnaryOperator tie_breaker) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_6(swigCPtr, this, vars, var_evaluator, value_evaluator, tie_breaker);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeDefaultPhase(IntVar[] vars) {
    long cPtr = mainJNI.Solver_makeDefaultPhase__SWIG_0(swigCPtr, this, vars);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeDefaultPhase(IntVar[] vars, DefaultPhaseParameters parameters) {
    long cPtr = mainJNI.Solver_makeDefaultPhase__SWIG_1(swigCPtr, this, vars, DefaultPhaseParameters.getCPtr(parameters), parameters);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar v0, int var_str, int val_str) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_7(swigCPtr, this, IntVar.getCPtr(v0), v0, var_str, val_str);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar v0, IntVar v1, int var_str, int val_str) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_8(swigCPtr, this, IntVar.getCPtr(v0), v0, IntVar.getCPtr(v1), v1, var_str, val_str);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar v0, IntVar v1, IntVar v2, int var_str, int val_str) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_9(swigCPtr, this, IntVar.getCPtr(v0), v0, IntVar.getCPtr(v1), v1, IntVar.getCPtr(v2), v2, var_str, val_str);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar v0, IntVar v1, IntVar v2, IntVar v3, int var_str, int val_str) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_10(swigCPtr, this, IntVar.getCPtr(v0), v0, IntVar.getCPtr(v1), v1, IntVar.getCPtr(v2), v2, IntVar.getCPtr(v3), v3, var_str, val_str);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public Decision makeScheduleOrPostpone(IntervalVar var, long est, int[] marker) {
    long cPtr = mainJNI.Solver_makeScheduleOrPostpone(swigCPtr, this, IntervalVar.getCPtr(var), var, est, marker);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public Decision makeScheduleOrExpedite(IntervalVar var, long est, int[] marker) {
    long cPtr = mainJNI.Solver_makeScheduleOrExpedite(swigCPtr, this, IntervalVar.getCPtr(var), var, est, marker);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public Decision makeRankFirstInterval(SequenceVar sequence, int index) {
    long cPtr = mainJNI.Solver_makeRankFirstInterval(swigCPtr, this, SequenceVar.getCPtr(sequence), sequence, index);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public Decision makeRankLastInterval(SequenceVar sequence, int index) {
    long cPtr = mainJNI.Solver_makeRankLastInterval(swigCPtr, this, SequenceVar.getCPtr(sequence), sequence, index);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar[] vars, LongBinaryOperator eval, int str) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_11(swigCPtr, this, vars, eval, str);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntVar[] vars, LongBinaryOperator eval, LongUnaryOperator tie_breaker, int str) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_12(swigCPtr, this, vars, eval, tie_breaker, str);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(IntervalVar[] intervals, int str) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_13(swigCPtr, this, intervals, str);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makePhase(SequenceVar[] sequences, int str) {
    long cPtr = mainJNI.Solver_makePhase__SWIG_14(swigCPtr, this, sequences, str);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeDecisionBuilderFromAssignment(Assignment assignment, DecisionBuilder db, IntVar[] vars) {
    long cPtr = mainJNI.Solver_makeDecisionBuilderFromAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment, DecisionBuilder.getCPtr(db), db, vars);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeConstraintAdder(Constraint ct) {
    long cPtr = mainJNI.Solver_makeConstraintAdder(swigCPtr, this, Constraint.getCPtr(ct), ct);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeSolveOnce(DecisionBuilder db) {
    long cPtr = mainJNI.Solver_makeSolveOnce__SWIG_0(swigCPtr, this, DecisionBuilder.getCPtr(db), db);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeSolveOnce(DecisionBuilder db, SearchMonitor monitor1) {
    long cPtr = mainJNI.Solver_makeSolveOnce__SWIG_1(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(monitor1), monitor1);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeSolveOnce(DecisionBuilder db, SearchMonitor monitor1, SearchMonitor monitor2) {
    long cPtr = mainJNI.Solver_makeSolveOnce__SWIG_2(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(monitor1), monitor1, SearchMonitor.getCPtr(monitor2), monitor2);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeSolveOnce(DecisionBuilder db, SearchMonitor monitor1, SearchMonitor monitor2, SearchMonitor monitor3) {
    long cPtr = mainJNI.Solver_makeSolveOnce__SWIG_3(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(monitor1), monitor1, SearchMonitor.getCPtr(monitor2), monitor2, SearchMonitor.getCPtr(monitor3), monitor3);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeSolveOnce(DecisionBuilder db, SearchMonitor monitor1, SearchMonitor monitor2, SearchMonitor monitor3, SearchMonitor monitor4) {
    long cPtr = mainJNI.Solver_makeSolveOnce__SWIG_4(swigCPtr, this, DecisionBuilder.getCPtr(db), db, SearchMonitor.getCPtr(monitor1), monitor1, SearchMonitor.getCPtr(monitor2), monitor2, SearchMonitor.getCPtr(monitor3), monitor3, SearchMonitor.getCPtr(monitor4), monitor4);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeSolveOnce(DecisionBuilder db, SearchMonitor[] monitors) {
    long cPtr = mainJNI.Solver_makeSolveOnce__SWIG_5(swigCPtr, this, DecisionBuilder.getCPtr(db), db, monitors);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeNestedOptimize(DecisionBuilder db, Assignment solution, boolean maximize, long step) {
    long cPtr = mainJNI.Solver_makeNestedOptimize__SWIG_0(swigCPtr, this, DecisionBuilder.getCPtr(db), db, Assignment.getCPtr(solution), solution, maximize, step);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeNestedOptimize(DecisionBuilder db, Assignment solution, boolean maximize, long step, SearchMonitor monitor1) {
    long cPtr = mainJNI.Solver_makeNestedOptimize__SWIG_1(swigCPtr, this, DecisionBuilder.getCPtr(db), db, Assignment.getCPtr(solution), solution, maximize, step, SearchMonitor.getCPtr(monitor1), monitor1);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeNestedOptimize(DecisionBuilder db, Assignment solution, boolean maximize, long step, SearchMonitor monitor1, SearchMonitor monitor2) {
    long cPtr = mainJNI.Solver_makeNestedOptimize__SWIG_2(swigCPtr, this, DecisionBuilder.getCPtr(db), db, Assignment.getCPtr(solution), solution, maximize, step, SearchMonitor.getCPtr(monitor1), monitor1, SearchMonitor.getCPtr(monitor2), monitor2);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeNestedOptimize(DecisionBuilder db, Assignment solution, boolean maximize, long step, SearchMonitor monitor1, SearchMonitor monitor2, SearchMonitor monitor3) {
    long cPtr = mainJNI.Solver_makeNestedOptimize__SWIG_3(swigCPtr, this, DecisionBuilder.getCPtr(db), db, Assignment.getCPtr(solution), solution, maximize, step, SearchMonitor.getCPtr(monitor1), monitor1, SearchMonitor.getCPtr(monitor2), monitor2, SearchMonitor.getCPtr(monitor3), monitor3);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeNestedOptimize(DecisionBuilder db, Assignment solution, boolean maximize, long step, SearchMonitor monitor1, SearchMonitor monitor2, SearchMonitor monitor3, SearchMonitor monitor4) {
    long cPtr = mainJNI.Solver_makeNestedOptimize__SWIG_4(swigCPtr, this, DecisionBuilder.getCPtr(db), db, Assignment.getCPtr(solution), solution, maximize, step, SearchMonitor.getCPtr(monitor1), monitor1, SearchMonitor.getCPtr(monitor2), monitor2, SearchMonitor.getCPtr(monitor3), monitor3, SearchMonitor.getCPtr(monitor4), monitor4);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeNestedOptimize(DecisionBuilder db, Assignment solution, boolean maximize, long step, SearchMonitor[] monitors) {
    long cPtr = mainJNI.Solver_makeNestedOptimize__SWIG_5(swigCPtr, this, DecisionBuilder.getCPtr(db), db, Assignment.getCPtr(solution), solution, maximize, step, monitors);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeRestoreAssignment(Assignment assignment) {
    long cPtr = mainJNI.Solver_makeRestoreAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeStoreAssignment(Assignment assignment) {
    long cPtr = mainJNI.Solver_makeStoreAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public LocalSearchOperator makeOperator(IntVar[] vars, int op) {
    long cPtr = mainJNI.Solver_makeOperator__SWIG_0(swigCPtr, this, vars, op);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator makeOperator(IntVar[] vars, IntVar[] secondary_vars, int op) {
    long cPtr = mainJNI.Solver_makeOperator__SWIG_1(swigCPtr, this, vars, secondary_vars, op);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator makeOperator(IntVar[] vars, LongTernaryOperator evaluator, int op) {
    long cPtr = mainJNI.Solver_makeOperator__SWIG_2(swigCPtr, this, vars, evaluator, op);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator makeOperator(IntVar[] vars, IntVar[] secondary_vars, LongTernaryOperator evaluator, int op) {
    long cPtr = mainJNI.Solver_makeOperator__SWIG_3(swigCPtr, this, vars, secondary_vars, evaluator, op);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator makeRandomLnsOperator(IntVar[] vars, int number_of_variables) {
    long cPtr = mainJNI.Solver_makeRandomLnsOperator__SWIG_0(swigCPtr, this, vars, number_of_variables);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator makeRandomLnsOperator(IntVar[] vars, int number_of_variables, int seed) {
    long cPtr = mainJNI.Solver_makeRandomLnsOperator__SWIG_1(swigCPtr, this, vars, number_of_variables, seed);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator makeMoveTowardTargetOperator(Assignment target) {
    long cPtr = mainJNI.Solver_makeMoveTowardTargetOperator__SWIG_0(swigCPtr, this, Assignment.getCPtr(target), target);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator makeMoveTowardTargetOperator(IntVar[] variables, long[] target_values) {
    long cPtr = mainJNI.Solver_makeMoveTowardTargetOperator__SWIG_1(swigCPtr, this, variables, target_values);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator concatenateOperators(LocalSearchOperator[] ops) {
    long cPtr = mainJNI.Solver_concatenateOperators__SWIG_0(swigCPtr, this, ops);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator concatenateOperators(LocalSearchOperator[] ops, boolean restart) {
    long cPtr = mainJNI.Solver_concatenateOperators__SWIG_1(swigCPtr, this, ops, restart);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator concatenateOperators(LocalSearchOperator[] ops, IntIntToLongFunction evaluator) {
    long cPtr = mainJNI.Solver_concatenateOperators__SWIG_2(swigCPtr, this, ops, evaluator);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator randomConcatenateOperators(LocalSearchOperator[] ops) {
    long cPtr = mainJNI.Solver_randomConcatenateOperators__SWIG_0(swigCPtr, this, ops);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator randomConcatenateOperators(LocalSearchOperator[] ops, int seed) {
    long cPtr = mainJNI.Solver_randomConcatenateOperators__SWIG_1(swigCPtr, this, ops, seed);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public LocalSearchOperator makeNeighborhoodLimit(LocalSearchOperator op, long limit) {
    long cPtr = mainJNI.Solver_makeNeighborhoodLimit(swigCPtr, this, LocalSearchOperator.getCPtr(op), op, limit);
    return (cPtr == 0) ? null : new LocalSearchOperator(cPtr, false);
  }

  public DecisionBuilder makeLocalSearchPhase(Assignment assignment, LocalSearchPhaseParameters parameters) {
    long cPtr = mainJNI.Solver_makeLocalSearchPhase__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment, LocalSearchPhaseParameters.getCPtr(parameters), parameters);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeLocalSearchPhase(IntVar[] vars, DecisionBuilder first_solution, LocalSearchPhaseParameters parameters) {
    long cPtr = mainJNI.Solver_makeLocalSearchPhase__SWIG_1(swigCPtr, this, vars, DecisionBuilder.getCPtr(first_solution), first_solution, LocalSearchPhaseParameters.getCPtr(parameters), parameters);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeLocalSearchPhase(IntVar[] vars, DecisionBuilder first_solution, DecisionBuilder first_solution_sub_decision_builder, LocalSearchPhaseParameters parameters) {
    long cPtr = mainJNI.Solver_makeLocalSearchPhase__SWIG_2(swigCPtr, this, vars, DecisionBuilder.getCPtr(first_solution), first_solution, DecisionBuilder.getCPtr(first_solution_sub_decision_builder), first_solution_sub_decision_builder, LocalSearchPhaseParameters.getCPtr(parameters), parameters);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public DecisionBuilder makeLocalSearchPhase(SequenceVar[] vars, DecisionBuilder first_solution, LocalSearchPhaseParameters parameters) {
    long cPtr = mainJNI.Solver_makeLocalSearchPhase__SWIG_3(swigCPtr, this, vars, DecisionBuilder.getCPtr(first_solution), first_solution, LocalSearchPhaseParameters.getCPtr(parameters), parameters);
    return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
  }

  public SolutionPool makeDefaultSolutionPool() {
    long cPtr = mainJNI.Solver_makeDefaultSolutionPool(swigCPtr, this);
    return (cPtr == 0) ? null : new SolutionPool(cPtr, false);
  }

  public LocalSearchPhaseParameters makeLocalSearchPhaseParameters(IntVar objective, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder) {
    long cPtr = mainJNI.Solver_makeLocalSearchPhaseParameters__SWIG_0(swigCPtr, this, IntVar.getCPtr(objective), objective, LocalSearchOperator.getCPtr(ls_operator), ls_operator, DecisionBuilder.getCPtr(sub_decision_builder), sub_decision_builder);
    return (cPtr == 0) ? null : new LocalSearchPhaseParameters(cPtr, false);
  }

  public LocalSearchPhaseParameters makeLocalSearchPhaseParameters(IntVar objective, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder, RegularLimit limit) {
    long cPtr = mainJNI.Solver_makeLocalSearchPhaseParameters__SWIG_1(swigCPtr, this, IntVar.getCPtr(objective), objective, LocalSearchOperator.getCPtr(ls_operator), ls_operator, DecisionBuilder.getCPtr(sub_decision_builder), sub_decision_builder, RegularLimit.getCPtr(limit), limit);
    return (cPtr == 0) ? null : new LocalSearchPhaseParameters(cPtr, false);
  }

  public LocalSearchPhaseParameters makeLocalSearchPhaseParameters(IntVar objective, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder, RegularLimit limit, LocalSearchFilter[] filters) {
    long cPtr = mainJNI.Solver_makeLocalSearchPhaseParameters__SWIG_2(swigCPtr, this, IntVar.getCPtr(objective), objective, LocalSearchOperator.getCPtr(ls_operator), ls_operator, DecisionBuilder.getCPtr(sub_decision_builder), sub_decision_builder, RegularLimit.getCPtr(limit), limit, filters);
    return (cPtr == 0) ? null : new LocalSearchPhaseParameters(cPtr, false);
  }

  public LocalSearchPhaseParameters makeLocalSearchPhaseParameters(IntVar objective, SolutionPool pool, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder) {
    long cPtr = mainJNI.Solver_makeLocalSearchPhaseParameters__SWIG_3(swigCPtr, this, IntVar.getCPtr(objective), objective, SolutionPool.getCPtr(pool), pool, LocalSearchOperator.getCPtr(ls_operator), ls_operator, DecisionBuilder.getCPtr(sub_decision_builder), sub_decision_builder);
    return (cPtr == 0) ? null : new LocalSearchPhaseParameters(cPtr, false);
  }

  public LocalSearchPhaseParameters makeLocalSearchPhaseParameters(IntVar objective, SolutionPool pool, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder, RegularLimit limit) {
    long cPtr = mainJNI.Solver_makeLocalSearchPhaseParameters__SWIG_4(swigCPtr, this, IntVar.getCPtr(objective), objective, SolutionPool.getCPtr(pool), pool, LocalSearchOperator.getCPtr(ls_operator), ls_operator, DecisionBuilder.getCPtr(sub_decision_builder), sub_decision_builder, RegularLimit.getCPtr(limit), limit);
    return (cPtr == 0) ? null : new LocalSearchPhaseParameters(cPtr, false);
  }

  public LocalSearchPhaseParameters makeLocalSearchPhaseParameters(IntVar objective, SolutionPool pool, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder, RegularLimit limit, LocalSearchFilter[] filters) {
    long cPtr = mainJNI.Solver_makeLocalSearchPhaseParameters__SWIG_5(swigCPtr, this, IntVar.getCPtr(objective), objective, SolutionPool.getCPtr(pool), pool, LocalSearchOperator.getCPtr(ls_operator), ls_operator, DecisionBuilder.getCPtr(sub_decision_builder), sub_decision_builder, RegularLimit.getCPtr(limit), limit, filters);
    return (cPtr == 0) ? null : new LocalSearchPhaseParameters(cPtr, false);
  }

  public LocalSearchFilter MakeAcceptFilter() {
    long cPtr = mainJNI.Solver_MakeAcceptFilter(swigCPtr, this);
    return (cPtr == 0) ? null : new LocalSearchFilter(cPtr, false);
  }

  public LocalSearchFilter MakeRejectFilter() {
    long cPtr = mainJNI.Solver_MakeRejectFilter(swigCPtr, this);
    return (cPtr == 0) ? null : new LocalSearchFilter(cPtr, false);
  }

  public LocalSearchFilter makeVariableDomainFilter() {
    long cPtr = mainJNI.Solver_makeVariableDomainFilter(swigCPtr, this);
    return (cPtr == 0) ? null : new LocalSearchFilter(cPtr, false);
  }

  public IntVarLocalSearchFilter makeSumObjectiveFilter(IntVar[] vars, LongBinaryOperator values, int filter_enum) {
    long cPtr = mainJNI.Solver_makeSumObjectiveFilter__SWIG_0(swigCPtr, this, vars, values, filter_enum);
    return (cPtr == 0) ? null : new IntVarLocalSearchFilter(cPtr, false);
  }

  public IntVarLocalSearchFilter makeSumObjectiveFilter(IntVar[] vars, IntVar[] secondary_vars, LongTernaryOperator values, int filter_enum) {
    long cPtr = mainJNI.Solver_makeSumObjectiveFilter__SWIG_1(swigCPtr, this, vars, secondary_vars, values, filter_enum);
    return (cPtr == 0) ? null : new IntVarLocalSearchFilter(cPtr, false);
  }

  public void topPeriodicCheck() {
    mainJNI.Solver_topPeriodicCheck(swigCPtr, this);
  }

  public int topProgressPercent() {
    return mainJNI.Solver_topProgressPercent(swigCPtr, this);
  }

  public void pushState() {
    mainJNI.Solver_pushState(swigCPtr, this);
  }

  public void popState() {
    mainJNI.Solver_popState(swigCPtr, this);
  }

  public int searchDepth() {
    return mainJNI.Solver_searchDepth(swigCPtr, this);
  }

  public int searchLeftDepth() {
    return mainJNI.Solver_searchLeftDepth(swigCPtr, this);
  }

  public int solveDepth() {
    return mainJNI.Solver_solveDepth(swigCPtr, this);
  }

  public long rand64(long size) {
    return mainJNI.Solver_rand64(swigCPtr, this, size);
  }

  public int rand32(int size) {
    return mainJNI.Solver_rand32(swigCPtr, this, size);
  }

  public void reSeed(int seed) {
    mainJNI.Solver_reSeed(swigCPtr, this, seed);
  }

  public void exportProfilingOverview(String filename) {
    mainJNI.Solver_exportProfilingOverview(swigCPtr, this, filename);
  }

  public String localSearchProfile() {
    return mainJNI.Solver_localSearchProfile(swigCPtr, this);
  }

  public boolean currentlyInSolve() {
    return mainJNI.Solver_currentlyInSolve(swigCPtr, this);
  }

  public int constraints() {
    return mainJNI.Solver_constraints(swigCPtr, this);
  }

  public void accept(ModelVisitor visitor) {
    mainJNI.Solver_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
  }

  public Decision balancing_decision() {
    long cPtr = mainJNI.Solver_balancing_decision(swigCPtr, this);
    return (cPtr == 0) ? null : new Decision(cPtr, false);
  }

  public void clear_fail_intercept() {
    mainJNI.Solver_clear_fail_intercept(swigCPtr, this);
  }

  public void SetUseFastLocalSearch(boolean use_fast_local_search) {
    mainJNI.Solver_SetUseFastLocalSearch(swigCPtr, this, use_fast_local_search);
  }

  public boolean UseFastLocalSearch() {
    return mainJNI.Solver_UseFastLocalSearch(swigCPtr, this);
  }

  public boolean hasName(PropagationBaseObject object) {
    return mainJNI.Solver_hasName(swigCPtr, this, PropagationBaseObject.getCPtr(object), object);
  }

  public Demon registerDemon(Demon demon) {
    long cPtr = mainJNI.Solver_registerDemon(swigCPtr, this, Demon.getCPtr(demon), demon);
    return (cPtr == 0) ? null : new Demon(cPtr, false);
  }

  public IntExpr registerIntExpr(IntExpr expr) {
    long cPtr = mainJNI.Solver_registerIntExpr(swigCPtr, this, IntExpr.getCPtr(expr), expr);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public IntVar registerIntVar(IntVar var) {
    long cPtr = mainJNI.Solver_registerIntVar(swigCPtr, this, IntVar.getCPtr(var), var);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntervalVar registerIntervalVar(IntervalVar var) {
    long cPtr = mainJNI.Solver_registerIntervalVar(swigCPtr, this, IntervalVar.getCPtr(var), var);
    return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
  }

  public ModelCache cache() {
    long cPtr = mainJNI.Solver_cache(swigCPtr, this);
    return (cPtr == 0) ? null : new ModelCache(cPtr, false);
  }

  public boolean instrumentsDemons() {
    return mainJNI.Solver_instrumentsDemons(swigCPtr, this);
  }

  public boolean isProfilingEnabled() {
    return mainJNI.Solver_isProfilingEnabled(swigCPtr, this);
  }

  public boolean isLocalSearchProfilingEnabled() {
    return mainJNI.Solver_isLocalSearchProfilingEnabled(swigCPtr, this);
  }

  public boolean instrumentsVariables() {
    return mainJNI.Solver_instrumentsVariables(swigCPtr, this);
  }

  public boolean nameAllVariables() {
    return mainJNI.Solver_nameAllVariables(swigCPtr, this);
  }

  public String model_name() {
    return mainJNI.Solver_model_name(swigCPtr, this);
  }

  public PropagationMonitor getPropagationMonitor() {
    long cPtr = mainJNI.Solver_getPropagationMonitor(swigCPtr, this);
    return (cPtr == 0) ? null : new PropagationMonitor(cPtr, false);
  }

  public void addPropagationMonitor(PropagationMonitor monitor) {
    mainJNI.Solver_addPropagationMonitor(swigCPtr, this, PropagationMonitor.getCPtr(monitor), monitor);
  }

  public LocalSearchMonitor getLocalSearchMonitor() {
    long cPtr = mainJNI.Solver_getLocalSearchMonitor(swigCPtr, this);
    return (cPtr == 0) ? null : new LocalSearchMonitor(cPtr, false);
  }

  public void addLocalSearchMonitor(LocalSearchMonitor monitor) {
    mainJNI.Solver_addLocalSearchMonitor(swigCPtr, this, LocalSearchMonitor.getCPtr(monitor), monitor);
  }

  public Assignment GetOrCreateLocalSearchState() {
    long cPtr = mainJNI.Solver_GetOrCreateLocalSearchState(swigCPtr, this);
    return (cPtr == 0) ? null : new Assignment(cPtr, false);
  }

  public void ClearLocalSearchState() {
    mainJNI.Solver_ClearLocalSearchState(swigCPtr, this);
  }

  public void setTmp_vector_(long[] value) {
    mainJNI.Solver_tmp_vector__set(swigCPtr, this, value);
  }

  public long[] getTmp_vector_() {
  return mainJNI.Solver_tmp_vector__get(swigCPtr, this);
}

  public IntExpr castExpression(IntVar var) {
    long cPtr = mainJNI.Solver_castExpression(swigCPtr, this, IntVar.getCPtr(var), var);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public void finishCurrentSearch() {
    mainJNI.Solver_finishCurrentSearch(swigCPtr, this);
  }

  public void restartCurrentSearch() {
    mainJNI.Solver_restartCurrentSearch(swigCPtr, this);
  }

  public void shouldFail() {
    mainJNI.Solver_shouldFail(swigCPtr, this);
  }

  public void checkFail() {
    mainJNI.Solver_checkFail(swigCPtr, this);
  }

  public final static int kNumPriorities = mainJNI.Solver_kNumPriorities_get();
  // IntVarStrategy 
  public final static int INT_VAR_DEFAULT = mainJNI.Solver_INT_VAR_DEFAULT_get();
  public final static int INT_VAR_SIMPLE = mainJNI.Solver_INT_VAR_SIMPLE_get();
  public final static int CHOOSE_FIRST_UNBOUND = mainJNI.Solver_CHOOSE_FIRST_UNBOUND_get();
  public final static int CHOOSE_RANDOM = mainJNI.Solver_CHOOSE_RANDOM_get();
  public final static int CHOOSE_MIN_SIZE_LOWEST_MIN = mainJNI.Solver_CHOOSE_MIN_SIZE_LOWEST_MIN_get();
  public final static int CHOOSE_MIN_SIZE_HIGHEST_MIN = mainJNI.Solver_CHOOSE_MIN_SIZE_HIGHEST_MIN_get();
  public final static int CHOOSE_MIN_SIZE_LOWEST_MAX = mainJNI.Solver_CHOOSE_MIN_SIZE_LOWEST_MAX_get();
  public final static int CHOOSE_MIN_SIZE_HIGHEST_MAX = mainJNI.Solver_CHOOSE_MIN_SIZE_HIGHEST_MAX_get();
  public final static int CHOOSE_LOWEST_MIN = mainJNI.Solver_CHOOSE_LOWEST_MIN_get();
  public final static int CHOOSE_HIGHEST_MAX = mainJNI.Solver_CHOOSE_HIGHEST_MAX_get();
  public final static int CHOOSE_MIN_SIZE = mainJNI.Solver_CHOOSE_MIN_SIZE_get();
  public final static int CHOOSE_MAX_SIZE = mainJNI.Solver_CHOOSE_MAX_SIZE_get();
  public final static int CHOOSE_MAX_REGRET_ON_MIN = mainJNI.Solver_CHOOSE_MAX_REGRET_ON_MIN_get();
  public final static int CHOOSE_PATH = mainJNI.Solver_CHOOSE_PATH_get();

  // IntValueStrategy 
  public final static int INT_VALUE_DEFAULT = mainJNI.Solver_INT_VALUE_DEFAULT_get();
  public final static int INT_VALUE_SIMPLE = mainJNI.Solver_INT_VALUE_SIMPLE_get();
  public final static int ASSIGN_MIN_VALUE = mainJNI.Solver_ASSIGN_MIN_VALUE_get();
  public final static int ASSIGN_MAX_VALUE = mainJNI.Solver_ASSIGN_MAX_VALUE_get();
  public final static int ASSIGN_RANDOM_VALUE = mainJNI.Solver_ASSIGN_RANDOM_VALUE_get();
  public final static int ASSIGN_CENTER_VALUE = mainJNI.Solver_ASSIGN_CENTER_VALUE_get();
  public final static int SPLIT_LOWER_HALF = mainJNI.Solver_SPLIT_LOWER_HALF_get();
  public final static int SPLIT_UPPER_HALF = mainJNI.Solver_SPLIT_UPPER_HALF_get();

  // EvaluatorStrategy 
  public final static int CHOOSE_STATIC_GLOBAL_BEST = mainJNI.Solver_CHOOSE_STATIC_GLOBAL_BEST_get();
  public final static int CHOOSE_DYNAMIC_GLOBAL_BEST = mainJNI.Solver_CHOOSE_DYNAMIC_GLOBAL_BEST_get();

  // SequenceStrategy 
  public final static int SEQUENCE_DEFAULT = mainJNI.Solver_SEQUENCE_DEFAULT_get();
  public final static int SEQUENCE_SIMPLE = mainJNI.Solver_SEQUENCE_SIMPLE_get();
  public final static int CHOOSE_MIN_SLACK_RANK_FORWARD = mainJNI.Solver_CHOOSE_MIN_SLACK_RANK_FORWARD_get();
  public final static int CHOOSE_RANDOM_RANK_FORWARD = mainJNI.Solver_CHOOSE_RANDOM_RANK_FORWARD_get();

  // IntervalStrategy 
  public final static int INTERVAL_DEFAULT = mainJNI.Solver_INTERVAL_DEFAULT_get();
  public final static int INTERVAL_SIMPLE = mainJNI.Solver_INTERVAL_SIMPLE_get();
  public final static int INTERVAL_SET_TIMES_FORWARD = mainJNI.Solver_INTERVAL_SET_TIMES_FORWARD_get();
  public final static int INTERVAL_SET_TIMES_BACKWARD = mainJNI.Solver_INTERVAL_SET_TIMES_BACKWARD_get();

  // LocalSearchOperators 
  public final static int TWOOPT = mainJNI.Solver_TWOOPT_get();
  public final static int OROPT = mainJNI.Solver_OROPT_get();
  public final static int RELOCATE = mainJNI.Solver_RELOCATE_get();
  public final static int EXCHANGE = mainJNI.Solver_EXCHANGE_get();
  public final static int CROSS = mainJNI.Solver_CROSS_get();
  public final static int MAKEACTIVE = mainJNI.Solver_MAKEACTIVE_get();
  public final static int MAKEINACTIVE = mainJNI.Solver_MAKEINACTIVE_get();
  public final static int MAKECHAININACTIVE = mainJNI.Solver_MAKECHAININACTIVE_get();
  public final static int SWAPACTIVE = mainJNI.Solver_SWAPACTIVE_get();
  public final static int EXTENDEDSWAPACTIVE = mainJNI.Solver_EXTENDEDSWAPACTIVE_get();
  public final static int PATHLNS = mainJNI.Solver_PATHLNS_get();
  public final static int FULLPATHLNS = mainJNI.Solver_FULLPATHLNS_get();
  public final static int UNACTIVELNS = mainJNI.Solver_UNACTIVELNS_get();
  public final static int INCREMENT = mainJNI.Solver_INCREMENT_get();
  public final static int DECREMENT = mainJNI.Solver_DECREMENT_get();
  public final static int SIMPLELNS = mainJNI.Solver_SIMPLELNS_get();

  // EvaluatorLocalSearchOperators 
  public final static int LK = mainJNI.Solver_LK_get();
  public final static int TSPOPT = mainJNI.Solver_TSPOPT_get();
  public final static int TSPLNS = mainJNI.Solver_TSPLNS_get();

  // LocalSearchFilterBound 
  public final static int GE = mainJNI.Solver_GE_get();
  public final static int LE = mainJNI.Solver_LE_get();
  public final static int EQ = mainJNI.Solver_EQ_get();

  // DemonPriority 
  public final static int DELAYED_PRIORITY = mainJNI.Solver_DELAYED_PRIORITY_get();
  public final static int VAR_PRIORITY = mainJNI.Solver_VAR_PRIORITY_get();
  public final static int NORMAL_PRIORITY = mainJNI.Solver_NORMAL_PRIORITY_get();

  // BinaryIntervalRelation 
  public final static int ENDS_AFTER_END = mainJNI.Solver_ENDS_AFTER_END_get();
  public final static int ENDS_AFTER_START = mainJNI.Solver_ENDS_AFTER_START_get();
  public final static int ENDS_AT_END = mainJNI.Solver_ENDS_AT_END_get();
  public final static int ENDS_AT_START = mainJNI.Solver_ENDS_AT_START_get();
  public final static int STARTS_AFTER_END = mainJNI.Solver_STARTS_AFTER_END_get();
  public final static int STARTS_AFTER_START = mainJNI.Solver_STARTS_AFTER_START_get();
  public final static int STARTS_AT_END = mainJNI.Solver_STARTS_AT_END_get();
  public final static int STARTS_AT_START = mainJNI.Solver_STARTS_AT_START_get();
  public final static int STAYS_IN_SYNC = mainJNI.Solver_STAYS_IN_SYNC_get();

  // UnaryIntervalRelation 
  public final static int ENDS_AFTER = mainJNI.Solver_ENDS_AFTER_get();
  public final static int ENDS_AT = mainJNI.Solver_ENDS_AT_get();
  public final static int ENDS_BEFORE = mainJNI.Solver_ENDS_BEFORE_get();
  public final static int STARTS_AFTER = mainJNI.Solver_STARTS_AFTER_get();
  public final static int STARTS_AT = mainJNI.Solver_STARTS_AT_get();
  public final static int STARTS_BEFORE = mainJNI.Solver_STARTS_BEFORE_get();
  public final static int CROSS_DATE = mainJNI.Solver_CROSS_DATE_get();
  public final static int AVOID_DATE = mainJNI.Solver_AVOID_DATE_get();

  // DecisionModification 
  public final static int NO_CHANGE = mainJNI.Solver_NO_CHANGE_get();
  public final static int KEEP_LEFT = mainJNI.Solver_KEEP_LEFT_get();
  public final static int KEEP_RIGHT = mainJNI.Solver_KEEP_RIGHT_get();
  public final static int KILL_BOTH = mainJNI.Solver_KILL_BOTH_get();
  public final static int SWITCH_BRANCHES = mainJNI.Solver_SWITCH_BRANCHES_get();

  // MarkerType 
  public final static int SENTINEL = mainJNI.Solver_SENTINEL_get();
  public final static int SIMPLE_MARKER = mainJNI.Solver_SIMPLE_MARKER_get();
  public final static int CHOICE_POINT = mainJNI.Solver_CHOICE_POINT_get();
  public final static int REVERSIBLE_ACTION = mainJNI.Solver_REVERSIBLE_ACTION_get();

  // SolverState 
  public final static int OUTSIDE_SEARCH = mainJNI.Solver_OUTSIDE_SEARCH_get();
  public final static int IN_ROOT_NODE = mainJNI.Solver_IN_ROOT_NODE_get();
  public final static int IN_SEARCH = mainJNI.Solver_IN_SEARCH_get();
  public final static int AT_SOLUTION = mainJNI.Solver_AT_SOLUTION_get();
  public final static int NO_MORE_SOLUTIONS = mainJNI.Solver_NO_MORE_SOLUTIONS_get();
  public final static int PROBLEM_INFEASIBLE = mainJNI.Solver_PROBLEM_INFEASIBLE_get();

  // OptimizationDirection 
  public final static int NOT_SET = mainJNI.Solver_NOT_SET_get();
  public final static int MAXIMIZATION = mainJNI.Solver_MAXIMIZATION_get();
  public final static int MINIMIZATION = mainJNI.Solver_MINIMIZATION_get();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy