OR-Tools  9.1
constraint_solver_python_wrap.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.2
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11#ifndef SWIG_pywrapcp_WRAP_H_
12#define SWIG_pywrapcp_WRAP_H_
13
14#include <map>
15#include <string>
16
17
19
20public:
21 SwigDirector_BaseObject(PyObject *self);
23 virtual std::string DebugString() const;
24
25/* Internal director utilities */
26public:
27 bool swig_get_inner(const char *swig_protected_method_name) const {
28 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
29 return (iv != swig_inner.end() ? iv->second : false);
30 }
31 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
32 swig_inner[swig_protected_method_name] = swig_val;
33 }
34private:
35 mutable std::map<std::string, bool> swig_inner;
36
37#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
38/* VTable implementation */
39 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
40 PyObject *method = vtable[method_index];
41 if (!method) {
43 method = PyObject_GetAttr(swig_get_self(), name);
44 if (!method) {
45 std::string msg = "Method in class BaseObject doesn't exist, undefined ";
46 msg += method_name;
48 }
49 vtable[method_index] = method;
50 }
51 return method;
52 }
53private:
54 mutable swig::SwigVar_PyObject vtable[1];
55#endif
56
57};
58
59
61
62public:
65 virtual std::string DebugString() const;
66 virtual std::string name() const;
67
68/* Internal director utilities */
69public:
70 bool swig_get_inner(const char *swig_protected_method_name) const {
71 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
72 return (iv != swig_inner.end() ? iv->second : false);
73 }
74 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
75 swig_inner[swig_protected_method_name] = swig_val;
76 }
77private:
78 mutable std::map<std::string, bool> swig_inner;
79
80#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
81/* VTable implementation */
82 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
83 PyObject *method = vtable[method_index];
84 if (!method) {
86 method = PyObject_GetAttr(swig_get_self(), name);
87 if (!method) {
88 std::string msg = "Method in class PropagationBaseObject doesn't exist, undefined ";
89 msg += method_name;
91 }
92 vtable[method_index] = method;
93 }
94 return method;
95 }
96private:
97 mutable swig::SwigVar_PyObject vtable[2];
98#endif
99
100};
101
102
104
105public:
106 SwigDirector_Decision(PyObject *self);
108 virtual std::string DebugString() const;
109 virtual void Apply(operations_research::Solver *const s);
110 virtual void Refute(operations_research::Solver *const s);
111
112/* Internal director utilities */
113public:
114 bool swig_get_inner(const char *swig_protected_method_name) const {
115 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
116 return (iv != swig_inner.end() ? iv->second : false);
117 }
118 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
119 swig_inner[swig_protected_method_name] = swig_val;
120 }
121private:
122 mutable std::map<std::string, bool> swig_inner;
123
124#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
125/* VTable implementation */
126 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
127 PyObject *method = vtable[method_index];
128 if (!method) {
130 method = PyObject_GetAttr(swig_get_self(), name);
131 if (!method) {
132 std::string msg = "Method in class Decision doesn't exist, undefined ";
133 msg += method_name;
135 }
136 vtable[method_index] = method;
137 }
138 return method;
139 }
140private:
141 mutable swig::SwigVar_PyObject vtable[3];
142#endif
143
144};
145
146
148
149public:
150 SwigDirector_DecisionBuilder(PyObject *self);
152 virtual std::string DebugString() const;
154
155/* Internal director utilities */
156public:
157 bool swig_get_inner(const char *swig_protected_method_name) const {
158 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
159 return (iv != swig_inner.end() ? iv->second : false);
160 }
161 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
162 swig_inner[swig_protected_method_name] = swig_val;
163 }
164private:
165 mutable std::map<std::string, bool> swig_inner;
166
167#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
168/* VTable implementation */
169 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
170 PyObject *method = vtable[method_index];
171 if (!method) {
173 method = PyObject_GetAttr(swig_get_self(), name);
174 if (!method) {
175 std::string msg = "Method in class DecisionBuilder doesn't exist, undefined ";
176 msg += method_name;
178 }
179 vtable[method_index] = method;
180 }
181 return method;
182 }
183private:
184 mutable swig::SwigVar_PyObject vtable[2];
185#endif
186
187};
188
189
191
192public:
193 SwigDirector_Demon(PyObject *self);
195 virtual std::string DebugString() const;
196 virtual void Run(operations_research::Solver *const s);
198
199/* Internal director utilities */
200public:
201 bool swig_get_inner(const char *swig_protected_method_name) const {
202 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
203 return (iv != swig_inner.end() ? iv->second : false);
204 }
205 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
206 swig_inner[swig_protected_method_name] = swig_val;
207 }
208private:
209 mutable std::map<std::string, bool> swig_inner;
210
211#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
212/* VTable implementation */
213 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
214 PyObject *method = vtable[method_index];
215 if (!method) {
217 method = PyObject_GetAttr(swig_get_self(), name);
218 if (!method) {
219 std::string msg = "Method in class Demon doesn't exist, undefined ";
220 msg += method_name;
222 }
223 vtable[method_index] = method;
224 }
225 return method;
226 }
227private:
228 mutable swig::SwigVar_PyObject vtable[3];
229#endif
230
231};
232
233
235
236public:
239 virtual std::string DebugString() const;
240 virtual std::string name() const;
241 virtual void Post();
242 virtual void InitialPropagate();
243 virtual void Accept(operations_research::ModelVisitor *const visitor) const;
245
246/* Internal director utilities */
247public:
248 bool swig_get_inner(const char *swig_protected_method_name) const {
249 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
250 return (iv != swig_inner.end() ? iv->second : false);
251 }
252 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
253 swig_inner[swig_protected_method_name] = swig_val;
254 }
255private:
256 mutable std::map<std::string, bool> swig_inner;
257
258#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
259/* VTable implementation */
260 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
261 PyObject *method = vtable[method_index];
262 if (!method) {
264 method = PyObject_GetAttr(swig_get_self(), name);
265 if (!method) {
266 std::string msg = "Method in class Constraint doesn't exist, undefined ";
267 msg += method_name;
269 }
270 vtable[method_index] = method;
271 }
272 return method;
273 }
274private:
275 mutable swig::SwigVar_PyObject vtable[5];
276#endif
277
278};
279
280
282
283public:
286 virtual std::string DebugString() const;
287 virtual void EnterSearch();
288 virtual void RestartSearch();
289 virtual void ExitSearch();
294 virtual void AfterDecision(operations_research::Decision *const d, bool apply);
295 virtual void BeginFail();
296 virtual void EndFail();
298 virtual void EndInitialPropagation();
299 virtual bool AcceptSolution();
300 virtual bool AtSolution();
301 virtual void NoMoreSolutions();
302 virtual bool LocalOptimum();
304 virtual void AcceptNeighbor();
307 virtual void PeriodicCheck();
308 virtual int ProgressPercent();
309 virtual void Accept(operations_research::ModelVisitor *const visitor) const;
310 virtual void Install();
311
312/* Internal director utilities */
313public:
314 bool swig_get_inner(const char *swig_protected_method_name) const {
315 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
316 return (iv != swig_inner.end() ? iv->second : false);
317 }
318 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
319 swig_inner[swig_protected_method_name] = swig_val;
320 }
321private:
322 mutable std::map<std::string, bool> swig_inner;
323
324#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
325/* VTable implementation */
326 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
327 PyObject *method = vtable[method_index];
328 if (!method) {
330 method = PyObject_GetAttr(swig_get_self(), name);
331 if (!method) {
332 std::string msg = "Method in class SearchMonitor doesn't exist, undefined ";
333 msg += method_name;
335 }
336 vtable[method_index] = method;
337 }
338 return method;
339 }
340private:
341 mutable swig::SwigVar_PyObject vtable[19];
342#endif
343
344};
345
346
348
349public:
350 SwigDirector_LocalSearchOperator(PyObject *self);
352 virtual std::string DebugString() const;
354 virtual void Start(operations_research::Assignment const *assignment);
355 virtual void Reset();
356 virtual bool HasFragments() const;
357 virtual bool HoldsDelta() const;
358
359/* Internal director utilities */
360public:
361 bool swig_get_inner(const char *swig_protected_method_name) const {
362 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
363 return (iv != swig_inner.end() ? iv->second : false);
364 }
365 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
366 swig_inner[swig_protected_method_name] = swig_val;
367 }
368private:
369 mutable std::map<std::string, bool> swig_inner;
370
371#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
372/* VTable implementation */
373 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
374 PyObject *method = vtable[method_index];
375 if (!method) {
377 method = PyObject_GetAttr(swig_get_self(), name);
378 if (!method) {
379 std::string msg = "Method in class LocalSearchOperator doesn't exist, undefined ";
380 msg += method_name;
382 }
383 vtable[method_index] = method;
384 }
385 return method;
386 }
387private:
388 mutable swig::SwigVar_PyObject vtable[3];
389#endif
390
391};
392
393
395
396public:
398 SwigDirector_IntVarLocalSearchOperator(PyObject *self, std::vector< operations_research::IntVar * > const &vars, bool keep_inverse_values = false);
400 virtual std::string DebugString() const;
402 virtual void Reset();
403 virtual bool HasFragments() const;
404 virtual bool HoldsDelta() const;
405 virtual bool IsIncremental() const;
406 virtual bool SkipUnchanged(int index) const;
407 virtual void OnStart();
408 virtual bool MakeOneNeighbor();
411 }
412
413/* Internal director utilities */
414public:
415 bool swig_get_inner(const char *swig_protected_method_name) const {
416 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
417 return (iv != swig_inner.end() ? iv->second : false);
418 }
419 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
420 swig_inner[swig_protected_method_name] = swig_val;
421 }
422private:
423 mutable std::map<std::string, bool> swig_inner;
424
425#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
426/* VTable implementation */
427 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
428 PyObject *method = vtable[method_index];
429 if (!method) {
431 method = PyObject_GetAttr(swig_get_self(), name);
432 if (!method) {
433 std::string msg = "Method in class IntVarLocalSearchOperator doesn't exist, undefined ";
434 msg += method_name;
436 }
437 vtable[method_index] = method;
438 }
439 return method;
440 }
441private:
442 mutable swig::SwigVar_PyObject vtable[5];
443#endif
444
445};
446
447
449
450public:
451 SwigDirector_BaseLns(PyObject *self, std::vector< operations_research::IntVar * > const &vars);
453 virtual std::string DebugString() const;
455 virtual void Reset();
456 virtual bool HasFragments() const;
457 virtual bool HoldsDelta() const;
458 virtual bool IsIncremental() const;
459 virtual void InitFragments();
460 virtual bool NextFragment();
461
462/* Internal director utilities */
463public:
464 bool swig_get_inner(const char *swig_protected_method_name) const {
465 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
466 return (iv != swig_inner.end() ? iv->second : false);
467 }
468 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
469 swig_inner[swig_protected_method_name] = swig_val;
470 }
471private:
472 mutable std::map<std::string, bool> swig_inner;
473
474#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
475/* VTable implementation */
476 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
477 PyObject *method = vtable[method_index];
478 if (!method) {
480 method = PyObject_GetAttr(swig_get_self(), name);
481 if (!method) {
482 std::string msg = "Method in class BaseLns doesn't exist, undefined ";
483 msg += method_name;
485 }
486 vtable[method_index] = method;
487 }
488 return method;
489 }
490private:
491 mutable swig::SwigVar_PyObject vtable[5];
492#endif
493
494};
495
496
498
499public:
500 SwigDirector_ChangeValue(PyObject *self, std::vector< operations_research::IntVar * > const &vars);
502 virtual std::string DebugString() const;
504 virtual void Reset();
505 virtual bool HasFragments() const;
506 virtual bool HoldsDelta() const;
507 virtual bool IsIncremental() const;
508 virtual bool SkipUnchanged(int index) const;
509 virtual void OnStart();
510 virtual bool MakeOneNeighbor();
513 }
514 virtual int64_t ModifyValue(int64_t index, int64_t value);
515
516/* Internal director utilities */
517public:
518 bool swig_get_inner(const char *swig_protected_method_name) const {
519 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
520 return (iv != swig_inner.end() ? iv->second : false);
521 }
522 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
523 swig_inner[swig_protected_method_name] = swig_val;
524 }
525private:
526 mutable std::map<std::string, bool> swig_inner;
527
528#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
529/* VTable implementation */
530 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
531 PyObject *method = vtable[method_index];
532 if (!method) {
534 method = PyObject_GetAttr(swig_get_self(), name);
535 if (!method) {
536 std::string msg = "Method in class ChangeValue doesn't exist, undefined ";
537 msg += method_name;
539 }
540 vtable[method_index] = method;
541 }
542 return method;
543 }
544private:
545 mutable swig::SwigVar_PyObject vtable[6];
546#endif
547
548};
549
550
552
553public:
554 SwigDirector_IntVarLocalSearchFilter(PyObject *self, std::vector< operations_research::IntVar * > const &vars);
556 virtual std::string DebugString() const;
559 virtual bool Accept(operations_research::Assignment const *delta, operations_research::Assignment const *deltadelta, int64_t objective_min, int64_t objective_max);
560 virtual bool IsIncremental() const;
562 virtual void Revert();
563 virtual void Reset();
564 virtual int64_t GetSynchronizedObjectiveValue() const;
565 virtual int64_t GetAcceptedObjectiveValue() const;
569 }
570
571/* Internal director utilities */
572public:
573 bool swig_get_inner(const char *swig_protected_method_name) const {
574 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
575 return (iv != swig_inner.end() ? iv->second : false);
576 }
577 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
578 swig_inner[swig_protected_method_name] = swig_val;
579 }
580private:
581 mutable std::map<std::string, bool> swig_inner;
582
583#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
584/* VTable implementation */
585 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
586 PyObject *method = vtable[method_index];
587 if (!method) {
589 method = PyObject_GetAttr(swig_get_self(), name);
590 if (!method) {
591 std::string msg = "Method in class IntVarLocalSearchFilter doesn't exist, undefined ";
592 msg += method_name;
594 }
595 vtable[method_index] = method;
596 }
597 return method;
598 }
599private:
600 mutable swig::SwigVar_PyObject vtable[4];
601#endif
602
603};
604
605
606#endif
PyObject * swig_get_self() const
virtual bool MakeNextNeighbor(operations_research::Assignment *delta, operations_research::Assignment *deltadelta)
Redefines MakeNextNeighbor to export a simpler interface.
virtual bool HasFragments() const
virtual bool HoldsDelta() const
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
SwigDirector_BaseLns(std::vector< operations_research::IntVar * > const &vars)
virtual void Reset()
virtual void InitFragments()
virtual ~SwigDirector_BaseLns()
virtual std::string DebugString() const
virtual bool IsIncremental() const
virtual bool NextFragment()
bool swig_get_inner(const char *swig_protected_method_name) const
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
virtual std::string DebugString() const
bool swig_get_inner(const char *swig_protected_method_name) const
virtual bool MakeNextNeighbor(operations_research::Assignment *delta, operations_research::Assignment *deltadelta)
Redefines MakeNextNeighbor to export a simpler interface.
virtual bool SkipUnchanged(int index) const
virtual bool HasFragments() const
virtual bool HoldsDelta() const
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
virtual bool MakeOneNeighbor()
This method should not be overridden. Override ModifyValue() instead.
virtual ~SwigDirector_ChangeValue()
SwigDirector_ChangeValue(std::vector< operations_research::IntVar * > const &vars)
virtual std::string DebugString() const
virtual int64_t ModifyValue(int64_t index, int64_t value)
virtual bool IsIncremental() const
virtual void OnStart()
Called by Start() after synchronizing the operator with the current assignment.
bool swig_get_inner(const char *swig_protected_method_name) const
virtual operations_research::IntVar * Var()
Creates a Boolean variable representing the status of the constraint (false = constraint is violated,...
virtual std::string name() const
Object naming.
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
SwigDirector_Constraint(operations_research::Solver *const solver)
virtual std::string name() const
Object naming.
virtual void Accept(operations_research::ModelVisitor *const visitor) const
Accepts the given visitor.
virtual std::string DebugString() const
virtual void Post()
This method is called when the constraint is processed by the solver.
virtual ~SwigDirector_Constraint()
bool swig_get_inner(const char *swig_protected_method_name) const
virtual void InitialPropagate()
This method performs the initial propagation of the constraint.
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
virtual std::string DebugString() const
virtual operations_research::Decision * Next(operations_research::Solver *const s)
This is the main method of the decision builder class.
bool swig_get_inner(const char *swig_protected_method_name) const
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
virtual ~SwigDirector_Decision()
virtual void Refute(operations_research::Solver *const s)
Refute will be called after a backtrack.
virtual std::string DebugString() const
virtual void Apply(operations_research::Solver *const s)
Apply will be called first when the decision is executed.
bool swig_get_inner(const char *swig_protected_method_name) const
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
virtual operations_research::Solver::DemonPriority priority() const
This method returns the priority of the demon.
virtual void Run(operations_research::Solver *const s)
This is the main callback of the demon.
virtual std::string DebugString() const
virtual ~SwigDirector_Demon()
bool swig_get_inner(const char *swig_protected_method_name) const
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
virtual int64_t GetAcceptedObjectiveValue() const
Objective value from the last time Accept() was called and returned true.
virtual void Reset()
Sets the filter to empty solution.
SwigDirector_IntVarLocalSearchFilter(std::vector< operations_research::IntVar * > const &vars)
virtual void OnSynchronize(operations_research::Assignment const *delta)
virtual void Relax(operations_research::Assignment const *delta, operations_research::Assignment const *deltadelta)
Lets the filter know what delta and deltadelta will be passed in the next Accept().
virtual void OnSynchronizeSwigPublic(operations_research::Assignment const *delta)
virtual bool Accept(operations_research::Assignment const *delta, operations_research::Assignment const *deltadelta, int64_t objective_min, int64_t objective_max)
Accepts a "delta" given the assignment with which the filter has been synchronized; the delta holds t...
virtual std::string DebugString() const
virtual bool IsIncremental() const
virtual int64_t GetSynchronizedObjectiveValue() const
Objective value from last time Synchronize() was called.
virtual void Revert()
Cancels the changes made by the last Relax()/Accept() calls.
virtual void Synchronize(operations_research::Assignment const *assignment, operations_research::Assignment const *delta)
This method should not be overridden.
bool swig_get_inner(const char *swig_protected_method_name) const
virtual void Commit(operations_research::Assignment const *delta, operations_research::Assignment const *deltadelta)
Dual of Relax(), lets the filter know that the delta was accepted.
virtual bool MakeNextNeighbor(operations_research::Assignment *delta, operations_research::Assignment *deltadelta)
Redefines MakeNextNeighbor to export a simpler interface.
virtual bool SkipUnchanged(int index) const
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
virtual bool MakeOneNeighbor()
Creates a new neighbor.
virtual std::string DebugString() const
virtual void OnStart()
Called by Start() after synchronizing the operator with the current assignment.
bool swig_get_inner(const char *swig_protected_method_name) const
virtual bool MakeNextNeighbor(operations_research::Assignment *delta, operations_research::Assignment *deltadelta)
virtual bool HasFragments() const
virtual bool HoldsDelta() const
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
virtual std::string DebugString() const
virtual void Start(operations_research::Assignment const *assignment)
bool swig_get_inner(const char *swig_protected_method_name) const
virtual std::string name() const
Object naming.
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
SwigDirector_PropagationBaseObject(PyObject *self, operations_research::Solver *const s)
bool swig_get_inner(const char *swig_protected_method_name) const
virtual void Install()
Registers itself on the solver such that it gets notified of the search and propagation events.
virtual bool IsUncheckedSolutionLimitReached()
Returns true if the limit of solutions has been reached including unchecked solutions.
virtual void ExitSearch()
End of the search.
virtual void EndInitialPropagation()
After the initial propagation.
virtual void PeriodicCheck()
Periodic call to check limits in long running methods.
virtual void BeginFail()
Just when the failure occurs.
virtual void RestartSearch()
Restart the search.
virtual void EnterSearch()
Beginning of the search.
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
virtual bool AcceptSolution()
This method is called when a solution is found.
virtual int ProgressPercent()
Returns a percentage representing the propress of the search before reaching limits.
virtual void EndFail()
After completing the backtrack.
virtual void AcceptNeighbor()
After accepting a neighbor during local search.
virtual void ApplyDecision(operations_research::Decision *const d)
Before applying the decision.
virtual void NoMoreSolutions()
When the search tree is finished.
virtual void AfterDecision(operations_research::Decision *const d, bool apply)
Just after refuting or applying the decision, apply is true after Apply.
virtual void BeginNextDecision(operations_research::DecisionBuilder *const b)
Before calling DecisionBuilder::Next.
virtual void RefuteDecision(operations_research::Decision *const d)
Before refuting the decision.
virtual std::string DebugString() const
virtual bool AtSolution()
This method is called when a valid solution is found.
virtual void EndNextDecision(operations_research::DecisionBuilder *const b, operations_research::Decision *const d)
After calling DecisionBuilder::Next, along with the returned decision.
virtual void Accept(operations_research::ModelVisitor *const visitor) const
Accepts the given model visitor.
virtual bool LocalOptimum()
When a local optimum is reached.
virtual bool AcceptDelta(operations_research::Assignment *delta, operations_research::Assignment *deltadelta)
virtual void BeginInitialPropagation()
Before the initial propagation.
virtual void AcceptUncheckedNeighbor()
After accepting an unchecked neighbor during local search.
virtual ~SwigDirector_SearchMonitor()
SwigDirector_SearchMonitor(operations_research::Solver *const s)
bool swig_get_inner(const char *swig_protected_method_name) const
An Assignment is a variable -> domains mapping, used to report solutions to the user.
This is the base class for building an Lns operator.
A BaseObject is the root of all reversibly allocated objects.
Defines operators which change the value of variables; each neighbor corresponds to one modified vari...
bool MakeOneNeighbor() override
This method should not be overridden. Override ModifyValue() instead.
A constraint is the main modeling object.
A DecisionBuilder is responsible for creating the search tree.
A Decision represents a choice point in the search tree.
A Demon is the base element of a propagation queue.
The class IntVar is a subset of IntExpr.
virtual void OnSynchronize(const Assignment *delta)
Specialization of LocalSearchOperator built from an array of IntVars which specifies the scope of the...
virtual bool MakeOneNeighbor()
Creates a new neighbor.
Definition: local_search.cc:97
The base class for all local search operators.
A search monitor is a simple set of callbacks to monitor all search events.
DemonPriority
This enum represents the three possible priorities for a demon in the Solver queue.
int64_t b
const std::string name
int64_t value
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)
int index
Definition: pack.cc:509
int64_t delta
Definition: resource.cc:1692