Package csp

Examples of csp.EnumeratedChocoSolver


        }
    }

    public Map<String, Double> findFuzzyModel() {
        for (int numberOfDegrees = 1;!timesUp(); numberOfDegrees++) {
            EnumeratedChocoSolver solv = new EnumeratedChocoSolver(numberOfDegrees, new HashMap(),k);

            for (FuzzyClause fc : constraints) {
                solv.addFuzzyClause(fc);
            }

            /*Map<String, Double> model = solv.getModel();
            model.putAll(trivialAssignments);
            if (model != null){
            return model;
            }*/
//            // Safer code added by Jeroen:
//            Map<String, Double> model = solv.getModel();
//            if (!trivialAssignments.isEmpty()) {
//                if (model == null) {
//                    model = new HashMap<String, Double>();
//                }
//                model.putAll(trivialAssignments);
//                return model;
//            }
            Map<String, Double> model = solv.getModel();
            if (model!=null) {               
                model.putAll(trivialAssignments);
                return model;
            }
        }
View Full Code Here

TOP

Related Classes of csp.EnumeratedChocoSolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.