[SCIP] How to check and separate only integer solutions in a constraint handler?

Lastra Diaz Jose j.lastra at lectra.com
Sat Apr 15 10:57:01 CEST 2023


Dear all,

I am implementing a branch-and-Check approach to solve a 0-1 ILP model and I would like to check the feasibility of integer solutions, and insert a feasibility cut to separate those infeasible solutions. I have implemented a constraint handler based on the TSP example, but I have not understood well what callback I should implement. I have implemented the four separation and enforcement callback below, as done in TSP example, but when I check the solution in these callbacks, the solution is not binary. Likewise, I do not know how to skip non-integer solutions in the check callback.

What should I do to check and separate only infeasible integer solutions?

- SCIP_DECL_CONSSEPALP
- SCIP_DECL_CONSSEPASOL
- SCIP_DECL_CONSENFOLP
- SCIP_DECL_CONSENFOPS
- SCIP_DECL_CONSCHECK

ObjConshdlr(scip, "overdemand", "Feasibility cuts",
             1000000, -2000000, -2000000, 1, -1, 1, 0,
             FALSE, FALSE, TRUE, SCIP_PROPTIMING_BEFORELP, SCIP_PRESOLTIMING_FAST)


Thank you very much for your help,
Juan

[cid:image001.png at 01D4B3E6.540B6570]
Juan J. Lastra Díaz, PhD
Advanced Research department

t :   +34 917 88 88 65
e :   j.lastra at lectra.com<mailto:j.lastra at lectra.com>
[cid:image002.png at 01D4B3E6.540B6570]<https://www.linkedin.com/company/8538/>[cid:image003.png at 01D4B3E6.540B6570]<https://www.facebook.com/LectraOfficial/>[cid:image004.png at 01D4B3E6.540B6570]<https://www.instagram.com/lectraofficial/>[cid:image005.png at 01D4B3E6.540B6570]<https://www.youtube.com/user/LectraTechChannel?hl=fr>[cid:image006.png at 01D4B3E6.540B6570]<https://blog.lectra.com/>
C/ Vía de los Poblados, 1 - Edif. C, 1ª Plta.
P.E. Alvento - 28033 Madrid - España
lectra.com<http://www.lectra.com/>

This e-mail and any attached files may contain confidential information which is intended exclusively for the recipient. If you are not the specified recipient, you should delete this e-mail from your system immediately, and inform the sender without delay. Reading, distributing, copying, or any other unauthorized use of this e-mail and its attached files is strictly forbidden. Thank you for your comprehension.

Este correo electrónico y cualquier archivo adjunto pueden contener información confidencial que está destinada exclusivamente al destinatario. Si usted no es el destinatario especificado, debe eliminar este correo electrónico de su sistema inmediatamente e informar al remitente sin demora. Está terminantemente prohibido leer, distribuir, copiar o cualquier otro uso no autorizado de este correo electrónico y sus archivos adjuntos. Gracias por su comprensión.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20230415/5e1f96c9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6491 bytes
Desc: image001.png
URL: <http://listserv.zib.de/pipermail/scip/attachments/20230415/5e1f96c9/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 2149 bytes
Desc: image002.png
URL: <http://listserv.zib.de/pipermail/scip/attachments/20230415/5e1f96c9/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 2033 bytes
Desc: image003.png
URL: <http://listserv.zib.de/pipermail/scip/attachments/20230415/5e1f96c9/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 2340 bytes
Desc: image004.png
URL: <http://listserv.zib.de/pipermail/scip/attachments/20230415/5e1f96c9/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 2117 bytes
Desc: image005.png
URL: <http://listserv.zib.de/pipermail/scip/attachments/20230415/5e1f96c9/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 2115 bytes
Desc: image006.png
URL: <http://listserv.zib.de/pipermail/scip/attachments/20230415/5e1f96c9/attachment-0005.png>


More information about the Scip mailing list