| 262 | } |
| 263 | |
| 264 | void CostFunctionManager::computeBasicOOBCosts() |
| 265 | { |
| 266 | unsigned variable; |
| 267 | double assignment, lb, relaxedLb, ub, relaxedUb; |
| 268 | for ( unsigned i = 0; i < _m; ++i ) |
| 269 | { |
| 270 | variable = _tableau->basicIndexToVariable( i ); |
| 271 | assignment = _tableau->getBasicAssignment( i ); |
| 272 | |
| 273 | lb = _tableau->getLowerBound( variable ); |
| 274 | relaxedLb = lb - ( GlobalConfiguration::BASIC_COSTS_ADDITIVE_TOLERANCE + |
| 275 | GlobalConfiguration::BASIC_COSTS_MULTIPLICATIVE_TOLERANCE * |
| 276 | FloatUtils::abs( lb ) ); |
| 277 | |
| 278 | if ( assignment < relaxedLb ) |
| 279 | { |
| 280 | _basicCosts[i] = -1; |
| 281 | continue; |
| 282 | } |
| 283 | |
| 284 | ub = _tableau->getUpperBound( variable ); |
| 285 | relaxedUb = ub + ( GlobalConfiguration::BASIC_COSTS_ADDITIVE_TOLERANCE + |
| 286 | GlobalConfiguration::BASIC_COSTS_MULTIPLICATIVE_TOLERANCE * |
| 287 | FloatUtils::abs( ub ) ); |
| 288 | |
| 289 | if ( assignment > relaxedUb ) |
| 290 | { |
| 291 | _basicCosts[i] = 1; |
| 292 | continue; |
| 293 | } |
| 294 | |
| 295 | _basicCosts[i] = 0; |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | void CostFunctionManager::computeMultipliers() |
| 300 | { |
nothing calls this directly
no test coverage detected