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

com.google.ortools.constraintsolver.Pack 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 Pack extends Constraint {
  private transient long swigCPtr;

  protected Pack(long cPtr, boolean cMemoryOwn) {
    super(operations_research_constraint_solverJNI.Pack_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Pack 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_Pack(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public Pack(Solver s, IntVar[] vars, int number_of_bins) {
    this(operations_research_constraint_solverJNI.new_Pack(Solver.getCPtr(s), s, vars, number_of_bins), true);
  }

  public void AddWeightedSumLessOrEqualConstantDimension(long[] weights, long[] bounds) {
    operations_research_constraint_solverJNI.Pack_AddWeightedSumLessOrEqualConstantDimension__SWIG_0(swigCPtr, this, weights, bounds);
  }

  public void AddWeightedSumLessOrEqualConstantDimension(LongToLong weights, long[] bounds) {
    operations_research_constraint_solverJNI.Pack_AddWeightedSumLessOrEqualConstantDimension__SWIG_1(swigCPtr, this, weights, bounds);
  }

  public void AddWeightedSumLessOrEqualConstantDimension(LongLongToLong weights, long[] bounds) {
    operations_research_constraint_solverJNI.Pack_AddWeightedSumLessOrEqualConstantDimension__SWIG_2(swigCPtr, this, weights, bounds);
  }

  public void AddWeightedSumEqualVarDimension(long[] weights, IntVar[] loads) {
    operations_research_constraint_solverJNI.Pack_AddWeightedSumEqualVarDimension__SWIG_0(swigCPtr, this, weights, loads);
  }

  public void AddWeightedSumEqualVarDimension(LongLongToLong weights, IntVar[] loads) {
    operations_research_constraint_solverJNI.Pack_AddWeightedSumEqualVarDimension__SWIG_1(swigCPtr, this, weights, loads);
  }

  public void AddSumVariableWeightsLessOrEqualConstantDimension(IntVar[] usage, long[] capacity) {
    operations_research_constraint_solverJNI.Pack_AddSumVariableWeightsLessOrEqualConstantDimension(swigCPtr, this, usage, capacity);
  }

  public void AddWeightedSumOfAssignedDimension(long[] weights, IntVar cost_var) {
    operations_research_constraint_solverJNI.Pack_AddWeightedSumOfAssignedDimension(swigCPtr, this, weights, IntVar.getCPtr(cost_var), cost_var);
  }

  public void AddCountUsedBinDimension(IntVar count_var) {
    operations_research_constraint_solverJNI.Pack_AddCountUsedBinDimension(swigCPtr, this, IntVar.getCPtr(count_var), count_var);
  }

  public void AddCountAssignedItemsDimension(IntVar count_var) {
    operations_research_constraint_solverJNI.Pack_AddCountAssignedItemsDimension(swigCPtr, this, IntVar.getCPtr(count_var), count_var);
  }

  public void Post() {
    operations_research_constraint_solverJNI.Pack_Post(swigCPtr, this);
  }

  public void ClearAll() {
    operations_research_constraint_solverJNI.Pack_ClearAll(swigCPtr, this);
  }

  public void PropagateDelayed() {
    operations_research_constraint_solverJNI.Pack_PropagateDelayed(swigCPtr, this);
  }

  public void InitialPropagate() {
    operations_research_constraint_solverJNI.Pack_InitialPropagate(swigCPtr, this);
  }

  public void Propagate() {
    operations_research_constraint_solverJNI.Pack_Propagate(swigCPtr, this);
  }

  public void OneDomain(int var_index) {
    operations_research_constraint_solverJNI.Pack_OneDomain(swigCPtr, this, var_index);
  }

  public String toString() {
    return operations_research_constraint_solverJNI.Pack_toString(swigCPtr, this);
  }

  public boolean IsUndecided(int var_index, int bin_index) {
    return operations_research_constraint_solverJNI.Pack_IsUndecided(swigCPtr, this, var_index, bin_index);
  }

  public void SetImpossible(int var_index, int bin_index) {
    operations_research_constraint_solverJNI.Pack_SetImpossible(swigCPtr, this, var_index, bin_index);
  }

  public void Assign(int var_index, int bin_index) {
    operations_research_constraint_solverJNI.Pack_Assign(swigCPtr, this, var_index, bin_index);
  }

  public boolean IsAssignedStatusKnown(int var_index) {
    return operations_research_constraint_solverJNI.Pack_IsAssignedStatusKnown(swigCPtr, this, var_index);
  }

  public boolean IsPossible(int var_index, int bin_index) {
    return operations_research_constraint_solverJNI.Pack_IsPossible(swigCPtr, this, var_index, bin_index);
  }

  public IntVar AssignVar(int var_index, int bin_index) {
    long cPtr = operations_research_constraint_solverJNI.Pack_AssignVar(swigCPtr, this, var_index, bin_index);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public void SetAssigned(int var_index) {
    operations_research_constraint_solverJNI.Pack_SetAssigned(swigCPtr, this, var_index);
  }

  public void SetUnassigned(int var_index) {
    operations_research_constraint_solverJNI.Pack_SetUnassigned(swigCPtr, this, var_index);
  }

  public void RemoveAllPossibleFromBin(int bin_index) {
    operations_research_constraint_solverJNI.Pack_RemoveAllPossibleFromBin(swigCPtr, this, bin_index);
  }

  public void AssignAllPossibleToBin(int bin_index) {
    operations_research_constraint_solverJNI.Pack_AssignAllPossibleToBin(swigCPtr, this, bin_index);
  }

  public void AssignFirstPossibleToBin(int bin_index) {
    operations_research_constraint_solverJNI.Pack_AssignFirstPossibleToBin(swigCPtr, this, bin_index);
  }

  public void AssignAllRemainingItems() {
    operations_research_constraint_solverJNI.Pack_AssignAllRemainingItems(swigCPtr, this);
  }

  public void UnassignAllRemainingItems() {
    operations_research_constraint_solverJNI.Pack_UnassignAllRemainingItems(swigCPtr, this);
  }

  public void accept(ModelVisitor visitor) {
    operations_research_constraint_solverJNI.Pack_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy