Package javax.constraints.impl.search.goal

Examples of javax.constraints.impl.search.goal.Goal


    com.exigen.ie.constrainer.Goal goal2 = (com.exigen.ie.constrainer.Goal)g2.getImpl();
    if (goal2 == null)
      throw new RuntimeException("Goal "+g2.getName() + " cannot be used inside solver.or()");
    com.exigen.ie.constrainer.Goal orGoal = new com.exigen.ie.constrainer.GoalOr(goal1,goal2);
    orGoal.name(name);
    Goal goal = new javax.constraints.impl.search.ConstrainerGoal(this,orGoal);
    goal.setName(name);
    return goal;
  }
View Full Code Here


   * Adds an application-specific action "goal" that will be executed during backtracking.
   * @param action the action (goal) to be executed during backtracking.
   */
  public void addReversibleAction(ReversibleAction action) {
    javax.constraints.impl.Problem p = (javax.constraints.impl.Problem)getProblem();
    Goal goal = ((ReversibleActionGoal)action).getGoal();
    com.exigen.ie.constrainer.Goal myGoal = (com.exigen.ie.constrainer.Goal) goal.getImpl();
    if (myGoal == null) {
      throw new RuntimeException("Critical Error: goal" +
          goal.getName() + " does not have an implementation");
    }
    p.getConstrainer().addUndoableAction(myGoal);
  }
View Full Code Here

    SearchStrategy searchStrategy = getSearchStrategy();
    if (isTraceSolutions()) {
      addSearchStrategy(new StrategyLogVar("Found a solution with ", objectiveVar));
    }
   
    Goal strategy = makeGoal(searchStrategy);
    com.exigen.ie.constrainer.Goal goal = (com.exigen.ie.constrainer.Goal)strategy.getImpl();
    for (int i = 1; i < getSearchStrategies().size(); i++) {
      strategy = makeGoal(getSearchStrategies().elementAt(i));
      com.exigen.ie.constrainer.Goal nextGoal = (com.exigen.ie.constrainer.Goal)strategy.getImpl();
      goal = new GoalAnd(goal,nextGoal);
    }
   
    //clearSolutions();
    com.exigen.ie.constrainer.Goal saveGoal = new GoalSaveSolution(this);
View Full Code Here

TOP

Related Classes of javax.constraints.impl.search.goal.Goal

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.