Exhort.SAT.Model (Exhort v0.1.0)

The model built from the Builder.

Link to this section Summary

Functions

Solve the model, returning the solution.

Solve the model, using a callback for each response to the model.

Link to this section Types

@type t() :: %Exhort.SAT.Model{constraints: term(), res: term(), vars: term()}

Link to this section Functions

@spec solve(t()) :: Exhort.SAT.SolverResponse.t()

Solve the model, returning the solution.

This may only be called after the build function has been called.

Link to this function

solve(model, callback)

@spec solve(t(), (Exhort.SAT.SolverResponse.t(), any() -> any())) ::
  {Exhort.SAT.SolverResponse.t(), any()}

Solve the model, using a callback for each response to the model.

The given function will be called on each improving feasible solution found during the search. For a non-optimization problem, if the option to find all solution was set, then this will be called on each new solution.