Describe the bug
Forming a quadratic expression starting with a unitary variable term errors in the python API.
Steps/Code to reproduce bug
from cuopt.linear_programming.problem import Problem, CONTINUOUS, MINIMIZE
problem = Problem("qp")
x = problem.addVariable(lb=0.0, vtype=CONTINUOUS, name="x")
problem.setObjective(x + x*x, sense=MINIMIZE) # errors
produces the following output:
Cannot add type QuadraticExpression to variable
Expected behavior
I expected the problem to be formed as expected
Environment details (please complete the following information):
- Environment location: DGX Spark
- Method of cuOpt install: via
pip in a python virtual environment, using cuOpt v26.02
Additional context
Probably linked to #926 and how unitary variable terms are handled in conjunction with linear/quadratic expressions.
Describe the bug
Forming a quadratic expression starting with a unitary variable term errors in the python API.
Steps/Code to reproduce bug
produces the following output:
Expected behavior
I expected the problem to be formed as expected
Environment details (please complete the following information):
pipin a python virtual environment, using cuOpt v26.02Additional context
Probably linked to #926 and how unitary variable terms are handled in conjunction with linear/quadratic expressions.