GOBNILP  f164d83
Functions
probdata_bn.h File Reference

Function declarations for probdata_bn.c. More...

#include "parent_set_data.h"
#include "model_averaging.h"
Include dependency graph for probdata_bn.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

SCIP_RETCODE BN_addNonRepetitionConstraint (SCIP *scip, int run)
 Adds a constraint that prevents the current best network being found again. More...
 
SCIP_RETCODE BN_addParameters (SCIP *scip)
 Adds GOBNILP specific parameters to those recognised by SCIP. More...
 
SCIP_RETCODE BN_doIterativePrint (SCIP *scip, MA_info *ma_info, int run)
 Prints appropriate information about each optimal solution obtained. More...
 
int BN_getNumberOfRepeats (SCIP *scip)
 Gets the number of most likely Bayesian networks that should be found. More...
 
SCIP_RETCODE BN_includePlugins (SCIP *scip)
 Includes all plugins needed by the problem. More...
 
SCIP_RETCODE BN_printcountsols (SCIP *scip, char *filename)
 Prints solutions found using countsols. More...
 
SCIP_RETCODE BN_printHeader (SCIP *scip)
 Prints a header which describes the GOBNILP and SCIP systems being used. More...
 
SCIP_RETCODE BN_printParameters (SCIP *scip)
 Prints any of the current SCIP or GOBNILP parameters not at their default value. More...
 
SCIP_RETCODE BN_printProblem (SCIP *scip, int run)
 Prints the current problem. More...
 
SCIP_RETCODE BN_printScores (SCIP *scip)
 Prints the scores for the family variables in Jaakkola format. More...
 
SCIP_RETCODE BN_readProblem (SCIP *scip, char *inputformat, char *frequencyfile, const char *filename)
 Reads in a problem from a file. More...
 
SCIP_RETCODE BN_setParamaterDefaults (SCIP *scip)
 Sets various built-in SCIP parameters to suitable GOBNILP values. More...
 
SCIP_RETCODE BN_suppresscols (SCIP *scip)
 Suppresses output columns according to the value of parameter gobnilp/verblevelsetcols. More...
 

Detailed Description

Function declarations for probdata_bn.c.

Function Documentation

◆ BN_addNonRepetitionConstraint()

SCIP_RETCODE BN_addNonRepetitionConstraint ( SCIP *  scip,
int  run 
)

Adds a constraint that prevents the current best network being found again.

Parameters
scipThe SCIP instance being used for the optimisation.
runThe iteration of the loop that this soilution was found on.
Returns
SCIP_OKAY if a constraint could be added, or an error otherwise.

References BN_addMECNonRepetitionConstraint(), MD_getParentSetData(), ParentSetData::n, ParentSetData::nParentSets, and ParentSetData::PaVars.

Here is the call graph for this function:

◆ BN_addParameters()

SCIP_RETCODE BN_addParameters ( SCIP *  scip)

Adds GOBNILP specific parameters to those recognised by SCIP.

Parameters
scipThe SCIP instance to add to the parameters to.
Returns
SCIP_OKAY if the operation succeeded or an appropriate error coede otherwise.

References IO_addOutputParameters(), PD_addPedigreeParameters(), SC_addScoringParameters(), UT_addBoolParam(), UT_addIntParam(), UT_addLongintParam(), UT_addRealParam(), and UT_addStringParam().

Referenced by main().

Here is the call graph for this function:

◆ BN_doIterativePrint()

SCIP_RETCODE BN_doIterativePrint ( SCIP *  scip,
MA_info ma_info,
int  run 
)

Prints appropriate information about each optimal solution obtained.

Parameters
scipThe SCIP instance for which the solution has been found.
runThe iteration of the main loop that the solution was found on.
Returns
SCIP_OKAY if printing succeeded or an appropriate error code otherwise.

References IO_doIterativePrint(), and MD_getParentSetData().

Referenced by main().

Here is the call graph for this function:

◆ BN_getNumberOfRepeats()

int BN_getNumberOfRepeats ( SCIP *  scip)

Gets the number of most likely Bayesian networks that should be found.

Parameters
scipThe SCIP inatance used for finding the networks.
Returns
The number of Bayesian networks that should be found.

