[SCIP] Assertion failed: (!(*cons)->active || (*cons)->updatedeactivate),

Gerald Gamrath gamrath at zib.de
Tue May 2 12:56:35 CEST 2017


Dear Natalia,

this looks like you are releasing your constraints too often. Could it 
be that you changed the constraints in your array, e.g., by replacing 
them with their transformed counterparts (SCIPgetTransCons(s))?

Best,
Gerald


On 30.04.2017 06:02, Natalia Perina wrote:
> 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 <mailto:nperina at princeton.edu>
> 202 360 9536
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20170502/4ba18324/attachment.html>


More information about the Scip mailing list