Skip to content

Commit 906a58e

Browse files
committed
Use highsbox and update versions of optimizers
1 parent 215be68 commit 906a58e

File tree

9 files changed

+55
-131
lines changed

9 files changed

+55
-131
lines changed

.github/actions/setup_optimizers_linux/action.yml

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ runs:
2424
shell: bash
2525
run: |
2626
mkdir -p ~/installers
27-
mkdir -p ~/highs
2827
2928
- name: Cache Installers
3029
id: cache-installers-linux
@@ -41,9 +40,9 @@ runs:
4140
shell: bash
4241
name: Download Installers
4342
run: |
44-
curl -L -o ~/installers/gurobi.tar.gz https://packages.gurobi.com/11.0/gurobi11.0.0_linux64.tar.gz
45-
curl -L -o ~/installers/copt.tar.gz https://pub.shanshu.ai/download/copt/7.1.0/linux64/CardinalOptimizer-7.1.0-lnx64.tar.gz
46-
curl -L -o ~/installers/mosek.tar.bz2 https://download.mosek.com/stable/10.1.22/mosektoolslinux64x86.tar.bz2
43+
curl -L -o ~/installers/gurobi.tar.gz https://packages.gurobi.com/11.0/gurobi11.0.2_linux64.tar.gz
44+
curl -L -o ~/installers/copt.tar.gz https://pub.shanshu.ai/download/copt/7.1.3/linux64/CardinalOptimizer-7.1.3-lnx64.tar.gz
45+
curl -L -o ~/installers/mosek.tar.bz2 https://download.mosek.com/stable/10.2.0/mosektoolslinux64x86.tar.bz2
4746
4847
- name: Setup Gurobi Installation
4948
shell: bash
@@ -99,11 +98,11 @@ runs:
9998
tar jxf ~/installers/mosek.tar.bz2 -C ~/
10099
ls ~/mosek
101100
# set environment variables
102-
export MOSEK_10_1_BINDIR="${HOME}/mosek/10.1/tools/platform/linux64x86/bin"
103-
echo "MOSEK_10_1_BINDIR=${MOSEK_10_1_BINDIR}" >> $GITHUB_ENV
104-
echo "PATH=${PATH}:${MOSEK_10_1_BINDIR}" >> $GITHUB_ENV
105-
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MOSEK_10_1_BINDIR}" >> $GITHUB_ENV
106-
echo $MOSEK_10_1_BINDIR
101+
export MOSEK_10_2_BINDIR="${HOME}/mosek/10.2/tools/platform/linux64x86/bin"
102+
echo "MOSEK_10_2_BINDIR=${MOSEK_10_1_BINDIR}" >> $GITHUB_ENV
103+
echo "PATH=${PATH}:${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
104+
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
105+
echo $MOSEK_10_2_BINDIR
107106
108107
# setup license using secrets
109108
echo "$MOSEK_LICENSE" > ~/mosek.lic
@@ -113,29 +112,3 @@ runs:
113112
shell: bash
114113
run: |
115114
msktestlic
116-
117-
- name: Download HiGHS artifact from my own build
118-
uses: dawidd6/action-download-artifact@v3
119-
with:
120-
# GitHub token, a Personal Access Token with `public_repo` scope
121-
github_token: ${{inputs.GITHUB_TOKEN}}
122-
workflow: build.yml
123-
repo: metab0t/highs_autobuild
124-
path: /home/runner/highs
125-
name: highs-artifact-Linux-X64
126-
127-
- name: Setup HiGHS Installation
128-
shell: bash
129-
run: |
130-
ls ~/highs
131-
chmod -R +xr ~/highs
132-
# set environment variables
133-
export HiGHS_HOME="${HOME}/highs"
134-
echo "HiGHS_HOME=${HiGHS_HOME}" >> $GITHUB_ENV
135-
echo "PATH=${PATH}:${HiGHS_HOME}/bin" >> $GITHUB_ENV
136-
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HiGHS_HOME}/lib" >> $GITHUB_ENV
137-
echo $HiGHS_HOME
138-
- name: Test HiGHS
139-
shell: bash
140-
run: |
141-
highs --version

.github/actions/setup_optimizers_macos/action.yml

Lines changed: 18 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ runs:
3232
shell: bash
3333
run: |
3434
mkdir -p ~/installers
35-
mkdir -p ~/highs
3635
3736
- name: Cache Installers
3837
id: cache-installers-macos
@@ -49,20 +48,20 @@ runs:
4948
shell: bash
5049
name: Download Universal Installers
5150
run: |
52-
curl -L -o ~/installers/gurobi.pkg https://packages.gurobi.com/11.0/gurobi11.0.0_macos_universal2.pkg
53-
curl -L -o ~/installers/copt.tar.gz https://pub.shanshu.ai/download/copt/7.1.0/osx64/CardinalOptimizer-7.1.0-universal_mac.tar.gz
51+
curl -L -o ~/installers/gurobi.pkg https://packages.gurobi.com/11.0/gurobi11.0.2_macos_universal2.pkg
52+
curl -L -o ~/installers/copt.tar.gz https://pub.shanshu.ai/download/copt/7.1.3/osx64/CardinalOptimizer-7.1.3-universal_mac.tar.gz
5453
5554
- if: ${{ (steps.cache-installers-macos.outputs.cache-hit != 'true') && (inputs.ARCH == 'X64') }}
5655
shell: bash
5756
name: Download X64 Installers
5857
run: |
59-
curl -L -o ~/installers/mosek.tar.bz2 https://download.mosek.com/stable/10.1.22/mosektoolsosx64x86.tar.bz2
58+
curl -L -o ~/installers/mosek.tar.bz2 https://download.mosek.com/stable/10.2.0/mosektoolsosx64x86.tar.bz2
6059
6160
- if: ${{ (steps.cache-installers-macos.outputs.cache-hit != 'true') && (inputs.ARCH == 'ARM64') }}
6261
shell: bash
6362
name: Download ARM64 Installers
6463
run: |
65-
curl -L -o ~/installers/mosek.tar.bz2 https://download.mosek.com/stable/10.1.25/mosektoolsosxaarch64.tar.bz2
64+
curl -L -o ~/installers/mosek.tar.bz2 https://download.mosek.com/stable/10.2.0/mosektoolsosxaarch64.tar.bz2
6665
6766
- name: Setup Gurobi Installation
6867
shell: bash
@@ -119,14 +118,14 @@ runs:
119118
MOSEK_LICENSE: ${{ inputs.MOSEK_LICENSE }}
120119
run: |
121120
tar jxf ~/installers/mosek.tar.bz2 -C ~/
122-
ls ~/mosek/10.1/tools/platform
121+
ls ~/mosek/10.2/tools/platform
123122
# set environment variables
124-
export MOSEK_10_1_BINDIR="${HOME}/mosek/10.1/tools/platform/osx64x86/bin"
125-
echo "MOSEK_10_1_BINDIR=${MOSEK_10_1_BINDIR}" >> $GITHUB_ENV
126-
echo "PATH=${PATH}:${MOSEK_10_1_BINDIR}" >> $GITHUB_ENV
127-
echo "DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${MOSEK_10_1_BINDIR}" >> $GITHUB_ENV
128-
echo $MOSEK_10_1_BINDIR
129-
ls $MOSEK_10_1_BINDIR
123+
export MOSEK_10_2_BINDIR="${HOME}/mosek/10.2/tools/platform/osx64x86/bin"
124+
echo "MOSEK_10_2_BINDIR=${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
125+
echo "PATH=${PATH}:${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
126+
echo "DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
127+
echo $MOSEK_10_2_BINDIR
128+
ls $MOSEK_10_2_BINDIR
130129
131130
# setup license using secrets
132131
echo "$MOSEK_LICENSE" > ~/mosek.lic
@@ -138,14 +137,14 @@ runs:
138137
MOSEK_LICENSE: ${{ inputs.MOSEK_LICENSE }}
139138
run: |
140139
tar jxf ~/installers/mosek.tar.bz2 -C ~/
141-
ls ~/mosek/10.1/tools/platform
140+
ls ~/mosek/10.2/tools/platform
142141
# set environment variables
143-
export MOSEK_10_1_BINDIR="${HOME}/mosek/10.1/tools/platform/osxaarch64/bin"
144-
echo "MOSEK_10_1_BINDIR=${MOSEK_10_1_BINDIR}" >> $GITHUB_ENV
145-
echo "PATH=${PATH}:${MOSEK_10_1_BINDIR}" >> $GITHUB_ENV
146-
echo "DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${MOSEK_10_1_BINDIR}" >> $GITHUB_ENV
147-
echo $MOSEK_10_1_BINDIR
148-
ls $MOSEK_10_1_BINDIR
142+
export MOSEK_10_2_BINDIR="${HOME}/mosek/10.2/tools/platform/osxaarch64/bin"
143+
echo "MOSEK_10_2_BINDIR=${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
144+
echo "PATH=${PATH}:${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
145+
echo "DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${MOSEK_10_2_BINDIR}" >> $GITHUB_ENV
146+
echo $MOSEK_10_2_BINDIR
147+
ls $MOSEK_10_2_BINDIR
149148
150149
# setup license using secrets
151150
echo "$MOSEK_LICENSE" > ~/mosek.lic
@@ -155,29 +154,3 @@ runs:
155154
shell: bash
156155
run: |
157156
msktestlic
158-
159-
- name: Download HiGHS artifact from my own build
160-
uses: dawidd6/action-download-artifact@v3
161-
with:
162-
# GitHub token, a Personal Access Token with `public_repo` scope
163-
github_token: ${{inputs.GITHUB_TOKEN}}
164-
workflow: build.yml
165-
repo: metab0t/highs_autobuild
166-
path: /Users/runner/highs
167-
name: highs-artifact-macOS-${{ inputs.ARCH }}
168-
169-
- name: Setup HiGHS Installation
170-
shell: bash
171-
run: |
172-
ls ~/highs
173-
chmod -R +xr ~/highs
174-
# set environment variables
175-
export HiGHS_HOME="${HOME}/highs"
176-
echo "HiGHS_HOME=${HiGHS_HOME}" >> $GITHUB_ENV
177-
echo "PATH=${PATH}:${HiGHS_HOME}/bin" >> $GITHUB_ENV
178-
echo "DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${HiGHS_HOME}/lib" >> $GITHUB_ENV
179-
echo $HiGHS_HOME
180-
- name: Test HiGHS
181-
shell: bash
182-
run: |
183-
DYLD_LIBRARY_PATH=${HiGHS_HOME}/lib highs --version

