(internal) Bound to the Loco solver object during problem construction / solving
(internal) Bound to the Loco solver object during problem construction / solving
(->choco data)
(INTERNAL) Memoized version of ->choco*
(INTERNAL) Memoized version of ->choco*
(INTERNAL) Given Clojure data generated by the Loco DSL, returns a Choco variable (to be used inside a constraint), or returns a constraint (to be posted to the solver).
(INTERNAL) Given Clojure data generated by the Loco DSL, returns a Choco variable (to be used inside a constraint), or returns a constraint (to be posted to the solver).
(solution problem & args)
Solves the problem using the specified constraints and returns a map from variable names to their values (or nil if there is no solution). Keyword arguments:
Solves the problem using the specified constraints and returns a map from variable names to their values (or nil if there is no solution). Keyword arguments: - :maximize <var> - finds the solution maximizing the given variable. - :minimize <var> - finds the solution minimizing the given variable. - :feasible true - optimizes time by guaranteeing that the problem is feasible before trying to maximize/minimize a variable. - :timeout <number> - stops after a certain amount of milliseconds (returns nil, or best solution so far when min/maxing a variable) Note: returned solution maps have the metadata {:loco/solution <n>} denoting that it is the nth solution found (starting with 0).
(solutions problem & args)
Solves the solver using the constraints and returns a lazy seq of maps (for each solution) from variable names to their values. Keyword arguments:
Solves the solver using the constraints and returns a lazy seq of maps (for each solution) from variable names to their values. Keyword arguments: - :timeout <number> - the sequence ends prematurely if the timer exceeds a certain number of milliseconds. - :maximize <var> - finds all solutions that maximize the given var or expression. NOT lazy. - :minimize <var> - finds all solutions that minimize the given var or expression. NOT lazy.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close