Public Member Functions | Private Types | Static Private Member Functions | Private Attributes
Clasp::DomainHeuristic::DomMinimize Class Reference
Inheritance diagram for Clasp::DomainHeuristic::DomMinimize:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool attach (Solver &)
 Attaches this object to the given solver.
ConstraintcloneAttach (Solver &)
 Returns a clone of this and adds necessary watches to the given solver.
void destroy (Solver *, bool)
 Default is to call delete this.
 DomMinimize (const LitVec &lits)
bool handleModel (Solver &s)
 Shall commit the model in s to the shared data object.
bool handleUnsat (Solver &, bool, LitVec &)
 Shall handle the unsatisfiable path in s.
bool integrate (Solver &s)
 Shall activate the minimize constraint by integrating bounds stored in the shared data object.
PropResult propagate (Solver &, Literal, uint32 &)
void reason (Solver &, Literal, LitVec &)
bool relax (Solver &, bool)
 Shall relax this constraint (i.e. remove any bounds).
bool simplify (Solver &s, bool)

Private Types

typedef PodVector< Constraint * >
::type 
ConstraintDB

Static Private Member Functions

static SharedMinimizeDatacreateDataFrom (const LitVec &lits)

Private Attributes

LitVec clause_
ConstraintDB nogoods_

Detailed Description

Definition at line 620 of file heuristics.cpp.


Member Typedef Documentation

Definition at line 646 of file heuristics.cpp.


Constructor & Destructor Documentation

Clasp::DomainHeuristic::DomMinimize::DomMinimize ( const LitVec lits) [inline, explicit]

Definition at line 622 of file heuristics.cpp.


Member Function Documentation

bool Clasp::DomainHeuristic::DomMinimize::attach ( Solver s) [inline, virtual]

Attaches this object to the given solver.

Implements Clasp::MinimizeConstraint.

Definition at line 630 of file heuristics.cpp.

Returns a clone of this and adds necessary watches to the given solver.

The function shall create and return a copy of this constraint to be used in the given solver. Furthermore, it shall add necessary watches to the given solver.

Note:
Return 0 to indicate that cloning is not supported.

Reimplemented from Clasp::MinimizeConstraint.

Definition at line 627 of file heuristics.cpp.

static SharedMinimizeData* Clasp::DomainHeuristic::DomMinimize::createDataFrom ( const LitVec lits) [inline, static, private]

Definition at line 636 of file heuristics.cpp.

void Clasp::DomainHeuristic::DomMinimize::destroy ( Solver s,
bool  detach 
) [virtual]

Default is to call delete this.

Reimplemented from Clasp::MinimizeConstraint.

Definition at line 927 of file heuristics.cpp.

Shall commit the model in s to the shared data object.

The return value indicates whether the model is valid w.r.t the costs stored in the shared data object.

Implements Clasp::MinimizeConstraint.

Definition at line 934 of file heuristics.cpp.

bool Clasp::DomainHeuristic::DomMinimize::handleUnsat ( Solver s,
bool  upShared,
LitVec restore 
) [inline, virtual]

Shall handle the unsatisfiable path in s.

Implements Clasp::MinimizeConstraint.

Definition at line 632 of file heuristics.cpp.

Shall activate the minimize constraint by integrating bounds stored in the shared data object.

Implements Clasp::MinimizeConstraint.

Definition at line 941 of file heuristics.cpp.

PropResult Clasp::DomainHeuristic::DomMinimize::propagate ( Solver s,
Literal  p,
uint32 &  data 
) [inline, virtual]

Propagate is called for each constraint that watches p. It shall enqueue all consequences of p becoming true.

Precondition:
p is true in s
Parameters:
sThe solver in which p became true.
pA literal watched by this constraint that recently became true.
dataThe data-blob that this constraint passed when the watch for p was registered.

Implements Clasp::Constraint.

Definition at line 624 of file heuristics.cpp.

void Clasp::DomainHeuristic::DomMinimize::reason ( Solver s,
Literal  p,
LitVec lits 
) [inline, virtual]
Precondition:
This constraint is the reason for p being true in s.
Postcondition:
The literals implying p were added to lits.

Implements Clasp::Constraint.

Definition at line 625 of file heuristics.cpp.

bool Clasp::DomainHeuristic::DomMinimize::relax ( Solver s,
bool  reset 
) [inline, virtual]

Shall relax this constraint (i.e. remove any bounds).

If reset is true, shall also remove search-path related state.

Implements Clasp::MinimizeConstraint.

Definition at line 631 of file heuristics.cpp.

bool Clasp::DomainHeuristic::DomMinimize::simplify ( Solver s,
bool  reinit 
) [inline, virtual]

Simplify this constraint.

Precondition:
s.decisionLevel() == 0 and the current assignment is fully propagated.
Returns:
true if this constraint can be ignored (e.g. is satisfied), false otherwise.
Postcondition:
If simplify returned true, this constraint has previously removed all its watches from the solver.
Note:
The default implementation is a noop and returns false.

Reimplemented from Clasp::Constraint.

Definition at line 626 of file heuristics.cpp.


Member Data Documentation

Definition at line 648 of file heuristics.cpp.

Definition at line 647 of file heuristics.cpp.


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


clasp
Author(s): Benjamin Kaufmann
autogenerated on Thu Aug 27 2015 12:41:40