Solving problems from a file

SDPA for Python can read and solve problems saved in CLP and SDPA Sparse formats.

The below example shows how to read and solve a CLP formatted file (i.e. one having .clp extension):

import sdpap

A, b, c, K, J = sdpap.readproblem('example1.clp')
x, y, sdpapinfo, timeinfo, sdpainfo = sdpap.solve(A,b,c,K,J)

Example CLP formatted problems can be found in the examples folder of the SDPA for Python GitHub repository.

The below example shows how to read and solve an SDPA sparse formatted file (i.e. one having .dat-s extension):

import sdpap

A, b, c, K, J = sdpap.fromsdpa('mcp500-3.dat-s')
x, y, sdpapinfo, timeinfo, sdpainfo = sdpap.solve(A,b,c,K,J)

SDPLIB is a database of problems in SDPA sparse format. It’s available as a GitHub repository.