From 2b7e3e3bd764414995fa0432c7e004fb101a74d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Caron?= Date: Wed, 13 Dec 2023 19:23:35 +0100 Subject: [PATCH] [minor] Simpler problem sample script --- .github/ISSUE_TEMPLATE/new_problem.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/new_problem.md b/.github/ISSUE_TEMPLATE/new_problem.md index 6d0f734..9840f8e 100644 --- a/.github/ISSUE_TEMPLATE/new_problem.md +++ b/.github/ISSUE_TEMPLATE/new_problem.md @@ -12,29 +12,26 @@ I propose to add the following problem to the *GitHub free-for-all* test set. Th ```python import numpy as np -from qpsolvers import solve_qp +import qpsolvers -def build_problem(): # add parameters if applicable +def build_problem(): # Cost: x^T P x + q^T x P = ... q = ... - # Inequality constraints: G x <= h G = ... h = ... - # Equality constraints: A x == b A = ... b = ... - # Box constraints: lb <= x <= ub lb = ... ub = ... - return P, q, G, h, A, b, lb, ub + return qpsolvers.Problem(P, q, G, h, A, b, lb, ub) if __name__ == "__main__": - args = build_problem() - x = solve_qp(*args, solver="...") + solver = "proxqp" # your favorite solver here + x = qpsolvers.solve_problem(build_problem(), solver=solver) ``` ### Context