From 07a5779da2df8419390efbcc1ea958e2e910ad6b Mon Sep 17 00:00:00 2001 From: Joris Gillis Date: Sun, 14 Jul 2024 23:52:04 +0200 Subject: [PATCH] work --- compiler/generate_precompile.jl | 2 +- src/MadNLP_C.jl | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/compiler/generate_precompile.jl b/compiler/generate_precompile.jl index b98c6bf..916910f 100644 --- a/compiler/generate_precompile.jl +++ b/compiler/generate_precompile.jl @@ -121,7 +121,7 @@ primal_feas::Vector{Float64} = [] dual_feas::Vector{Float64} = [] -cases::Vector{Tuple{Int,Int,Int}} = [(0,3,10)] +cases::Vector{Tuple{Int,Int,Int}} = [(0,3,10),(3,2,1000),(5,0,10)] # cases::Vector{Tuple{Int,Int,Int}} = [(0,3,10),(2,2,1000),(1,1,1000),(0,0,1000)] for (lin_solver_id,print_level, max_iters) in cases nlp_interface = MadnlpCInterface( diff --git a/src/MadNLP_C.jl b/src/MadNLP_C.jl index 57ddb10..7b873b2 100644 --- a/src/MadNLP_C.jl +++ b/src/MadNLP_C.jl @@ -301,7 +301,7 @@ Base.@ccallable function madnlp_c_create(nlp_interface::Ptr{MadnlpCInterface}):: solver = MadnlpCSolver() solver.nlp_interface = unsafe_load(nlp_interface) solver.lin_solver_id = 0 - solver.max_iters = 1000 + solver.max_iters = 3000 solver.print_level = 5 solver.minimize = true @@ -309,8 +309,10 @@ Base.@ccallable function madnlp_c_create(nlp_interface::Ptr{MadnlpCInterface}):: solver.in = MadnlpCNumericIn{Vector{Float64}}() - # @info "nw" interf.nw - # @info "nc" interf.nc + @info "interf" interf + + @info "nw" interf.nw + @info "nc" interf.nc solver.in.x0 = fill(0.0, interf.nw) solver.in.l0 = fill(0.0, interf.nc)