Initial Guess/Warm start in CVXPY: give a hint of the solution

后端 未结 1 1043
慢半拍i
慢半拍i 2021-01-06 05:02

In this bit of code:

import cvxpy as cvx

# Examples: linear programming
# Create two scalar optimization variables.
x = cvx.Variable()
y = cvx.Variable()

#         


        
相关标签:
1条回答
  • 2021-01-06 05:49

    You can manually assign the values using x.value = 1/2, and then passing the warm_start=True parameter in the available solvers. Keep in mind not all solvers allow this, one that does is for example SCS.

    More info available on: https://www.cvxpy.org/tutorial/advanced/index.html

    0 讨论(0)
提交回复
热议问题