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

Add AbstractKKTSystem structure #58

Merged
merged 10 commits into from
Aug 29, 2021
7 changes: 3 additions & 4 deletions src/Interfaces/NLPModels_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ status_translator = Dict(
MAXIMUM_WALLTIME_EXCEEDED=>:max_time)

function madnlp(model::AbstractNLPModel;kwargs...)

nlp = NonlinearProgram(model)
ips = Solver(nlp;kwargs...)
# seems that some CUTEst model requires this
ips.f.=0
ips.f.=0
ips.c.=0
ips.jac.=0
ips.hess.=0
initialize!(ips.kkt)
ips.zl.=0
ips.zu.=0
# ------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions src/MadNLP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ introduce() = "MadNLP version v$(version())"
# Linear solver dependencies
include("enums.jl")
include("utils.jl")
include("options.jl")
include("nonlinearprogram.jl")
include("matrixtools.jl")
include(joinpath("LinearSolvers","linearsolvers.jl"))
include(joinpath("kktsystem.jl"))
include(joinpath("interiorpointsolver.jl"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can

include("kktsystem.jl")
include("interiorpointsolver.jl")

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

include(joinpath("Interfaces","interfaces.jl"))

Expand Down
5 changes: 5 additions & 0 deletions src/enums.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
INERTIA_BASED = 2,
INERTIA_FREE = 3)

@enum(KKTLinearSystem::Int,
SPARSE_KKT_SYSTEM = 1,
SPARSE_UNREDUCED_KKT_SYSTEM = 2,
DENSE_KKT_SYSTEM = 3)

@enum(Status::Int,
SOLVE_SUCCEEDED = 1,
SOLVED_TO_ACCEPTABLE_LEVEL = 2,
Expand Down
Loading