Developer reference

High level picture

The high precision SDPA solvers do not provide a library interface, only binary access. So SDPAFamily.jl takes the problem inputs from a MathOptInterface Optimizer object and writes them to a file in a temporary folder (in the SDPA format) and calls the binary. The binary reads the input file, solves the problem, and writes an output file. SDPAFamily.jl then reads the output file and populates the MathOptInterface Optimizer object.

Docstrings

SDPAFamily.ParamsType
struct Params{variant, T <: Number}

An object holding a list of parameters to be used by the solver, parametrized by the variant and numeric type. variant should be one of :sdpa_gmp, :sdpa_qd, :sdpa_dd or sdpa. The variant and numeric type are used to choose the default values for unspecified parameters; they are unused in the case that every parameter is specified.

Note

It is often simpler to simply pass non-default parameters directly to the optimizer as a NamedTuple; e.g. SDPAFamily.Optimizer(params = (maxIteration = 600,)).

Example

julia> using SDPAFamily

julia> P = SDPAFamily.Params{:sdpa_gmp, BigFloat}(maxIteration = 600)
SDPAFamily.Params{:sdpa_gmp, BigFloat}(600, 1.000000000000000083336420607585985350931336026868654502364509783548862515410206e-30, 10000.0, 2.0, -100000.0, 100000.0, 0.1000000000000000055511151231257827021181583404541015625, 0.299999999999999988897769753748434595763683319091796875, 0.90000000000000002220446049250313080847263336181640625, 1.000000000000000083336420607585985350931336026868654502364509783548862515410206e-30, 200, "%+.Fe", "%+.Fe", "%+.Fe", "%+.Fe")

julia> SDPAFamily.Optimizer(params = P)
SDPAFamily.Optimizer{BigFloat}

List of parameters

The following is a brief summary of the parameters. See the SDPA manual for more details.

  • maxIteration: number of iterations allowed
  • epsilonStar: constraint tolerance
  • epsilonDash: normalized duality gap tolerance
  • lambdaStar: determines initial point; should have the same order of magnitude as the optimal solution
  • omegaStar: determines region in which SDPA searches for an optimal solution; must be at least 1.0.
  • lowerBound, (resp. upperBound): bound on the primal (resp. dual) optimal objective value; serves as a stopping criteria
  • betaStar: parameter controlling the search direction for feasible points
  • betaBar: parameter controlling the search direction for infeasible points
  • gammaStar: reduction factor for the primal and dual step lengths
  • precision: number of significant bits used for SDPA-GMP; if set to b bits, then (log(2)/log(10)) * b is approximately the number of decimal digits of precision.
  • xPrint, XPrint, YPrint, infPrint: printf format specification used for printing the results to send them from the solver binary to Julia.
source
SDPAFamily.ParamsSettingType

Possible the parameter settings of an SDPAFamily.Optimizer. One can also pass a path to the params keyword argument to use a custom parameter file.

Options are DEFAULT, UNSTABLE_BUT_FAST, or STABLE_BUT_SLOW.

source
SDPAFamily.BB_PATHSConstant
BB_PATHS::Dict{Symbol,String}

Holds the binary-builder-built paths to the executables for sdpa_gmp, sdpa_dd, and sdpa_qd.

source
SDPAFamily.initializeSolveMethod
initializeSolve(optimizer::Optimizer)

Writes problem data into an SDPA-formatted file named input.dat-s. presolve.jl routine is applied as indicated by optimizer.presolve.

Returns a vector of indices for redundant constraints, which are omitted from the input file.

source
SDPAFamily.inputElementMethod
inputElement(optimizer::Optimizer, constr_number::Int, blk::Int, i::Int, j::Int, value::T) where T

Stores the constraint data in optimizer.elemdata as a vector of tuples. Each tuple corresponds to one line in the SDPA-formatted input file.

source
SDPAFamily.presolveMethod
presolve(optimizer::SDPAFamily.Optimizer{T}) where T

Identifies linearly dependent constraints in the problem. This is done by a naive Gaussian elimination.

Returns a vector with the indices of redundant constraints, which should be removed from the formulation. The rest of the constraints form a maximal linearly independent subset of the original set of constraints.

source
SDPAFamily.read_results!Method
read_results!(optimizer::Optimizer{T}, filepath::String, redundant_entries::Vector)

Populates optimizer with results in a SDPA-formatted output file specified by filepath. Redundant entries corresponding to linearly dependent constraints are set to 0.

source
SDPAFamily.reduce!Method
function reduce!(A::SparseMatrixCSC{T}, ɛ = T <: Union{Rational,Integer} ? 0 : eps(norm(A, Inf))) where T

Identifies linearly dependent constraints in the problem. The last column of input is constraint constants and they are included to check if the linearly dependent constraints are redundant or inconsistent. This is done by a naive Gaussian elimination.

Returns a vector with the indices of redundant constraints, which should be removed from the formulation. The rest of the constraints form a maximal linearly independent subset of the original set of constraints.

source
SDPAFamily.sdpa_gmp_binary_solve!Method
sdpa_gmp_binary_solve!(m::Optimizer, full_input_path, full_output_path; redundant_entries)

Calls the binary sdpa_gmp to solve SDPA-formatted problem specified in a .dat-s file at full_input_path. Results are written into the file at full_output_path. redundant_entries is a sorted vector listing indices of linearly dependent constraint which are already removed by presolve.jl. The corresponding decision variables are populated as zeros.

This function returns m with solutions already populated from results in the output file.

source