-
Notifications
You must be signed in to change notification settings - Fork 0
Desire dependencies are not implemented #19
Copy link
Copy link
Open
Description
Steps :
- Remove the following difference in the README.md file: Desires cannot have dependencies;
- In the DesireSetObserver class, add the following parameter to
onDesireSetChanged:const std::unordered_map<uint64_t, std::unordered_set<uint64_t>>& desireDependenciesById - In the
DesireSetObserverclass, create an empty implementation foronDesireSetChanged. - In the
DesireSetObserverclass, add the following method:virtual void onDesireFulfilled(uint64_t desireId). - In the
DesireSetclass, add the following field:std::unordered_map<uint64_t, std::unordered_set<uint64_t>> m_desiredependenciesById;. - In the
DesireSetclass, make the method removeDesire remove all the dependencies recursively. - In the
DesireSetclass, add overload methods of addDesire that take astd::unordered_set<uint64_t>as the first parameter. - In the
DesireSetclass, add a private method that makes the desire fulfilled. The method removes the desire fromm_desiresById, removes the desire id from all set indesireDependenciesByIdand callonDesireFulfilledof the observers. - In the
DesireSetclass, makeBaseStrategya friend class. - In the
BaseStrategyclass, make the DesireSet private. - In the
BaseStrategy, add a method that makes the current desire fulfilled by calling the method of theDesireSet. Make sure the desire id is valid. - In the
SolverandGecodeSolverclasses, add the following parameter to thesolvemethod:const std::unordered_map<uint64_t, std::unordered_set<uint64_t>>& desireDependenciesById - In the
Solverclass, theselectMostIntenseEnabledDesireIndexesmust only index that does not have any dependencies. Rename the method accordingly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels