forked from coin-or/Sonnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.txt
76 lines (59 loc) · 4.3 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
https://github.com/coin-or/SONNET
http://www.coin-or.org
As mentioned in the README, SONNET consists of two libraries:
The SonnetWrapper is writen in C++/CLI
The SonnetWrapper library is built using the COIN-OR libraries BuildTools, Cbc, Cgl, Clp, CoinUtils, Osi and their dependencies.
See also below Building SONNET.
The SonnetWrapper library refers to and builds all COIN-OR dependencies and the SonnetWrapper project itself.
The COIN-OR libraries are statically linked into the SonnetWrapper library.
Within SONNET, the main purpose of the SonnetWrapper library is to be use by the Sonnet library.
The SonnetWrapper can also be used as a stand-alone library to provide classic COIN-OR functionality in .NET.
In contrast, the Sonnet library is writen in C#. This library uses a reference to the SonnetWrapper library.
Code is provided to perform various tests on the Sonnet library.
Getting the source code
---------------------
The latest SONNET sources can be downloaded from the Subversion repository from this link:
https://github.com/coin-or/SONNET
If you use "Download ZIP", the downloaded zip file contains the Sonnet source code and MS Visual Studio 2019 solution.
It also includes several examples.
Before you can build SONNET, the sources of the used COIN-OR libraries are also required. Since the Cbc project has the same dependencies, the easiest way is to download a Cbc source archive from
http://www.coin-or.org/download/source/Cbc/
It is recommended to build SONNET against a released version of Cbc--not against master branch. SONNET has been tested to work with Cbc 2.10.3 sources.
From the archive, copy the folders BuildTools, Cbc, Cgl, Clp, CoinUtils and Osi
such that the Sonnet root directory is at the same level as Cbc, Clp, etc.
If you want to build SONNET against master branch or the relevant COIN-OR projects, then download the relevant sources from github, either from the web portal, using coinbrew, or from Visual Studio.
Ensure that the Sonnet root directory is at the same level as Cbc, Clp, etc.
Building SONNET
---------------------
The SONNET projects and solution are provided for Visual Studio 2019 (MSVisualStudio\v16).
The Sonnet solution for Visual Studio 2019 refers to the v10 project files of the relevant COIN-OR libraries.
As a result, either the v10 Toolset (v100) has to be installed, or 'Retarget Project' each of the COIN-OR project files to v142 (recommended). To retarget, open the Sonnet solution, and for each project within the COIN-OR v10 folder (libCbc, etc.) do right-click and select Retarget Projects.
Older versions of SONNET projects and solutions files are available for Visual Studio 2010 (v10), but these are not maintained.
About x64 or Win32/x86
-------------------------
Specific builds are required for x86 or x64, in particular for SonnetWrapper.dll.
Since the C++/CLI of SonnetWraper.dll has no "AnyCPU" equivalent, it is NOT possible to use
the x86 and/or x64 Sonnet.dll and SonnetWrapper.dll in an "AnyCPU" project. The project has to target x86 or x64.
Strongly naming / Signing assemblies
---------------------
To strongly name (sign) the Sonnet.dll and SonnetWrapper.dll there are two options:
1) Build the source code using your own key, or
2) Use ILMERGE
ilmerge Weak.dll /keyfile:key.snk /out:Strong.dll
See http://www.microsoft.com/download/en/details.aspx?id=17630
About additional functionality
-------------------------
Several parts of the source code have been disabled because they require, e.g., non-standard COIN-OR code.
SONNET_LEANLOADPROBLEM (Solver.cs, See also SonnetWrapper)
Especially for CLP, this functionality loads problems more efficiently but requires
non-standard osiClp code. This is really only interesting for large problems (>100K var/con)
If SONNET_LEANLOADPROBLEM is defined, then two additional member functions of SonnetWrapper's OsiClpSolverInterface are defined
- LeanLoadProblemInit
- LeanLoadProblem
and one extra member function must be added for normal OsiClpSolverInterface
- loadCurrentProblem
SONNET_USE_SEMICONTVAR (Solver.cs)
Unfinished code for adding a variable type of SemiContinuousVariable, and automatically generate
helper variable (binary) and constraint.
SONNET_SETWARMROWPRICE (WarmStart.cs)
Whether or not to include row price information in WarmStart