<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Bahareh,<br>
<br>
did you implement the PRICERFARKAS method of your pricing rule?
This sounds like your right node is infeasible. Either domain
propagation detects this (which should only be the case if you
have unmodifiable constraints), or your restricted LP is
infeasible, in which case SCIP would call the PRICERFARKAS
callback instead of PRICERREDCOST.<br>
<br>
Best,<br>
Gerald<br>
<br>
On 01.04.2015 16:32, Bahareh Eghtesadi wrote:<br>
</div>
<blockquote
cite="mid:CA+t7RjGXCLC1+wO=wxYviNmN1+rK=UkpjUb5Novce=FSr_mt5Q@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div>I am now confused about how the callback methods CONSACTIVE
and DEACTIVE are supposed to work. When I create two nodes
with 0 as their node selection priority, it first goes into
the left_node's consactive method, then prop and then goes
into the pricing(in my case leftnode means where the upper
bound of a variable is changed). I guess this is how it should
work.</div>
<div>But when I set the node selection priority of the
right_node to sth larger, it first visits the right node,
after implementing consactive and prop, it goes into DEactive
method, and after that implements active and prop of the
left_node! Then goes ahead with the pricing! Does this mean
that there is sth wrong with my implementation?</div>
<div><br>
</div>
<div>Thanks in advance.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Mar 30, 2015 at 2:07 PM,
Bahareh Eghtesadi <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:b.eghtesadi@gmail.com"
target="_blank">b.eghtesadi@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hello again,
<div><br>
</div>
<div>That problem is solved. Actually I was following the
Binpacking example, so I had also added
SCIPreleasecons() in the branching rule after calling
SCIPaddconsnode(). But when I remove that, <span
style="font-size:12.8000001907349px">SCIPconshdlrGetConss(conshdlr)
returns the constraints. I am wondering how come it
works in the example?</span></div>
<div><span style="font-size:12.8000001907349px">However,
after I get the conss in the pricing, I loop over all
of them to see which one is active (using
SCIPconsIsActive) to apply the branching decisions,but
non of them is active. I have checked in the conshdlr,
after going into the </span><span
style="font-size:12.8000001907349px">CONSACTIVE</span><span
style="font-size:12.8000001907349px"> , it also goes
into the CONSDEACTIVE method, and then returns to the
pricing. I suspect this may be the reason that the
constraint is not active? or this is how it should be
performed?</span></div>
<div><span style="font-size:12.8000001907349px"><br>
</span></div>
<div><span style="font-size:12.8000001907349px">Thanks.</span></div>
</div>
<div class="gmail_extra">
<div>
<div class="h5"><br>
<div class="gmail_quote">On Mon, Mar 30, 2015 at 2:51
AM, Gerald Gamrath <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:gamrath@zib.de" target="_blank">gamrath@zib.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Dear
Bahareh,<br>
<br>
do you also add the constraint via SCIPaddCons()
or (better in your case) SCIPaddConsNode()?<br>
<br>
Best,<br>
Gerald
<div>
<div><br>
<br>
<div>Am 30.03.2015 um 07:48 schrieb Bahareh
Eghtesadi:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi Gerald,<br>
<br>
</div>
Thanks for your explanation. I now
understand how these constraints
work. So they are not basically
added to the subproblems causing
additional constraints(which I was
trying to avoid).<br>
</div>
So I am now creating two child nodes
using SCIPcreatechild, then create
the constraint of the conshdlr and
add them to the node by
SCIPaddconsnode. <br>
</div>
After one iteration, when one
constraint is added to a node,and the
prop is done , it goes in the
pricing(to see if any cons is active
and if so change bounds), but
SCIPconshdlrGetConss(conshdlr) returns
no constraint! I have checked the
conshdlr is found by SCIPfindConshdlr,
and it is the one attached to the
node. Is there a way to check if the
constraint is being created? because
the SCIPcreatecon seems to be working
fine, and I have no other idea why it
can happen.<br>
</div>
<div>I would appreciate your
suggestions.<br>
<br>
</div>
<div>Thanks.<br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Mar 19,
2015 at 8:00 AM, Gerald Gamrath <span
dir="ltr"><<a
moz-do-not-send="true"
href="mailto:gamrath@zib.de"
target="_blank">gamrath@zib.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div text="#000000"
bgcolor="#FFFFFF"> Dear Bahareh,<br>
<br>
you say that you store
corresponding bounds and other
information in the consdata and
use the CONSACTIVE method to apply
them in the pricer data. Both of
this uses a (set of) constraints,
not just the constraint handler.
Of course, within the constraint
handler, you define how the data
of a single constraint should look
like and what should be done if
the constraint is activated. So I
don't really get your question,
you are already using
constraints...<br>
<br>
I don't see how you could have the
information about bound changes
for each node other than by
storing them in constraints
sticked to nodes. You might store
all this in the constraint handler
data, but you would then need to
keep track of all created nodes
and store a "copy" of the tree
there, which is not convenient.<br>
Also the CONSACTIVE callback is
not called if no constraint is
activated...<br>
<br>
So I think there is no easy way to
do this without creating
constraints.<br>
<br>
Best,<br>
Gerald
<div>
<div><br>
<br>
<div>Am 18.03.2015 um 19:02
schrieb Bahareh Eghtesadi:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi <span
style="font-size:12.8000001907349px">Stephen,</span>
<div><span
style="font-size:12.8000001907349px"><br>
</span></div>
<div><span
style="font-size:12.8000001907349px">Thank
you for your
response. </span></div>
<div><span
style="font-size:12.8000001907349px">Actually
I have been looking at
the Bin Packing
example. Here is what
I have done so far: In
my branching rule, I
choose which pricing
variable to branch on,
create two nodes and
store the
corresponding bounds
and other information
in the consdata for
each node. In the
conshdlr, </span><span
style="font-size:12.8000001907349px"> </span><span
style="font-size:12.8000001907349px">in
CONSACTIVE method, </span><span
style="font-size:12.8000001907349px">I change the bounds stored in the
pricer data. </span></div>
<div>Do I still have to
create the constraint
of <span
style="font-size:12.8000001907349px">constraint
handler in each node?
Because I do not have
any constraint in
fact, I am using the
handlr to apply
changes to my pricer
data(bounds). I set
the NEEDSCONS flag to
False, and was hoping
that it would be
enough.</span></div>
<div>Also, in this case I
would not need to check
whether the "cons" is
active in my variable
pricer. Is this right?</div>
<div>I appreciate your
help. This is my first
experience with SCIP,
and I am afraid I have
oversimplified
everything.</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks. </div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On
Wed, Mar 18, 2015 at
8:42 AM, Stephen J Maher
<span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:maher@zib.de" target="_blank">maher@zib.de</a>></span>
wrote:<br>
<blockquote
class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px
#ccc
solid;padding-left:1ex">Hi
Bahareh,<br>
<br>
Branching on original
variables can be
performed similar to
the way used for
branching on
constraints, i.e.
Ryan-Foster branching.<br>
<br>
In order to implement
this type of branching
you will need to write
your own constraint
handler, branching
rule and modify the
variable pricer. The
constraint handler
will take some
reference to the
original variable and
selected bounds as
input and determine
which master problem
variables satisfy this
constraint based on
given variable bounds.
In your branching
rule, you will decide
what original variable
to branch on, create
two branching nodes
and then add a
constraint of your
constraint handler to
each with appropriate
bounds. In your
variable pricer, it is
then necessary to
check whether any
constraints of this
type exist at the
current node and apply
the appropriate
variable bounds on the
original variables.<br>
<br>
An example of
Ryan-Foster branching
is given in the Bin
Packing example
included with SCIP. It
should be possible to
use this as a guide
for your own rule
branching on original
variables.<br>
<br>
Cheers,<br>
<br>
Stephen
<div>
<div><br>
<br>
On 13/03/15 07:14,
Bahareh Eghtesadi
wrote:<br>
</div>
</div>
<blockquote
class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px
#ccc
solid;padding-left:1ex">
<div>
<div> Hi all,<br>
<br>
I am tying to
implement a
branch and price
algorithm. I
want to branch<br>
on the original
variables that
are not present
in the master
problem,<br>
and then change
their bound in
the pricing
problems. But I
am not sure<br>
how to do this.
I think I can't
use
SCIPbranchvar
directly from<br>
mybranchrule. If
I use a
constraint
handler, I
wouldn't make a<br>
constraint of
that type
(because there
is no such
constraint),
then how<br>
can I include it
in my
branchrule?<br>
<br>
<br>
Thanks in
advance.<br>
<br>
<br>
</div>
</div>
_______________________________________________<br>
Scip mailing list<br>
<a
moz-do-not-send="true"
href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
<a
moz-do-not-send="true"
href="http://listserv.zib.de/mailman/listinfo/scip" target="_blank">http://listserv.zib.de/mailman/listinfo/scip</a><br>
<br>
</blockquote>
_______________________________________________<br>
Scip mailing list<br>
<a
moz-do-not-send="true"
href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
<a
moz-do-not-send="true"
href="http://listserv.zib.de/mailman/listinfo/scip" target="_blank">http://listserv.zib.de/mailman/listinfo/scip</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div><span
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Regards</span><br
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">
<span
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Bahareh
Eghtesadi</span><br>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Scip mailing list
<a moz-do-not-send="true" href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a>
<a moz-do-not-send="true" href="http://listserv.zib.de/mailman/listinfo/scip" target="_blank">http://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div><span
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Regards</span><br
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">
<span
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Bahareh
Eghtesadi</span><br>
</div>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
</div>
</div>
<span class="HOEnZb"><font color="#888888">-- <br>
<div><span
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Regards</span><br
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">
<span
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Bahareh
Eghtesadi</span><br>
</div>
</font></span></div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature"><span
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Regards</span><br
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">
<span
style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Bahareh
Eghtesadi</span><br>
</div>
</div>
</blockquote>
<br>
</body>
</html>