| 372 | } |
| 373 | |
| 374 | void HEkkDual::minorUpdatePrimal() { |
| 375 | MChoice* choice = &multi_choice[multi_iChoice]; |
| 376 | MFinish* finish = &multi_finish[multi_nFinish]; |
| 377 | double valueOut = choice->baseValue; |
| 378 | double lowerOut = choice->baseLower; |
| 379 | double upperOut = choice->baseUpper; |
| 380 | if (delta_primal < 0) { |
| 381 | theta_primal = (valueOut - lowerOut) / alpha_row; |
| 382 | finish->basicBound = lowerOut; |
| 383 | } |
| 384 | if (delta_primal > 0) { |
| 385 | theta_primal = (valueOut - upperOut) / alpha_row; |
| 386 | finish->basicBound = upperOut; |
| 387 | } |
| 388 | finish->theta_primal = theta_primal; |
| 389 | |
| 390 | if (edge_weight_mode == EdgeWeightMode::kDevex && !new_devex_framework) { |
| 391 | std::vector<double>& edge_weight = ekk_instance_.dual_edge_weight_; |
| 392 | assert(row_out >= 0); |
| 393 | if (row_out < 0) |
| 394 | printf("ERROR: row_out = %" HIGHSINT_FORMAT " in minorUpdatePrimal\n", |
| 395 | row_out); |
| 396 | const double updated_edge_weight = edge_weight[row_out]; |
| 397 | new_devex_framework = newDevexFramework(updated_edge_weight); |
| 398 | minor_new_devex_framework = new_devex_framework; |
| 399 | // Transform the edge weight of the pivotal row according to the |
| 400 | // simplex update |
| 401 | double new_pivotal_edge_weight = |
| 402 | computed_edge_weight / (alpha_row * alpha_row); |
| 403 | new_pivotal_edge_weight = max(1.0, new_pivotal_edge_weight); |
| 404 | // Store the Devex weight of the leaving row now - OK since it's |
| 405 | // stored in finish->EdWt and the updated weights are stored in |
| 406 | // multi_choice[*].infeasEdWt |
| 407 | finish->EdWt = new_pivotal_edge_weight; |
| 408 | } |
| 409 | |
| 410 | /** |
| 411 | * 5. Update the other primal value |
| 412 | * By the pivot (theta_primal) |
| 413 | */ |
| 414 | for (HighsInt ich = 0; ich < multi_num; ich++) { |
| 415 | if (multi_choice[ich].row_out >= 0) { |
| 416 | HVector* this_ep = &multi_choice[ich].row_ep; |
| 417 | double dot = a_matrix->computeDot(*this_ep, variable_in); |
| 418 | multi_choice[ich].baseValue -= theta_primal * dot; |
| 419 | double value = multi_choice[ich].baseValue; |
| 420 | double lower = multi_choice[ich].baseLower; |
| 421 | double upper = multi_choice[ich].baseUpper; |
| 422 | double infeas = 0; |
| 423 | if (value < lower - Tp) infeas = value - lower; |
| 424 | if (value > upper + Tp) infeas = value - upper; |
| 425 | infeas *= infeas; |
| 426 | multi_choice[ich].infeasValue = infeas; |
| 427 | if (edge_weight_mode == EdgeWeightMode::kDevex) { |
| 428 | // Update the other Devex weights |
| 429 | const double new_pivotal_edge_weight = finish->EdWt; |
| 430 | double aa_iRow = dot; |
| 431 | multi_choice[ich].infeasEdWt = |
nothing calls this directly
no test coverage detected