Closed steve3141 closed 9 years ago
Oh, awesome. :) Thanks for catching that.
On Wed, Jul 16, 2014 at 8:26 AM, steve3141 notifications@github.com wrote:
Clearly this is a minor issue since it involves a "pointless" constant added to the objective function, which can simply be removed. But I came across it when doing some "automated" problem generation, and it should be simple to fix. Minimal example:
variable x(2) parameter aconst minimize norm(x) + aconst
Generates the error:
File "U:\python\lib\python\qcml\qc_lang.py", line 144, in solve_func result['objval'] = multiplier * sol['info']['pcost'] + offset TypeError: unsupported operand type(s) for +: 'float' and 'str'
By debugging I see that 'offset' has been left as the string aconst rather than the value params['aconst']
Thanks, Steve
— Reply to this email directly or view it on GitHub https://github.com/cvxgrp/qcml/issues/50.
Give it a shot now.
Thanks for the quick response. Sorry I haven't had a chance to try this yet, will let you know if there is still any problem.
Clearly this is a minor issue since it involves a "pointless" constant added to the objective function, which can simply be removed. But I came across it when doing some "automated" problem generation, and it should be simple to fix. Minimal example:
Generates the error:
By debugging I see that 'offset' has been left as the string
aconst
rather than the valueparams['aconst']
Thanks, Steve