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

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

The newest version!
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.10
 *
 * 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;

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

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

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

  protected void finalize() {
    delete();
  }

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

  public void Clear() {
    operations_research_constraint_solverJNI.ModelCache_Clear(swigCPtr, this);
  }

  public Constraint FindVoidConstraint(int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindVoidConstraint(swigCPtr, this, type);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public void InsertVoidConstraint(Constraint ct, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertVoidConstraint(swigCPtr, this, Constraint.getCPtr(ct), ct, type);
  }

  public Constraint FindVarConstantConstraint(IntVar var, long value, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindVarConstantConstraint(swigCPtr, this, IntVar.getCPtr(var), var, value, type);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public void InsertVarConstantConstraint(Constraint ct, IntVar var, long value, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertVarConstantConstraint(swigCPtr, this, Constraint.getCPtr(ct), ct, IntVar.getCPtr(var), var, value, type);
  }

  public Constraint FindVarConstantConstantConstraint(IntVar var, long value1, long value2, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindVarConstantConstantConstraint(swigCPtr, this, IntVar.getCPtr(var), var, value1, value2, type);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public void InsertVarConstantConstantConstraint(Constraint ct, IntVar var, long value1, long value2, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertVarConstantConstantConstraint(swigCPtr, this, Constraint.getCPtr(ct), ct, IntVar.getCPtr(var), var, value1, value2, type);
  }

  public Constraint FindExprExprConstraint(IntExpr expr1, IntExpr expr2, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindExprExprConstraint(swigCPtr, this, IntExpr.getCPtr(expr1), expr1, IntExpr.getCPtr(expr2), expr2, type);
    return (cPtr == 0) ? null : new Constraint(cPtr, false);
  }

  public void InsertExprExprConstraint(Constraint ct, IntExpr expr1, IntExpr expr2, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertExprExprConstraint(swigCPtr, this, Constraint.getCPtr(ct), ct, IntExpr.getCPtr(expr1), expr1, IntExpr.getCPtr(expr2), expr2, type);
  }

  public IntExpr FindExprExpression(IntExpr expr, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindExprExpression(swigCPtr, this, IntExpr.getCPtr(expr), expr, type);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public void InsertExprExpression(IntExpr expression, IntExpr expr, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertExprExpression(swigCPtr, this, IntExpr.getCPtr(expression), expression, IntExpr.getCPtr(expr), expr, type);
  }

  public IntExpr FindExprConstantExpression(IntExpr expr, long value, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindExprConstantExpression(swigCPtr, this, IntExpr.getCPtr(expr), expr, value, type);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public void InsertExprConstantExpression(IntExpr expression, IntExpr var, long value, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertExprConstantExpression(swigCPtr, this, IntExpr.getCPtr(expression), expression, IntExpr.getCPtr(var), var, value, type);
  }

  public IntExpr FindExprExprExpression(IntExpr var1, IntExpr var2, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindExprExprExpression(swigCPtr, this, IntExpr.getCPtr(var1), var1, IntExpr.getCPtr(var2), var2, type);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public void InsertExprExprExpression(IntExpr expression, IntExpr var1, IntExpr var2, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertExprExprExpression(swigCPtr, this, IntExpr.getCPtr(expression), expression, IntExpr.getCPtr(var1), var1, IntExpr.getCPtr(var2), var2, type);
  }

  public IntExpr FindExprExprConstantExpression(IntExpr var1, IntExpr var2, long constant, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindExprExprConstantExpression(swigCPtr, this, IntExpr.getCPtr(var1), var1, IntExpr.getCPtr(var2), var2, constant, type);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public void InsertExprExprConstantExpression(IntExpr expression, IntExpr var1, IntExpr var2, long constant, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertExprExprConstantExpression(swigCPtr, this, IntExpr.getCPtr(expression), expression, IntExpr.getCPtr(var1), var1, IntExpr.getCPtr(var2), var2, constant, type);
  }

  public IntExpr FindVarConstantConstantExpression(IntVar var, long value1, long value2, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindVarConstantConstantExpression(swigCPtr, this, IntVar.getCPtr(var), var, value1, value2, type);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public void InsertVarConstantConstantExpression(IntExpr expression, IntVar var, long value1, long value2, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertVarConstantConstantExpression(swigCPtr, this, IntExpr.getCPtr(expression), expression, IntVar.getCPtr(var), var, value1, value2, type);
  }

  public IntExpr FindVarConstantArrayExpression(IntVar var, long[] values, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindVarConstantArrayExpression(swigCPtr, this, IntVar.getCPtr(var), var, values, type);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public void InsertVarConstantArrayExpression(IntExpr expression, IntVar var, long[] values, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertVarConstantArrayExpression(swigCPtr, this, IntExpr.getCPtr(expression), expression, IntVar.getCPtr(var), var, values, type);
  }

  public IntExpr FindVarArrayExpression(IntVar[] vars, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindVarArrayExpression(swigCPtr, this, vars, type);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public void InsertVarArrayExpression(IntExpr expression, IntVar[] vars, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertVarArrayExpression(swigCPtr, this, IntExpr.getCPtr(expression), expression, vars, type);
  }

  public IntExpr FindVarArrayConstantArrayExpression(IntVar[] vars, long[] values, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindVarArrayConstantArrayExpression(swigCPtr, this, vars, values, type);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public void InsertVarArrayConstantArrayExpression(IntExpr expression, IntVar[] var, long[] values, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertVarArrayConstantArrayExpression(swigCPtr, this, IntExpr.getCPtr(expression), expression, var, values, type);
  }

  public IntExpr FindVarArrayConstantExpression(IntVar[] vars, long value, int type) {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_FindVarArrayConstantExpression(swigCPtr, this, vars, value, type);
    return (cPtr == 0) ? null : new IntExpr(cPtr, false);
  }

  public void InsertVarArrayConstantExpression(IntExpr expression, IntVar[] var, long value, int type) {
    operations_research_constraint_solverJNI.ModelCache_InsertVarArrayConstantExpression(swigCPtr, this, IntExpr.getCPtr(expression), expression, var, value, type);
  }

  public Solver solver() {
    long cPtr = operations_research_constraint_solverJNI.ModelCache_solver(swigCPtr, this);
    return (cPtr == 0) ? null : new Solver(cPtr, false);
  }

  // VoidConstraintType 
  public final static int VOID_FALSE_CONSTRAINT = operations_research_constraint_solverJNI.ModelCache_VOID_FALSE_CONSTRAINT_get();
  public final static int VOID_TRUE_CONSTRAINT = operations_research_constraint_solverJNI.ModelCache_VOID_TRUE_CONSTRAINT_get();
  public final static int VOID_CONSTRAINT_MAX = operations_research_constraint_solverJNI.ModelCache_VOID_CONSTRAINT_MAX_get();

  // VarConstantConstraintType 
  public final static int VAR_CONSTANT_EQUALITY = operations_research_constraint_solverJNI.ModelCache_VAR_CONSTANT_EQUALITY_get();
  public final static int VAR_CONSTANT_GREATER_OR_EQUAL = operations_research_constraint_solverJNI.ModelCache_VAR_CONSTANT_GREATER_OR_EQUAL_get();
  public final static int VAR_CONSTANT_LESS_OR_EQUAL = operations_research_constraint_solverJNI.ModelCache_VAR_CONSTANT_LESS_OR_EQUAL_get();
  public final static int VAR_CONSTANT_NON_EQUALITY = operations_research_constraint_solverJNI.ModelCache_VAR_CONSTANT_NON_EQUALITY_get();
  public final static int VAR_CONSTANT_CONSTRAINT_MAX = operations_research_constraint_solverJNI.ModelCache_VAR_CONSTANT_CONSTRAINT_MAX_get();

  // VarConstantConstantConstraintType 
  public final static int VAR_CONSTANT_CONSTANT_BETWEEN = operations_research_constraint_solverJNI.ModelCache_VAR_CONSTANT_CONSTANT_BETWEEN_get();
  public final static int VAR_CONSTANT_CONSTANT_CONSTRAINT_MAX = operations_research_constraint_solverJNI.ModelCache_VAR_CONSTANT_CONSTANT_CONSTRAINT_MAX_get();

  // ExprExprConstraintType 
  public final static int EXPR_EXPR_EQUALITY = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_EQUALITY_get();
  public final static int EXPR_EXPR_GREATER = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_GREATER_get();
  public final static int EXPR_EXPR_GREATER_OR_EQUAL = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_GREATER_OR_EQUAL_get();
  public final static int EXPR_EXPR_LESS = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_LESS_get();
  public final static int EXPR_EXPR_LESS_OR_EQUAL = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_LESS_OR_EQUAL_get();
  public final static int EXPR_EXPR_NON_EQUALITY = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_NON_EQUALITY_get();
  public final static int EXPR_EXPR_CONSTRAINT_MAX = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_CONSTRAINT_MAX_get();

  // ExprExpressionType 
  public final static int EXPR_OPPOSITE = operations_research_constraint_solverJNI.ModelCache_EXPR_OPPOSITE_get();
  public final static int EXPR_ABS = operations_research_constraint_solverJNI.ModelCache_EXPR_ABS_get();
  public final static int EXPR_SQUARE = operations_research_constraint_solverJNI.ModelCache_EXPR_SQUARE_get();
  public final static int EXPR_EXPRESSION_MAX = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPRESSION_MAX_get();

  // ExprExprExpressionType 
  public final static int EXPR_EXPR_DIFFERENCE = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_DIFFERENCE_get();
  public final static int EXPR_EXPR_PROD = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_PROD_get();
  public final static int EXPR_EXPR_DIV = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_DIV_get();
  public final static int EXPR_EXPR_MAX = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_MAX_get();
  public final static int EXPR_EXPR_MIN = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_MIN_get();
  public final static int EXPR_EXPR_SUM = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_SUM_get();
  public final static int EXPR_EXPR_IS_LESS = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_IS_LESS_get();
  public final static int EXPR_EXPR_IS_LESS_OR_EQUAL = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_IS_LESS_OR_EQUAL_get();
  public final static int EXPR_EXPR_IS_EQUAL = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_IS_EQUAL_get();
  public final static int EXPR_EXPR_IS_NOT_EQUAL = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_IS_NOT_EQUAL_get();
  public final static int EXPR_EXPR_EXPRESSION_MAX = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_EXPRESSION_MAX_get();

  // ExprExprConstantExpressionType 
  public final static int EXPR_EXPR_CONSTANT_CONDITIONAL = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_CONSTANT_CONDITIONAL_get();
  public final static int EXPR_EXPR_CONSTANT_EXPRESSION_MAX = operations_research_constraint_solverJNI.ModelCache_EXPR_EXPR_CONSTANT_EXPRESSION_MAX_get();

  // ExprConstantExpressionType 
  public final static int EXPR_CONSTANT_DIFFERENCE = operations_research_constraint_solverJNI.ModelCache_EXPR_CONSTANT_DIFFERENCE_get();
  public final static int EXPR_CONSTANT_DIVIDE = operations_research_constraint_solverJNI.ModelCache_EXPR_CONSTANT_DIVIDE_get();
  public final static int EXPR_CONSTANT_PROD = operations_research_constraint_solverJNI.ModelCache_EXPR_CONSTANT_PROD_get();
  public final static int EXPR_CONSTANT_MAX = operations_research_constraint_solverJNI.ModelCache_EXPR_CONSTANT_MAX_get();
  public final static int EXPR_CONSTANT_MIN = operations_research_constraint_solverJNI.ModelCache_EXPR_CONSTANT_MIN_get();
  public final static int EXPR_CONSTANT_SUM = operations_research_constraint_solverJNI.ModelCache_EXPR_CONSTANT_SUM_get();
  public final static int EXPR_CONSTANT_IS_EQUAL = operations_research_constraint_solverJNI.ModelCache_EXPR_CONSTANT_IS_EQUAL_get();
  public final static int EXPR_CONSTANT_IS_NOT_EQUAL = operations_research_constraint_solverJNI.ModelCache_EXPR_CONSTANT_IS_NOT_EQUAL_get();
  public final static int EXPR_CONSTANT_IS_GREATER_OR_EQUAL = operations_research_constraint_solverJNI.ModelCache_EXPR_CONSTANT_IS_GREATER_OR_EQUAL_get();
  public final static int EXPR_CONSTANT_IS_LESS_OR_EQUAL = operations_research_constraint_solverJNI.ModelCache_EXPR_CONSTANT_IS_LESS_OR_EQUAL_get();
  public final static int EXPR_CONSTANT_EXPRESSION_MAX = operations_research_constraint_solverJNI.ModelCache_EXPR_CONSTANT_EXPRESSION_MAX_get();

  // VarConstantConstantExpressionType 
  public final static int VAR_CONSTANT_CONSTANT_SEMI_CONTINUOUS = operations_research_constraint_solverJNI.ModelCache_VAR_CONSTANT_CONSTANT_SEMI_CONTINUOUS_get();
  public final static int VAR_CONSTANT_CONSTANT_EXPRESSION_MAX = operations_research_constraint_solverJNI.ModelCache_VAR_CONSTANT_CONSTANT_EXPRESSION_MAX_get();

  // VarConstantArrayExpressionType 
  public final static int VAR_CONSTANT_ARRAY_ELEMENT = operations_research_constraint_solverJNI.ModelCache_VAR_CONSTANT_ARRAY_ELEMENT_get();
  public final static int VAR_CONSTANT_ARRAY_EXPRESSION_MAX = operations_research_constraint_solverJNI.ModelCache_VAR_CONSTANT_ARRAY_EXPRESSION_MAX_get();

  // VarArrayConstantArrayExpressionType 
  public final static int VAR_ARRAY_CONSTANT_ARRAY_SCAL_PROD = operations_research_constraint_solverJNI.ModelCache_VAR_ARRAY_CONSTANT_ARRAY_SCAL_PROD_get();
  public final static int VAR_ARRAY_CONSTANT_ARRAY_EXPRESSION_MAX = operations_research_constraint_solverJNI.ModelCache_VAR_ARRAY_CONSTANT_ARRAY_EXPRESSION_MAX_get();

  // VarArrayExpressionType 
  public final static int VAR_ARRAY_MAX = operations_research_constraint_solverJNI.ModelCache_VAR_ARRAY_MAX_get();
  public final static int VAR_ARRAY_MIN = operations_research_constraint_solverJNI.ModelCache_VAR_ARRAY_MIN_get();
  public final static int VAR_ARRAY_SUM = operations_research_constraint_solverJNI.ModelCache_VAR_ARRAY_SUM_get();
  public final static int VAR_ARRAY_EXPRESSION_MAX = operations_research_constraint_solverJNI.ModelCache_VAR_ARRAY_EXPRESSION_MAX_get();

  // VarArrayConstantExpressionType 
  public final static int VAR_ARRAY_CONSTANT_INDEX = operations_research_constraint_solverJNI.ModelCache_VAR_ARRAY_CONSTANT_INDEX_get();
  public final static int VAR_ARRAY_CONSTANT_EXPRESSION_MAX = operations_research_constraint_solverJNI.ModelCache_VAR_ARRAY_CONSTANT_EXPRESSION_MAX_get();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy