Interface IRelationshipController
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
RelationshipController
The Interface IRelationshipController.
- Since:
- 27/09/2019
- Version:
- 16/04/2023
- Author:
- Jens Richter
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelationShipCost(double addCost) Adds therelationship costto the already existingrelationship cost.voidAdds the inputILogicRouteElementDetailItemon theRelationshipController.node2DetailsPersistendMapas well as on theRelationshipController.node2DetailsMap.voidcleanLostRelations(List<IOptimizationElement> unassignedNodes) copy()Returns a copy of theIRelationshipController.default intGets the number of violations of all relations in the relation to cost item map, as each relation counted them at its last check.Gets the persistent map with theIOptimizationElementand theILogicRouteElementDetailItem.Gets the map containing allINode2NodeRelationsand the linkedcostdoubleGets therelationship cost.Gets theOptionalILogicRouteElementDetailItem.Returns a copy of theIRelationshipController.voidPuts a cost of a certainINode2NodeRelationin the map.default booleanRemoves the cost item of a certainINode2NodeRelationfrom the map if it is still the given item.voidSets the persistent map with theIOptimizationElementand theILogicRouteElementDetailItem.voidSets theINode2NodeRelationtocostitem map.voidsetRelationShipCost(double cost) Sets the relationship cost.voidSets the map with theIOptimizationElementand theILogicRouteElementDetailItem.
-
Method Details
-
putRelation2CostItem
Puts a cost of a certainINode2NodeRelationin the map.- Parameters:
rel- the iNode2NodeRelationcost- the double cost
-
removeRelation2CostItem
Removes the cost item of a certainINode2NodeRelationfrom the map if it is still the given item.- Parameters:
rel- the iNode2NodeRelationcost- the cost item to remove- Returns:
- true if the item was removed
-
getRelation2CostItemMap
Map<INode2NodeRelation,RelationShipCostItem> getRelation2CostItemMap()Gets the map containing allINode2NodeRelationsand the linkedcost- Returns:
- the relation to cost item map
-
setRelation2CostItemMap
Sets theINode2NodeRelationtocostitem map.- Parameters:
map- the map to set
-
setRelationShipCost
void setRelationShipCost(double cost) Sets the relationship cost.- Parameters:
cost- the double new relation ship cost
-
addRelationShipCost
void addRelationShipCost(double addCost) Adds therelationship costto the already existingrelationship cost.- Parameters:
addCost- the double cost to add
-
getRelationShipCost
double getRelationShipCost()Gets therelationship cost.- Returns:
- the relation ship cost
-
getNumRelationViolations
default int getNumRelationViolations()Gets the number of violations of all relations in the relation to cost item map, as each relation counted them at its last check. Like therelationship costit also covers the relations that the last assessment did not check again.- Returns:
- the number of relation violations
-
copy
IRelationshipController copy()Returns a copy of theIRelationshipController.- Returns:
- the copy
-
addRelationShipDetails
Adds the inputILogicRouteElementDetailItemon theRelationshipController.node2DetailsPersistendMapas well as on theRelationshipController.node2DetailsMap.- Parameters:
details- the iLogicRouteElementDetailItem to add
-
getRelationShipDetails
Gets theOptionalILogicRouteElementDetailItem.If the
RelationshipController.node2DetailsMapis empty returnsRelationshipController.node2DetailsPersistendMap.- Parameters:
el- the iLogicRouteElementDetailItem of theILogicRouteElementDetailItem- Returns:
- the map
-
getRelationShipDetailMap
Map<IOptimizationElement,ILogicRouteElementDetailItem> getRelationShipDetailMap()- Returns:
- the map
-
setRelationShipDetailMap
Sets the map with theIOptimizationElementand theILogicRouteElementDetailItem.- Parameters:
map- the map to set
-
getPersistendRelationShipDetailMap
Map<IOptimizationElement,ILogicRouteElementDetailItem> getPersistendRelationShipDetailMap()Gets the persistent map with theIOptimizationElementand theILogicRouteElementDetailItem.- Returns:
- the map
-
setPersistentRelationShipDetailMap
Sets the persistent map with theIOptimizationElementand theILogicRouteElementDetailItem.- Parameters:
map- the map to set
-
partialCopy
IRelationshipController partialCopy()Returns a copy of theIRelationshipController.- Returns:
- the controller
-
cleanLostRelations
-