juliasmoothoptimizers / cannoles.jl Goto Github PK
View Code? Open in Web Editor NEWConstrained and NoNlinear Optimizer of Least Squares
License: Other
Constrained and NoNlinear Optimizer of Least Squares
License: Other
@JuliaRegistrator register()
I tried to solve the following problem modeled with PDENLPModels.jl
using Gridap, PDENLPModels
# Definition of the domain
n = 100
domain = (-1, 1, -1, 1)
partition = (n, n)
model = CartesianDiscreteModel(domain, partition)
# Definition of the spaces:
valuetype = Float64
reffe = ReferenceFE(lagrangian, valuetype, 2)
Xpde = TestFESpace(model, reffe; conformity = :H1, dirichlet_tags = "boundary")
y0(x) = 0.0
Ypde = TrialFESpace(Xpde, y0)
reffe_con = ReferenceFE(lagrangian, valuetype, 1)
Xcon = TestFESpace(model, reffe_con; conformity = :H1)
Ycon = TrialFESpace(Xcon)
Y = MultiFieldFESpace([Ypde, Ycon])
# Integration machinery
trian = Triangulation(model)
degree = 1
dΩ = Measure(trian, degree)
# Objective function:
yd(x) = -x[1]^2
α = 1e-2
function f(y, u)
∫(0.5 * (yd - y) * (yd - y) + 0.5 * α * u * u) * dΩ
end
# Definition of the constraint operator
ω = π - 1 / 8
h(x) = -sin(ω * x[1]) * sin(ω * x[2])
function res(y, u, v)
∫(∇(v) ⊙ ∇(y) - v * u - v * h) * dΩ
end
op = FEOperator(res, Y, Xpde)
npde = Gridap.FESpaces.num_free_dofs(Ypde)
ncon = Gridap.FESpaces.num_free_dofs(Ycon)
x0 = zeros(npde + ncon)
nlp = GridapPDENLPModel(x0, f, trian, Ypde, Ycon, Xpde, Xcon, op, name = "Control elastic membrane")
using CaNNOLeS, NLPModelsModifiers
nls = FeasibilityResidual(nlp)
stats_cannoles = cannoles(nls)
However, I get the following mysterious error:
┌ Warning: linsolve ma57 not available. Using :ldlfactorizations instead
└ @ CaNNOLeS .julia\packages\CaNNOLeS\CGoHr\src\CaNNOLeS.jl:60
[ Info: I #F fx Δt ‖∇L‖ ‖Fx - r‖ ‖c(x)‖ α η ρ δ in_it nbk
[ Info: 0 2 2.2e-04 0.0e+00 1.6e-07 0.0e+00 0.0e+00
ERROR: LoadError: AssertionError: LDLT.factor != nothing
Stacktrace:
[1] newton_system(x::Vector{Float64}, r::Vector{Float64}, λ::Vector{Float64}, Fx::Vector{Float64}, rhs::Vector{Float64}, LDLT::CaNNOLeS.LDLFactStruct, ρold::Float64, params::Dict{Symbol, Float64}, method::Symbol, linsolve::Symbol)
@ CaNNOLeS .julia\packages\CaNNOLeS\CGoHr\src\CaNNOLeS.jl:616
[2] cannoles(nls::FeasibilityResidual{Float64, Vector{Float64}}; x::Vector{Float64}, λ::Vector{Float64}, method::Symbol, merit::Symbol, linsolve::Symbol, max_f::Int64, max_time::Float64, max_inner::Int64, ϵtol::Float64, check_small_residual::Bool, always_accept_extrapolation::Bool, ϵkchoice::Symbol, δdec::Float64)
@ CaNNOLeS .julia\packages\CaNNOLeS\CGoHr\src\CaNNOLeS.jl:315
[3] cannoles(nls::FeasibilityResidual{Float64, Vector{Float64}})
@ CaNNOLeS .julia\packages\CaNNOLeS\CGoHr\src\CaNNOLeS.jl:50
Any idea?
My environment is the following:
[5a1c9e79] CaNNOLeS v0.5.3
[56d4f2e9] Gridap v0.15.5
[40e66cde] LDLFactorizations v0.8.1
[a4795742] NLPModels v0.18.1
[e01155f1] NLPModelsModifiers v0.5.1
[80da258d] PDENLPModels v0.3.0
In the recent pull requests, there seems to be an issue with the build of the documentation hanging forever...
There is a similar issue here: JuliaDocs/Documenter.jl#1414
I will investigate where the error is coming from.
It would be great to have some CI to test the usage of HSL in this solver.
@MonssafToukal @amontoison
Only one merit function is accepted, so I suggest to add a package issue and remove from the kwargs until done. #72
There are pieces of code here and there, but I don't think it works.
The current CITATION.bib refers to the research paper.
I am wondering if it should reflects more the package than the paper.
Following up the new possibilities of SolverCore 0.3
Connected to JuliaSmoothOptimizers/NLPModels.jl#429
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
To have uniform stopping with other JSO-solvers.
Right now there is just a ϵtol
that correspond to the relative tolerance I think.
Noticed here: https://github.com/orgs/JuliaSmoothOptimizers/discussions/33
It can be tested with a BundleAdjustmentModel, or a dummy model without hess.
@dpo, I'm thinking of making this public, so I can start testing with Travis and Appveyor. Any suggestions on what to do before that?
The parameter ϵkchoice
is not used in the algorithm L.47
PR #60 added a minimal structure, and we should pre-allocate here the memory used in the algorithm.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.