<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Shahin,<br>
<br>
first of all, it might happen happen that constraints are detected
to be redundant during presolving or (as in your case) upgraded,
which means, e.g., linear to a special form of linear like knapsack
or setppc, or also linear-type constraints to nonlinear constraints
like "and" (in case a set of linear constraints models exactly this
nonlinearity; this is done by the gate presolver).<br>
<br>
However, all of this can only happen, if your constraint is not
marked to be modifiable. Otherwise, SCIP cannot detect the structure
of a constraint, because it does not know which variables will be
added and with which coefficient.<br>
<br>
In your case, if your master-only constraints are not modifiable
because you don't add variables to them during pricing, removing or
upgrading these constraints can happen. But what do you need the
dual solution values of these constraints for, anyway?<br>
<br>
If you want to keep the constraints as they are, you can also
disable the gate presolver and all upgrading techniques (check the
cons_linear settings in the interactive shell). But still, unless
you disable presolving, SCIP might detect that some of them are
redundant and remove them.<br>
<br>
By the way: Whenever you store a pointer to a constraint or
variable, you should capture this constraint/variable (unless it was
already captured, e.g, by SCIPcreateVar()). Later, if you don't need
these pointers anymore, you must release them. This can be done by
SCIPcapture/releaseVar/Cons(). In this case, you would still have
the transformed linear constraints in your hand, because SCIP cannot
delete them since you still have a capture on it. However, it would
not fix your particular problem, since the constraints would not be
in the problem anymore after deletion.<br>
<br>
Best,<br>
Gerald<br>
<br>
<br>
<div class="moz-cite-prefix">Am 16.04.2014 23:21, schrieb Shahin
Gelareh:<br>
</div>
<blockquote
cite="mid:CA+r-pT6ai4esvcBH7i_H5wa_R3rUWLYXtkVMDNDjdNU1Oqxv4A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Dear SCIPers<br>
<br>
</div>
in CG: <br>
in scip_init <br>
</div>
I do the following:<br>
SCIP_CALL( SCIPgetTransformedCons(scip, m_con_MasterOnly[i],
&m_con_MasterOnly[i]) );<br>
<br>
</div>
where these constraints are declared as <br>
true, /* initial */<br>
false, /* separate */<br>
true, /* enforce */<br>
true, /* check */<br>
true, /* propagate */<br>
false, /* local */<br>
false, /* modifiable */<br>
false, /* dynamic */<br>
false, /* removable */<br>
false) ); /* stickingatnode */<br>
</div>
<div>in the master problem (non-modifiable because they do not
contain any column of pricing problem). The transformation is
done successfully.<br>
</div>
<div>But when it arrives first time in the pricing problem and I
ask <br>
dual_MasterOnly.push_back(SCIPgetDualsolLinear(scip,
m_con_MasterOnly[i]));<br>
</div>
<div>then I get an error message that the constraint is not
linear!<br>
</div>
<div>Moreover, when I look at the constraint it s name has
changed to "andgate_0" which does not correspond with the
original constraint (and the rest of elements of array have
name field equal to "NULL"). <br>
<br>
</div>
<div>The strange thing is that the first element of this array
is correct but the second up to end have changed.<br>
<br>
</div>
<div>instead I have a set of constraints which are linking
constraints and I have declared them as <br>
<br>
true, /* initial */<br>
false, /* separate */<br>
true, /* enforce */<br>
true, /* check */<br>
true, /* propagate */<br>
false, /* local */<br>
true, /* modifiable */<br>
false, /* dynamic */<br>
false, /* removable */<br>
false)
); /* stickingatnode */<br>
<br>
</div>
<div>to be modified upon need (adding new col).<br>
</div>
<div>Everything is fine with this set of constraints. and I can
get the dual values.<br>
<br>
</div>
<div>Now the question is that I have a set of constraint which
need to be extended by adding new columns (linking
constraints, master-only and priced vars) , a set of
masterOnly constraints (constraints made of master-only
variables) and a set of convexity constraints. <br>
</div>
<div><br>
</div>
<div><br>
What should be the way of declaring each set of such
constraints? Is there something wrong?<br>
<br>
</div>
<div>Cheers<br>
Shahin<br>
</div>
<div><br>
<br>
<br>
<br>
<br>
<br>
</div>
<div><br>
</div>
<div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
<div><br>
<br>
<br>
<br>
<br>
</div>
<div><br>
<br>
<br>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Scip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Scip@zib.de">Scip@zib.de</a>
<a class="moz-txt-link-freetext" href="http://listserv.zib.de/mailman/listinfo/scip">http://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
</blockquote>
<br>
</body>
</html>