[SCIP] How to add operators on variables in a constraint

Gregor Hendel hendel at zib.de
Mon Apr 10 14:26:10 CEST 2017


Hi Sakib,

SCIP only supports linear objective functions. Nonlinear objective 
functions f must be modeled through a constraint in combination with an 
auxiliary variable based on the equivalence

min f(x) <=> min t s.t. f(x) <= t

Happy modeling,
Gregor

Am 10.04.2017 um 13:53 schrieb sakib mondal:
>
>
> Thanks Matthias.
>
> Is  there  a similar way to add operators on variables in the 
> objective function.
>
> For example,
>>  model.setObjective(quicksum(exp(x[i]) for i in I), "minimize")
>>
>>
>> Thanks a lot.
>>
>> Regards
>>
>
> ------------------------------------------------------------------------
> *From:* Matthias Miltenberger <miltenberger at zib.de>
> *Sent:* Friday, April 7, 2017 4:40 PM
> *To:* sakib mondal; scip at zib.de
> *Subject:* Re: [SCIP] How to add operators on variables in a constraint
> Dear Sakib,
>
> this constraint type is currently not yet supported by PySCIPOpt. You 
> would need to write a new Conshdlr class that implements `exp()`. This 
> might be a good starting point: 
> https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/tests/test_tsp.py 
>
> <https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/tests/test_tsp.py>
> 	
> SCIP-Interfaces/PySCIPOpt 
> <https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/tests/test_tsp.py>
> github.com
> PySCIPOpt - Python interface for the SCIP Optimization Suite
>
>
>
>
> all the best
> Matthias
>
> On 07.04.2017 17:15, sakib mondal wrote:
>>
>> Hi,
>>
>>
>> I am trying to use scip solver where one of the constraints need 
>> exponentiation of a variable.  For example,
>>
>>
>>
>> model.addCons(quicksum(exp(x[i]) for i in I) ==1, name="constraint")
>>
>> Wondering what would be possible ways to add this.
>>
>> I tried searching for such examples, but could not find any.
>>
>> Would appreciate any help. I am using pyscipopt.
>>
>> Regards
>> Sakib
>>
>>
>>
>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> https://listserv.zib.de/mailman/listinfo/scip
>
> -- 
> \__________________
>
> Matthias Miltenberger
> Zuse Institute Berlin
> Takustr. 7, 14195 Berlin
> www.zib.de/miltenberger
> miltenberger at zib.de
> +49 (30) 841 85-245
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20170410/5ec376e9/attachment.html>


More information about the Scip mailing list