Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support blmo type and passed test for Cube polytope #188

Draft
wants to merge 288 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 162 commits
Commits
Show all changes
288 commits
Select commit Hold shift + click to select a range
b780ff9
Update frank_wolfe_variants.jl; rename
WenjieXiao-2022 May 2, 2024
9358be1
Update node.jl; rename
WenjieXiao-2022 May 2, 2024
37db78e
Update frank_wolfe_variants.jl; typo
WenjieXiao-2022 May 2, 2024
575b59e
Update frank_wolfe_variants.jl; typo
WenjieXiao-2022 May 2, 2024
92c865c
Update managed_blmo.jl
WenjieXiao-2022 May 2, 2024
f3bb09d
Update time_tracking_lmo.jl; support dicg
WenjieXiao-2022 May 2, 2024
41acb88
Update Boscia.jl
WenjieXiao-2022 May 2, 2024
79a0632
Update time_tracking_lmo.jl ; wrap blmo
WenjieXiao-2022 May 2, 2024
e233774
Update managed_blmo.jl; typo
WenjieXiao-2022 May 2, 2024
4fed869
Update time_tracking_lmo.jl; realize them
WenjieXiao-2022 May 2, 2024
4b6a9dd
Update polytope_blmos.jl; typo
WenjieXiao-2022 May 2, 2024
4c4525a
Update node.jl; typo
WenjieXiao-2022 May 2, 2024
2986f09
Update node.jl; typos
WenjieXiao-2022 May 2, 2024
58bb3a8
Update node.jl; typos
WenjieXiao-2022 May 2, 2024
4f28786
Update node.jl
WenjieXiao-2022 May 2, 2024
8d84486
Update frank_wolfe_variants.jl; remove test
WenjieXiao-2022 May 2, 2024
2cda5e9
Update managed_blmo.jl; added interface for Probability and unit simp…
WenjieXiao-2022 May 2, 2024
e7d2a5e
Update time_tracking_lmo.jl;
WenjieXiao-2022 May 2, 2024
511b5d1
Update managed_blmo.jl; check if all vertices lie on zero one
WenjieXiao-2022 May 2, 2024
5c3c87d
Update managed_blmo.jl; typos
WenjieXiao-2022 May 2, 2024
043bf12
Update time_tracking_lmo.jl; typos
WenjieXiao-2022 May 2, 2024
0b467ea
Update time_tracking_lmo.jl; rename
WenjieXiao-2022 May 2, 2024
c5d5d67
Update managed_blmo.jl; rename
WenjieXiao-2022 May 2, 2024
99da228
Update managed_blmo.jl; for testing
WenjieXiao-2022 May 2, 2024
76063bb
Update time_tracking_lmo.jl; for testing
WenjieXiao-2022 May 2, 2024
5b8ba77
Update managed_blmo.jl; testing
WenjieXiao-2022 May 2, 2024
52d5b2e
Update time_tracking_lmo.jl; changed arguments
WenjieXiao-2022 May 3, 2024
204fca0
Update managed_blmo.jl; put three polytope together
WenjieXiao-2022 May 3, 2024
ad23437
Update managed_blmo.jl
WenjieXiao-2022 May 3, 2024
604a836
Update managed_blmo.jl
WenjieXiao-2022 May 3, 2024
ff47ad3
Update time_tracking_lmo.jl
WenjieXiao-2022 May 3, 2024
8cae0e6
Update managed_blmo.jl; typos
WenjieXiao-2022 May 3, 2024
04d0d13
Update managed_blmo.jl ; for testing
WenjieXiao-2022 May 3, 2024
d3109b3
Update managed_blmo.jl; typo
WenjieXiao-2022 May 3, 2024
ae3d206
Update managed_blmo.jl
WenjieXiao-2022 May 3, 2024
53efbd2
Update managed_blmo.jl; typos
WenjieXiao-2022 May 3, 2024
605ad58
Update managed_blmo.jl; for testing
WenjieXiao-2022 May 3, 2024
698ddef
Update managed_blmo.jl; remove test
WenjieXiao-2022 May 3, 2024
08673fd
Update managed_blmo.jl; remove test
WenjieXiao-2022 May 3, 2024
9c2aaea
Update managed_blmo.jl; typos
WenjieXiao-2022 May 3, 2024
f5a1027
Update managed_blmo.jl; for testing
WenjieXiao-2022 May 3, 2024
9840eab
Update time_tracking_lmo.jl; for testing
WenjieXiao-2022 May 3, 2024
d678018
Update time_tracking_lmo.jl; for testing
WenjieXiao-2022 May 3, 2024
1299a22
Update managed_blmo.jl; remove testing
WenjieXiao-2022 May 3, 2024
6b9f3d3
Update time_tracking_lmo.jl; remove testing
WenjieXiao-2022 May 3, 2024
689bce2
Update node.jl; different ways to split active set
WenjieXiao-2022 May 3, 2024
9d4c1aa
Update frank_wolfe_variants.jl
WenjieXiao-2022 May 3, 2024
17a4e67
Update managed_blmo.jl; formatting
WenjieXiao-2022 May 3, 2024
62e7d7a
Update time_tracking_lmo.jl; track time
WenjieXiao-2022 May 3, 2024
3ccdb58
Update time_tracking_lmo.jl; typos
WenjieXiao-2022 May 3, 2024
686804f
Update frank_wolfe_variants.jl; support vanilla Frank Wolfe
WenjieXiao-2022 May 3, 2024
bb0c7c7
Update node.jl; support vanilla Frank Wolfe
WenjieXiao-2022 May 3, 2024
e233828
Update frank_wolfe_variants.jl
WenjieXiao-2022 May 3, 2024
40f4149
Update frank_wolfe_variants.jl
WenjieXiao-2022 May 3, 2024
fc44d9d
Update frank_wolfe_variants.jl; rename
WenjieXiao-2022 May 3, 2024
ae7432d
Update managed_blmo.jl; deleted one redundant indicator
WenjieXiao-2022 May 3, 2024
46c56fe
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
4c09b6f
Update managed_blmo.jl
WenjieXiao-2022 May 4, 2024
fd81107
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
2637b43
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
a13d32b
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
35032ac
Update managed_blmo.jl; typos
WenjieXiao-2022 May 4, 2024
7bee017
Update polytope_blmos.jl; typo
WenjieXiao-2022 May 4, 2024
e3fc427
Update polytope_blmos.jl; simplify
WenjieXiao-2022 May 4, 2024
bdbd5cd
Update polytope_blmos.jl; typo
WenjieXiao-2022 May 4, 2024
c62f6a2
Update polytope_blmos.jl;
WenjieXiao-2022 May 4, 2024
01cc4c2
Update polytope_blmos.jl; typos
WenjieXiao-2022 May 4, 2024
8a09abe
Update polytope_blmos.jl; typos
WenjieXiao-2022 May 4, 2024
628f9b8
Update node.jl
WenjieXiao-2022 May 4, 2024
7faef63
Update managed_blmo.jl; reconstruction
WenjieXiao-2022 May 4, 2024
f3d733d
Update polytope_blmos.jl; reconstruct
WenjieXiao-2022 May 4, 2024
44823a3
Update polytope_blmos.jl; typo
WenjieXiao-2022 May 4, 2024
bfb0b5a
Update polytope_blmos.jl; missing argument
WenjieXiao-2022 May 4, 2024
be00e8a
Update polytope_blmos.jl; typo
WenjieXiao-2022 May 4, 2024
aee13de
Update managed_blmo.jl
WenjieXiao-2022 May 4, 2024
2acb279
Update managed_blmo.jl
WenjieXiao-2022 May 4, 2024
0a606dd
Update managed_blmo.jl; typos
WenjieXiao-2022 May 4, 2024
7977614
Update time_tracking_lmo.jl
WenjieXiao-2022 May 4, 2024
635cd3e
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
9e5ccec
Update polytope_blmos.jl; typos
WenjieXiao-2022 May 4, 2024
e839f08
Update polytope_blmos.jl; scaled hot vec type
WenjieXiao-2022 May 4, 2024
5696475
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
83db28d
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
a20ec22
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
841f772
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
163aff7
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
057d765
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
80b31b9
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
4e32e95
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
0348146
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
2397013
Update node.jl; test
WenjieXiao-2022 May 4, 2024
afb1eab
Update node.jl; test
WenjieXiao-2022 May 4, 2024
8e0e9a3
Update polytope_blmos.jl; test
WenjieXiao-2022 May 4, 2024
8f26376
Update polytope_blmos.jl; typos
WenjieXiao-2022 May 4, 2024
16f0ed1
Update polytope_blmos.jl
WenjieXiao-2022 May 4, 2024
a6745a8
Update node.jl; test
WenjieXiao-2022 May 4, 2024
b6728b9
Update frank_wolfe_variants.jl;test
WenjieXiao-2022 May 4, 2024
7415887
Update polytope_blmos.jl
WenjieXiao-2022 May 5, 2024
a79c495
Update utilities.jl;
WenjieXiao-2022 May 5, 2024
6ec7f34
Update node.jl
WenjieXiao-2022 May 5, 2024
19cfd07
Update utilities.jl
WenjieXiao-2022 May 5, 2024
5a0d0be
Update polytope_blmos.jl
WenjieXiao-2022 May 5, 2024
f7a385b
Update polytope_blmos.jl;
WenjieXiao-2022 May 5, 2024
1c9c0af
Update frank_wolfe_variants.jl; testing
WenjieXiao-2022 May 5, 2024
e2b3673
Update frank_wolfe_variants.jl; testing
WenjieXiao-2022 May 5, 2024
02b788c
Update polytope_blmos.jl; testing
WenjieXiao-2022 May 5, 2024
15b2da6
Update polytope_blmos.jl;
WenjieXiao-2022 May 5, 2024
bef776b
Update polytope_blmos.jl
WenjieXiao-2022 May 6, 2024
fe96b04
Update polytope_blmos.jl
WenjieXiao-2022 May 6, 2024
3b72a5f
Update polytope_blmos.jl;
WenjieXiao-2022 May 6, 2024
e53f9f8
Update polytope_blmos.jl
WenjieXiao-2022 May 6, 2024
f2c3e4c
Update utilities.jl
WenjieXiao-2022 May 6, 2024
d22b8a7
Update node.jl
WenjieXiao-2022 May 7, 2024
cd191b5
Update node.jl
WenjieXiao-2022 May 7, 2024
d711b41
Update polytope_blmos.jl
WenjieXiao-2022 May 7, 2024
752e647
Update polytope_blmos.jl
WenjieXiao-2022 May 7, 2024
3a80ab1
Update node.jl
WenjieXiao-2022 May 7, 2024
ca70292
Update node.jl
WenjieXiao-2022 May 7, 2024
fa091c3
Update node.jl
WenjieXiao-2022 May 7, 2024
eb24df3
Update polytope_blmos.jl
WenjieXiao-2022 May 7, 2024
b1133e1
Update node.jl
WenjieXiao-2022 May 7, 2024
397dd85
Update node.jl
WenjieXiao-2022 May 7, 2024
9c0d94c
Update utilities.jl
WenjieXiao-2022 May 7, 2024
05a0082
Update node.jl
WenjieXiao-2022 May 7, 2024
fcef8ee
Update utilities.jl
WenjieXiao-2022 May 7, 2024
ce4888b
Update utilities.jl;
WenjieXiao-2022 May 7, 2024
d6909aa
Update node.jl
WenjieXiao-2022 May 7, 2024
0d7820d
Update node.jl
WenjieXiao-2022 May 7, 2024
ff57813
Update node.jl
WenjieXiao-2022 May 7, 2024
c6e62f6
Update utilities.jl
WenjieXiao-2022 May 7, 2024
56fc776
Update utilities.jl
WenjieXiao-2022 May 7, 2024
44b6ee5
Update utilities.jl
WenjieXiao-2022 May 7, 2024
30988ba
Update utilities.jl
WenjieXiao-2022 May 7, 2024
97cbf79
Update utilities.jl
WenjieXiao-2022 May 7, 2024
8ed2be6
Update utilities.jl
WenjieXiao-2022 May 7, 2024
38c79c7
Update polytope_blmos.jl;
WenjieXiao-2022 May 7, 2024
1f7ca99
Update utilities.jl
WenjieXiao-2022 May 7, 2024
46ea130
Update utilities.jl
WenjieXiao-2022 May 7, 2024
9643849
Update node.jl
WenjieXiao-2022 May 7, 2024
abac966
Update frank_wolfe_variants.jl
WenjieXiao-2022 May 7, 2024
0cf25ee
Update frank_wolfe_variants.jl
WenjieXiao-2022 May 7, 2024
e91da16
Update utilities.jl
WenjieXiao-2022 May 7, 2024
65c04a5
Update utilities.jl
WenjieXiao-2022 May 7, 2024
c69500d
Update utilities.jl
WenjieXiao-2022 May 7, 2024
80597e9
Update utilities.jl
WenjieXiao-2022 May 7, 2024
95d75c8
Update utilities.jl
WenjieXiao-2022 May 7, 2024
c8cfbc4
Update utilities.jl
WenjieXiao-2022 May 7, 2024
d5d0c89
Update node.jl
WenjieXiao-2022 May 9, 2024
eb31bbe
Update polytope_blmos.jl
WenjieXiao-2022 May 9, 2024
bd99592
Update utilities.jl
WenjieXiao-2022 May 9, 2024
8d13f5b
Update node.jl
WenjieXiao-2022 May 9, 2024
8b7b004
Update node.jl
WenjieXiao-2022 May 9, 2024
73f2683
Update utilities.jl
WenjieXiao-2022 May 9, 2024
67d48c0
Update node.jl
WenjieXiao-2022 May 9, 2024
652f1b6
Update utilities.jl
WenjieXiao-2022 May 9, 2024
65a6aaa
Update node.jl
WenjieXiao-2022 May 9, 2024
2618175
Update utilities.jl
WenjieXiao-2022 May 9, 2024
8f2b2f4
Update utilities.jl; test
WenjieXiao-2022 May 9, 2024
52b0695
Update utilities.jl
WenjieXiao-2022 May 9, 2024
3cdac5d
Update utilities.jl
WenjieXiao-2022 May 9, 2024
12231c6
Update utilities.jl
WenjieXiao-2022 May 9, 2024
f2add9a
Update node.jl
WenjieXiao-2022 May 9, 2024
9c2a438
Update utilities.jl
WenjieXiao-2022 May 9, 2024
c66b4cc
Update utilities.jl; tst
WenjieXiao-2022 May 9, 2024
c0ec4d9
Update utilities.jl; testing
WenjieXiao-2022 May 9, 2024
463b1b4
Update utilities.jl
WenjieXiao-2022 May 9, 2024
402a0e5
Update utilities.jl
WenjieXiao-2022 May 9, 2024
c0c2b6b
Update polytope_blmos.jl
WenjieXiao-2022 May 9, 2024
0df9272
Update frank_wolfe_variants.jl
WenjieXiao-2022 May 9, 2024
b8f8581
Update node.jl
WenjieXiao-2022 May 9, 2024
8c59e15
Update polytope_blmos.jl
WenjieXiao-2022 May 11, 2024
aaf592a
Update node.jl
WenjieXiao-2022 May 11, 2024
447bb82
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
95bb632
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
95a450d
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
a2a7234
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
e873398
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
f21d347
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
ecc5c0a
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
fdf2e5b
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
e591f74
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
b3bf6a8
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
c58c73d
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
aee1ab5
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
f2ce733
Update polytope_blmos.jl
WenjieXiao-2022 May 12, 2024
45ca6e0
Update Boscia.jl
WenjieXiao-2022 May 15, 2024
2afc284
Update polytope_blmos.jl
WenjieXiao-2022 May 15, 2024
b858c05
Update polytope_blmos.jl
WenjieXiao-2022 May 15, 2024
fce5283
Update time_tracking_lmo.jl
WenjieXiao-2022 May 15, 2024
356f3e5
Update polytope_blmos.jl
WenjieXiao-2022 May 16, 2024
3eeee06
Update managed_blmo.jl; update dicg_split_active_set
WenjieXiao-2022 May 16, 2024
73cdbb5
Update node.jl
WenjieXiao-2022 May 16, 2024
8c08bb4
Update blmo_interface.jl
WenjieXiao-2022 May 16, 2024
a96625a
Update managed_blmo.jl
WenjieXiao-2022 May 16, 2024
798552e
Update node.jl
WenjieXiao-2022 May 16, 2024
d56886f
Update polytope_blmos.jl
WenjieXiao-2022 May 16, 2024
05591ad
Update polytope_blmos.jl
WenjieXiao-2022 May 16, 2024
eb9774e
Update time_tracking_lmo.jl
WenjieXiao-2022 May 25, 2024
e9ebbdf
Update polytope_blmos.jl
WenjieXiao-2022 May 25, 2024
dd028bc
Update frank_wolfe_variants.jl
WenjieXiao-2022 May 25, 2024
7b168ef
Update polytope_blmos.jl
WenjieXiao-2022 May 25, 2024
e368aaa
Update polytope_blmos.jl
WenjieXiao-2022 May 25, 2024
c81dce6
Update time_tracking_lmo.jl;
WenjieXiao-2022 May 25, 2024
c6f6ffa
Update polytope_blmos.jl
WenjieXiao-2022 May 25, 2024
2d40d6e
Update time_tracking_lmo.jl
WenjieXiao-2022 May 25, 2024
91d798c
Update MOI_bounded_oracle.jl;
WenjieXiao-2022 May 27, 2024
dc6f408
Update polytope_blmos.jl
WenjieXiao-2022 May 27, 2024
05dce7c
Update interface.jl;
WenjieXiao-2022 Jul 29, 2024
fae9ac6
Update node.jl
WenjieXiao-2022 Jul 29, 2024
e22ed4c
Update utilities.jl;
WenjieXiao-2022 Jul 29, 2024
eb5efa5
Update frank_wolfe_variants.jl
WenjieXiao-2022 Jul 29, 2024
b372d27
Update node.jl;
WenjieXiao-2022 Jul 30, 2024
144550a
Update frank_wolfe_variants.jl
WenjieXiao-2022 Jul 30, 2024
dfb42af
Update utilities.jl
WenjieXiao-2022 Aug 3, 2024
a0c5f44
Merge branch 'ZIB-IOL:main' into main
WenjieXiao-2022 Aug 21, 2024
d954f7a
Update MOI_bounded_oracle.jl
WenjieXiao-2022 Aug 21, 2024
f8f65dc
Add files via upload
WenjieXiao-2022 Aug 29, 2024
050cb48
Create examples
WenjieXiao-2022 Sep 25, 2024
95a7202
Add files via upload
WenjieXiao-2022 Sep 25, 2024
ad1bc5c
Add files via upload
WenjieXiao-2022 Sep 25, 2024
8550101
Merge branch 'ZIB-IOL:main' into main
WenjieXiao-2022 Sep 25, 2024
554cbcf
Update callbacks.jl
WenjieXiao-2022 Sep 25, 2024
33d36de
Update frank_wolfe_variants.jl
WenjieXiao-2022 Sep 25, 2024
575f429
Update interface.jl
WenjieXiao-2022 Sep 25, 2024
2e1e954
Update node.jl
WenjieXiao-2022 Sep 25, 2024
8a17168
Update polytope_blmos.jl
WenjieXiao-2022 Sep 25, 2024
6924c0a
Update callbacks.jl
WenjieXiao-2022 Sep 25, 2024
fecb6bd
Update time_tracking_lmo.jl
WenjieXiao-2022 Sep 25, 2024
e1f41f6
reconstruct callback
WenjieXiao-2022 Oct 22, 2024
25362a6
shorten some functions
WenjieXiao-2022 Oct 22, 2024
8eb32f5
added dicg start point related functions
WenjieXiao-2022 Oct 23, 2024
3e5e8ec
Update frank_wolfe_variants.jl
WenjieXiao-2022 Oct 23, 2024
b5daada
Add files via upload
WenjieXiao-2022 Oct 23, 2024
c82e200
Merge branch 'ZIB-IOL:main' into main
WenjieXiao-2022 Oct 24, 2024
a16dcea
Merge branch 'ZIB-IOL:main' into main
WenjieXiao-2022 Oct 27, 2024
c576225
corrected the arguments
WenjieXiao-2022 Dec 4, 2024
0493cd3
corrected the arguments
WenjieXiao-2022 Dec 4, 2024
1a1688d
typo
WenjieXiao-2022 Dec 4, 2024
03a86fc
typo
WenjieXiao-2022 Dec 4, 2024
7eb4969
resolved conflicts
WenjieXiao-2022 Dec 4, 2024
d0e8bf0
resolved conflicts
WenjieXiao-2022 Dec 4, 2024
4e30f4e
resolved conflicts
WenjieXiao-2022 Dec 4, 2024
e7193d4
resolved conflicts
WenjieXiao-2022 Dec 4, 2024
840feaf
Update node.jl
WenjieXiao-2022 Dec 4, 2024
88f9248
resolved conflicts
WenjieXiao-2022 Dec 4, 2024
3e1fb39
Merge branch 'ZIB-IOL:main' into main
WenjieXiao-2022 Dec 4, 2024
563a995
in-face check for pre_computed_set
WenjieXiao-2022 Dec 4, 2024
82673b6
specify sanity check for non-DICG
WenjieXiao-2022 Dec 4, 2024
b148003
run with DICG()
WenjieXiao-2022 Dec 13, 2024
573f447
using seed 5
WenjieXiao-2022 Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/Boscia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ module Boscia
using FrankWolfe
import FrankWolfe: compute_extreme_point
export compute_extreme_point
#=====================================================#
WenjieXiao-2022 marked this conversation as resolved.
Show resolved Hide resolved
import FrankWolfe: is_decomposition_invariant_oracle
export is_decomposition_invariant_oracle

import FrankWolfe: compute_inface_extreme_point
export compute_inface_extreme_point

import FrankWolfe: dicg_maximum_step
export dicg_maximum_step
#=====================================================#
using Random
import Bonobo
using Printf
Expand Down
79 changes: 65 additions & 14 deletions src/frank_wolfe_variants.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,65 @@ end

Base.print(io::IO, ::BPCG) = print(io, "Blended Pairwise Conditional Gradient")

#===============================================================================================#
"""
Vanilla-Frank-Wolfe
DICG-Frank-Wolfe

The Decomposition-invariant Frank-Wolfe.

"""
struct DICG <: FrankWolfeVariant end

function solve_frank_wolfe(
frank_wolfe_variant::DICG,
f,
grad!,
lmo,
active_set;
line_search::FrankWolfe.LineSearchMethod=FrankWolfe.Adaptive(),
epsilon=1e-7,
max_iteration=10000,
add_dropped_vertices=false,
use_extra_vertex_storage=false,
extra_vertex_storage=nothing,
callback=nothing,
lazy=false,
lazy_tolerance=2.0,
timeout=Inf,
verbose=false,
workspace=nothing,
)
x0 = FrankWolfe.compute_active_set_iterate!(active_set)
println("lmo:")
println(lmo.blmo.lower_bounds)
println(lmo.blmo.upper_bounds)

# Observe that the lazy flag is only observed if away_steps is set to true, so it can neglected.
x, _, primal, dual_gap, _ = FrankWolfe.decomposition_invariant_conditional_gradient(
f,
grad!,
lmo,
x0;
line_search=line_search,
epsilon=epsilon,
max_iteration=max_iteration,
verbose=verbose,
timeout=timeout,
lazy=lazy,
linesearch_workspace=workspace,
lazy_tolerance=lazy_tolerance,
)
println("x solution:")
println(x)
active_set = FrankWolfe.ActiveSet([(1.0, x)])
return x, primal, dual_gap, active_set
end

Base.print(io::IO, ::DICG) = print(io, "Decompostion-Invariant-Frank-Wolfe")

The standard variant of Frank-Wolfe. In each iteration, the vertex v minimizing ∇f * (x-v) is computed.
"""
Vanilla-Frank-Wolfe

Lazification cannot be used in this setting.
"""
struct VanillaFrankWolfe <: FrankWolfeVariant end

Expand All @@ -199,26 +252,24 @@ function solve_frank_wolfe(
verbose=false,
workspace=nothing,
)
# If the flag away_steps is set to false, away_frank_wolfe performs Vanilla.
x0 = FrankWolfe.compute_active_set_iterate!(active_set)

