Move model_builder under linear_solver

This commit is contained in:
Laurent Perron
2022-09-12 11:28:52 +02:00
parent a93c57b707
commit 81b31ff24b
62 changed files with 2769 additions and 342 deletions

View File

@@ -174,7 +174,7 @@ public static class IntVarArrayHelper
}
}
// TODO(user): Try to move this code back to the .i with @define macros.
// TODO(user): Try to move this code back to the .swig with @define macros.
public partial class IntVarVector : IDisposable,
System.Collections.IEnumerable
#if !SWIG_DOTNET_1

View File

@@ -197,10 +197,8 @@ public class SimpleCpProgram {
Console.WriteLine($"Number of constraints: {solver.Constraints()}");
// Solve the problem.
DecisionBuilder db = solver.MakePhase(
new IntVar[] { x, y, z },
Solver.CHOOSE_FIRST_UNBOUND,
Solver.ASSIGN_MIN_VALUE);
DecisionBuilder db = solver.MakePhase(new IntVar[] { x, y, z }, Solver.CHOOSE_FIRST_UNBOUND,
Solver.ASSIGN_MIN_VALUE);
// Print solution on console.
int count = 0;

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright 2010-2022 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@@ -23,9 +23,9 @@
#include <vector>
#include "absl/flags/flag.h"
#include "ortools/base/flags.h"
#include "ortools/base/init_google.h"
#include "ortools/base/logging.h"
#include "ortools/base/logging_flags.h"
#include "ortools/constraint_solver/constraint_solver.h"
// [END import]

View File

@@ -22,9 +22,9 @@
#include <vector>
#include "absl/flags/flag.h"
#include "ortools/base/flags.h"
#include "ortools/base/init_google.h"
#include "ortools/base/logging.h"
#include "ortools/base/logging_flags.h"
#include "ortools/constraint_solver/constraint_solver.h"
// Solve a job shop problem:

View File

@@ -18,9 +18,9 @@
#include <vector>
#include "absl/flags/flag.h"
#include "ortools/base/flags.h"
#include "ortools/base/init_google.h"
#include "ortools/base/logging.h"
#include "ortools/base/logging_flags.h"
#include "ortools/constraint_solver/constraint_solver.h"
namespace operations_research {

View File

@@ -14,9 +14,9 @@
// Knowing that we see 20 heads and 56 legs,
// how many pheasants and rabbits are we looking at ?
#include "absl/flags/flag.h"
#include "ortools/base/flags.h"
#include "ortools/base/init_google.h"
#include "ortools/base/logging.h"
#include "ortools/base/logging_flags.h"
#include "ortools/constraint_solver/constraint_solver.h"
namespace operations_research {

View File

@@ -17,9 +17,9 @@
// Search with Filter approach.
#include <vector>
#include "ortools/base/flags.h"
#include "ortools/base/init_google.h"
#include "ortools/base/logging.h"
#include "ortools/base/logging_flags.h"
#include "ortools/constraint_solver/constraint_solver.h"
#include "ortools/constraint_solver/constraint_solveri.h"