.github/actions/setup_optimizers_windows/action.yml

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ runs:
3535
shell: pwsh
3636
run: |
3737
New-Item -ItemType Directory -Force -Path "D:\installers"
38-
New-Item -ItemType Directory -Force -Path "D:\highs"
3938
4039
- name: Cache Installers
4140
id: cache-installers-windows
@@ -52,9 +51,9 @@ runs:
5251
shell: pwsh
5352
name: Download Installers
5453
run: |
55-
curl -L -o D:\installers\gurobi.msi https://packages.gurobi.com/11.0/Gurobi-11.0.0-win64.msi
56-
curl -L -o D:\installers\copt.zip https://pub.shanshu.ai/download/copt/7.1.0/win64/CardinalOptimizer-7.1.0-win64.zip
57-
curl -L -o D:\installers\mosek.msi https://download.mosek.com/stable/10.1.22/moseksetupwin64x86.msi
54+
curl -L -o D:\installers\gurobi.msi https://packages.gurobi.com/11.0/Gurobi-11.0.2-win64.msi
55+
curl -L -o D:\installers\copt.zip https://pub.shanshu.ai/download/copt/7.1.3/win64/CardinalOptimizer-7.1.3-win64.zip
56+
curl -L -o D:\installers\mosek.msi https://download.mosek.com/stable/10.2.0/moseksetupwin64x86.msi
5857
5958
- name: Setup Gurobi Installation
6059
shell: pwsh
@@ -107,13 +106,13 @@ runs:
107106
MOSEK_LICENSE: ${{ inputs.MOSEK_LICENSE }}
108107
run: |
109108
lessmsi x D:\installers\mosek.msi "D:\" msktestlic.exe
110-
lessmsi x D:\installers\mosek.msi "D:\" mosek64_10_1.dll mosek64_10_1.lib tbb12.dll svml_dispmd.dll
109+
lessmsi x D:\installers\mosek.msi "D:\" mosek64_10_2.dll mosek64_10_2.lib tbb12.dll svml_dispmd.dll
111110
lessmsi x D:\installers\mosek.msi "D:\" mosek.h
112-
ls D:\SourceDir\PFiles\Mosek\10.1\tools\platform\win64x86
111+
ls D:\SourceDir\PFiles\Mosek\10.2\tools\platform\win64x86
113112
# set environment variables
114-
echo "MOSEK_10_1_BINDIR=D:\SourceDir\PFiles\Mosek\10.1\tools\platform\win64x86\bin" >> $env:GITHUB_ENV
115-
echo "PATH=$env:PATH;D:\SourceDir\PFiles\Mosek\10.1\tools\platform\win64x86\bin" >> $env:GITHUB_ENV
116-
echo $env:MOSEK_10_1_BINDIR
113+
echo "MOSEK_10_2_BINDIR=D:\SourceDir\PFiles\Mosek\10.2\tools\platform\win64x86\bin" >> $env:GITHUB_ENV
114+
echo "PATH=$env:PATH;D:\SourceDir\PFiles\Mosek\10.2\tools\platform\win64x86\bin" >> $env:GITHUB_ENV
115+
echo $env:MOSEK_10_2_BINDIR
117116
118117
# setup license using secrets
119118
echo $env:MOSEK_LICENSE > D:\mosek.lic
@@ -123,26 +122,3 @@ runs:
123122
shell: pwsh
124123
run: |
125124
msktestlic
126-
127-
- name: Download HiGHS artifact from my own build
128-
uses: dawidd6/action-download-artifact@v3
129-
with:
130-
# GitHub token, a Personal Access Token with `public_repo` scope
131-
github_token: ${{inputs.GITHUB_TOKEN}}
132-
workflow: build.yml
133-
repo: metab0t/highs_autobuild
134-
path: D:\highs
135-
name: highs-artifact-Windows-X64
136-
137-
- name: Setup HiGHS Installation
138-
shell: pwsh
139-
run: |
140-
ls D:\highs
141-
# set environment variables
142-
echo "HiGHS_HOME=D:\highs" >> $env:GITHUB_ENV
143-
echo "PATH=$env:PATH;D:\highs\bin" >> $env:GITHUB_ENV
144-
echo $env:HiGHS_HOME
145-
- name: Test HiGHS
146-
shell: pwsh
147-
run: |
148-
highs --version

