Esempio n. 1
0
  public VariableConfig getVariableConfig(NamedCatalog<FurnitureType> typesCatalog) {
    Set<Functionality> functionsNotSatisfied = getUnsatisfiedFunctionalities(typesCatalog);

    if (!functionsNotSatisfied.isEmpty())
      throw new RoomFunctionalitiesNotSatisfiedException(functionsNotSatisfied);

    VariableConfig variableSet =
        new VariableConfig(room.getDimension(), new ArrayList(globalConstraints.values()));

    for (WantedFixed wfixed : fixed.getAll()) variableSet.addConstant(wfixed);

    for (WantedFurniture wfurniture : furniture.getAll())
      variableSet.addVariable(wfurniture, typesCatalog.get(wfurniture.getTypeName()));

    return variableSet;
  }
Esempio n. 2
0
 /**
  * Returns the set of WantedFixed
  *
  * @return the collection of WantedFixed elements
  */
 public Collection<WantedFixed> getWantedFixed() {
   return fixed.getAll();
 }
Esempio n. 3
0
 /**
  * Returns the set of WantedFurnitures
  *
  * @return the collection of WantedFurnitures
  */
 public Collection<WantedFurniture> getWantedFurniture() {
   return furniture.getAll();
 }