@@ -391,7 +391,7 @@ Int FactorHiGHSSolver::setup() {
391391Int FactorHiGHSSolver::chooseNla () {
392392 // Choose whether to use augmented system or normal equations.
393393
394- assert (options_.nla == kOptionNlaChoose );
394+ assert (options_.nla == kHighsChooseString );
395395
396396 Symbolic symb_NE{};
397397 Symbolic symb_AS{};
@@ -436,10 +436,10 @@ Int FactorHiGHSSolver::chooseNla() {
436436
437437 // Decision may be forced by failures
438438 if (failure_NE && !failure_AS) {
439- options_.nla = kOptionNlaAugmented ;
439+ options_.nla = kHipoAugmentedString ;
440440 log_stream << textline (" Newton system:" ) << " AS preferred (NE failed)\n " ;
441441 } else if (failure_AS && !failure_NE) {
442- options_.nla = kOptionNlaNormEq ;
442+ options_.nla = kHipoNormalEqString ;
443443 log_stream << textline (" Newton system:" ) << " NE preferred (AS failed)\n " ;
444444 } else if (failure_AS && failure_NE) {
445445 if (overflow_AS && overflow_NE)
@@ -467,18 +467,18 @@ Int FactorHiGHSSolver::chooseNla() {
467467
468468 if (NE_much_more_expensive ||
469469 (sn_AS_larger_than_NE && AS_not_too_expensive)) {
470- options_.nla = kOptionNlaAugmented ;
470+ options_.nla = kHipoAugmentedString ;
471471 log_stream << textline (" Newton system:" ) << " AS preferred\n " ;
472472 } else {
473- options_.nla = kOptionNlaNormEq ;
473+ options_.nla = kHipoNormalEqString ;
474474 log_stream << textline (" Newton system:" ) << " NE preferred\n " ;
475475 }
476476 }
477477
478478 log_.print (log_stream);
479479
480480 if (status == kStatusOk ) {
481- if (options_.nla == kOptionNlaAugmented ) {
481+ if (options_.nla == kHipoAugmentedString ) {
482482 S_ = std::move (symb_AS);
483483 freeNEmemory ();
484484 } else {
@@ -588,33 +588,30 @@ Int FactorHiGHSSolver::chooseOrdering(const std::vector<Int>& rows,
588588Int FactorHiGHSSolver::setNla () {
589589 std::stringstream log_stream;
590590
591- switch (options_.nla ) {
592- case kOptionNlaAugmented : {
593- if (analyseAS (S_) ) {
594- log_.printe (" AS requested, failed analyse phase \n " );
595- return kStatusErrorAnalyse ;
596- }
597- log_stream << textline ( " Newton system: " ) << " AS requested \n " ;
598- break ;
591+ if (options_.nla == kHipoAugmentedString ) {
592+ Int status = analyseAS (S_);
593+ if (status == kStatusOverflow ) {
594+ log_.printe (" AS requested, integer overflow \n " );
595+ return kStatusOverflow ;
596+ } else if (status) {
597+ log_. printe ( " AS requested, failed analyse phase \n " ) ;
598+ return kStatusErrorAnalyse ;
599599 }
600-
601- case kOptionNlaNormEq : {
602- Int status = analyseNE (S_);
603- if (status == kStatusOverflow ) {
604- log_.printe (" NE requested, integer overflow\n " );
605- return kStatusOverflow ;
606- } else if (status) {
607- log_.printe (" NE requested, failed analyse phase\n " );
608- return kStatusErrorAnalyse ;
609- }
610- log_stream << textline (" Newton system:" ) << " NE requested\n " ;
611- break ;
600+ log_stream << textline (" Newton system:" ) << " AS requested\n " ;
601+
602+ } else if (options_.nla == kHipoNormalEqString ) {
603+ Int status = analyseNE (S_);
604+ if (status == kStatusOverflow ) {
605+ log_.printe (" NE requested, integer overflow\n " );
606+ return kStatusOverflow ;
607+ } else if (status) {
608+ log_.printe (" NE requested, failed analyse phase\n " );
609+ return kStatusErrorAnalyse ;
612610 }
611+ log_stream << textline (" Newton system:" ) << " NE requested\n " ;
613612
614- case kOptionNlaChoose : {
615- if (Int status = chooseNla ()) return status;
616- break ;
617- }
613+ } else {
614+ if (Int status = chooseNla ()) return status;
618615 }
619616
620617 log_.print (log_stream);
0 commit comments