.github/workflows/linux-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
- name: Install python deps
4545
run: |
46-
python -m pip install pytest numpy
46+
python -m pip install pytest numpy highsbox
4747
4848
- name: Build
4949
# We need to use gcc-10 to support c++ concepts

.github/workflows/macos-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: Install python deps
4444
run: |
45-
python -m pip install pytest numpy
45+
python -m pip install pytest numpy highsbox
4646
4747
- name: Build
4848
run: |

.github/workflows/windows-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: Install python deps
4444
run: |
45-
python -m pip install pytest numpy
45+
python -m pip install pytest numpy highsbox
4646
4747
- name: Build
4848
run: |

docs/source/getting_started.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ The typical paths where the dynamic library of optimizers are located are as fol
7979
- `/opt/copt71/lib`
8080
- `/opt/copt71/lib`
8181
* - Mosek
82-
- `C:\Program Files\Mosek\10.1\tools\platform\win64x86\bin`
83-
- `/opt/mosek/10.1/tools/platform/linux64x86/bin`
84-
- `/opt/mosek/10.1/tools/platform/osxaarch64/bin`
85-
- `/opt/mosek/10.1/tools/platform/osx64x86/bin`
82+
- `C:\Program Files\Mosek\10.2\tools\platform\win64x86\bin`
83+
- `/opt/mosek/10.2/tools/platform/linux64x86/bin`
84+
- `/opt/mosek/10.2/tools/platform/osxaarch64/bin`
85+
- `/opt/mosek/10.2/tools/platform/osx64x86/bin`
8686
* - HiGHS
8787
- `D:\highs\bin`
8888
- `/opt/highs/lib`
@@ -110,12 +110,12 @@ For COPT, the automatic detection looks for the following things in order:
110110

