Toggle navigation
SCIP Optimization Suite
SCIP
SoPlex
ZIMPL
UG
GCG
Documentation
SoPlex 6.0.3
SoPlex 5.0.2
SoPlex 4.0.2
SoPlex 3.1.0
SoPlex 3.0.1
SoPlex 2.2.1
SoPlex
Sequential object-oriented simPlex
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
soplex-repo
src
spxstarter.h
Go to the documentation of this file.
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2
/* */
3
/* This file is part of the class library */
4
/* SoPlex --- the Sequential object-oriented simPlex. */
5
/* */
6
/* Copyright (C) 1996-2015 Konrad-Zuse-Zentrum */
7
/* fuer Informationstechnik Berlin */
8
/* */
9
/* SoPlex is distributed under the terms of the ZIB Academic Licence. */
10
/* */
11
/* You should have received a copy of the ZIB Academic License */
12
/* along with SoPlex; see the file COPYING. If not email to soplex@zib.de. */
13
/* */
14
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15
16
17
/**@file spxstarter.h
18
* @brief SoPlex start basis generation base class.
19
*/
20
#ifndef _SPXDSTARTER_H_
21
#define _SPXDSTARTER_H_
22
23
#include <assert.h>
24
25
#include "
spxdefines.h
"
26
#include "
spxsolver.h
"
27
28
namespace
soplex
29
{
30
31
/**@brief SoPlex start basis generation base class.
32
@ingroup Algo
33
34
SPxStarter is the virtual base class for classes generating a starter basis
35
for the Simplex solver SoPlex. When a SPxStarter object has been loaded
36
to a SoPlex solver, the latter will call method #generate() in order to
37
have a start basis generated. Implementations of method #generate() must
38
terminate by \ref soplex::SPxSolver::load() "loading" the generated basis to
39
SoPlex. Loaded bases must be nonsingular.
40
*/
41
class
SPxStarter
42
{
43
protected
:
44
45
//-------------------------------------
46
/**@name Data */
47
//@{
48
/// name of the starter
49
const
char
*
m_name
;
50
//@}
51
52
public
:
53
54
//-------------------------------------
55
/**@name Data */
56
//@{
57
/// constructor
58
explicit
SPxStarter
(
const
char
* name)
59
:
m_name
(name)
60
{}
61
/// copy constructor
62
SPxStarter
(
const
SPxStarter
& old)
63
:
m_name
(old.
m_name
)
64
{}
65
/// assignment operator
66
SPxStarter
&
operator=
(
const
SPxStarter
& rhs)
67
{
68
if
(
this
!= &rhs)
69
{
70
m_name
= rhs.
m_name
;
71
}
72
73
return
*
this
;
74
}
75
/// destructor.
76
virtual
~SPxStarter
()
77
{
78
m_name
= 0;
79
}
80
/// clone function for polymorphism
81
virtual
SPxStarter
*
clone
()
const
= 0;
82
//@}
83
84
//-------------------------------------
85
/**@name Access */
86
//@{
87
/// get name of starter.
88
virtual
const
char
*
getName
()
const
89
{
90
return
m_name
;
91
}
92
//@}
93
94
//-------------------------------------
95
/**@name Starting */
96
//@{
97
/// generates start basis for loaded basis.
98
virtual
void
generate
(
SPxSolver
& base) = 0;
99
//@}
100
101
//-------------------------------------
102
/**@name Misc */
103
//@{
104
/// checks consistency.
105
virtual
bool
isConsistent
()
const
;
106
//@}
107
108
private
:
109
110
//------------------------------------
111
/**@name Blocked */
112
//@{
113
/// we have no default constructor.
114
SPxStarter
();
115
//@}
116
117
};
118
}
// namespace soplex
119
#endif // _SPXDSTARTER_H_