Пример #1
0
    @Override
    public int calculateCost(Assignment a) {
      controller.getGlobalProblem().calculateCost(getAgentId(), a, queryTemp);

      ccCount[controller.pid()] += queryTemp.getCheckCost();
      return queryTemp.getCost();
    }
Пример #2
0
    @Override
    public int getConstraintCost(Assignment ass) {
      controller.getGlobalProblem().getConstraintCost(getAgentId(), ass, queryTemp);

      ccCount[id] += queryTemp.getCheckCost();
      return queryTemp.getCost();
    }
Пример #3
0
    @Override
    public int getConstraintCost(int var1, int val1) {
      controller.getGlobalProblem().getConstraintCost(getAgentId(), var1, val1, queryTemp);

      ccCount[id] += queryTemp.getCheckCost();
      return queryTemp.getCost();
    }
Пример #4
0
    @Override
    public boolean isConsistent(int var1, int val1, int var2, int val2) {
      controller
          .getGlobalProblem()
          .getConstraintCost(getAgentId(), var1, val1, var2, val2, queryTemp);

      ccCount[id] += queryTemp.getCheckCost();
      return queryTemp.getCost() == 0;
    }