111111
### Mosek
112112

113-
The currently supported version is **10.1.x**. Other versions may work but are not tested.
113+
The currently supported version is **10.2.x**. Other versions may work but are not tested.
114114

115115
For Mosek, the automatic detection looks for the following things in order:
116-
1. The environment variable `MOSEK_10_1_BINDIR` set by the installer of Mosek
116+
1. The environment variable `MOSEK_10_2_BINDIR` set by the installer of Mosek
117117
2. The installation of `mosek` PyPI package
118-
3. `mosek64_10_1.dll`/`libmosek64.so`/`libmosek64.dylib` in the system loadable path
118+
3. `mosek64_10_2.dll`/`libmosek64.so`/`libmosek64.dylib` in the system loadable path
119119

120120
### HiGHS
121121

@@ -181,10 +181,10 @@ The typical paths where the dynamic library of optimizers are located are as fol
181181
- `/opt/copt71/lib/libcopt.dylib`
182182
- `/opt/copt71/lib/libcopt.dylib`
183183
* - Mosek
184-
- `C:\Program Files\Mosek\10.1\tools\platform\win64x86\bin\mosek64_10_1.dll`
185-
- `/opt/mosek/10.1/tools/platform/linux64x86/bin/libmosek64.so`
186-
- `/opt/mosek/10.1/tools/platform/osxaarch64/bin/libmosek64.dylib`
187-
- `/opt/mosek/10.1/tools/platform/osx64x86/bin/libmosek64.dylib`
184+
- `C:\Program Files\Mosek\10.2\tools\platform\win64x86\bin\mosek64_10_1.dll`
185+
- `/opt/mosek/10.2/tools/platform/linux64x86/bin/libmosek64.so`
186+
- `/opt/mosek/10.2/tools/platform/osxaarch64/bin/libmosek64.dylib`
187+
- `/opt/mosek/10.2/tools/platform/osx64x86/bin/libmosek64.dylib`
188188
* - HiGHS
189189
- `D:\highs\bin\highs.dll`
190190
- `/opt/highs/lib/libhighs.so`

optimizer_version.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Gurobi = "11.0.1"
2-
COPT = "7.1.1"
3-
MOSEK = "10.1.22"
1+
Gurobi = "11.0.2"
2+
COPT = "7.1.3"
3+
MOSEK = "10.2.0"
44
HiGHS = "1.7.0"

src/pyoptinterface/_src/mosek.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def detected_libraries():
4040
}[platform.system()]
4141

4242
# Environment
43-
home = os.environ.get("MOSEK_10_1_BINDIR", None)
43+
home = os.environ.get("MOSEK_10_2_BINDIR", None)
44+
if home is None:
45+
home = os.environ.get("MOSEK_10_1_BINDIR", None)
4446
if home and os.path.exists(home):
4547
dir = Path(home)
4648
for path in dir.glob(suffix_pattern):
@@ -76,7 +78,7 @@ def detected_libraries():
7678
default_libname = {
7779
"Linux": "libmosek64.so",
7880
"Darwin": "libmosek64.dylib",
79-
"Windows": "mosek64_10_1.dll",
81+
"Windows": "mosek64_10_2.dll",
8082
}[platform.system()]
8183
libs.append(default_libname)
8284

0 commit comments

Comments
 (0)