| 628 | } |
| 629 | |
| 630 | String MaxConstraint::serializeToString() const |
| 631 | { |
| 632 | // Output format: max,f,element_1,element_2,element_3,... |
| 633 | Stringf output = Stringf( "max,%u", _f ); |
| 634 | for ( const auto &element : _elements ) |
| 635 | output += Stringf( ",%u", element ); |
| 636 | |
| 637 | // Special delimiter ",e" represents elimination flag and variables |
| 638 | output += Stringf( ",e" ); |
| 639 | output += Stringf( ",%u", _haveFeasibleEliminatedPhases ? 1 : 0 ); |
| 640 | if ( _haveFeasibleEliminatedPhases ) |
| 641 | output += Stringf( ",%f", _maxValueOfEliminatedPhases ); |
| 642 | else |
| 643 | // Will be ignored in any case |
| 644 | output += Stringf( ",%u", 0 ); |
| 645 | |
| 646 | return output; |
| 647 | } |
| 648 | |
| 649 | void MaxConstraint::eliminateCase( unsigned variable ) |
| 650 | { |