Move the sample bin-packing solver from algorithms to set_cover, the only place it is used.
The main reason is that we have several solvers, including some being open-sourced, in the `packing/` folder.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "ortools/algorithms/bin_packing.h"
|
||||
#include "ortools/set_cover/samples/bin_packing.h"
|
||||
|
||||
#include <absl/algorithm/container.h>
|
||||
#include <absl/container/flat_hash_set.h>
|
||||
@@ -12,8 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef OR_TOOLS_ORTOOLS_ALGORITHMS_BIN_PACKING_H
|
||||
#define OR_TOOLS_ORTOOLS_ALGORITHMS_BIN_PACKING_H
|
||||
#ifndef OR_TOOLS_ORTOOLS_SET_COVER_SAMPLES_BIN_PACKING_H
|
||||
#define OR_TOOLS_ORTOOLS_SET_COVER_SAMPLES_BIN_PACKING_H
|
||||
|
||||
#include <absl/algorithm/container.h>
|
||||
#include <absl/container/flat_hash_set.h>
|
||||
@@ -177,4 +177,4 @@ void AddRandomizedBins(const BinPackingModel& model, BaseInt num_bins,
|
||||
BinPackingSetCoverModel& scp_model, std::mt19937& rnd);
|
||||
|
||||
} // namespace operations_research
|
||||
#endif /* OR_TOOLS_ORTOOLS_ALGORITHMS_BIN_PACKING_H */
|
||||
#endif /* OR_TOOLS_ORTOOLS_SET_COVER_SAMPLES_BIN_PACKING_H */
|
||||
@@ -18,10 +18,10 @@
|
||||
#include <cstdlib>
|
||||
#include <random>
|
||||
|
||||
#include "ortools/algorithms/bin_packing.h"
|
||||
#include "ortools/base/init_google.h"
|
||||
#include "ortools/set_cover/base_types.h"
|
||||
#include "ortools/set_cover/set_cover_cft.h"
|
||||
#include "ortools/set_cover/samples/bin_packing.h"
|
||||
|
||||
using namespace operations_research;
|
||||
ABSL_FLAG(std::string, instance, "", "BPP instance int RAIL format.");
|
||||
Reference in New Issue
Block a user