Skip to content

Instantly share code, notes, and snippets.

View frapac's full-sized avatar

François Pacaud frapac

View GitHub Profile
using MathOptInterface
using MathOptFormat
using Dualization
const MOI = MathOptInterface
const MOIU = MathOptInterface.Utilities
const MOF = MathOptFormat
# Mock model
MOIU.@model(TestModel,
@frapac
frapac / LinearSolvers.jl
Created June 7, 2021 21:19
An abstract interface for (direct and iterative) linear solvers.
abstract type AbstractLinearSolver end
"""
introduce(solver::AbstractLinearSolver)
Print the name of the linear system.
"""
function introduce end
abstract type AbstractKKTSystem end
"Assemble KKT matrix."
function compress! end
"Factorize KKT matrix with given linear solver."
function factorize! end
"Solve KKT system `Wx = b` with given linear solver."
@frapac
frapac / benchmark_kernels.jl
Created August 25, 2023 09:00
Benchmark MadNLP's kernels
using BenchmarkTools
using CUTEst
using MadNLP
name = "OPTMASS"
nlp = CUTEst.CUTEstModel(name)
solver = MadNLP.MadNLPSolver(nlp)