API reference
CoolPDLP.Algorithm — Type
AlgorithmFields
conversion::CoolPDLP.ConversionParameterspreconditioning::CoolPDLP.PreconditioningParameters{T} where T<:Numberstep_size::CoolPDLP.StepSizeParametersrestart::CoolPDLP.RestartParametersgeneric::CoolPDLP.GenericParameterstermination::CoolPDLP.TerminationParameters
CoolPDLP.Algorithm — Method
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.
CoolPDLP.GPUSparseMatrixCOO — Type
GPUSparseMatrixCOOFields
m::Int64n::Int64rowval::DenseVector{Ti} where Ti<:Integercolval::DenseVector{Ti} where Ti<:Integernzval::DenseVector{T} where T<:Number
CoolPDLP.GPUSparseMatrixCSR — Type
GPUSparseMatrixCSRFields
m::Int64n::Int64rowptr::DenseVector{Ti} where Ti<:Integercolval::DenseVector{Ti} where Ti<:Integernzval::DenseVector{T} where T<:Number
CoolPDLP.GPUSparseMatrixELL — Type
GPUSparseMatrixELLFields
m::Int64n::Int64colval::DenseMatrix{Ti} where Ti<:Integernzval::DenseMatrix{T} where T<:Number
CoolPDLP.MILP — Type
MILPRepresent a Mixed Integer Linear Program in "cuPDLPx form":
min cᵀx s.t. lv ≤ x ≤ uv
lc ≤ A * x ≤ ucConstructor
MILP(;
c, lv, uv, A, lc, uc,
[D1, D2, int_var, var_names, dataset, name, path]
)Fields
c::DenseVector{T} where T<:Number: objective vectorlv::DenseVector{T} where T<:Number: variable lower bounduv::DenseVector{T} where T<:Number: variable upper boundA::AbstractMatrix{T} where T<:Number: constraint matrixAt::AbstractMatrix{T} where T<:Number: transposed constraint matrixlc::DenseVector{T} where T<:Number: constraint lower bounduc::DenseVector{T} where T<:Number: constraint upper boundD1::LinearAlgebra.Diagonal{T, V} where {T<:Number, V<:DenseVector{T}}: left preconditionerD2::LinearAlgebra.Diagonal{T, V} where {T<:Number, V<:DenseVector{T}}: right preconditionerint_var::DenseVector{Bool}: which variables must be integersvar_names::Vector{String}: variable namesdataset::String: source datasetname::String: instance name (last part of the path)path::String: file path the MILP was read from
CoolPDLP.MILP — Method
MILP(qps::QPSData; kwargs...)Construct a MILP from a QPSData object generated by QPSReader.jl.
CoolPDLP.Optimizer — Type
OptimizerSolver type compatible with JuMP, which calls an algorithm from CoolPDLP under the hood.
Its options are the same as the keyword arguments of Algorithm.
CoolPDLP.PrimalDualSolution — Type
PrimalDualSolutionFields
x::DenseVector{T} where T<:Numbery::DenseVector{T} where T<:Number
CoolPDLP.PDHG — Method
PDHG(args...; kwargs...)Shortcut for Algorithm{:PDHG} with some defaults disabled.
CoolPDLP.PDLP — Method
PDLP(args...; kwargs...)Shortcut for Algorithm{:PDLP}.
CoolPDLP.initialize — Function
initialize(milp, sol, algo)Initialize the appropriate state for solving milp starting from sol with the algorithm defined by algo.
CoolPDLP.is_feasible — Method
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 satisfactionint_tol: tolerance for integrality requirementsverbose: whether to display warnings
CoolPDLP.nbcons — Method
nbcons(milp)Return the number of constraints in milp, not including variable bounds or integrality requirements.
CoolPDLP.nbcons_eq — Method
nbcons_eq(milp)Return the number of equality constraints in milp.
CoolPDLP.nbcons_ineq — Method
nbcons_ineq(milp)Return the number of inequality constraints in milp, not including variable bounds.
CoolPDLP.nbvar — Method
nbvar(milp)Return the number of variables in milp.
CoolPDLP.nbvar_cont — Method
nbvar_cont(milp)Return the number of integer variables in milp.
CoolPDLP.nbvar_int — Method
nbvar_int(milp)Return the number of integer variables in milp.
CoolPDLP.objective_value — Method
objective_value(x, milp)Compute the value of the linear objective of milp at solution vector x.
CoolPDLP.preprocess — Method
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).
CoolPDLP.solve! — Function
solve!(state, milp, algo)Modify state in-place to solve the continuous relaxation of milp using the algorithm defined by algo.
CoolPDLP.solve — Method
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.