From a73f3bf6e421f4858eeaf09fc984a1dbacda39a3 Mon Sep 17 00:00:00 2001 From: Marc Pfetsch Date: Thu, 3 Oct 2024 18:16:06 +0200 Subject: [PATCH] allow to call SCIPdelCons() in transformed stage --- CHANGELOG | 1 + src/scip/scip_prob.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 4a022d8f22..cc23091d83 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -29,6 +29,7 @@ Interface changes - added SCIPtpiIsAvailable() to check whether a working task processing interface is available (TPI != none) - added SCIPtpiGetLibraryName() and SCIPtpiGetLibraryDesc() +- SCIPdelCons() can now also be called in SCIP_STAGE_TRANSFORMED ### Command line interface ### Interfaces to external software diff --git a/src/scip/scip_prob.c b/src/scip/scip_prob.c index 130310eaf9..51fa7cba2f 100644 --- a/src/scip/scip_prob.c +++ b/src/scip/scip_prob.c @@ -2847,7 +2847,7 @@ SCIP_RETCODE SCIPdelCons( { assert(cons != NULL); - SCIP_CALL( SCIPcheckStage(scip, "SCIPdelCons", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE) ); + SCIP_CALL( SCIPcheckStage(scip, "SCIPdelCons", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE) ); switch( scip->set->stage ) { @@ -2859,6 +2859,7 @@ SCIP_RETCODE SCIPdelCons( /* only added constraints can be removed in (de-)initialization process of presolving, otherwise the reduction * might be wrong */ + case SCIP_STAGE_TRANSFORMED: case SCIP_STAGE_INITPRESOLVE: case SCIP_STAGE_EXITPRESOLVE: assert(SCIPconsIsAdded(cons));