-
Notifications
You must be signed in to change notification settings - Fork 41
/
generate_readme
113 lines (87 loc) · 5.25 KB
/
generate_readme
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/usr/bin/env bash
# Exit when command fails
set -e
#Attempt to use undefined variable outputs error message, and forces an exit
set -u
#Causes a pipeline to return the exit status of the last command in the pipe
#that returned a non-zero return value.
set -o pipefail
#set -x
source $COINBREW_HOME/scripts/generate_readme
pushd . > /dev/null
cd $(dirname $0)
SCRIPT_DIR=$PWD
popd > /dev/null
create_variables $SCRIPT_DIR/config.yml
make_header
echo "Osi (*O*pen *S*olver *I*nterface) provides an abstract base class to a generic linear programming (LP) solver, along with derived classes for specific solvers.
Many applications may be able to use the Osi to insulate themselves from a specific LP solver.
That is, programs written to the OSI standard may be linked to any solver with an OSI interface and should produce correct results.
The OSI has been significantly extended compared to its first incarnation.
Currently, the OSI supports linear programming solvers and has rudimentary support for integer programming.
Among others the following operations are supported:
* creating the LP formulation;
* directly modifying the formulation by adding rows/columns;
* modifying the formulation by adding cutting planes provided by [CGL](https://www.github.com/coin-or/Cgl);
* solving the formulation (and resolving after modifications);
* extracting solution information;
* invoking the underlying solver's branch-and-bound component.
The following is a list of derived Osi classes:
|Solver|Derived Class|Note|
|------|-------------|----|
|[Cbc](https://www.github.com/coin-or/Cbc)|OsiCbc| unmaintained |
|[Clp](https://www.github.com/coin-or/Clp)|OsiClp| |
|[CPLEX](https://www.ibm.com/analytics/cplex-optimizer)|OsiCpx| |
|[DyLP](https://www.github.com/coin-or/DyLP)|OsiDylp| |
|[GLPK](http://www.gnu.org/software/glpk/glpk.html)|OsiGlpk| Glpk |
|[Gurobi](http://www.gurobi.com)|OsiGrb| |
|[MOSEK](http://www.mosek.com)|OsiMsk| |
|[SoPlex](http://soplex.zib.de)|OsiSpx| SoPlex < 4.0 |
|[SYMPHONY](https://www.github.com/coin-or/SYMPHONY)|OsiSym| |
|[Vol](https://www.github.com/coin-or/Vol)|OsiVol| |
|[XPRESS-MP](https://www.fico.com/en/products/fico-xpress-optimization)|OsiXpr| |
Each solver interface is in a separate directory of Osi or distributed
with the solver itself.
Within COIN-OR, Osi is used by [Cgl](https://www.github.com/coin-or/Cgl), [Cbc](https://www.github.com/coin-or/Cbc), and [Bcp](https://www.github.com/coin-or/Bcp), among others.
The main project managers are Lou Hafer (@LouHafer) and Matt Saltzmann (@mjsaltzman).
An incomplete list of recent changes to Osi are found in the [CHANGELOG](Osi/CHANGELOG)
"
make_build_info
make_doxygen_info
echo "## Project Links
* [Code of Conduct](https://www.coin-or.org/code-of-conduct/)
* [COIN-OR Web Site](http://www.coin-or.org/)
* [Discussion forum](https://github.com/coin-or/Osi/discussions)
* [Report a bug](https://github.com/coin-or/Osi/issues/new)
* [Doxygen-generated html documentation](https://coin-or.github.io/Osi/Doxygen)
* [OSI2 Discussion](https://github.com/coin-or/Osi2/discussions)
* The most recent tutorial on OSI can be accessed from the [page on presentations from the 2004 CORS/INFORMS Joint Meeting in Banff](http://www.coin-or.org/Presentations/CORSINFORMSWorkshop04/index.html).
* [The COIN-OR Open Solver Interface: Technology Overview](http://www.coin-or.org/Presentations/CORS2004-OSI.pdf): An overview of the COIN-OR OSI and design issues for a next-generation version given at CORS/INFORMS 2004 by Matthew Saltzman.
-------
## Dynamically loading commercial solver libraries
### At build time
It is possible to create an osi build that supports cplex, gurobi and xpress even if you don't have (yet) any of these solvers on your machine using [lazylpsolverlibs](https://code.google.com/p/lazylpsolverlibs/). To do so, follow these steps:
1. Install lazylpsolverlibs (follow the instructions of the [lazylpsolverlibs wiki](https://code.google.com/p/lazylpsolverlibs/wiki/HowToSetup))
2. Use the following command line to configure Osi:
\`\`\`
./configure --with-cplex-incdir=\"\$(pkg-config --variable=includedir lazycplex)/lazylpsolverlibs/ilcplex\" \\
--with-cplex-lib=\"\$(pkg-config --libs lazycplex)\" \\
--with-gurobi-incdir=\"\$(pkg-config --variable=includedir lazygurobi)/lazylpsolverlibs\" \\
--with-gurobi-lib=\"\$(pkg-config --libs lazygurobi)\" \\
--with-xpress-incdir=\"\$(pkg-config --variable=includedir lazyxprs)/lazylpsolverlibs\" \\
--with-xpress-lib=\"\$(pkg-config --libs lazyxprs)\"
\`\`\`
3. Then follow the normal installation process (make, make install)
### At run time
Your build should now support cplex, gurobi and xpress, which means that if you install one of these solvers, osi will be able to use it.
At run time, you just need to point one of the environment variables LAZYLPSOLVERLIBS_GUROBI_LIB, LAZYLPSOLVERLIBS_CPLEX_LIB or LAZYLPSOLVERLIBS_XPRS_LIB to the full path of the corresponding solver library.
For example:
\`\`\`
export LAZYLPSOLVERLIBS_CPLEX_LIB=/usr/ilog/cplex121/bin/x86_debian4.0_4.1/libcplex121.so
\`\`\`
### Troubleshooting
If pkg-config reports errors during the configure step, try modifying the PKG_CONFIG_PATH variable. Most likely, you need to do:
\`\`\`
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
\`\`\`
"