Scippy

    SCIP

    Solving Constraint Integer Programs

    scip::ObjHeur Class Referenceabstract

    Detailed Description

    C++ wrapper for primal heuristics.

    This class defines the interface for primal heuristics implemented in C++. Note that there is a pure virtual function (this function has to be implemented). This function is: scip_exec().

    Definition at line 53 of file objheur.h.

    C++ wrapper for primal heuristics. More...

    #include <objheur.h>

    Public Member Functions

     ObjHeur (SCIP *scip, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, SCIP_HEURTIMING timingmask, SCIP_Bool usessubscip)
     
     ObjHeur (const ObjHeur &o)
     
     ObjHeur (ObjHeur &&o)
     
    virtual ~ObjHeur ()
     
    ObjHeuroperator= (const ObjHeur &o)=delete
     
    ObjHeuroperator= (ObjHeur &&o)=delete
     
    virtual SCIP_DECL_HEURFREE (scip_free)
     
    virtual SCIP_DECL_HEURINIT (scip_init)
     
    virtual SCIP_DECL_HEUREXIT (scip_exit)
     
    virtual SCIP_DECL_HEURINITSOL (scip_initsol)
     
    virtual SCIP_DECL_HEUREXITSOL (scip_exitsol)
     
    virtual SCIP_DECL_HEUREXEC (scip_exec)=0
     
    - Public Member Functions inherited from scip::ObjCloneable
    virtual ~ObjCloneable ()
     
    ObjCloneableoperator= (const ObjCloneable &o)=delete
     
    ObjCloneableoperator= (ObjCloneable &&o)=delete
     
    virtual SCIP_DECL_OBJCLONEABLECLONE (ObjCloneable *clone)
     
    virtual SCIP_DECL_OBJCLONEABLEISCLONEABLE (iscloneable)
     

    Data Fields

    SCIPscip_
     
    char * scip_name_
     
    char * scip_desc_
     
    const char scip_dispchar_
     
    const int scip_priority_
     
    const int scip_freq_
     
    const int scip_freqofs_
     
    const int scip_maxdepth_
     
    const SCIP_HEURTIMING scip_timingmask_
     
    const SCIP_Bool scip_usessubscip_
     

    Constructor & Destructor Documentation

    ◆ ObjHeur() [1/3]

    scip::ObjHeur::ObjHeur ( SCIP scip,
    const char *  name,
    const char *  desc,
    char  dispchar,
    int  priority,
    int  freq,
    int  freqofs,
    int  maxdepth,
    SCIP_HEURTIMING  timingmask,
    SCIP_Bool  usessubscip 
    )
    inline

    default constructor

    Parameters
    scipSCIP data structure
    namename of primal heuristic
    descdescription of primal heuristic
    dispchardisplay character of primal heuristic
    prioritypriority of the primal heuristic
    freqfrequency for calling primal heuristic
    freqofsfrequency offset for calling primal heuristic
    maxdepthmaximal depth level to call heuristic at (-1: no limit)
    timingmaskpositions in the node solving loop where heuristic should be executed; see definition of SCIP_HEURTIMING for possible values
    usessubscipdoes the heuristic use a secondary SCIP instance?

    Definition at line 89 of file objheur.h.

    References scip_, SCIP_CALL_ABORT, scip_desc_, scip_name_, and SCIPduplicateMemoryArray.

    ◆ ObjHeur() [2/3]

    scip::ObjHeur::ObjHeur ( const ObjHeur o)
    inline

    copy constructor

    Definition at line 119 of file objheur.h.

    ◆ ObjHeur() [3/3]

    scip::ObjHeur::ObjHeur ( ObjHeur &&  o)
    inline

    move constructor

    Definition at line 126 of file objheur.h.

    References scip_desc_, and scip_name_.

    ◆ ~ObjHeur()

    virtual scip::ObjHeur::~ObjHeur ( )
    inlinevirtual

    destructor

    Definition at line 143 of file objheur.h.

    References scip_, scip_desc_, scip_name_, and SCIPfreeMemoryArray.

    Member Function Documentation

    ◆ operator=() [1/2]

    ObjHeur & scip::ObjHeur::operator= ( const ObjHeur o)
    delete

    assignment of polymorphic classes causes slicing and is therefore disabled.

    ◆ operator=() [2/2]

    ObjHeur & scip::ObjHeur::operator= ( ObjHeur &&  o)
    delete

    assignment of polymorphic classes causes slicing and is therefore disabled.

    ◆ SCIP_DECL_HEURFREE()

    virtual scip::ObjHeur::SCIP_DECL_HEURFREE ( scip_free  )
    inlinevirtual

    destructor of primal heuristic to free user data (called when SCIP is exiting)

    See also
    SCIP_DECL_HEURFREE(x) in type_heur.h

    Reimplemented in tsp::Heur2opt, tsp::HeurFarthestInsert, and tsp::HeurFrats.

    Definition at line 161 of file objheur.h.

    References SCIP_OKAY.

    ◆ SCIP_DECL_HEURINIT()

    virtual scip::ObjHeur::SCIP_DECL_HEURINIT ( scip_init  )
    inlinevirtual

    initialization method of primal heuristic (called after problem was transformed)

    See also
    SCIP_DECL_HEURINIT(x) in type_heur.h

    Reimplemented in tsp::Heur2opt, tsp::HeurFarthestInsert, and tsp::HeurFrats.

    Definition at line 170 of file objheur.h.

    References SCIP_OKAY.

    ◆ SCIP_DECL_HEUREXIT()

    virtual scip::ObjHeur::SCIP_DECL_HEUREXIT ( scip_exit  )
    inlinevirtual

    deinitialization method of primal heuristic (called before transformed problem is freed)

    See also
    SCIP_DECL_HEUREXIT(x) in type_heur.h

    Reimplemented in tsp::Heur2opt, tsp::HeurFarthestInsert, and tsp::HeurFrats.

    Definition at line 179 of file objheur.h.

    References SCIP_OKAY.

    ◆ SCIP_DECL_HEURINITSOL()

    virtual scip::ObjHeur::SCIP_DECL_HEURINITSOL ( scip_initsol  )
    inlinevirtual

    solving process initialization method of primal heuristic (called when branch and bound process is about to begin)

    See also
    SCIP_DECL_HEURINITSOL(x) in type_heur.h

    Reimplemented in tsp::Heur2opt, tsp::HeurFarthestInsert, and tsp::HeurFrats.

    Definition at line 188 of file objheur.h.

    References SCIP_OKAY.

    ◆ SCIP_DECL_HEUREXITSOL()

    virtual scip::ObjHeur::SCIP_DECL_HEUREXITSOL ( scip_exitsol  )
    inlinevirtual

    solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)

    See also
    SCIP_DECL_HEUREXITSOL(x) in type_heur.h

    Reimplemented in tsp::Heur2opt, tsp::HeurFarthestInsert, and tsp::HeurFrats.

    Definition at line 197 of file objheur.h.

    References SCIP_OKAY.

    ◆ SCIP_DECL_HEUREXEC()

    virtual scip::ObjHeur::SCIP_DECL_HEUREXEC ( scip_exec  )
    pure virtual

    execution method of primal heuristic

    See also
    SCIP_DECL_HEUREXEC(x) in type_heur.h

    Implemented in tsp::Heur2opt, tsp::HeurFarthestInsert, and tsp::HeurFrats.

    Field Documentation

    ◆ scip_

    SCIP* scip::ObjHeur::scip_

    SCIP data structure

    Definition at line 59 of file objheur.h.

    Referenced by ObjHeur(), and ~ObjHeur().

    ◆ scip_name_

    char* scip::ObjHeur::scip_name_

    name of the primal heuristic

    Definition at line 62 of file objheur.h.

    Referenced by ObjHeur(), SCIPincludeObjHeur(), and ~ObjHeur().

    ◆ scip_desc_

    char* scip::ObjHeur::scip_desc_

    description of the primal heuristic

    Definition at line 65 of file objheur.h.

    Referenced by ObjHeur(), SCIPincludeObjHeur(), and ~ObjHeur().

    ◆ scip_dispchar_

    const char scip::ObjHeur::scip_dispchar_

    display character of primal heuristic

    Definition at line 68 of file objheur.h.

    Referenced by SCIPincludeObjHeur().

    ◆ scip_priority_

    const int scip::ObjHeur::scip_priority_

    default priority of the primal heuristic

    Definition at line 71 of file objheur.h.

    Referenced by SCIPincludeObjHeur().

    ◆ scip_freq_

    const int scip::ObjHeur::scip_freq_

    frequency for calling primal heuristic

    Definition at line 74 of file objheur.h.

    Referenced by SCIPincludeObjHeur().

    ◆ scip_freqofs_

    const int scip::ObjHeur::scip_freqofs_

    frequency offset for calling primal heuristic

    Definition at line 77 of file objheur.h.

    Referenced by SCIPincludeObjHeur().

    ◆ scip_maxdepth_

    const int scip::ObjHeur::scip_maxdepth_

    maximal depth level to call heuristic at (-1: no limit)

    Definition at line 80 of file objheur.h.

    Referenced by SCIPincludeObjHeur().

    ◆ scip_timingmask_

    const SCIP_HEURTIMING scip::ObjHeur::scip_timingmask_

    positions in the node solving loop where heuristic should be executed

    Definition at line 83 of file objheur.h.

    Referenced by SCIPincludeObjHeur().

    ◆ scip_usessubscip_

    const SCIP_Bool scip::ObjHeur::scip_usessubscip_

    does the heuristic use a secondary SCIP instance?

    Definition at line 86 of file objheur.h.

    Referenced by SCIPincludeObjHeur().