dimod.lp.dumps

dumps(cqm: dimod.constrained.ConstrainedQuadraticModel) str[source]

Serialize a constrained quadratic model as an LP file.

LP files are a common format for encoding optimization models. See documentation from Gurobi and CPLEX.

Parameters

cqm – A constrained quadratic model.

Returns

A string encoding the constrained quadratic model as an LP file.