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; }
/** * Returns the set of WantedFixed * * @return the collection of WantedFixed elements */ public Collection<WantedFixed> getWantedFixed() { return fixed.getAll(); }
/** * Returns the set of WantedFurnitures * * @return the collection of WantedFurnitures */ public Collection<WantedFurniture> getWantedFurniture() { return furniture.getAll(); }