... | ... |
@@ -581,18 +581,19 @@ |
581 | 581 |
// If the basis is not valid we get an error return value. |
582 | 582 |
// In this case we can try to create a new basis. |
583 | 583 |
switch (glp_simplex(lp, &smcp)) { |
584 | 584 |
case 0: |
585 | 585 |
break; |
586 | 586 |
case GLP_EBADB: |
587 | 587 |
case GLP_ESING: |
588 | 588 |
case GLP_ECOND: |
589 |
|
|
589 |
glp_term_out(false); |
|
590 | 590 |
glp_adv_basis(lp, 0); |
591 |
glp_term_out(true); |
|
591 | 592 |
if (glp_simplex(lp, &smcp) != 0) return UNSOLVED; |
592 | 593 |
break; |
593 | 594 |
default: |
594 | 595 |
return UNSOLVED; |
595 | 596 |
} |
596 | 597 |
|
597 | 598 |
return SOLVED; |
598 | 599 |
} |
... | ... |
@@ -623,18 +624,19 @@ |
623 | 624 |
// If the basis is not valid we get an error return value. |
624 | 625 |
// In this case we can try to create a new basis. |
625 | 626 |
switch (glp_simplex(lp, &smcp)) { |
626 | 627 |
case 0: |
627 | 628 |
break; |
628 | 629 |
case GLP_EBADB: |
629 | 630 |
case GLP_ESING: |
630 | 631 |
case GLP_ECOND: |
631 |
|
|
632 |
glp_term_out(false); |
|
632 | 633 |
glp_adv_basis(lp, 0); |
634 |
glp_term_out(true); |
|
633 | 635 |
if (glp_simplex(lp, &smcp) != 0) return UNSOLVED; |
634 | 636 |
break; |
635 | 637 |
default: |
636 | 638 |
return UNSOLVED; |
637 | 639 |
} |
638 | 640 |
return SOLVED; |
639 | 641 |
} |
640 | 642 |
|
... | ... |
@@ -917,18 +919,19 @@ |
917 | 919 |
// If the basis is not valid we get an error return value. |
918 | 920 |
// In this case we can try to create a new basis. |
919 | 921 |
switch (glp_simplex(lp, &smcp)) { |
920 | 922 |
case 0: |
921 | 923 |
break; |
922 | 924 |
case GLP_EBADB: |
923 | 925 |
case GLP_ESING: |
924 | 926 |
case GLP_ECOND: |
925 |
|
|
927 |
glp_term_out(false); |
|
926 | 928 |
glp_adv_basis(lp, 0); |
929 |
glp_term_out(true); |
|
927 | 930 |
if (glp_simplex(lp, &smcp) != 0) return UNSOLVED; |
928 | 931 |
break; |
929 | 932 |
default: |
930 | 933 |
return UNSOLVED; |
931 | 934 |
} |
932 | 935 |
|
933 | 936 |
if (glp_get_status(lp) != GLP_OPT) return SOLVED; |
934 | 937 |
|
0 comments (0 inline)