Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Google.OrTools.ConstraintSolver.NetDecision Class Reference

Detailed Description

This class acts as a intermediate step between a c++ decision and a .Net one. Its main purpose is to catch the .Net application exception launched when a failure occurs during the Apply()/Refute() calls, and to set the ShouldFail() flag on the solver that will propagate the failure back to the C++ code.

Definition at line 62 of file NetDecisionBuilder.cs.

Inheritance diagram for Google.OrTools.ConstraintSolver.NetDecision:
Google.OrTools.ConstraintSolver.Decision Google.OrTools.ConstraintSolver.BaseObject

Public Member Functions

override void ApplyWrapper (Solver solver)
virtual void Apply (Solver solver)
override void RefuteWrapper (Solver solver)
virtual void Refute (Solver solver)
Public Member Functions inherited from Google.OrTools.ConstraintSolver.Decision
 Decision ()
override string ToString ()
virtual void Accept (DecisionVisitor visitor)
delegate string SwigDelegateDecision_0 ()
delegate void SwigDelegateDecision_1 (global::System.IntPtr s)
delegate void SwigDelegateDecision_2 (global::System.IntPtr s)
delegate void SwigDelegateDecision_3 (global::System.IntPtr visitor)
Public Member Functions inherited from Google.OrTools.ConstraintSolver.BaseObject
void Dispose ()
 BaseObject ()

Additional Inherited Members

Protected Member Functions inherited from Google.OrTools.ConstraintSolver.Decision
override void Dispose (bool disposing)
Protected Attributes inherited from Google.OrTools.ConstraintSolver.BaseObject
bool swigCMemOwn

Member Function Documentation

◆ Apply()

virtual void Google.OrTools.ConstraintSolver.NetDecision.Apply ( Solver solver)
inlinevirtual

This is a new method to subclass when defining a .Net decision.

By default, do nothing

Definition at line 83 of file NetDecisionBuilder.cs.

◆ ApplyWrapper()

override void Google.OrTools.ConstraintSolver.NetDecision.ApplyWrapper ( Solver solver)
inlinevirtual

This methods wraps the calls to Apply() and catches fail exceptions. It currently catches all application exceptions.

Todo
(user): Catch only fail exceptions.

Reimplemented from Google.OrTools.ConstraintSolver.Decision.

Definition at line 68 of file NetDecisionBuilder.cs.

◆ Refute()

virtual void Google.OrTools.ConstraintSolver.NetDecision.Refute ( Solver solver)
inlinevirtual

This is a new method to subclass when defining a .Net decision.

Definition at line 103 of file NetDecisionBuilder.cs.

◆ RefuteWrapper()

override void Google.OrTools.ConstraintSolver.NetDecision.RefuteWrapper ( Solver solver)
inlinevirtual
Todo
(user): Catch only fail exceptions.

Reimplemented from Google.OrTools.ConstraintSolver.Decision.

Definition at line 88 of file NetDecisionBuilder.cs.


The documentation for this class was generated from the following file: