Skip to content

Commit 4414c41

Browse files
Merge branch 'JuliaSmoothOptimizers:master' into LM-update
2 parents d0a12c9 + 9109051 commit 4414c41

File tree

14 files changed

+1139
-28
lines changed

14 files changed

+1139
-28
lines changed

.cirrus.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,7 @@ task:
55
image_family: freebsd-13-3
66
env:
77
matrix:
8-
- JULIA_VERSION: 1.6
98
- JULIA_VERSION: 1
10-
- name: musl Linux
11-
container:
12-
image: alpine:3.14
13-
env:
14-
- JULIA_VERSION: 1
15-
- name: MacOS M1
16-
macos_instance:
17-
image: ghcr.io/cirruslabs/macos-monterey-base:latest
18-
env:
19-
- JULIA_VERSION: 1
209
install_script: |
2110
URL="https://raw.githubusercontent.com/ararslan/CirrusCI.jl/master/bin/install.sh"
2211
set -x
@@ -32,7 +21,6 @@ task:
3221
sh -c "$(fetch ${URL} -o -)"
3322
fi
3423
build_script:
35-
- julia --color=yes --project=. -e 'using Pkg; pkg = PackageSpec(url = "https://github.com/JuliaSmoothOptimizers/ShiftedProximalOperators.jl.git", rev = "master"); Pkg.add([pkg])'
3624
- cirrusjl build
3725
test_script:
3826
- cirrusjl test

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
version:
16-
- '1.6'
16+
- '1.10'
1717
- '1'
1818
- 'nightly'
1919
os:

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ LinearOperators = "5c8ed15e-5a4c-59e4-a42b-c7e8811fb125"
99
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
1010
NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6"
1111
NLPModelsModifiers = "e01155f1-5c6f-4375-a9d8-616dd036575f"
12+
Percival = "01435c0c-c90d-11e9-3788-63660f8fbccc"
1213
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1314
ProximalOperators = "a725b495-10eb-56fe-b38b-717eba820537"
1415
RegularizedProblems = "ea076b23-609f-44d2-bb12-a4ae45328278"
@@ -17,9 +18,10 @@ SolverCore = "ff4d7338-4cf1-434d-91df-b86cb86fb843"
1718
TSVD = "9449cd9e-2762-5aa3-a617-5413e99d722e"
1819

1920
[compat]
20-
LinearOperators = "2.7"
21+
LinearOperators = "2.9"
2122
NLPModels = "0.19, 0.20"
2223
NLPModelsModifiers = "0.7"
24+
Percival = "0.7.2"
2325
ProximalOperators = "0.15"
2426
RegularizedProblems = "0.1.1"
2527
ShiftedProximalOperators = "0.2"

examples/demo-cutest.jl

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
using NLPModels, CUTEst
2+
using ProximalOperators
3+
using RegularizedOptimization
4+
5+
problem_name = "HS8"
6+
nlp = CUTEstModel(problem_name)
7+
@assert !has_bounds(nlp)
8+
@assert equality_constrained(nlp)
9+
10+
h = NormL1(1.0)
11+
12+
stats = AL(nlp, h, atol = 1e-6, verbose = 1)
13+
print(stats)
14+
15+
using RegularizedProblems
16+
17+
regnlp = RegularizedNLPModel(nlp, h)
18+
stats = AL(regnlp, atol = 1e-6, verbose = 1)
19+
print(stats)
20+
21+
solver = ALSolver(regnlp)
22+
stats = solve!(solver, regnlp, atol = 1e-6, verbose = 1)
23+
print(stats)
24+
25+
using SolverCore
26+
27+
stats = GenericExecutionStats(nlp)
28+
solver = ALSolver(regnlp)
29+
stats = solve!(solver, regnlp, stats, atol = 1e-6, verbose = 1)
30+
print(stats)
31+
32+
callback =
33+
(regnlp, solver, stats) -> begin
34+
@info "iter $(stats.iter), obj $(stats.objective), status $(stats.status)"
35+
end
36+
stats = AL(nlp, h, atol = 1e-6, verbose = 1, callback = callback)
37+
print(stats)
38+
39+
callback =
40+
(regnlp, solver, stats) -> begin
41+
@info "iter $(stats.iter), f $(stats.solver_specific[:smooth_obj]), h $(stats.solver_specific[:nonsmooth_obj])"
42+
end
43+
stats = AL(nlp, h, atol = 1e-6, verbose = 1, callback = callback)
44+
print(stats)
45+
46+
finalize(nlp)

0 commit comments

Comments
 (0)