<div dir="ltr">Hi<div><br></div><div>Maybe you can get away with by modeling the objective function as </div><div><br></div><div>min z - a^T x</div><div>and having a constraint</div><div>||x||^2 <= z</div><div><br></div><div>This way you only modify a linear objective each time.</div><div><br></div><div>Best,</div><div>Felipe </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 16, 2020 at 9:41 AM Marc Pfetsch <<a href="mailto:pfetsch@mathematik.tu-darmstadt.de">pfetsch@mathematik.tu-darmstadt.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
Hi Victor,<br>
<br>
reoptimization can only be used if "the space of solutions gets<br>
restricted and/or the objective function changes", see<br>
<a href="https://www.scipopt.org/doc-7.0.0/html/REOPT.php" rel="noreferrer" target="_blank">https://www.scipopt.org/doc-7.0.0/html/REOPT.php</a><br>
<br>
Note that "the objective function changes" only refers to linear<br>
objectives, so I think that your case in which you are modeling a<br>
quadratic objective function is not covered, but I agree that this would<br>
be an interesting case.<br>
<br>
So to achieve what you want, you cannot use reoptimization but need to<br>
use the ordinary solving procedures. I should then be possible to change<br>
the constraint.<br>
<br>
Hope this helps.<br>
<br>
Best<br>
<br>
Marc<br>
<br>
<br>
On 15/06/2020 22:19, Victor Miller wrote:<br>
> I have a MIP that I want to solve many times, but each time with a<br>
> different quadratic constraint of the form minimize sum_i  ||x||^2 -<br>
> a^T x, where the vector a may change each time.  I understand that<br>
> SCIP doesn't have quadratic constraints, but that I can specify that<br>
> by introducing a continuous variable z, adding the constraint z >=<br>
> ||x||^2 - a^T x, and minimizing z.<br>
> <br>
> I'm using pyscipopt.  I do<br>
> <br>
>         model.freeReoptSolve()<br>
> <br>
>         model.chgReoptObjective(obj_var, "minimize")<br>
> <br>
> However, since the constraint changes each time I want to delete the<br>
> old constraint (if any),<br>
> by doing<br>
> <br>
> model.delCons(old_cons).<br>
> <br>
> However, when I do that I get the error<br>
> <br>
> Exception: SCIP: method cannot be called at this time in solution process!<br>
> <br>
> How can I do what I want?  Is there a way of modifying the constraint<br>
> instead of deleting it?<br>
> _______________________________________________<br>
> Scip mailing list<br>
> <a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
> <a href="https://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">https://listserv.zib.de/mailman/listinfo/scip</a><br>
> <br>
_______________________________________________<br>
Scip mailing list<br>
<a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
<a href="https://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">https://listserv.zib.de/mailman/listinfo/scip</a><br>
</blockquote></div>