# Observe that the lazy flag is only observed if away_steps is set to true, so it can neglected.
x, _, primal, dual_gap, _, active_set = FrankWolfe.away_frank_wolfe(
x, _, primal, dual_gap, _ = FrankWolfe.frank_wolfe(
f,
grad!,
lmo,
active_set,
away_steps=false,
x0;
line_search=line_search,
epsilon=epsilon,
max_iteration=max_iteration,
line_search=line_search,
callback=callback,
timeout=timeout,
add_dropped_vertices=add_dropped_vertices,
use_extra_vertex_storage=use_extra_vertex_storage,
extra_vertex_storage=extra_vertex_storage,
verbose=verbose,
timeout=timeout,
linesearch_workspace=workspace,
)

active_set = FrankWolfe.ActiveSet([(1.0, x)])
return x, primal, dual_gap, active_set
end

Base.print(io::IO, ::VanillaFrankWolfe) = print(io, "Vanilla-Frank-Wolfe")
#==========================================================================================#
2 changes: 2 additions & 0 deletions src/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ function solve(
println("\t Additional kwargs: ", join(keys(kwargs), ","))
end


println("Boscia-version")
n, _ = get_list_of_variables(blmo)

integer_variables = Vector{Int}()
Expand Down
34 changes: 34 additions & 0 deletions src/managed_blmo.jl
WenjieXiao-2022 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,40 @@ function compute_extreme_point(blmo::ManagedBoundedLMO, d; kwargs...)
return v
end

#================================================================================================================#
function is_decomposition_invariant_oracle(blmo::ManagedBoundedLMO)
return is_decomposition_invariant_oracle_simple(blmo.simple_lmo)
end

# Provide FrankWolfe.compute_inface_extreme_point
function compute_inface_extreme_point(blmo::ManagedBoundedLMO, direction, x; kwargs...)
time_ref = Dates.now()
a = bounded_compute_inface_extreme_point(
blmo.simple_lmo,
direction,
x,
blmo.lower_bounds,
blmo.upper_bounds,
blmo.int_vars,
)

blmo.solving_time = float(Dates.value(Dates.now() - time_ref))
return a
end

#Provide FrankWolfe.dicg_maximum_step
function dicg_maximum_step(blmo::ManagedBoundedLMO, x, direction; kwargs...)
return bounded_dicg_maximum_step(
blmo.simple_lmo,
x,
direction,
blmo.lower_bounds,
blmo.upper_bounds,
blmo.int_vars,
)
end
#================================================================================================================#

# Read global bounds from the problem.
function build_global_bounds(blmo::ManagedBoundedLMO, integer_variables)
global_bounds = IntegerBounds()
Expand Down
25 changes: 20 additions & 5 deletions src/node.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ mutable struct FrankWolfeNode{
local_potential_tightenings::Int
dual_gap::Float64
end

"""
Create the information of the new branching nodes
based on their parent and the index of the branching variable
Expand All @@ -69,6 +68,9 @@ function Bonobo.get_branching_nodes_info(tree::Bonobo.BnBTree, node::FrankWolfeN
error("Splitting on the same index as parent! Abort!")
end

println("Splitted Variable idx:")
println(vidx)

# get iterate, primal and lower bound
x = Bonobo.get_relaxed_values(tree, node)
primal = tree.root.problem.f(x)
Expand All @@ -77,12 +79,23 @@ function Bonobo.get_branching_nodes_info(tree::Bonobo.BnBTree, node::FrankWolfeN

# In case of strong convexity, check if a child can be pruned
prune_left, prune_right = prune_children(tree, node, lower_bound_base, x, vidx)
#================================================================================#
#different ways to split active set
if !(tree.root.options[:variant] == DICG() || tree.root.options[:variant] == VanillaFrankWolfe() )
# Split active set
active_set_left, active_set_right =
split_vertices_set!(node.active_set, tree, vidx, node.local_bounds)
else
if (typeof(tlmo.blmo.sblmo) == CubeSimpleBLMO)
lb, ub = build_node_bounds_all_idx(sblmo, node.local_bounds, tlmo.blmo.n)
end
active_set_left, active_set_right =
dicg_split_vertices_set!(x, lb, ub, vidx)
end
#================================================================================#

# Split active set
active_set_left, active_set_right =
split_vertices_set!(node.active_set, tree, vidx, node.local_bounds)
discarded_set_left, discarded_set_right =
split_vertices_set!(node.discarded_vertices, tree, vidx, x, node.local_bounds)
split_vertices_set!(node.discarded_vertices, tree, vidx, x, node.local_bounds)

# Sanity check
@assert isapprox(sum(active_set_left.weights), 1.0)
Expand Down Expand Up @@ -266,6 +279,8 @@ function Bonobo.evaluate_node!(tree::Bonobo.BnBTree, node::FrankWolfeNode)
# Check feasibility of the iterate
active_set = node.active_set
x = FrankWolfe.compute_active_set_iterate!(node.active_set)
println("Active set:")
println(node.active_set)
@assert is_linear_feasible(tree.root.problem.tlmo, x)
for (_, v) in node.active_set
@assert is_linear_feasible(tree.root.problem.tlmo, v)
Expand Down
Loading