Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v9-minor'
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed Nov 23, 2024
2 parents f9e1b83 + 019c648 commit d6b88b8
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 54 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ Fixed bugs

- apply same feasibility definition in PaPILO as SCIP to avoid numerical inconsistencies
- check variable cancellation in SCIPvarAddVlb() and SCIPvarAddVub() to avert wrong infeasibility
- SCIPfreeReoptSolve now also clears the partial solutions

Unit tests
----------
Expand Down
7 changes: 4 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ make install #
Note: For a full ctest run `ctest` instead of `make check` after compilation.

CMake checks for available third-party libraries like GMP or ZLIB and sets up the configuration accordingly.
Note that the symmetry codes [Bliss](https://users.aalto.fi/~tjunttil/bliss/) and [Sassy](https://github.com/markusa4/sassy) are shipped with SCIP.
Note that the symmetry codes [Nauty](https://pallini.di.uniroma1.it/) and [Sassy](https://github.com/markusa4/sassy) are shipped with SCIP.
A version of Bliss that is compatible with SCIP is available at https://github.com/scipopt/bliss.

Note: Here is a list of apt package requirements for ubuntu or debian users that want to build the entire SCIP Optimization Suite from source tarball:
```
Expand Down Expand Up @@ -185,7 +186,7 @@ e.g., `cmake </path/to/SCIP> -DSOPLEX_DIR=<path/to/SoPlex/build/or/install>`.
| `IPOPT` | `on`, `off` | `IPOPT=[true,false]` | requires IPOPT version >= 3.12.0; specify `IPOPT_DIR` if not found automatically |
| `LAPACK` | `on`, `off` | `LAPACK=[true,false]` | requires Lapack to be installed on the system |
| `LPS` | `spx`, `cpx`, `grb`, `xprs`, ... | `LPS=...` | specify `SOPLEX_DIR`, `CPLEX_DIR`, `MOSEK_DIR`, ... if LP solver is not found automatically |
| `SYM` | `bliss`, `sbliss`, `none`, ... | `SYM=[bliss, sbliss, none]`| choose symmetry handling |
| `SYM` | `nauty`, `snauty`, `none`, ... | `SYM=[nauty, snauty, none]`| choose symmetry handling |
| `WORHP` | `on`, `off` | `WORHP=[true,false]` | should worhp be linked; specify `WORHP_DIR` if not found automatically |
| `ZIMPL` | `on`, `off` | `ZIMPL=[true, false]` | specify `ZIMPL_DIR` if not found automatically |
| `AMPL` | `on`, `off` | `AMPL=[true, false]` | |
Expand Down Expand Up @@ -346,7 +347,7 @@ In your SCIP main directory, enter `make [options]` with the following options:
| `PAPILO=false` | `[false, true]` | to disable or disable the MILP presolver based on the presolving library PaPILO |
| `READLINE=true` | `[true, false]` | to enable or disable readline library for interactive shell |
| `SHARED=false` | `[false, true]` | to suppress or create shared libraries (only Gnu compiler) |
| `SYM=none` | `[none, bliss, sbliss, nauty, snauty]` | to choose method for computing symmetries in mixed nonlinear integer programs |
| `SYM=none` | `[none, nauty, snauty, bliss, sbliss]` | to choose method for computing symmetries in mixed nonlinear integer programs |
| `TPI=none` | `[none, omp, tny]` | to disable the task processing interface or use it with the openmp or tinycthreads interface for concurrent solves |
| `VERBOSE=false` | `[false, true]` | to suppress or display of compiler and linker invocations |
| `WORHP=false` | `[false, true]` | to disable or enable WORHP interface (needs WORHP >= 2.00) |
Expand Down
10 changes: 4 additions & 6 deletions doc/xternal.c
Original file line number Diff line number Diff line change
Expand Up @@ -8438,14 +8438,12 @@
* invariant. To detect such formulation symmetries, SCIP builds an auxiliary colored graph whose
* color-preserving automorphisms correspond to symmetries of the integer program. The symmetries of
* the graph, and thus of the integer program, are then computed by an external graph automorphism
* library that needs to be linked to SCIP. Currently, SCIP ships with two such libraries: The graph
* library that needs to be linked to SCIP. Currently, SCIP can use two such libraries: The graph
* automorphism libraries bliss or nauty/traces are the basic workhorses to detect symmetries. Moreover, one can use
* sassy, a graph symmetry preprocessor which passes the preprocessed graphs to bliss or nauty/traces.
* The current default is to use bliss in combination with sassy for symmetry detection.
*
* @note To detect symmetries, SCIP needs to be built with sassy/bliss, which can be achieved
* by using the options <code>SYM=sassy</code> and <code>-DSYM=sassy</code> in the Makefile and CMake
* system, respectively.
* The current default is to use nauty in combination with sassy for symmetry detection.
* To use other symmetry packages, options <code>SYM</code> and <code>-DSYM</code> in the Makefile and CMake
* system, respectively, need to be set.
*
* Besides purely integer linear problems, SCIP also supports symmetry detection for general
* constraint mixed-integer programs containing most of the constraint types that can be handled
Expand Down
69 changes: 26 additions & 43 deletions src/scip/primal.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,34 +162,10 @@ SCIP_RETCODE SCIPprimalFree(
BMS_BLKMEM* blkmem /**< block memory */
)
{
int s;

assert(primal != NULL);
assert(*primal != NULL);

/* free temporary solution for storing current solution */
if( (*primal)->currentsol != NULL )
{
SCIP_CALL( SCIPsolFree(&(*primal)->currentsol, blkmem, *primal) );
}

/* free solution for storing primal ray */
if( (*primal)->primalray != NULL )
{
SCIP_CALL( SCIPsolFree(&(*primal)->primalray, blkmem, *primal) );
}

/* free feasible primal CIP solutions */
for( s = 0; s < (*primal)->nsols; ++s )
{
SCIP_CALL( SCIPsolFree(&(*primal)->sols[s], blkmem, *primal) );
}
/* free partial CIP solutions */
for( s = 0; s < (*primal)->npartialsols; ++s )
{
SCIP_CALL( SCIPsolFree(&(*primal)->partialsols[s], blkmem, *primal) );
}
assert((*primal)->nexistingsols == 0);
SCIP_CALL( SCIPprimalClear(*primal, blkmem) );

BMSfreeMemoryArrayNull(&(*primal)->sols);
BMSfreeMemoryArrayNull(&(*primal)->partialsols);
Expand All @@ -201,43 +177,50 @@ SCIP_RETCODE SCIPprimalFree(

/** clears primal data */
SCIP_RETCODE SCIPprimalClear(
SCIP_PRIMAL** primal, /**< pointer to primal data */
SCIP_PRIMAL* primal, /**< pointer to primal data */
BMS_BLKMEM* blkmem /**< block memory */
)
{
int s;

assert(primal != NULL);
assert(*primal != NULL);

/* free temporary solution for storing current solution */
if( (*primal)->currentsol != NULL )
if( primal->currentsol != NULL )
{
SCIP_CALL( SCIPsolFree(&(*primal)->currentsol, blkmem, *primal) );
SCIP_CALL( SCIPsolFree(&primal->currentsol, blkmem, primal) );
}

/* free solution for storing primal ray */
if( (*primal)->primalray != NULL )
if( primal->primalray != NULL )
{
SCIP_CALL( SCIPsolFree(&(*primal)->primalray, blkmem, *primal) );
SCIP_CALL( SCIPsolFree(&primal->primalray, blkmem, primal) );
}

/* free feasible primal CIP solutions */
for( s = 0; s < (*primal)->nsols; ++s )
for( s = 0; s < primal->nsols; ++s )
{
SCIP_CALL( SCIPsolFree(&(*primal)->sols[s], blkmem, *primal) );
SCIP_CALL( SCIPsolFree(&primal->sols[s], blkmem, primal) );
}

(*primal)->currentsol = NULL;
(*primal)->primalray = NULL;
(*primal)->nsols = 0;
(*primal)->nsolsfound = 0;
(*primal)->nlimsolsfound = 0;
(*primal)->nbestsolsfound = 0;
(*primal)->nlimbestsolsfound = 0;
(*primal)->upperbound = SCIP_INVALID;
(*primal)->cutoffbound = SCIP_INVALID;
(*primal)->updateviolations = TRUE;
/* free partial CIP solutions */
for( s = 0; s < primal->npartialsols; ++s )
{
SCIP_CALL( SCIPsolFree(&primal->partialsols[s], blkmem, primal) );
}
assert(primal->nexistingsols == 0);

primal->currentsol = NULL;
primal->primalray = NULL;
primal->nsols = 0;
primal->nsolsfound = 0;
primal->npartialsols = 0;
primal->nlimsolsfound = 0;
primal->nbestsolsfound = 0;
primal->nlimbestsolsfound = 0;
primal->upperbound = SCIP_INVALID;
primal->cutoffbound = SCIP_INVALID;
primal->updateviolations = TRUE;

return SCIP_OKAY;
}
Expand Down
2 changes: 1 addition & 1 deletion src/scip/primal.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ SCIP_RETCODE SCIPprimalFree(

/** clears primal data */
SCIP_RETCODE SCIPprimalClear(
SCIP_PRIMAL** primal, /**< pointer to primal data */
SCIP_PRIMAL* primal, /**< pointer to primal data */
BMS_BLKMEM* blkmem /**< block memory */
);

Expand Down
2 changes: 1 addition & 1 deletion src/scip/scip_solve.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ SCIP_RETCODE freeReoptSolve(
}

/* free the debug solution which might live in transformed primal data structure */
SCIP_CALL( SCIPprimalClear(&scip->primal, scip->mem->probmem) );
SCIP_CALL( SCIPprimalClear(scip->primal, scip->mem->probmem) );

if( scip->set->misc_resetstat )
{
Expand Down

0 comments on commit d6b88b8

Please sign in to comment.