Expand description
Reader for the Conic Benchmark Format (CBF / .cbf), the format the
CBLIB conic benchmark library (https://cblib.zib.de) ships its instances
in, plus a mapping to a pounce conic program.
§Format (the subset CBLIB’s exponential-cone GPs use)
A CBF file is a sequence of keyword blocks, blank-line separated, with #
comments. The blocks this reader understands:
VER— format version (read and ignored).OBJSENSE—MINorMAX.POWCONES— power-cone parameter table: each entry’s weight vector(α₀, α₁)gives the exponentα = α₀/(α₀+α₁), referenced as@k:POW.VAR n k—nscalar variables partitioned intokcones, one cone per following line asCONE dim(F/L+/L-/L=/EXP/Q/@k:POW).CON m k—mscalar constraint rowsAx + b, each lying in one ofkcones (same syntax).L=⇒Ax+b = 0,L-⇒≤ 0,L+⇒≥ 0.OBJACOORD/OBJBCOORD— sparse objectivecand constantc₀.ACOORD/BCOORD— sparseA(row col val) andb(row val).PSDCON+HCOORD/DCOORD— affine PSD constraintsD_c + Σ_k x_k H_{c,k} ⪰ 0, mapped to aPsdcone on the slack.
The problem is min/max cᵀx + c₀ s.t. x ∈ K_var, Ax + b ∈ K_con,
plus any affine PSD constraints.
§Exponential-cone convention
CBF’s primal exponential cone is {(u₀,u₁,u₂) : u₀ ≥ u₁·exp(u₂/u₁), u₁>0}
(the first coordinate is the bound), whereas pounce’s is
{(x,y,z) : z ≥ y·exp(x/y), y>0} (the third is the bound). The triple
therefore reverses: pounce (x,y,z) = (u₂, u₁, u₀). See
dev-notes/hsde.md (the CBLIB benchmark-tier plan).
Structs§
- CbfModel
- A parsed CBF instance: the objective, the variable / constraint cone
partitions, and the sparse
A/b(and objectivec/c₀). - Cone
Decl - A parsed CBF cone declaration: a kind and the number of scalar rows it spans.
- Conic
Program - A CBF instance mapped to a pounce conic program
min ½xᵀPx + cᵀx s.t. Ax = b, Gx ⪯_K h(hereP = 0). Theconespartition the rows ofGin order;obj_constant(c₀, sign-adjusted) is added tosolution.objto recover the CBF objective value.
Enums§
- CbfError
- A CBF parse / mapping failure, with enough context to locate the problem.
- Cone
Kind - The CBF cone kinds this reader supports (
F/L=/L+/L-/EXP/Q, plus the 3-D power cone@k:POWresolved againstPOWCONES). Unsupported kinds (PSDDCOORD, the rotated SOCQR, dual power cones) are rejected at parse time with a clear error rather than silently mis-handled.
Functions§
- parse
- Parse a CBF instance from its text. Errors on malformed input or a cone kind outside the supported subset.