Skip to content

Commit

Permalink
Delete old code for storage (#690)
Browse files Browse the repository at this point in the history
* delete old code for storage

* storage

* ok
  • Loading branch information
guimarqu authored Aug 16, 2022
1 parent 9d1c95d commit 2b70ceb
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 434 deletions.
6 changes: 1 addition & 5 deletions src/Algorithm/branching/branchingalgo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,7 @@ function _perform_strong_branching_with_phases!(

# before deleting branching candidates which are not kept for the next phase
# we need to remove record kept in these nodes
for candidate_index = nb_candidates_for_next_phase + 1 : length(candidates)
for child in candidates[candidate_index].children
remove_records!(child.recordids)
end
end

resize!(candidates, nb_candidates_for_next_phase)
end
return sbstate
Expand Down
9 changes: 0 additions & 9 deletions src/Algorithm/treesearch/branch_and_bound.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ end

function node_change!(previous::Node, current::Node, space::BaBSearchSpace, untreated_nodes)
_updatedualbound!(space, space.reformulation, untreated_nodes) # this method needs to be reimplemented.
remove_records!(previous.recordids)

# we delete solutions from the node optimization state, as they are not needed anymore
nodestate = getoptstate(previous)
Expand All @@ -164,14 +163,6 @@ function tree_search_output(space::BaBSearchSpace, untreated_nodes)
setterminationstatus!(space.optstate, OTHER_LIMIT)
end

# TODO: warnings with record participation.
# I won't fix and wait for the storage refactoring.
# Clear untreated nodes
# while !isempty(untreated_nodes)
# node = pop!(untreated_nodes)
# remove_records!(node.recordids)
# end

#env.kpis.node_count = 0 #get_tree_order(tsdata) - 1 # TODO : check why we need to remove 1

return OptimizationOutput(space.optstate)
Expand Down
6 changes: 2 additions & 4 deletions src/ColunaBase/ColunaBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ export TerminationStatus, SolutionStatus, OPTIMIZE_NOT_CALLED, OPTIMAL,
export HashTable, gethash, savesolid!, getsolids

# Storages (TODO : clean)
export RecordsVector, UnitType, Storage, AbstractStorageUnit, AbstractRecord,
UnitsUsage, UnitPermission, READ_AND_WRITE, READ_ONLY, NOT_USED, StorageUnitWrapper,
export RecordsVector, UnitType,
UnitsUsage, UnitPermission, READ_AND_WRITE, READ_ONLY, NOT_USED,
set_permission!, store_record!, restore_from_records!, copy_records,
restore_from_record!, remove_records!, #check_records_participation,
record_type,
getstorageunit, getstoragewrapper

export NewStorage, NewStorageUnitManager, AbstractNewStorageUnit, AbstractNewRecord, new_storage_unit,
Expand Down
Loading

0 comments on commit 2b70ceb

Please sign in to comment.