Commit e48dcfb
feat(mps_parser): reject Lazy Constraints LP sections
Previously 'Lazy Constraints' was accepted and parsed as a regular
constraints block. This quietly pulled in content that's meant to be
solver-side metadata, not model structure. Treat it the same as 'User
Cuts': recognize the header as a section boundary so the prior section
ends cleanly, then throw with a clear "not supported (scope is
LP/MIP/QP only)" message.
Removes the LazyConstraints enumerator and its dispatch arm, adds the
display-name branch so reject_unsupported_section() prints "Lazy
Constraints", and adds two tests (unsupported_lazy_constraints_section_throws
and unsupported_user_cuts_section_throws). PARSER_TEST: 95/95 pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Miles Lubin <mlubin@nvidia.com>1 parent 56dabd8 commit e48dcfb
2 files changed
Lines changed: 36 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
| |||
529 | 528 | | |
530 | 529 | | |
531 | 530 | | |
532 | | - | |
533 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
534 | 535 | | |
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
539 | 540 | | |
540 | | - | |
541 | | - | |
542 | 541 | | |
543 | 542 | | |
544 | 543 | | |
| |||
564 | 563 | | |
565 | 564 | | |
566 | 565 | | |
| 566 | + | |
| 567 | + | |
567 | 568 | | |
568 | 569 | | |
569 | 570 | | |
| |||
609 | 610 | | |
610 | 611 | | |
611 | 612 | | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | 613 | | |
618 | 614 | | |
619 | 615 | | |
| |||
909 | 905 | | |
910 | 906 | | |
911 | 907 | | |
912 | | - | |
913 | | - | |
914 | 908 | | |
915 | 909 | | |
916 | 910 | | |
| |||
1096 | 1090 | | |
1097 | 1091 | | |
1098 | 1092 | | |
1099 | | - | |
1100 | | - | |
| 1093 | + | |
1101 | 1094 | | |
1102 | 1095 | | |
1103 | 1096 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1748 | 1748 | | |
1749 | 1749 | | |
1750 | 1750 | | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
1751 | 1780 | | |
1752 | 1781 | | |
1753 | 1782 | | |
| |||
0 commit comments