MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / minorUpdateDual

Method minorUpdateDual

highs/simplex/HEkkDualMulti.cpp:337–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337void HEkkDual::minorUpdateDual() {
338 /**
339 * 1. Update the dual solution
340 * XXX Data parallel (depends on the ap partition before)
341 */
342 if (theta_dual == 0) {
343 shiftCost(variable_in, -workDual[variable_in]);
344 } else {
345 dualRow.updateDual(theta_dual);
346 if (slice_PRICE) {
347 for (HighsInt i = 0; i < slice_num; i++)
348 slice_dualRow[i].updateDual(theta_dual);
349 }
350 }
351 workDual[variable_in] = 0;
352 workDual[variable_out] = -theta_dual;
353 shiftBack(variable_out);
354
355 /**
356 * 2. Apply global bound flip
357 */
358 dualRow.updateFlip(multi_finish[multi_nFinish].col_BFRT);
359
360 /**
361 * 3. Apply local bound flips
362 */
363 for (HighsInt ich = 0; ich < multi_num; ich++) {
364 if (ich == multi_iChoice || multi_choice[ich].row_out >= 0) {
365 HVector* this_ep = &multi_choice[ich].row_ep;
366 for (HighsInt i = 0; i < dualRow.workCount; i++) {
367 double dot = a_matrix->computeDot(*this_ep, dualRow.workData[i].first);
368 multi_choice[ich].baseValue -= dualRow.workData[i].second * dot;
369 }
370 }
371 }
372}
373
374void HEkkDual::minorUpdatePrimal() {
375 MChoice* choice = &multi_choice[multi_iChoice];

Callers

nothing calls this directly

Calls 3

updateFlipMethod · 0.80
updateDualMethod · 0.45
computeDotMethod · 0.45

Tested by

no test coverage detected