Files
ortools-clone/examples/cpp
Corentin Le Molgat b027e57e95 dotnet: Remove reference to dotnet release command
- Currently not implemented...

Add abseil patch

- Add patches/absl-config.cmake

Makefile: Add abseil-cpp on unix

- Force abseil-cpp SHA1 to 45221cc
  note: Just before the PR #136 which break all CMake

Makefile: Add abseil-cpp on windows

- Force abseil-cpp SHA1 to 45221cc
  note: Just before the PR #136 which break all CMake

CMake: Add abseil-cpp

- Force abseil-cpp SHA1 to 45221cc
  note: Just before the PR #136 which break all CMake

port to absl: C++ Part

- Fix warning with the use of ABSL_MUST_USE_RESULT
  > The macro must appear as the very first part of a function
    declaration or definition:
    ...
    Note: past advice was to place the macro after the argument list.
  src: dependencies/sources/abseil-cpp-master/absl/base/attributes.h:418
- Rename enum after windows clash
- Remove non compact table constraints
- Change index type from int64 to int in routing library
- Fix file_nonport compilation on windows
- Fix another naming conflict with windows (NO_ERROR is a macro)
- Cleanup hash containers; work on sat internals
- Add optional_boolean sub-proto

Sync cpp examples with internal code
- reenable issue173 after reducing number of loops

port to absl: Python Part

- Add back cp_model.INT32_MIN|MAX for examples

Update Python examples

- Add random_tsp.py
- Run words_square example
- Run magic_square in python tests

port to absl: Java Part

- Fix compilation of the new routing parameters in java
- Protect some code from SWIG parsing

Update Java Examples

port to absl: .Net Part

Update .Net examples

work on sat internals; Add C++ CP-SAT CpModelBuilder API; update sample code and recipes to use the new API; sync with internal code

Remove VS 2015 in Appveyor-CI

- abseil-cpp does not support VS 2015...

improve tables

upgrade C++ sat examples to use the new API; work on sat internals

update license dates

rewrite jobshop_ft06_distance.py to use the CP-SAT solver

rename last example

revert last commit

more work on SAT internals

fix
2018-11-30 14:48:55 +01:00
..
2018-11-23 08:52:59 +01:00
2018-11-10 18:00:53 +01:00
2018-11-24 23:06:05 +01:00
2018-11-22 13:15:13 +01:00
2018-11-22 13:15:13 +01:00
2018-11-24 16:01:12 +01:00
2018-11-22 13:15:13 +01:00
2018-11-22 13:15:13 +01:00
2018-11-08 10:22:10 +01:00

C++ examples

The following examples showcase how to use the different Operations Research libraries.

Examples list

  • Constraint Solver examples:

    • cryptarithm.cc Demonstrates the use of basic modeling objects (integer variables, arithmetic constraints and expressions, simple search).
    • golomb.cc Demonstrates how to handle objective functions and collect solutions found during the search.
    • magic_square.cc Shows how to use the automatic search to solve your problem.
    • costas_array.cc Solves the problem of Costas Array (a constrained assignment problem used for radars) with two version. On version is a feasibility version with hard constraints, the other version is an optimization version with soft constraints and violation costs.
    • jobshop.cc Demonstrates scheduling of jobs on different machines.
    • jobshop_ls.cc Demonstrates scheduling of jobs on different machines with a search using Local Search and Large Neighorhood Search.
    • nqueens.cc Solves the n-queen problem. It also demonstrates how to break symmetries during search.
    • network_routing.cc Solves a multicommodity mono-routing problem with capacity constraints and a max usage cost structure.
    • sports_scheduling.cc Finds a soccer championship schedule. Its uses an original approach where all constraints attached to either one team, or one week are regrouped into one global 'AllowedAssignment' constraints.
    • dobble_ls.cc Shows how to write Local Search operators and Local Search filters in a context of an assignment/partitioning problem. It also shows how to write a simple constraint.
  • Routing examples:

    • tsp.cc Travelling Salesman Problem.
    • cvrptw.cc Capacitated Vehicle Routing Problem with Time Windows.
    • pdptw.cc Pickup and Delivery Problem with Time Windows.
  • Graph examples:

    • flow_api.cc Demonstrates how to use Min-Cost Flow and Max-Flow api.
    • linear_assignment_api.cc Demonstrates how to use the Linear Sum Assignment solver.
    • dimacs_assignment.cc Solves DIMACS challenge on assignment problems.
  • Linear and integer programming examples:

    • linear_programming.cc Demonstrates how to use the linear solver wrapper API to solve Linear Programming problems.
    • integer_programming.cc Demonstrates how to use the linear solver wrapper API to solve Integer Programming problems.
    • linear_solver_protocol_buffers.cc Demonstrates how protocol buffers can be used as input and output to the linear solver wrapper.
    • strawberry_fields_with_column_generation.cc Complex example that demonstrates how to use dynamic column generation to solve a 2D covering problem.
  • Utilities

    • model_util.cc A utility to manipulate model files (.cp) dumped by the solver.

Execution

Running the examples will involve building them, then running them.
You can run the following command from the top directory:

make build SOURCE=examples/cpp/<example>.cc
make run SOURCE=examples/cpp/<example>.cc