Package solver.objective

Examples of solver.objective.ObjectiveManager


      // communication
      final ISearchLoop searchLoop = solver.getSearchLoop();
      searchLoop.plugSearchMonitor(new IMonitorSolution() {
        @Override
        public void onSolution() {
          ObjectiveManager om = searchLoop.getObjectiveManager();
          int val = om.getPolicy() == ResolutionPolicy.SATISFACTION ? 1 : om.getBestSolutionValue().intValue();
          master.newSol(val, om.getPolicy());
        }
      });

            model.solve();
            if (!solver.hasReachedLimit()) {
View Full Code Here


        }
    }

    public void findBetterThan(int val, ResolutionPolicy policy) {
        if (solver == null) return;// can happen if a solution is found before this thread is fully ready
        ObjectiveManager iom = solver.getSearchLoop().getObjectiveManager();
        if (iom == null) return;// can happen if a solution is found before this thread is fully ready
        switch (policy) {
            case MAXIMIZE:
                iom.updateBestLB(val);
                break;
            case MINIMIZE:
                iom.updateBestUB(val);
                break;
            case SATISFACTION:
                // nothing to do
                break;
        }
View Full Code Here

TOP

Related Classes of solver.objective.ObjectiveManager

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.