@@ -98,48 +98,17 @@ bool lp_primal_core_solver<T, X>::column_is_benefitial_for_entering_basis(unsign
98
98
}
99
99
return false ;
100
100
}
101
-
102
- template <typename T, typename X> bool lp_primal_core_solver<T, X>::try_jump_to_another_bound_on_entering(unsigned entering,
103
- const X & theta,
104
- X & t,
105
- bool & unlimited) {
106
- switch (this ->m_column_types [entering]){
107
- case column_type::boxed:
108
- if (m_sign_of_entering_delta > 0 ) {
109
- t = this ->m_upper_bounds [entering] - this ->m_x [entering];
110
- if (unlimited || t <= theta){
111
- lp_assert (t >= zero_of_type<X>());
112
- return true ;
113
- }
114
- } else { // m_sign_of_entering_delta == -1
115
- t = this ->m_x [entering] - this ->m_lower_bounds [entering];
116
- if (unlimited || t <= theta) {
117
- lp_assert (t >= zero_of_type<X>());
118
- return true ;
119
- }
120
- }
121
- return false ;
122
- case column_type::upper_bound:
123
- if (m_sign_of_entering_delta > 0 ) {
124
- t = this ->m_upper_bounds [entering] - this ->m_x [entering];
125
- if (unlimited || t <= theta){
126
- lp_assert (t >= zero_of_type<X>());
127
- return true ;
128
- }
129
- }
130
- return false ;
131
- case column_type::lower_bound:
132
- if (m_sign_of_entering_delta < 0 ) {
133
- t = this ->m_x [entering] - this ->m_lower_bounds [entering];
134
- if (unlimited || t <= theta) {
135
- lp_assert (t >= zero_of_type<X>());
136
- return true ;
137
- }
138
- }
101
+ // we assume that the columns are at their bounds
102
+ template <typename T, typename X> bool lp_primal_core_solver<T, X>::try_jump_to_another_bound_on_entering(unsigned entering, X & theta) {
103
+ if (this ->m_column_types [entering] != column_type::boxed)
139
104
return false ;
140
- default :return false ;
105
+ X t = this ->m_upper_bounds [entering] - this ->m_lower_bounds [entering];
106
+ if (t <= theta) {
107
+ theta = t;
108
+ return true ;
141
109
}
142
110
return false ;
111
+
143
112
}
144
113
145
114
template <typename T, typename X> bool lp_primal_core_solver<T, X>::
0 commit comments