Files
ortools-clone/tools/README.cc.java.dotnet

113 lines
2.8 KiB
Plaintext
Raw Permalink Normal View History

2018-09-19 08:44:03 +02:00
# Introduction
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
This file describes how to install the OR-Tools C++, Java and .Net binary archive.
OR-Tools is located at https://developers.google.com/optimization
These modules have been tested under:
2020-12-05 23:17:55 +01:00
2022-03-10 14:03:26 +01:00
- CentOS 8 (64 bit).
- Debian 11 (64 bit).
- Fedora 33 and up (64 bit).
- Ubuntu 18.04 LTS and up (64 bit).
- MacOS 12.5 Monterey (64 bit).
2022-03-10 14:03:26 +01:00
- Microsoft Windows with Visual Studio 2022 (64-bit)
Upon decompressing the archive, you will get the following structure:
2018-09-19 08:44:03 +02:00
```
or-tools/
[LICENSE](LICENSE) <- Apache 2.0 License
[README.md](README.md) <- This file
2022-03-03 14:25:39 +01:00
Makefile <- Main Makefile for C++,Java and .Net
examples/ <- C++, Java and .Net examples
include/ <- all include files
objs/ <- directory containing C++ compiled object files (*.o)
classes/ <- directory containing Java class files.
packages/ <- directory containing .Net nuget packages.
lib/ <- directory containing libraries and jar files.
bin/ <- directory containing executable files
2018-09-19 08:44:03 +02:00
```
2022-03-30 21:43:00 +02:00
Warning: While OR-Tools ships with SCIP, please consult the SCIP license
to ensure that you are complying with it if you want to use this solver.
2018-09-19 08:44:03 +02:00
# C++
2018-09-19 08:44:03 +02:00
Running the examples will involve compiling them, then running them.
We have provided a makefile target to help you.
Use Makefile:
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
```shell
make run SOURCE=examples/basic_example/basic_example.cc
2018-09-19 08:44:03 +02:00
```
**OR** this is equivalent to compiling and running
`examples/basic_example/basic_example.cc`.
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
- on Unix:
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
```shell
cd examples/basic_example
cmake -S . -B build
cmake --build build
2018-09-19 08:44:03 +02:00
```
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
- on Windows:
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
```shell
cd examples/basic_example
cmake -S . -B build
cmake --build build
2018-09-19 08:44:03 +02:00
```
# Java
2016-07-21 11:46:20 -07:00
Running the examples will involve compiling them, then running them.
We have provided a makefile target to help you. You need to have the
java and javac tools accessible from the command line.
2018-09-19 08:44:03 +02:00
Use Makefile:
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
```shell
2020-10-02 17:47:54 +02:00
make run SOURCE=examples/java/LinearProgramming/src/main/java/com/google/ortools/LinearProgramming.java
2018-09-19 08:44:03 +02:00
```
2020-10-02 17:47:54 +02:00
**OR** this is equivalent to compiling and running `examples/java/LinearProgramming`.
2020-12-05 23:17:55 +01:00
2020-10-02 17:47:54 +02:00
```shell
cd examples/java/LinearProgramming
mvn compile
mvn exec:java
```
2018-09-19 08:44:03 +02:00
# .Net
Running the examples will involve compiling them, then running them.
We have provided a makefile target to help you. You need to have the
2018-09-19 08:44:03 +02:00
dotnet/cli tools accessible from the command line.
2018-09-19 08:44:03 +02:00
Use Makefile:
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
```shell
2021-12-09 11:34:01 +01:00
make run SOURCE=examples/dotnet/Vrp/Vrp.cs
2018-09-19 08:44:03 +02:00
```
**OR** this is equivalent to compiling and running
2021-12-09 11:34:01 +01:00
`examples/dotnet/Vrp/Vrp.cs`.
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
- on Unix:
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
```shell
2021-12-09 11:34:01 +01:00
dotnet build examples/dotnet/Vrp/Vrp.csproj
dotnet run --no-build --framework net8.0 --project examples/dotnet/Vrp/Vrp.csproj
2018-09-19 08:44:03 +02:00
```
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
- on Windows:
2020-12-05 23:17:55 +01:00
2018-09-19 08:44:03 +02:00
```shell
2021-12-09 11:34:01 +01:00
dotnet build examples\dotnet\Vrp\Vrp.csproj
dotnet run --no-build --framework net8.0 --project examples\dotnet\Vrp\Vrp.csproj
2018-09-19 08:44:03 +02:00
```