Scippy

SCIP

Solving Constraint Integer Programs

validate.c File Reference

Detailed Description

Method to validate Steiner problem solutions.

Author
Thorsten Koch
Gerald Gamrath
Daniel Rehfeldt

Definition in file validate.c.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include "graph.h"
#include "portab.h"

Go to the source code of this file.

Functions

static int nail (const GRAPH *g, const double *xval)
 
static void trail_old (const GRAPH *g, int i, const double *xval, int tail, int *visitcount)
 
static SCIP_RETCODE trail (SCIP *scip, const GRAPH *g, const double *xval, int start, int *visitcount)
 
SCIP_RETCODE SCIPStpValidateSol (SCIP *scip, const GRAPH *g, const double *xval, SCIP_Bool allow_cyles, SCIP_Bool *feasible)
 

Function Documentation

◆ nail()

static int nail ( const GRAPH g,
const double *  xval 
)
static

Definition at line 35 of file validate.c.

References GRAPH::edges, EPSILON, FALSE, GRAPH::layers, NULL, and TRUE.

Referenced by SCIPStpValidateSol().

◆ trail_old()

static void trail_old ( const GRAPH g,
int  i,
const double *  xval,
int  tail,
int *  visitcount 
)
static

Definition at line 85 of file validate.c.

References EAT_LAST, EPSILON, GRAPH::head, GRAPH::oeat, and GRAPH::outbeg.

Referenced by trail().

◆ trail()

static SCIP_RETCODE trail ( SCIP scip,
const GRAPH g,
const double *  xval,
int  start,
int *  visitcount 
)
static

traverses the graph from vertex 'start' and marks all reached nodes (counts up to to at most 2)

Parameters
scipSCIP
gthe new graph
xval(LP) solution
startnode to start from
visitcountmarks which node has been visited

Definition at line 120 of file validate.c.

References a, EAT_LAST, EPSILON, GRAPH::grad, GRAPH::head, GRAPH::knots, nnodes, GRAPH::oeat, GRAPH::outbeg, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPallocClearBufferArray, SCIPfreeBufferArray, and trail_old().

Referenced by SCIPStpValidateSol().

◆ SCIPStpValidateSol()

SCIP_RETCODE SCIPStpValidateSol ( SCIP scip,
const GRAPH g,
const double *  xval,
SCIP_Bool  allow_cyles,
SCIP_Bool feasible 
)

validates whether a (LP) solution is feasible

Parameters
scipSCIP
gthe new graph
xval(LP) solution
allow_cylesallow cycles?
feasibleis feasible?

Definition at line 202 of file validate.c.

References EAT_LAST, GRAPH::edges, EPSILON, FALSE, flipedge, GE, GRAPH::grad, graph_get_nNodes(), graph_valid(), GRAPH::maxdeg, nail(), nnodes, GRAPH::oeat, GRAPH::outbeg, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPdebugMessage, SCIPfreeBufferArray, GRAPH::source, STP_DCSTP, GRAPH::stp_type, GRAPH::term, trail(), and TRUE.

Referenced by SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), and solAddTry().