-
-
Save si14/c5d584bf622e6de91348 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn solver [input] | |
(let [task (parse-task input) | |
s (Solver. "graph coloring") | |
x (VariableFactory/bounded "X" 0 5 s) | |
y (VariableFactory/bounded "Y" 0 5 s) | |
constr1 (ICF/arithm x "+" y ">" 5) | |
strat (IntStrategyFactory/lexico_LB (into-array IntVar [x y])) | |
^"[Lorg.chocosolver.solver.search.strategy.strategy.AbstractStrategy;" strats (into-array AbstractStrategy [strat])] | |
(prn (class strats)) | |
(.post s constr1) | |
(.set s strats) | |
(.findSolution s)) | |
"test") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment