func runNormalSolver(file string, b *dpll.Brancher, m *db.Manager, quiet bool) { // Initialize the cdb and assignment db, a, err := initSolver(file) if err != nil { log.Fatal(err) } // Set the proper max db size m.MaxLearned = db.NGiven() / 3 // Run the Dpll! g := dpll.Dpll(db, a, b, m, nil) printResults(g, db, nil, !quiet) }
func runAdaptiveSolver(file string, json string, chooseOnce bool, extraStats, quiet bool) { // Initialize the cdb and assignment cdb, a, err := initSolver(file) if err != nil { log.Fatal(err) } // Set the proper max db size manage.MaxLearned = cdb.NGiven() / 3 // Read the data from the file and make the adapter adapt := dpll.NewAdapter(json, chooseOnce, extraStats) // Use the adapter to set the initial state b := dpll.NewBrancher() adapt.Reconfigure(cdb, b, manage) g := dpll.Dpll(cdb, a, b, manage, adapt) printResults(g, cdb, adapt, !quiet) }