Repository navigation
Fix update() API for box-constrained dense QPs - #479
Conversation
|
Hi @jorisv @pierfabre, I agree with these ideas, and I propose the following changes, none of which break the API:
Then, some extra tasks:
|
6d92d55 to
ec2ce42
Compare
|
Hey @Lucas-Haubert, @jorisv thanks for your comments, I applied them. |
|
@pierfabre #477 is merged |
…x-constrained qp without throwing.
…to avoid code duplication.
…nse qp box update()
1b737c6 to
456394f
Compare
|
@jorisv done! |
|
@pierfabre You must add yourself in the credit section |
Changes
l_box/u_box(the existing box constraints are preserved).update()->init()for box-constrained QPs when no box constraints are provided.l_boxandu_boxin the Python dense QP model.init()binding signature so thatHandgare optional, consistently with the box-constrainedinit(), preventing unexpected dispatch behavior.update_dense_qpexamples to demonstrate:Motivation
Previously, the non-box
update()path threw when called on an initialized box-constrained QP. This made it necessary to pass the box constraints at each update, even when they had not changed.Before:
Now:
Question
Since
l_box/u_boxare initialized to-infinite_bound/+infinite_boundin the dense model constructor whenbox_constraints == true, could we also accept omittedl_box/u_boxininit()and simply keep these default values, rather than throwing? Thanks!