Scippy

SCIP

Solving Constraint Integer Programs

solhistory.c File Reference

Detailed Description

includes methods working on the (reduction) history of solutions to Steiner tree problems

Author
Daniel Rehfeldt

This file includes methods working on the (reduction) history of solutions to Steiner tree problems

A list of all interface methods can be found in solhistory.h

Definition in file solhistory.c.

#include "solhistory.h"
#include "probdata_stp.h"
#include "portab.h"
#include "solstp.h"
#include "mst.h"
#include "shortestpath.h"

Go to the source code of this file.

Functions

static void updateorgsol (const GRAPH *graph, IDX *curr, STP_Bool *RESTRICT orgnodes, STP_Bool *RESTRICT orgedges, int *nsolnodes, int *nsoledges)
 
static void cleanHistory (const GRAPH *g, SOLHISTORY *solhistory)
 
static SCIP_RETCODE computeHistory (SCIP *scip, SCIP_SOL *scipsol, const GRAPH *graph, SOLHISTORY *solhistory)
 
static SCIP_RETCODE computeHistoryPcMw (SCIP *scip, SCIP_SOL *scipsol, const GRAPH *graph, SOLHISTORY *solhistory)
 
SCIP_RETCODE solhistory_init (SCIP *scip, const GRAPH *graph, SOLHISTORY **solhistory)
 
void solhistory_free (SCIP *scip, SOLHISTORY **solhistory)
 
SCIP_RETCODE solhistory_computeHistory (SCIP *scip, SCIP_SOL *scipsol, const GRAPH *g, SOLHISTORY *solhistory)
 

Function Documentation

◆ updateorgsol()

static void updateorgsol ( const GRAPH graph,
IDX curr,
STP_Bool *RESTRICT  orgnodes,
STP_Bool *RESTRICT  orgedges,
int *  nsolnodes,
int *  nsoledges 
)
inlinestatic

updates

Parameters
graphgraph data structure
currhead of solution edge list
orgnodesarray to mark whether a node is part of the original solution
orgedgesarray to mark whether an edge is part of the original solution
nsolnodespointer to store the number of nodes in the original solution
nsoledgespointer to store the number of edges in the original solution

Definition at line 46 of file solhistory.c.

References FALSE, Int_List_Node::index, NULL, GRAPH::orghead, GRAPH::orgtail, Int_List_Node::parent, and TRUE.

Referenced by computeHistory().

◆ cleanHistory()

static void cleanHistory ( const GRAPH g,
SOLHISTORY solhistory 
)
static

builds history

Parameters
ggraph structure
solhistorythe solution history

Definition at line 91 of file solhistory.c.

References FALSE, solution_history::norgedges, solution_history::norgnodes, GRAPH::orgedges, solution_history::orgedges_isInSol, GRAPH::orgknots, and solution_history::orgnodes_isInSol.

Referenced by solhistory_computeHistory().

◆ computeHistory()

◆ computeHistoryPcMw()

◆ solhistory_init()

SCIP_RETCODE solhistory_init ( SCIP scip,
const GRAPH graph,
SOLHISTORY **  solhistory 
)

◆ solhistory_free()

void solhistory_free ( SCIP scip,
SOLHISTORY **  solhistory 
)

frees

Parameters
scipSCIP data structure
solhistorythe solution history

Definition at line 419 of file solhistory.c.

References solution_history::orgedges_isInSol, solution_history::orgnodes_isInSol, SCIPfreeMemory, SCIPfreeMemoryArray, and SCIPfreeMemoryArrayNull.

Referenced by SCIPprobdataWriteSolution(), and subscipGetSol().

◆ solhistory_computeHistory()

SCIP_RETCODE solhistory_computeHistory ( SCIP scip,
SCIP_SOL scipsol,
const GRAPH g,
SOLHISTORY solhistory 
)

builds history

Parameters
scipSCIP data structure
scipsolsolution
ggraph structure
solhistorythe solution history

Definition at line 437 of file solhistory.c.

References cleanHistory(), computeHistory(), computeHistoryPcMw(), graph_pc_isPcMw(), SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPprobdataWriteSolution(), and subscipGetSol().