Function GMP::Instance::CreatePresolved(GMP, name)

GMP::Instance::CreatePresolved

The function GMP::Instance::CreatePresolved generates a mathematical program that is the presolved representation of the specified generated mathematical program. The generated mathematical program can be a linear or nonlinear model, and should be generated using the function GMP::Instance::Generate.

GMP::Instance::CreatePresolved(
     GMP,            ! (input) a generated mathematical program
     name            ! (input) a string expression
)

Arguments

GMP

An element in the set AllGeneratedMathematicalPrograms.

name

A string that holds the name for the presolved mathematical program.

Return Value

A new element in the set AllGeneratedMathematicalPrograms, with the name as specified by the name argument, if the presolver did not find an infeasibility. Else, the empty element.

Note

Example

Assume that MP is a mathematical program and gmpMP and gmpPre are element parameters with range AllGeneratedMathematicalPrograms. To solve the presolved model using GMP functions we can use:

gmpMP := GMP::Instance::Generate( MP );
gmpPre := GMP::Instance::CreatePresolved( gmpMP, "PresolvedModel" );

GMP::Instance::Solve( gmpPre ) ;

In case the GMP variant of the AOA module is used we can use:

gmpMP := GMP::Instance::Generate( MP );
gmpPre := GMP::Instance::CreatePresolved( gmpMP, "PresolvedModel" );

GMPOuterApprox::DoOuterApproximation( gmpPre );

Here GMPOuterApprox is the prefix used by the GMP Outer Approximation Module.