3333
3434
3535class DiffengineConeProgram (ParamConeProg ):
36- """A cone program with matrices extracted via the diff engine .
36+ """A cone program with matrices extracted via the diffengine .
3737
38- Duck-type compatible with ParamConeProg. On first solve, stores concrete
39- A, b, q, d, P matrices . When parameters are present, re-evaluates the
40- C expression DAG on subsequent solves via apply_parameters().
38+ Duck-type compatible with ParamConeProg. On first solve, stores the sparsity
39+ pattern of A and P . When parameters are present, re-evaluates the
40+ converted C expression trees on subsequent solves via apply_parameters().
4141
4242 minimize q'x + d + [(1/2)x'Px]
4343 subject to cone_constr(A*x + b) in cones
@@ -81,6 +81,7 @@ def __init__(
8181 self ._restruct_mat = None
8282 self .parameters = list (parameters ) if parameters else []
8383
84+ # TODO what should we do about parametric bounds?
8485 # Duck-type compatibility (always None for diffengine path).
8586 self .lb_tensor = None
8687 self .ub_tensor = None
@@ -226,6 +227,9 @@ def apply_restruct_mat(self, restruct_mat, restruct_mat_op=None):
226227 return new_prog
227228
228229 def split_solution (self , sltn , active_vars = None ):
230+ """
231+ Splits the solution into individual variables.
232+ """
229233 from cvxpy .reductions import cvx_attr2constr
230234 if active_vars is None :
231235 active_vars = [v .id for v in self .variables ]
@@ -249,8 +253,7 @@ def split_solution(self, sltn, active_vars=None):
249253 def from_problem (cls , problem , ordered_cons , inverse_data , quad_obj ):
250254 """Build a DiffengineConeProgram by evaluating expressions at x=0.
251255
252- Uses the sparsediffpy diff engine to extract A, b, q, d, P matrices
253- directly from the CVXPY expression tree via automatic differentiation.
256+ Uses the sparsediffpy diffengine to compute A, b, q, d, P matrices.
254257
255258 Parameters
256259 ----------
0 commit comments