How to use the osqp.utils function in osqp

To help you get started, we’ve selected a few osqp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oxfordcontrol / osqp-python / module / interface.py View on Github external
def setup(self, P=None, q=None, A=None, l=None, u=None, **settings):
        """
        Setup OSQP solver problem of the form

        minimize     1/2 x' * P * x + q' * x
        subject to   l <= A * x <= u

        solver settings can be specified as additional keyword arguments
        """

        unpacked_data, settings = utils.prepare_data(P, q, A, l, u, **settings)
        self._model.setup(*unpacked_data, **settings)
github oxfordcontrol / osqp-python / module / interface.py View on Github external
def solve(P=None, q=None, A=None, l=None, u=None, **settings):
        """
        Solve problem of the form 

        minimize     1/2 x' * P * x + q' * x
        subject to   l <= A * x <= u

        solver settings can be specified as additional keyword arguments. 
        This function disables the GIL because it internally performs 
        setup solve and cleanup.
        """

        unpacked_data, settings = utils.prepare_data(P, q, A, l, u, **settings)
        return _osqp.solve(*unpacked_data, **settings)

osqp

OSQP: The Operator Splitting QP Solver

Apache-2.0
Latest version published 28 days ago

Package Health Score

79 / 100
Full package analysis