1import scipy.sparse 
as sp
 
    6      minimize    ½〈x, Qx〉+〈q, x〉+ c 
    8      subject to  bmin ≤ Ax ≤ bmax 
   15valuesQ = [1, -1, -1, 2, 1]
 
   16data.Q = sp.csc_matrix((valuesQ, (row, col)), shape=(3, 3))
 
   20data.bmin = [0.5, -10, -10, -10]
 
   21data.bmax = [0.5, 10, 10, 10]
 
   24row = [0, 1, 0, 2, 0, 3]
 
   25col = [0, 0, 1, 1, 2, 2]
 
   26valuesA = [1, 1, 1, 1, 1, 1]
 
   27data.A = sp.csc_matrix((valuesA, (row, col)), shape=(4, 3))
 
   32settings.eps_abs = 1e-8
 
   40print(
"Status:     ", solver.info.status)
 
   41print(
"Solution:   ", solver.solution.x)
 
   42print(
"Multipliers:", solver.solution.y)
 
   43assert solver.info.status_val == qpalm.Info.SOLVED
 
   46solver.warm_start(solver.solution.x, solver.solution.y)
 
   48print(solver.solution.x)
 
   55settings.eps_abs = 1e-10
 
   57solver.update_settings(settings)
 
   59print(solver.solution.x)
 
   61data.bmin = [0, 0, -15, 1]
 
   62solver.update_bounds(bmin=data.bmin)
 
   64print(solver.solution.x)
 
   67solver.update_q(data.q)
 
   69print(solver.solution.x)
 
   77solver.update_Q_A(Qup.data, valuesA)
 
   79print(solver.solution.x)
 
Stores the matrices and vectors that define the problem.
 
Settings and parameters for the QPALM solver.