GOBNILP  f164d83
Functions
pedigrees.h File Reference

Function declarations for pedigrees.c. More...

#include "parent_set_data.h"
#include "property_data.h"
#include <scip/scip.h>
Include dependency graph for pedigrees.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

SCIP_RETCODE PD_addPedigreeParameters (SCIP *scip)
 Makes SCIP recognise parameters related to pedigree reconstruction. More...
 
SCIP_RETCODE PD_addPedigreeSpecificConstraints (SCIP *scip, ParentSetData *psd)
 Adds any constraints and variables needed for pedigree based constraints. More...
 
SCIP_RETCODE PD_assignPedigreeVariables (SCIP *scip, SCIP_SOL *sol, ParentSetData *psd, SCIP_Bool *possible)
 Tries to find values for any pedigree specific variables in a given primal solution. More...
 
SCIP_Bool * PD_getCurrentPedigreeVarValues (SCIP *scip)
 Gets the values of the pedigree specific variables in the current solution. More...
 
SCIP_Bool PD_inPedigreeMode (SCIP *scip)
 Determines whether the program is being run for learning pedigrees. More...
 
SCIP_RETCODE PD_printSolutionPedigreeFormat (SCIP *scip, ParentSetData *psd, SCIP_Real **Scores, SCIP_Bool **selected, SCIP_Real total_score, FILE *stream, SCIP_Bool *pedvars)
 Prints the solution as a pedigree. More...
 

Detailed Description

Function declarations for pedigrees.c.

Function Documentation

◆ PD_addPedigreeParameters()

SCIP_RETCODE PD_addPedigreeParameters ( SCIP *  scip)

Makes SCIP recognise parameters related to pedigree reconstruction.

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

References UT_addBoolParam(), UT_addIntParam(), UT_addRealParam(), and UT_addStringParam().

Referenced by BN_addParameters().

Here is the call graph for this function:

◆ PD_addPedigreeSpecificConstraints()

SCIP_RETCODE PD_addPedigreeSpecificConstraints ( SCIP *  scip,
ParentSetData psd 
)

Adds any constraints and variables needed for pedigree based constraints.

Parameters
scipThe SCIP instance in which to add the constraints.
psdThe parent set data associated with this problem.
Returns
SIP_OKAY if the constraints were added successfully, or an appropriate error code otherwise.

References PedigreeData::ages, MD_getPedigreeData(), MD_setPedigreeData(), PedigreeData::n, ParentSetData::n, PD_addPedigreeConstraints(), PD_addPedigreeVariables(), PE_deallocatePedigreeData(), PedigreeData::sexes, and PedigreeData::SexVars.

Referenced by addAdditionalConstraints().

Here is the call graph for this function:

◆ PD_assignPedigreeVariables()

SCIP_RETCODE PD_assignPedigreeVariables ( SCIP *  scip,
SCIP_SOL *  sol,
ParentSetData psd,
SCIP_Bool *  possible 
)

Tries to find values for any pedigree specific variables in a given primal solution.

If there is no possible assignment of pedigree variables then the function returns an appropriate error message.

Parameters
scipThe SCIP instance on which the heuristic is running.
solThe heuristic solution being worked on.
psdThe heursitic data related to this primal heursitic.
possibleReturns whether a valid assignment was possible.
Returns
SCIP_OKAY if a consistent labelling could be found and was made to sol. An appropriate error code otherwise.

References assignSexVariables(), checkSuitableForPedigree(), and usingSexConsistency().

Here is the call graph for this function:

◆ PD_getCurrentPedigreeVarValues()

SCIP_Bool* PD_getCurrentPedigreeVarValues ( SCIP *  scip)

Gets the values of the pedigree specific variables in the current solution.

If no pedigree specific variables are being used, NULL is returned.

Parameters
scipThe SCIP instance for which to find the variable values.
Returns
A list of SCIP_Bools which are TRUE for all variables included in the solution and FALSE otherwise.

References MD_getPedigreeData(), PedigreeData::n, PedigreeData::SexVars, and usingSexConsistency().

Referenced by printSolution().

Here is the call graph for this function:

◆ PD_inPedigreeMode()

SCIP_Bool PD_inPedigreeMode ( SCIP *  scip)

Determines whether the program is being run for learning pedigrees.

Parameters
scipThe SCIP instance that is running.
Returns
TRUE if the program is being used to learn pedigrees. FALSE otherwsie.

Referenced by addAdditionalConstraints(), printSolution(), and usingSexConsistency().

◆ PD_printSolutionPedigreeFormat()

SCIP_RETCODE PD_printSolutionPedigreeFormat ( SCIP *  scip,
ParentSetData psd,
SCIP_Real **  Scores,
SCIP_Bool **  selected,
SCIP_Real  total_score,
FILE *  stream,
SCIP_Bool *  pedvars 
)

Prints the solution as a pedigree.

The pedigree consists of four columns. The first is the individual, thes second is the sex of the individual, the third is its father and the fourth is its mother. If either the father or the mother is not present in the sample, a '-' is printed instead. If sex consistency is enforced, then individuals will not appear as father of one individual and mother of another. The pedigree is sorted such that all individuals are declared on a earlier line than those in which they appear as parents.

Parameters
scipThe SCIP instance to which the solution belongs.
psdThe problem data used by the solution.
ScoresThe score data to use for the solution.
selectedWhether each of the variables is selected in the solution.
total_scoreThe overall score of this solution.
streamWhere to print the solution.
pedvarsWhether each of the pedigree specific variables is selected in the solution.
Returns
SCIP_OKAY if the solution was printed correctly or an appropriate error message otherwise.

References checkSuitableForPedigree(), MD_getPedigreeData(), PedigreeData::n, ParentSetData::nodeNames, ParentSetData::nParents, ParentSetData::nParentSets, ParentSetData::ParentSets, and usingSexConsistency().

Referenced by printToFile().

Here is the call graph for this function: