Examples of SolverFactory


Examples of it.uniroma1.dptu.stan.solver.SolverFactory

    tableSolutions.clearSelection();
    solutions.clear();
    solutionModel.fireTableRowsDeleted(0, nSolutions - 1);
      }

      SolverFactory solverFactory = SolverFactory.newInstance();
      try {
    solverFactory.addModel(scenery);
    bgSolver = new BGSolver(solverFactory);
      } catch(SolverException ex) {
    lblMessage.setForeground(Color.RED);
    lblMessage.setText(ex.getLocalizedMessage());
    scenery.setStatus(Data.STATUS_ERROR);
View Full Code Here

Examples of net.sf.javailp.SolverFactory

  }
 
  @Override
  public void enforceConstraints() {
   
    SolverFactory factory = new SolverFactoryLpSolve();
    factory.setParameter(Solver.VERBOSE, 0);
   
    problem.setObjective(constructObjective(), OptType.MIN);
   
    //TODO Relaxations relax = new Relaxations();
   
    final Solver solver = factory.get();
    final Result result = solver.solve(problem);
   
    if (result == null) {
      System.out.println("[ERROR]: cannot enforce constraints, no result for LP");
    } else {
View Full Code Here

Examples of org.drools.planner.config.SolverFactory

public class VrpWebAction {

    private static ExecutorService solvingExecutor = Executors.newFixedThreadPool(4);

    public void setup(HttpSession session) {
        SolverFactory solverFactory = new XmlSolverFactory(
                "/org/drools/planner/examples/vehiclerouting/solver/vehicleRoutingSolverConfig.xml");
        Solver solver = solverFactory.buildSolver();
        session.setAttribute(VrpSessionAttributeName.SOLVER, solver);

        URL unsolvedSolutionURL = getClass().getResource("/org/drools/planner/webexamples/vehiclerouting/A-n33-k6.vrp");
        VrpSchedule unsolvedSolution = (VrpSchedule) new VehicleRoutingSolutionImporter()
                .readSolution(unsolvedSolutionURL);
View Full Code Here

Examples of org.drools.planner.config.SolverFactory

public class CloudBalancingHelloWorld {

    public static void main(String[] args) {
        // Build the Solver
        SolverFactory solverFactory = new XmlSolverFactory(
                "/org/drools/planner/examples/cloudbalancing/solver/cloudBalancingSolverConfig.xml");
        Solver solver = solverFactory.buildSolver();

        // Load a problem with 400 computers and 1200 processes
        CloudBalance unsolvedCloudBalance = new CloudBalancingGenerator().createCloudBalance(400, 1200);

        // Solve the problem
View Full Code Here

Examples of org.drools.planner.config.SolverFactory

public class NQueensHelloWorld {

    public static void main(String[] args) {
        // Build the Solver
        SolverFactory solverFactory = new XmlSolverFactory(
                "/org/drools/planner/examples/nqueens/solver/nqueensSolverConfig.xml");
        Solver solver = solverFactory.buildSolver();

        // Load a problem with 8 queens
        NQueens unsolved8Queens = new NQueensGenerator().createNQueens(8);

        // Solve the problem
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

* OptaPlanner component for Camel
*/
public class OptaPlannerComponent extends DefaultComponent {

    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
        SolverFactory solverFactory = new XmlSolverFactory(remaining);

        OptaPlannerEndpoint endpoint = new OptaPlannerEndpoint(uri, this, remaining);
        endpoint.setSolverFactory(solverFactory);
        setProperties(endpoint, parameters);

View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

    private static ExecutorService solvingExecutor = Executors.newFixedThreadPool(4);

    public void setup(HttpSession session) {
        terminateEarly(session);

        SolverFactory solverFactory = SolverFactory.createFromXmlResource(
                "org/optaplanner/examples/cloudbalancing/solver/cloudBalancingSolverConfig.xml");
        Solver solver = solverFactory.buildSolver();
        session.setAttribute(CloudBalancingSessionAttributeName.SOLVER, solver);

        // Load a problem with 40 computers and 120 processes
        CloudBalance unsolvedSolution = new CloudBalancingGenerator(true).createCloudBalance(100, 300);
        session.setAttribute(CloudBalancingSessionAttributeName.SHOWN_SOLUTION, unsolvedSolution);
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

    private static ExecutorService solvingExecutor = Executors.newFixedThreadPool(4);

    public void setup(HttpSession session) {
        terminateEarly(session);

        SolverFactory solverFactory = SolverFactory.createFromXmlResource(
                "org/optaplanner/examples/vehiclerouting/solver/vehicleRoutingSolverConfig.xml");
        Solver solver = solverFactory.buildSolver();
        session.setAttribute(VrpSessionAttributeName.SOLVER, solver);

        URL unsolvedSolutionURL = getClass().getResource("/org/optaplanner/webexamples/vehiclerouting/A-n33-k6.vrp");
        VehicleRoutingSolution unsolvedSolution = (VehicleRoutingSolution) new VehicleRoutingImporter(true)
                .readSolution(unsolvedSolutionURL);
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

    public OptaPlannerComponent() {
        super(OptaPlannerEndpoint.class);
    }

    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
        SolverFactory solverFactory = SolverFactory.createFromXmlResource(remaining);

        OptaPlannerEndpoint endpoint = new OptaPlannerEndpoint(uri, this, remaining);
        endpoint.setSolverFactory(solverFactory);
        setProperties(endpoint, parameters);
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

                CheapTimePanel.LOGO_PATH);
    }

    @Override
    protected Solver createSolver() {
        SolverFactory solverFactory = SolverFactory.createFromXmlResource(SOLVER_CONFIG);
        return solverFactory.buildSolver();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.