Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <objective_storage.h>
Classes | |
struct | SingleObjective |
Public Member Functions | |
Diff (const ObjectiveStorage &storage, VariableId variable_checkpoint) | |
bool | objective_tracked (ObjectiveId id) const |
Public Attributes | |
AuxiliaryObjectiveId | objective_checkpoint {0} |
VariableId | variable_checkpoint {0} |
absl::flat_hash_map< ObjectiveId, SingleObjective > | objective_diffs |
absl::flat_hash_set< AuxiliaryObjectiveId > | deleted |
Tracks the changes to ObjectiveStorage. Advancing the checkpoint throws away tracked changes.
An instance of this class is owned by each update tracker of ModelStorage.
Definition at line 44 of file objective_storage.h.
|
inlineexplicit |
Definition at line 243 of file objective_storage.h.
|
inline |
Returns true if objective id
is already tracked by the diff. Otherwise, it should be considered a "new" objective.
The primary objective is always present, so updates are always exported.
Definition at line 445 of file objective_storage.h.
absl::flat_hash_set<AuxiliaryObjectiveId> operations_research::math_opt::ObjectiveStorage::Diff::deleted |
Definition at line 83 of file objective_storage.h.
AuxiliaryObjectiveId operations_research::math_opt::ObjectiveStorage::Diff::objective_checkpoint {0} |
Definition at line 76 of file objective_storage.h.
absl::flat_hash_map<ObjectiveId, SingleObjective> operations_research::math_opt::ObjectiveStorage::Diff::objective_diffs |
No guarantees provided on which objectives have corresponding entries, or that values are not empty()
.
ObjectiveStorage
) if hashing is a noticeable bottleneck. Definition at line 82 of file objective_storage.h.
VariableId operations_research::math_opt::ObjectiveStorage::Diff::variable_checkpoint {0} |
Definition at line 77 of file objective_storage.h.