[Scip] User constraints checking
Abdelkader Ouali
oualiaek at hotmail.fr
Tue Aug 11 10:05:17 CEST 2015
Dear Gerald,
Thanks, that was really helpful.I didn't pay attention to those flags. Of course, I copied and modified the code from constraint handler used for cuts.
Best regards---A. Ouali
Date: Tue, 11 Aug 2015 00:04:21 +0200
From: gamrath at zib.de
To: oualiaek at hotmail.fr
CC: scip at zib.de
Subject: Re: [Scip] User constraints checking
Dear Abdelkader,
the first line of the log shows that SCIP found a feasible solution
with value -3. After that, SCIP is only looking for solutions with a
strictly better objective value. The infeasibility reported is for
this updated problem, which means that no improving solution does
exist. This is clear when looking at your problem, because all
(binary) variables have an objective coefficient of -1 and are set
to 1 in the solution. By the way: your linear constraint allows only
that solution.
So why is this solution accepted? This is because the flags of the
created constraint are wrong: If you have a look at the last lines
of usercons.cpp, you see that you set only the propagate flag to
TRUE when creating your constraint, but the default is to have the
first five bools set to TRUE. For example, number 3 and 4 are for
enforcement and check of solutions. If those are set to FALSE, SCIP
won't call the callbacks on this constraint (which might be useful
for cuts, for example).
Best,
Gerald
Am 10.08.2015 um 23:35 schrieb
Abdelkader Ouali:
Dear
Gerald,
In order to clarify my situation, I made a quick example
containing a user constraint handler which stays always
infeasible, I set both scip_check and scip_enfolp to return SCIP_INFEASIBLE.
When checking scip logs
during solving process, i found a message claims
infeasibility :
feasible solution found by trivial heuristic after 0.0
seconds, objective value -3.000000e+00
presolving:
propagator <pseudoobj> detected infeasibility
but after that, I get :
SCIP Status : problem is solved [optimal
solution found]
Solving Time (sec) : 0.00
Solving Nodes : 0
Primal Bound : -3.00000000000000e+00 (1
solutions)
Dual Bound : -3.00000000000000e+00
Gap : 0.00 %
SCIP should print [infeasible] rather then [optimal
solution found]
Please find the source code and the file containing SCIP
logs for the example in the attachment.
Best regards
---
A. Ouali
Date: Mon, 10 Aug 2015 18:55:41 +0200
From: gamrath at zib.de
To: oualiaek at hotmail.fr; scip at zib.de
Subject: Re: [Scip] User constraints checking
Dear Abdelkader,
can you send some more information and perhaps the output
of SCIP? I cannot imagine that SCIP states that the
problem is infeasible but prints a solution afterwards.
The scip_check method is mainly used to check feasibility
of solutions generated by heuristics. Checking whether the
node LP solution is feasible is done by the scip_enfolp
method, which should normally do something to enforce
feasibility, e.g., add a constraint or perform branching,
but can also just return infeasible. If you did not modify
this method to always return infeasible, it might happen
that LP solutions are accepted to be feasible.
Best,
Gerald
On 10.08.2015 14:30, Abdelkader Ouali wrote:
Dear
SCIP users,
I am implementing my own constraints using the
constraint handler as explained in the TSP example
of SCIP,
The problem I am facing is the feasibility
checking with my own constraints, which they don't
include problem variables in their scope, but use
them to check the feasibility of other given
information,
In order to see if SCIP respond to my
constraints, I set the callback function scip_check
returns always infeasible. In solving stage, SCIP
detects the infeasibility, but after that it prints
solutions that ignore my constraints.
I want to know what is going on inside SCIP ! it
detects infeasibility but rather prints infeasible
solutions.
Thanks in advance for any explanations.
---
A. Ouali
_______________________________________________
Scip mailing list
Scip at zib.de
http://listserv.zib.de/mailman/listinfo/scip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20150811/b795bf88/attachment.html>
More information about the Scip
mailing list