9package com.google.ortools.modelbuilder;
12 private transient long swigCPtr;
21 return (obj ==
null) ? 0 : obj.swigCPtr;
28 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
30 obj.swigCMemOwn =
false;
36 @SuppressWarnings({
"deprecation",
"removal"})
45 mainJNI.delete_ModelBuilderHelper(swigCPtr);
56 return mainJNI.ModelBuilderHelper_readModelFromProtoFile(swigCPtr,
this, filename);
60 return mainJNI.ModelBuilderHelper_writeModelToProtoFile(swigCPtr,
this, filename);
64 return mainJNI.ModelBuilderHelper_importFromMpsString(swigCPtr,
this, mps_string);
68 return mainJNI.ModelBuilderHelper_importFromMpsFile(swigCPtr,
this, mps_file);
72 return mainJNI.ModelBuilderHelper_importFromLpString(swigCPtr,
this, lp_string);
76 return mainJNI.ModelBuilderHelper_importFromLpFile(swigCPtr,
this, lp_file);
80 return mainJNI.ModelBuilderHelper_addVar(swigCPtr,
this);
84 mainJNI.ModelBuilderHelper_setVarLowerBound(swigCPtr,
this, var_index, lb);
88 mainJNI.ModelBuilderHelper_setVarUpperBound(swigCPtr,
this, var_index, ub);
92 mainJNI.ModelBuilderHelper_setVarIntegrality(swigCPtr,
this, var_index, is_integer);
96 mainJNI.ModelBuilderHelper_setVarObjectiveCoefficient(swigCPtr,
this, var_index, coeff);
100 mainJNI.ModelBuilderHelper_setVarName(swigCPtr,
this, var_index, name);
104 return mainJNI.ModelBuilderHelper_getVarLowerBound(swigCPtr,
this, var_index);
108 return mainJNI.ModelBuilderHelper_getVarUpperBound(swigCPtr,
this, var_index);
112 return mainJNI.ModelBuilderHelper_getVarIntegrality(swigCPtr,
this, var_index);
116 return mainJNI.ModelBuilderHelper_getVarObjectiveCoefficient(swigCPtr,
this, var_index);
120 return mainJNI.ModelBuilderHelper_getVarName(swigCPtr,
this, var_index);
124 return mainJNI.ModelBuilderHelper_getConstraintLowerBound(swigCPtr,
this, ct_index);
128 return mainJNI.ModelBuilderHelper_getConstraintUpperBound(swigCPtr,
this, ct_index);
132 return mainJNI.ModelBuilderHelper_addLinearConstraint(swigCPtr,
this);
136 return mainJNI.ModelBuilderHelper_getConstraintName(swigCPtr,
this, ct_index);
140 return mainJNI.ModelBuilderHelper_getConstraintCoefficients(swigCPtr,
this, ct_index);
144 return mainJNI.ModelBuilderHelper_getConstraintVarIndices(swigCPtr,
this, ct_index);
148 mainJNI.ModelBuilderHelper_addConstraintTerm(swigCPtr,
this, ct_index, var_index, coeff);
152 mainJNI.ModelBuilderHelper_clearConstraintTerms(swigCPtr,
this, ct_index);
156 mainJNI.ModelBuilderHelper_safeAddConstraintTerm(swigCPtr,
this, ct_index, var_index, coeff);
160 mainJNI.ModelBuilderHelper_setConstraintCoefficient(swigCPtr,
this, ct_index, var_index, coeff);
164 mainJNI.ModelBuilderHelper_setConstraintLowerBound(swigCPtr,
this, ct_index, lb);
168 mainJNI.ModelBuilderHelper_setConstraintName(swigCPtr,
this, ct_index, name);
172 mainJNI.ModelBuilderHelper_setConstraintUpperBound(swigCPtr,
this, ct_index, ub);
176 return mainJNI.ModelBuilderHelper_getEnforcedIndicatorValue(swigCPtr,
this, ct_index);
180 return mainJNI.ModelBuilderHelper_isEnforcedConstraint(swigCPtr,
this, ct_index);
184 return mainJNI.ModelBuilderHelper_getEnforcedConstraintLowerBound(swigCPtr,
this, ct_index);
188 return mainJNI.ModelBuilderHelper_getEnforcedConstraintUpperBound(swigCPtr,
this, ct_index);
192 return mainJNI.ModelBuilderHelper_addEnforcedLinearConstraint(swigCPtr,
this);
196 return mainJNI.ModelBuilderHelper_getEnforcedIndicatorVariableIndex(swigCPtr,
this, ct_index);
200 return mainJNI.ModelBuilderHelper_getEnforcedConstraintName(swigCPtr,
this, ct_index);
204 return mainJNI.ModelBuilderHelper_getEnforcedConstraintCoefficients(swigCPtr,
this, ct_index);
208 return mainJNI.ModelBuilderHelper_getEnforcedConstraintVarIndices(swigCPtr,
this, ct_index);
212 mainJNI.ModelBuilderHelper_addEnforcedConstraintTerm(swigCPtr,
this, ct_index, var_index, coeff);
216 mainJNI.ModelBuilderHelper_clearEnforcedConstraintTerms(swigCPtr,
this, ct_index);
220 mainJNI.ModelBuilderHelper_safeAddEnforcedConstraintTerm(swigCPtr,
this, ct_index, var_index, coeff);
224 mainJNI.ModelBuilderHelper_setEnforcedConstraintCoefficient(swigCPtr,
this, ct_index, var_index, coeff);
228 mainJNI.ModelBuilderHelper_setEnforcedConstraintLowerBound(swigCPtr,
this, ct_index, lb);
232 mainJNI.ModelBuilderHelper_setEnforcedConstraintName(swigCPtr,
this, ct_index, name);
236 mainJNI.ModelBuilderHelper_setEnforcedConstraintUpperBound(swigCPtr,
this, ct_index, ub);
240 mainJNI.ModelBuilderHelper_setEnforcedIndicatorValue(swigCPtr,
this, ct_index, positive);
244 mainJNI.ModelBuilderHelper_setEnforcedIndicatorVariableIndex(swigCPtr,
this, ct_index, var_index);
248 return mainJNI.ModelBuilderHelper_numConstraints(swigCPtr,
this);
252 return mainJNI.ModelBuilderHelper_numVariables(swigCPtr,
this);
256 return mainJNI.ModelBuilderHelper_getName(swigCPtr,
this);
260 mainJNI.ModelBuilderHelper_setName(swigCPtr,
this, name);
264 mainJNI.ModelBuilderHelper_clearObjective(swigCPtr,
this);
268 return mainJNI.ModelBuilderHelper_getMaximize(swigCPtr,
this);
272 mainJNI.ModelBuilderHelper_setMaximize(swigCPtr,
this, maximize);
276 return mainJNI.ModelBuilderHelper_getObjectiveOffset(swigCPtr,
this);
280 mainJNI.ModelBuilderHelper_setObjectiveOffset(swigCPtr,
this, offset);
284 mainJNI.ModelBuilderHelper_clearHints(swigCPtr,
this);
287 public void addHint(
int var_index,
double var_value) {
288 mainJNI.ModelBuilderHelper_addHint(swigCPtr,
this, var_index, var_value);
292 return mainJNI.ModelBuilderHelper_exportToMpsString(swigCPtr,
this, obfuscate);
296 return mainJNI.ModelBuilderHelper_exportToLpString(swigCPtr,
this, obfuscate);
300 return mainJNI.ModelBuilderHelper_writeToMpsFile(swigCPtr,
this, filename, obfuscate);
304 this(mainJNI.new_ModelBuilderHelper(),
true);