SoPlex
Toggle main menu visibility
Loading...
Searching...
No Matches
src
soplex
spxdantzigpr.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-2026 Zuse Institute Berlin (ZIB) */
7
/* */
8
/* Licensed under the Apache License, Version 2.0 (the "License"); */
9
/* you may not use this file except in compliance with the License. */
10
/* You may obtain a copy of the License at */
11
/* */
12
/* http://www.apache.org/licenses/LICENSE-2.0 */
13
/* */
14
/* Unless required by applicable law or agreed to in writing, software */
15
/* distributed under the License is distributed on an "AS IS" BASIS, */
16
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17
/* See the License for the specific language governing permissions and */
18
/* limitations under the License. */
19
/* */
20
/* You should have received a copy of the Apache-2.0 license */
21
/* along with SoPlex; see the file LICENSE. If not email to soplex@zib.de. */
22
/* */
23
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25
/**@file spxdantzigpr.h
26
* @brief Dantzig pricer.
27
*/
28
#ifndef _SPXDEFAULTPR_H_
29
#define _SPXDEFAULTPR_H_
30
31
#include <assert.h>
32
33
#include "
soplex/spxpricer.h
"
34
35
namespace
soplex
36
{
37
38
/**@brief Dantzig pricer.
39
@ingroup Algo
40
41
Class SPxDantzigPR is an implementation class of an SPxPricer implementing
42
Dantzig's default pricing strategy, i.e., maximal/minimal reduced cost or
43
maximally violated constraint.
44
45
See SPxPricer for a class documentation.
46
*/
47
template
<
class
R>
48
class
SPxDantzigPR
:
public
SPxPricer
<R>
49
{
50
private
:
51
int
selectLeaveSparse
();
/**< sparse pricing method for leaving Simplex */
52
53
SPxId
54
selectEnterX
();
/**< choose the best entering index among columns and rows but prefer sparsity */
55
SPxId
selectEnterSparseDim
(R& best,
56
SPxId
&
id
);
/**< sparse pricing method for entering Simplex (slack variables)*/
57
SPxId
selectEnterSparseCoDim
(R& best,
58
SPxId
&
id
);
/**< sparse pricing method for entering Simplex */
59
SPxId
selectEnterDenseDim
(R& best,
60
SPxId
&
id
);
/**< selectEnter() in dense case (slack variables) */
61
SPxId
selectEnterDenseCoDim
(R& best,
62
SPxId
&
id
);
/**< selectEnter() in dense case */
63
public
:
64
65
//-------------------------------------
66
/**@name Constructors / destructors */
67
///@{
68
/// default constructor
69
SPxDantzigPR
()
70
:
SPxPricer
<R>(
"Dantzig"
)
71
{}
72
/// copy constructor
73
SPxDantzigPR
(
const
SPxDantzigPR
& old)
74
:
SPxPricer
<R>(old)
75
{}
76
/// assignment operator
77
SPxDantzigPR
&
operator=
(
const
SPxDantzigPR
& rhs)
78
{
79
if
(
this
!= &rhs)
80
{
81
SPxPricer<R>::operator=
(rhs);
82
}
83
84
return
*
this
;
85
}
86
/// destructor
87
virtual
~SPxDantzigPR
()
88
{}
89
/// clone function for polymorphism
90
inline
virtual
SPxPricer<R>
*
clone
()
const
91
{
92
return
new
SPxDantzigPR
(*
this
);
93
}
94
///@}
95
96
97
//-------------------------------------
98
/**@name Select enter/leave */
99
///@{
100
///
101
virtual
int
selectLeave
();
102
///
103
virtual
SPxId
selectEnter
();
104
///@}
105
};
106
}
// namespace soplex
107
108
// For general tempalted functions
109
#include "spxdantzigpr.hpp"
110
111
#endif
// _SPXDEFAULTPRR_H_
soplex::SPxDantzigPR::selectEnterSparseDim
SPxId selectEnterSparseDim(R &best, SPxId &id)
soplex::SPxDantzigPR::selectEnterSparseCoDim
SPxId selectEnterSparseCoDim(R &best, SPxId &id)
soplex::SPxDantzigPR::selectEnterDenseCoDim
SPxId selectEnterDenseCoDim(R &best, SPxId &id)
soplex::SPxDantzigPR::clone
virtual SPxPricer< R > * clone() const
clone function for polymorphism
Definition
spxdantzigpr.h:90
soplex::SPxDantzigPR::operator=
SPxDantzigPR & operator=(const SPxDantzigPR &rhs)
assignment operator
Definition
spxdantzigpr.h:77
soplex::SPxDantzigPR::selectEnterDenseDim
SPxId selectEnterDenseDim(R &best, SPxId &id)
soplex::SPxDantzigPR::~SPxDantzigPR
virtual ~SPxDantzigPR()
destructor
Definition
spxdantzigpr.h:87
soplex::SPxDantzigPR::selectEnterX
SPxId selectEnterX()
soplex::SPxDantzigPR::selectLeaveSparse
int selectLeaveSparse()
soplex::SPxDantzigPR::SPxDantzigPR
SPxDantzigPR()
default constructor
Definition
spxdantzigpr.h:69
soplex::SPxDantzigPR::selectLeave
virtual int selectLeave()
soplex::SPxDantzigPR::selectEnter
virtual SPxId selectEnter()
soplex::SPxDantzigPR::SPxDantzigPR
SPxDantzigPR(const SPxDantzigPR &old)
copy constructor
Definition
spxdantzigpr.h:73
soplex::SPxId
Generic Ids for LP rows or columns.
Definition
spxid.h:95
soplex::SPxPricer::SPxPricer
SPxPricer(const char *p_name)
constructor
Definition
spxpricer.h:284
soplex::SPxPricer::operator=
SPxPricer & operator=(const SPxPricer &rhs)
assignment operator
Definition
spxpricer.h:298
soplex
Everything should be within this namespace.
spxpricer.h
Abstract pricer base class.
Generated by
1.17.0