Java Reference

Java Reference

SavingsFilteredDecisionBuilder.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.0
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package com.google.ortools.constraintsolver;
10 
15  private transient long swigCPtr;
16 
17  protected SavingsFilteredDecisionBuilder(long cPtr, boolean cMemoryOwn) {
18  super(mainJNI.SavingsFilteredDecisionBuilder_SWIGUpcast(cPtr), cMemoryOwn);
19  swigCPtr = cPtr;
20  }
21 
22  protected static long getCPtr(SavingsFilteredDecisionBuilder obj) {
23  return (obj == null) ? 0 : obj.swigCPtr;
24  }
25 
26  @SuppressWarnings("deprecation")
27  protected void finalize() {
28  delete();
29  }
30 
31  public synchronized void delete() {
32  if (swigCPtr != 0) {
33  if (swigCMemOwn) {
34  swigCMemOwn = false;
35  mainJNI.delete_SavingsFilteredDecisionBuilder(swigCPtr);
36  }
37  swigCPtr = 0;
38  }
39  super.delete();
40  }
41 
42  static public class SavingsParameters {
43  private transient long swigCPtr;
44  protected transient boolean swigCMemOwn;
45 
46  protected SavingsParameters(long cPtr, boolean cMemoryOwn) {
47  swigCMemOwn = cMemoryOwn;
48  swigCPtr = cPtr;
49  }
50 
51  protected static long getCPtr(SavingsParameters obj) {
52  return (obj == null) ? 0 : obj.swigCPtr;
53  }
54 
55  @SuppressWarnings("deprecation")
56  protected void finalize() {
57  delete();
58  }
59 
60  public synchronized void delete() {
61  if (swigCPtr != 0) {
62  if (swigCMemOwn) {
63  swigCMemOwn = false;
64  mainJNI.delete_SavingsFilteredDecisionBuilder_SavingsParameters(swigCPtr);
65  }
66  swigCPtr = 0;
67  }
68  }
69 
73  public void setNeighbors_ratio(double value) {
74  mainJNI.SavingsFilteredDecisionBuilder_SavingsParameters_neighbors_ratio_set(swigCPtr, this, value);
75  }
76 
80  public double getNeighbors_ratio() {
81  return mainJNI.SavingsFilteredDecisionBuilder_SavingsParameters_neighbors_ratio_get(swigCPtr, this);
82  }
83 
87  public void setMax_memory_usage_bytes(double value) {
88  mainJNI.SavingsFilteredDecisionBuilder_SavingsParameters_max_memory_usage_bytes_set(swigCPtr, this, value);
89  }
90 
94  public double getMax_memory_usage_bytes() {
95  return mainJNI.SavingsFilteredDecisionBuilder_SavingsParameters_max_memory_usage_bytes_get(swigCPtr, this);
96  }
97 
101  public void setAdd_reverse_arcs(boolean value) {
102  mainJNI.SavingsFilteredDecisionBuilder_SavingsParameters_add_reverse_arcs_set(swigCPtr, this, value);
103  }
104 
108  public boolean getAdd_reverse_arcs() {
109  return mainJNI.SavingsFilteredDecisionBuilder_SavingsParameters_add_reverse_arcs_get(swigCPtr, this);
110  }
111 
115  public void setArc_coefficient(double value) {
116  mainJNI.SavingsFilteredDecisionBuilder_SavingsParameters_arc_coefficient_set(swigCPtr, this, value);
117  }
118 
122  public double getArc_coefficient() {
123  return mainJNI.SavingsFilteredDecisionBuilder_SavingsParameters_arc_coefficient_get(swigCPtr, this);
124  }
125 
126  public SavingsParameters() {
127  this(mainJNI.new_SavingsFilteredDecisionBuilder_SavingsParameters(), true);
128  }
129 
130  }
131 
132  public boolean buildSolution() {
133  return mainJNI.SavingsFilteredDecisionBuilder_buildSolution(swigCPtr, this);
134  }
135 
136 }
void setNeighbors_ratio(double value)
If neighbors_ratio < 1 then for each node only this ratio of its neighbors leading to the smallest ar...
double getNeighbors_ratio()
If neighbors_ratio < 1 then for each node only this ratio of its neighbors leading to the smallest ar...
double getMax_memory_usage_bytes()
The number of neighbors considered for each node is also adapted so that the stored Savings don't use...
Filter-based decision builder which builds a solution by using Clarke & Wright's Savings heuristic.
void setArc_coefficient(double value)
arc_coefficient is a strictly positive parameter indicating the coefficient of the arc being consider...
double getArc_coefficient()
arc_coefficient is a strictly positive parameter indicating the coefficient of the arc being consider...
boolean getAdd_reverse_arcs()
If add_reverse_arcs is true, the neighborhood relationships are considered symmetrically.
void setAdd_reverse_arcs(boolean value)
If add_reverse_arcs is true, the neighborhood relationships are considered symmetrically.
void setMax_memory_usage_bytes(double value)
The number of neighbors considered for each node is also adapted so that the stored Savings don't use...