[SCIP] Assertion failed: (!(*cons)->active || (*cons)->updatedeactivate),
Natalia Perina
nperina at princeton.edu
Sun Apr 30 06:02:02 CEST 2017
I cannot release any of my constraints or variables after solving and
keeping getting the following error:
Assertion failed: (!(*cons)->active || (*cons)->updatedeactivate), function
SCIPconsRelease, file src/scip/cons.c, line 6128.
debug: Abort trap: 6
I am creating the constraint l like this:
char con_name[255];
vector<SCIP_CONS*> zrt_con(num_R, (SCIP_CONS*)NULL);
for (int r = 0; r < num_R; r++)
{
SCIP_CONS* con = NULL;
(void) SCIPsnprintf(con_name, 255, "Zrt_r%d", r);
//cout << "creating zrt linear constraint ..." << endl;
SCIP_CALL( SCIPcreateConsLinear(scip, &con, con_name, 0, 0, 0,
1.0, /* lhs */
1.0, /* rhs */
true, /* initial */
false, /* separate */
true, /* enforce */
true, /* check */
true, /* propagate */
false, /* local */
true, /* modifiable */
false, /* dynamic */
false, /* removable */
false) ); /* stickingatnode
*/
//cout << "adding zrt linear constraint ..." << endl;
SCIP_CALL( SCIPaddCons(scip, con) );
//cout << "saving zrt linear constraint ..." << endl;
zrt_con[r] = con; /*lint !e732 !e747*/
for (int t = 0; t < NC[r]; t++ )
{
//cout << "adding variable to zrt constraint ..." << endl;
SCIP_CALL ( SCIPaddCoefLinear (scip, zrt_con[r], z_var[r][t], 1.0)
);
}
}
Includign a pricer and then solving, printing the best solution, and then
releasing the constraint like this:
for (int r = 0; r < num_R; r++) {
SCIP_CALL( SCIPreleaseCons(scip, &zrt_con[r]) );
}
SCIPdebugMsg(scip, "released zrt constraints \n");
But i keep getting the abort error above. Does anybody know why this would
be?
Thanks,
Natalia
--
Natalia Perina
Princeton University l 2017
nperina at princeton.edu
202 360 9536
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20170430/3e5fc0fa/attachment.html>
More information about the Scip
mailing list