Procedure GMP::Row::DeleteRaw(GMP, rowSet)

GMP::Row::DeleteRaw

The procedure GMP::Row::DeleteRaw marks a group of rows in a generated mathematical program as deleted.

GMP::Row::DeleteRaw(
     GMP,            ! (input) a generated mathematical program
     rowSet          ! (input) a subset of Integers
     )

Arguments

GMP

An element in AllGeneratedMathematicalPrograms.

rowSet

A subset of the set Integers, representing a set of row numbers.

Return Value

The procedure returns 1 on success, or 0 otherwise.

Note

  • Deleted rows remain present in the generated mathematical program but their content will not be copied to a solver session.

  • The rows will not be printed in the constraint listing, nor be visible in the Math Program Inspector and they will be removed from any solver maintained copies.

Example

Assume that ‘MP’ is a mathematical program. To use GMP::Row::DeleteRaw we declare the following identifiers (in ams format):

ElementParameter myGMP {
    Range: AllGeneratedMathematicalPrograms;
}
Set ConstraintSet {
    SubsetOf: AllConstraints;
}
Set RowSet {
    SubsetOf: Integers;
    Index: rr;
}

To delete the constraint c(i) we can use:

myGMP := GMP::Instance::Generate( MP );

ConstraintSet := { 'c' };
RowSet := GMP::Instance::GetRowNumbers( myGMP, ConstraintSet );

GMP::Row::DeleteRaw( myGMP, RowSet );