save_qplibΒΆ

save_qplib(model: Model, filename: str | PathLike) → NoneΒΆ

Save a model to a QPLIB file.

Parameters:
  • model (Model) – Model to write.

  • filename (str | PathLike) – Output file path.

Raises:

RuntimeError – If the model is invalid for the QPLIB format (e.g., contains degree 3 or higher, or has invalid variable names / constraint labels).