9package com.google.ortools.constraintsolver;
16 private transient long swigCPtr;
19 super(mainJNI.Assignment_SWIGUpcast(cPtr), cMemoryOwn);
24 return (obj ==
null) ? 0 : obj.swigCPtr;
31 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
33 obj.swigCMemOwn =
false;
39 @SuppressWarnings({
"deprecation",
"removal"})
48 mainJNI.delete_Assignment(swigCPtr);
64 mainJNI.Assignment_clear(swigCPtr,
this);
68 return mainJNI.Assignment_empty(swigCPtr,
this);
72 return mainJNI.Assignment_size(swigCPtr,
this);
76 return mainJNI.Assignment_numIntVars(swigCPtr,
this);
80 return mainJNI.Assignment_numIntervalVars(swigCPtr,
this);
84 return mainJNI.Assignment_numSequenceVars(swigCPtr,
this);
88 mainJNI.Assignment_store(swigCPtr,
this);
92 mainJNI.Assignment_restore(swigCPtr,
this);
99 public boolean load(String filename) {
100 return mainJNI.Assignment_load(swigCPtr,
this, filename);
106 public boolean save(String filename) {
107 return mainJNI.Assignment_save__SWIG_0(swigCPtr,
this, filename);
110 public void save(SWIGTYPE_p_operations_research__AssignmentProto assignment_proto) {
111 mainJNI.Assignment_save__SWIG_1(swigCPtr,
this, SWIGTYPE_p_operations_research__AssignmentProto.getCPtr(assignment_proto));
115 mainJNI.Assignment_addObjective(swigCPtr,
this,
IntVar.
getCPtr(v), v);
119 mainJNI.Assignment_AddObjectives(swigCPtr,
this, vars);
123 mainJNI.Assignment_ClearObjective(swigCPtr,
this);
127 return mainJNI.Assignment_NumObjectives(swigCPtr,
this);
131 long cPtr = mainJNI.Assignment_objective(swigCPtr,
this);
132 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
136 long cPtr = mainJNI.Assignment_ObjectiveFromIndex(swigCPtr,
this, index);
137 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
141 return mainJNI.Assignment_hasObjective(swigCPtr,
this);
145 return mainJNI.Assignment_HasObjectiveFromIndex(swigCPtr,
this, index);
149 return mainJNI.Assignment_objectiveMin(swigCPtr,
this);
153 return mainJNI.Assignment_objectiveMax(swigCPtr,
this);
157 return mainJNI.Assignment_objectiveValue(swigCPtr,
this);
161 return mainJNI.Assignment_objectiveBound(swigCPtr,
this);
165 mainJNI.Assignment_setObjectiveMin(swigCPtr,
this, m);
169 mainJNI.Assignment_setObjectiveMax(swigCPtr,
this, m);
173 mainJNI.Assignment_setObjectiveValue(swigCPtr,
this,
value);
177 mainJNI.Assignment_setObjectiveRange(swigCPtr,
this, l, u);
181 return mainJNI.Assignment_ObjectiveMinFromIndex(swigCPtr,
this, index);
185 return mainJNI.Assignment_ObjectiveMaxFromIndex(swigCPtr,
this, index);
189 return mainJNI.Assignment_ObjectiveValueFromIndex(swigCPtr,
this, index);
193 return mainJNI.Assignment_ObjectiveBoundFromIndex(swigCPtr,
this, index);
197 mainJNI.Assignment_SetObjectiveMinFromIndex(swigCPtr,
this, index, m);
201 mainJNI.Assignment_SetObjectiveMaxFromIndex(swigCPtr,
this, index, m);
205 mainJNI.Assignment_SetObjectiveValueFromIndex(swigCPtr,
this, index,
value);
209 mainJNI.Assignment_SetObjectiveRangeFromIndex(swigCPtr,
this, index, l, u);
213 long cPtr = mainJNI.Assignment_add__SWIG_0(swigCPtr,
this,
IntVar.
getCPtr(var), var);
218 mainJNI.Assignment_add__SWIG_1(swigCPtr,
this, vars);
225 long cPtr = mainJNI.Assignment_fastAdd__SWIG_0(swigCPtr,
this,
IntVar.
getCPtr(var), var);
230 return mainJNI.Assignment_min(swigCPtr,
this,
IntVar.
getCPtr(var), var);
234 return mainJNI.Assignment_max(swigCPtr,
this,
IntVar.
getCPtr(var), var);
238 return mainJNI.Assignment_value(swigCPtr,
this,
IntVar.
getCPtr(var), var);
242 return mainJNI.Assignment_bound(swigCPtr,
this,
IntVar.
getCPtr(var), var);
246 mainJNI.Assignment_setMin(swigCPtr,
this,
IntVar.
getCPtr(var), var, m);
250 mainJNI.Assignment_setMax(swigCPtr,
this,
IntVar.
getCPtr(var), var, m);
254 mainJNI.Assignment_setRange(swigCPtr,
this,
IntVar.
getCPtr(var), var, l, u);
262 long cPtr = mainJNI.Assignment_add__SWIG_2(swigCPtr,
this,
IntervalVar.
getCPtr(var), var);
267 mainJNI.Assignment_add__SWIG_3(swigCPtr,
this, vars);
274 long cPtr = mainJNI.Assignment_fastAdd__SWIG_1(swigCPtr,
this,
IntervalVar.
getCPtr(var), var);
299 return mainJNI.Assignment_durationValue(swigCPtr,
this,
IntervalVar.
getCPtr(var), var);
315 return mainJNI.Assignment_performedMin(swigCPtr,
this,
IntervalVar.
getCPtr(var), var);
319 return mainJNI.Assignment_performedMax(swigCPtr,
this,
IntervalVar.
getCPtr(var), var);
323 return mainJNI.Assignment_performedValue(swigCPtr,
this,
IntervalVar.
getCPtr(var), var);
335 mainJNI.Assignment_setStartRange(swigCPtr,
this,
IntervalVar.
getCPtr(var), var, mi, ma);
351 mainJNI.Assignment_setDurationRange(swigCPtr,
this,
IntervalVar.
getCPtr(var), var, mi, ma);
367 mainJNI.Assignment_setEndRange(swigCPtr,
this,
IntervalVar.
getCPtr(var), var, mi, ma);
383 mainJNI.Assignment_setPerformedRange(swigCPtr,
this,
IntervalVar.
getCPtr(var), var, mi, ma);
391 long cPtr = mainJNI.Assignment_add__SWIG_4(swigCPtr,
this,
SequenceVar.
getCPtr(var), var);
396 mainJNI.Assignment_add__SWIG_5(swigCPtr,
this, vars);
403 long cPtr = mainJNI.Assignment_fastAdd__SWIG_2(swigCPtr,
this,
SequenceVar.
getCPtr(var), var);
408 return mainJNI.Assignment_forwardSequence(swigCPtr,
this,
SequenceVar.
getCPtr(var), var);
412 return mainJNI.Assignment_backwardSequence(swigCPtr,
this,
SequenceVar.
getCPtr(var), var);
424 mainJNI.Assignment_setForwardSequence(swigCPtr,
this,
SequenceVar.
getCPtr(var), var, forward_sequence);
428 mainJNI.Assignment_setBackwardSequence(swigCPtr,
this,
SequenceVar.
getCPtr(var), var, backward_sequence);
436 mainJNI.Assignment_activate__SWIG_0(swigCPtr,
this,
IntVar.
getCPtr(var), var);
440 mainJNI.Assignment_deactivate__SWIG_0(swigCPtr,
this,
IntVar.
getCPtr(var), var);
444 return mainJNI.Assignment_activated__SWIG_0(swigCPtr,
this,
IntVar.
getCPtr(var), var);
456 return mainJNI.Assignment_activated__SWIG_1(swigCPtr,
this,
IntervalVar.
getCPtr(var), var);
468 return mainJNI.Assignment_activated__SWIG_2(swigCPtr,
this,
SequenceVar.
getCPtr(var), var);
472 mainJNI.Assignment_activateObjective(swigCPtr,
this);
476 mainJNI.Assignment_deactivateObjective(swigCPtr,
this);
480 return mainJNI.Assignment_activatedObjective(swigCPtr,
this);
484 mainJNI.Assignment_ActivateObjectiveFromIndex(swigCPtr,
this, index);
488 mainJNI.Assignment_DeactivateObjectiveFromIndex(swigCPtr,
this, index);
492 return mainJNI.Assignment_ActivatedObjectiveFromIndex(swigCPtr,
this, index);
496 return mainJNI.Assignment_toString(swigCPtr,
this);
500 return mainJNI.Assignment_AreAllElementsBound(swigCPtr,
this);
504 return mainJNI.Assignment_contains__SWIG_0(swigCPtr,
this,
IntVar.
getCPtr(var), var);
508 return mainJNI.Assignment_contains__SWIG_1(swigCPtr,
this,
IntervalVar.
getCPtr(var), var);
512 return mainJNI.Assignment_contains__SWIG_2(swigCPtr,
this,
SequenceVar.
getCPtr(var), var);
520 mainJNI.Assignment_copyIntersection(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment);
528 mainJNI.Assignment_copy(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment);
536 long cPtr = mainJNI.Assignment_mutableIntVarContainer(swigCPtr,
this);
545 long cPtr = mainJNI.Assignment_mutableIntervalVarContainer(swigCPtr,
this);
554 long cPtr = mainJNI.Assignment_mutableSequenceVarContainer(swigCPtr,
this);