Scippy

SoPlex

Sequential object-oriented simPlex

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-2024 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
35namespace 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*/
47template <class R>
48class SPxDantzigPR : public SPxPricer<R>
49{
50private:
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 */
56 SPxId& id); /**< sparse pricing method for entering Simplex (slack variables)*/
58 SPxId& id); /**< sparse pricing method for entering Simplex */
60 SPxId& id); /**< selectEnter() in dense case (slack variables) */
62 SPxId& id); /**< selectEnter() in dense case */
63public:
64
65 //-------------------------------------
66 /**@name Constructors / destructors */
67 ///@{
68 /// default constructor
70 : SPxPricer<R>("Dantzig")
71 {}
72 /// copy constructor
74 : SPxPricer<R>(old)
75 {}
76 /// assignment operator
78 {
79 if(this != &rhs)
80 {
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 ///
104 ///@}
105};
106} // namespace soplex
107
108// For general tempalted functions
109#include "spxdantzigpr.hpp"
110
111#endif // _SPXDEFAULTPRR_H_
Dantzig pricer.
Definition: spxdantzigpr.h:49
SPxId selectEnterSparseDim(R &best, SPxId &id)
SPxId selectEnterSparseCoDim(R &best, SPxId &id)
SPxId selectEnterDenseCoDim(R &best, SPxId &id)
virtual SPxPricer< R > * clone() const
clone function for polymorphism
Definition: spxdantzigpr.h:90
SPxDantzigPR & operator=(const SPxDantzigPR &rhs)
assignment operator
Definition: spxdantzigpr.h:77
SPxId selectEnterDenseDim(R &best, SPxId &id)
virtual ~SPxDantzigPR()
destructor
Definition: spxdantzigpr.h:87
SPxDantzigPR()
default constructor
Definition: spxdantzigpr.h:69
virtual int selectLeave()
virtual SPxId selectEnter()
SPxDantzigPR(const SPxDantzigPR &old)
copy constructor
Definition: spxdantzigpr.h:73
Generic Ids for LP rows or columns.
Definition: spxid.h:95
Abstract pricer base class.
Definition: spxpricer.h:57
SPxPricer & operator=(const SPxPricer &rhs)
assignment operator
Definition: spxpricer.h:298
Everything should be within this namespace.
Abstract pricer base class.