Scippy

SCIP

Solving Constraint Integer Programs

cppmain.cpp File Reference

Detailed Description

main file for C++ TSP example using SCIP as a callable library

Author
Tobias Achterberg
Timo Berthold

This is an example of using SCIP to solve the TSP problem on undirected graphs. See the doxygen documentation for an explanation.

Definition in file cppmain.cpp.

#include <iostream>
#include "objscip/objscip.h"
#include "objscip/objscipdefplugins.h"
#include "ReaderTSP.h"
#include "ConshdlrSubtour.h"
#include "HeurFarthestInsert.h"
#include "Heur2opt.h"
#include "HeurFrats.h"
#include "EventhdlrNewSol.h"

Go to the source code of this file.

Functions

static SCIP_RETCODE runSCIP (int argc, char **argv)
 
int main (int argc, char **argv)
 

Function Documentation

◆ runSCIP()

static SCIP_RETCODE runSCIP ( int  argc,
char **  argv 
)
static

creates and runs a SCIP instance with default and TSP plugins

Parameters
argcnumber of arguments from the shell
argvarray of shell arguments

Definition at line 56 of file cppmain.cpp.

References BMScheckEmptyMemory, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreate(), SCIPenableDebugSol(), SCIPfree(), SCIPincludeDefaultPlugins(), SCIPincludeObjConshdlr(), SCIPincludeObjEventhdlr(), SCIPincludeObjHeur(), SCIPincludeObjReader(), SCIPprocessShellArguments(), and TRUE.

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

main method starting TSP code

Parameters
argcnumber of arguments from the shell
argvarray of shell arguments

Definition at line 105 of file cppmain.cpp.

References runSCIP(), SCIP_OKAY, and SCIPprintError().