MinizincSolver.solve_sync
You're seeing just the function
solve_sync
, go back to MinizincSolver module for more information.
Link to this function
solve_sync(model, data \\ [], solver_opts \\ [], opts \\ [])
Specs
solve_sync( model :: MinizincModel.mzn_model(), data :: MinizincData.mzn_data(), solver_opts :: solver_opts(), server_opts :: server_opts() ) :: {:ok, any()} | {:error, any()}
Solve (synchronously) with model, data and options.
Example:
# Solve N-queens puzzle with n = 4.
# Use Gecode solver, solve within 1000 ms.
#
results = MinizincSolver.solve_sync("mzn/nqueens.mzn", %{n: 4}, [solver: "gecode", time_limit: 1000])
Check out NQueens
module in examples/nqueens.ex
for more details on handling solutions.