Skip to main content

Module cbf

Module cbf 

Source
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).
  • OBJSENSEMIN or MAX.
  • POWCONES — power-cone parameter table: each entry’s weight vector (α₀, α₁) gives the exponent α = α₀/(α₀+α₁), referenced as @k:POW.
  • VAR n kn scalar variables partitioned into k cones, one cone per following line as CONE dim (F/L+/L-/L=/EXP/Q/@k:POW).
  • CON m km scalar constraint rows Ax + b, each lying in one of k cones (same syntax). L=Ax+b = 0, L-≤ 0, L+≥ 0.
  • OBJACOORD / OBJBCOORD — sparse objective c and constant c₀.
  • ACOORD / BCOORD — sparse A (row col val) and b (row val).
  • PSDCON + HCOORD / DCOORD — affine PSD constraints D_c + Σ_k x_k H_{c,k} ⪰ 0, mapped to a Psd cone 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 objective c/c₀).
ConeDecl
A parsed CBF cone declaration: a kind and the number of scalar rows it spans.
ConicProgram
A CBF instance mapped to a pounce conic program min ½xᵀPx + cᵀx s.t. Ax = b, Gx ⪯_K h (here P = 0). The cones partition the rows of G in order; obj_constant (c₀, sign-adjusted) is added to solution.obj to recover the CBF objective value.

Enums§

CbfError
A CBF parse / mapping failure, with enough context to locate the problem.
ConeKind
The CBF cone kinds this reader supports (F/L=/L+/L-/EXP/Q, plus the 3-D power cone @k:POW resolved against POWCONES). Unsupported kinds (PSD DCOORD, the rotated SOC QR, 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.