run_loadpath_from_form_CVXPY

compas_tno.solvers.run_loadpath_from_form_CVXPY(form, problem=None, find_inds=False, solver_convex='CLARABEL', printout=False)

Run convex optimisation problem with CVXPY directly from the Form Diagram.

This function is kept for backward compatibility. New code should use CVXPYSolver class.

Parameters:
formFormDiagram

FormDiagram object with form containing full information.

problemProblem, optional

The problem with matrices of interest, by default None

find_indsbool, optional

Whether or not independents must be computed before the analysis, by default False

solver_convexstr, optional

Solver to use, by default CLARABEL. Options are “CLARABEL”, “MOSEK” or “CVXOPT”.

printoutbool, optional

Whether or not print results, by default False

Returns:
problemProblem

Problem with optimal solution applied.

Notes

For new code, prefer using:

from compas_tno.problems import FixedProblem
from compas_tno.solvers import CVXPYSolver

problem = FixedProblem.from_formdiagram(form, method="QR")
solver = CVXPYSolver(settings={"solver_convex": "CLARABEL"})
result = solver.solve(problem)