Interface IProductionConsumptionKnowledge
-
- All Known Implementing Classes:
ProductionConsumptionKnowledge
public interface IProductionConsumptionKnowledge
Defining the model of the knowledge for production and consumption in all cities.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<ICity>
findCitiesWithNeedMinimalDistance(ICity distanceToCity, IWare ware, INavigableVessel vessel)
Find cities that need theware
and order them based on the need and the distance.java.util.List<ICity>
findListWithConsumptionMinimalDistance(ICity distanceToCity, IWare ware, INavigableVessel vessel)
Find cities that consume the ware and order them based on consumption amount and distance.java.util.List<ICity>
findListWithProductionsMinimalDistance(ICity distanceToCity, IWare ware, INavigableVessel vessel)
Find cities that produce the ware and order them based on production amount and distance.ICityProductionConsumptionKnowledge
getKnowlege(ICity city)
Retrieve the knowledge for a city.void
updateKnowledge(ICity city)
Update the knowledge of the city.
-
-
-
Method Detail
-
updateKnowledge
void updateKnowledge(ICity city)
Update the knowledge of the city. An update of the knowledge uses the exact value.- Parameters:
city
- for which the knowledge should be updated.
-
getKnowlege
ICityProductionConsumptionKnowledge getKnowlege(ICity city)
Retrieve the knowledge for a city.- Parameters:
city
- for which to retrieve the production and consumption knowledge- Returns:
- city specific production and consomption knowledge
-
findListWithProductionsMinimalDistance
java.util.List<ICity> findListWithProductionsMinimalDistance(ICity distanceToCity, IWare ware, INavigableVessel vessel)
Find cities that produce the ware and order them based on production amount and distance.- Parameters:
distanceToCity
- city to which the producing city's distance should be considered.ware
- that should be produced.vessel
- for which the list is retrieved- Returns:
- ordered list with the best production option at the beginning
-
findListWithConsumptionMinimalDistance
java.util.List<ICity> findListWithConsumptionMinimalDistance(ICity distanceToCity, IWare ware, INavigableVessel vessel)
Find cities that consume the ware and order them based on consumption amount and distance.- Parameters:
distanceToCity
- city to which the consuming city's distance should be considered.ware
- that should be consumed.vessel
- for which the list is retrieved- Returns:
- ordered list with the best consumption option at the beginning
-
findCitiesWithNeedMinimalDistance
java.util.List<ICity> findCitiesWithNeedMinimalDistance(ICity distanceToCity, IWare ware, INavigableVessel vessel)
Find cities that need theware
and order them based on the need and the distance.- Parameters:
distanceToCity
- city to which the consuming city's distance should be considered.ware
- that should be consumedvessel
- for which the list is retrieved- Returns:
- ordered list with the cities that need the ware the most.
-
-