API reference

CoolPDLP.AlgorithmType
Algorithm

Fields

  • conversion::CoolPDLP.ConversionParameters

  • preconditioning::CoolPDLP.PreconditioningParameters{T} where T<:Number

  • step_size::CoolPDLP.StepSizeParameters

  • restart::CoolPDLP.RestartParameters

  • generic::CoolPDLP.GenericParameters

  • termination::CoolPDLP.TerminationParameters

source
CoolPDLP.AlgorithmMethod
Algorithm{:ALGNAME}(
    # conversion
    _T::Type{T} = Float64,
    ::Type{Ti} = Int,
    ::Type{M} = SparseMatrixCSC;
    backend::B = CPU(),
    # preconditioning
    chambolle_pock_alpha = 1.0,
    ruiz_iter = 10,
    # step sizes
    invnorm_scaling = 0.9,
    primal_weight_damping = 0.5,
    zero_tol = 1.0e-8,
    # restart
    sufficient_decay = 0.2,
    necessary_decay = 0.8,
    artificial_decay = 0.36,
    # generic
    show_progress = false,
    check_every = 100,
    record_error_history = true,
    # termination
    termination_reltol = 1.0e-4,
    max_kkt_passes = 10^5,
    time_limit = 100.0,
)

Constructor for algorithm configs.

source
CoolPDLP.GPUSparseMatrixCOOType
GPUSparseMatrixCOO

Fields

  • m::Int64

  • n::Int64

  • rowval::DenseVector{Ti} where Ti<:Integer

  • colval::DenseVector{Ti} where Ti<:Integer

  • nzval::DenseVector{T} where T<:Number

source
CoolPDLP.GPUSparseMatrixCSRType
GPUSparseMatrixCSR

Fields

  • m::Int64

  • n::Int64

  • rowptr::DenseVector{Ti} where Ti<:Integer

  • colval::DenseVector{Ti} where Ti<:Integer

  • nzval::DenseVector{T} where T<:Number

source
CoolPDLP.MILPType
MILP

Represent a Mixed Integer Linear Program in "cuPDLPx form":

min cᵀx   s.t.   lv ≤ x ≤ uv
                 lc ≤ A * x ≤ uc

Constructor

MILP(;
    c, lv, uv, A, lc, uc,
    [D1, D2, int_var, var_names, dataset, name, path]
)

Fields

  • c::DenseVector{T} where T<:Number: objective vector

  • lv::DenseVector{T} where T<:Number: variable lower bound

  • uv::DenseVector{T} where T<:Number: variable upper bound

  • A::AbstractMatrix{T} where T<:Number: constraint matrix

  • At::AbstractMatrix{T} where T<:Number: transposed constraint matrix

  • lc::DenseVector{T} where T<:Number: constraint lower bound

  • uc::DenseVector{T} where T<:Number: constraint upper bound

  • D1::LinearAlgebra.Diagonal{T, V} where {T<:Number, V<:DenseVector{T}}: left preconditioner

  • D2::LinearAlgebra.Diagonal{T, V} where {T<:Number, V<:DenseVector{T}}: right preconditioner

  • int_var::DenseVector{Bool}: which variables must be integers

  • var_names::Vector{String}: variable names

  • dataset::String: source dataset

  • name::String: instance name (last part of the path)

  • path::String: file path the MILP was read from

source
CoolPDLP.OptimizerType
Optimizer

Solver type compatible with JuMP, which calls an algorithm from CoolPDLP under the hood.

Its options are the same as the keyword arguments of Algorithm.

source
CoolPDLP.initializeFunction
initialize(milp, sol, algo)

Initialize the appropriate state for solving milp starting from sol with the algorithm defined by algo.

source
CoolPDLP.is_feasibleMethod
is_feasible(x, milp[; cons_tol=1e-6, int_tol=1e-5, verbose=true])

Check whether solution vector x is feasible for milp.

Keyword arguments

  • cons_tol: tolerance for constraint satisfaction
  • int_tol: tolerance for integrality requirements
  • verbose: whether to display warnings
source
CoolPDLP.nbconsMethod
nbcons(milp)

Return the number of constraints in milp, not including variable bounds or integrality requirements.

source
CoolPDLP.nbcons_ineqMethod
nbcons_ineq(milp)

Return the number of inequality constraints in milp, not including variable bounds.

source
CoolPDLP.preprocessMethod
preprocess(milp_init, sol_init, algo)

Apply preconditioning, type conversion and device transfer to milp_init and sol_init for the algorithm defined by algo.

Return a tuple (milp, sol).

source
CoolPDLP.solve!Function
solve!(state, milp, algo)

Modify state in-place to solve the continuous relaxation of milp using the algorithm defined by algo.

source
CoolPDLP.solveMethod
solve(milp, sol, algo)
solve(milp, algo)

Solve the continuous relaxation of milp starting from solution sol using the algorithm defined by algo.

Return a couple (sol, stats) where sol is the last solution and stats contains convergence information.

source