source: trunk/CoinMP/src/CoinSolver.c @ 366

Last change on this file since 366 was 366, checked in by bjarni, 10 years ago

Extract pOption/CoinOption.cpp out of pSolver/CoinSolver.cpp and update option calls in CoinCbc?

File size: 757 bytes
Line 
1
2/*  CoinSolver.c  */
3
4#include <stdlib.h>
5#include <string.h>
6
7#include "CoinSolver.h"
8
9
10PSOLVER coinCreateSolverObject()
11{
12        PSOLVER pSolver;
13
14        pSolver = (PSOLVER)malloc(sizeof(SOLVERINFO));
15        memset(pSolver, 0, sizeof(SOLVERINFO));
16
17        strcpy(pSolver->LogFilename, "");
18
19        pSolver->MsgLogCallback = NULL;
20        pSolver->IterCallback = NULL;
21        pSolver->MipNodeCallback = NULL;
22
23        return pSolver;
24}
25
26
27void coinClearSolverObject(PSOLVER pSolver)
28{
29        if (!pSolver) {
30                return;
31        }
32        free(pSolver);
33}
34
35
36void coinSetLogFilename(PSOLVER pSolver, const char* LogFilename)
37{
38        if (LogFilename) {
39                strcpy(pSolver->LogFilename, LogFilename);
40        }
41}
42
43
44const char* coinGetLogFilename(PSOLVER pSolver)
45{
46        return pSolver->LogFilename;
47}
48
Note: See TracBrowser for help on using the repository browser.