Referenced by main().

◆ BN_includePlugins()

SCIP_RETCODE BN_includePlugins ( SCIP *  scip)

Includes all plugins needed by the problem.

Parameters
scipThe SCIP instance to add the plugins to.
Returns
SCIP_OKAY if all plugins were added successfully, or an error otherwise.

References DC_includeConshdlr(), HS_includePrimal(), MD_initialiseMetadata(), SCIPincludeConshdlrChordal(), SCIPincludeConshdlrCi(), SCIPincludeConshdlrLOP(), and SCIPincludeConshdlrPartialOrdering().

Referenced by main().

Here is the call graph for this function:

◆ BN_printcountsols()

SCIP_RETCODE BN_printcountsols ( SCIP *  scip,
char *  filename 
)

Prints solutions found using countsols.

Parameters
scipThe SCIP instance to print scores for.
Returns
SCIP_OKAY if printing succeeded or an error otherwise.

References IO_printcountsols(), and MD_getParentSetData().

Referenced by main().

Here is the call graph for this function:

◆ BN_printHeader()

SCIP_RETCODE BN_printHeader ( SCIP *  scip)

Prints a header which describes the GOBNILP and SCIP systems being used.

Parameters
scipThe SCIP instance that is being used.
Returns
SCIP_OKAY if printing succeeded or an error code otherwise.

References IO_printHeader().

Referenced by main().

Here is the call graph for this function:

◆ BN_printParameters()

SCIP_RETCODE BN_printParameters ( SCIP *  scip)

Prints any of the current SCIP or GOBNILP parameters not at their default value.

Parameters
scipThe SCIP instance to consult the parameters of.
Returns
SCIP_OKAY if the parameters were printed correctly, or an error code otherwise.

References IO_printParameters().

Referenced by main().

Here is the call graph for this function:

◆ BN_printProblem()

SCIP_RETCODE BN_printProblem ( SCIP *  scip,
int  run 
)

Prints the current problem.

Parameters
scipThe SCIP instance for which the problem should be printed.
runThe iteration of the main loop that the problem is to be solved on.
Returns
SCIP_OKAY if printing succeeded or an appropriate error code otherwise.

References IO_printProblem().

Referenced by main().

Here is the call graph for this function:

◆ BN_printScores()

SCIP_RETCODE BN_printScores ( SCIP *  scip)

Prints the scores for the family variables in Jaakkola format.

Parameters
scipThe SCIP instance to print scores for.
Returns
SCIP_OKAY if printing succeeded or an error otherwise.

References IO_printScoresInJKLFormat(), and MD_getParentSetData().

Referenced by main().

Here is the call graph for this function:

◆ BN_readProblem()

SCIP_RETCODE BN_readProblem ( SCIP *  scip,
char *  inputformat,
char *  frequencyfile,
const char *  filename 
)

Reads in a problem from a file.

Currently supported file formats are "jak", "cip" and "dat". The one to use is determined using the -f cmmand line argument and the filename extension. See getInputFormat() for details.

Parameters
scipThe SCIP instance to read the problem in to.
filenameThe filename from which to read the problem.
Returns
SCIP_OKAY if the problem was successfully created, or an error code otherwise.

References addAdditionalConstraints(), getInputFormat(), MD_getParentSetData(), ParentSetData::n, ParentSetData::nParents, ParentSetData::nParentSets, ParentSetData::ParentSets, readProblemInCIPFormat(), readProblemInNonCIPFormat(), setBranchingPriorities(), and setSpecialProperties().

Referenced by main().

Here is the call graph for this function:

◆ BN_setParamaterDefaults()

SCIP_RETCODE BN_setParamaterDefaults ( SCIP *  scip)

Sets various built-in SCIP parameters to suitable GOBNILP values.

These values can still be overriden using the settings file.

Parameters
scipThe SCIP instance the parameters relate to.
Returns
SCIP_OKAY if the setting worked or an appropriate error otherwise.

Referenced by main().

◆ BN_suppresscols()

SCIP_RETCODE BN_suppresscols ( SCIP *  scip)

Suppresses output columns according to the value of parameter gobnilp/verblevelsetcols.

Returns
SCIP_OKAY assuming all is well

Referenced by main().