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


The function GMP::Instance::Copy creates a copy of a generated mathematical program and an associated new element in the set AllGeneratedMathematicalPrograms.

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



An element in the set AllGeneratedMathematicalPrograms.


A string that contains the name for the copy of the generated mathematical program.

Return Value

A new element in the set AllGeneratedMathematicalPrograms with the name as specified by the name argument.


  • The name argument should be different from the name of the original generated mathematical program.

  • If an element with name specified by the name argument is already present in the set AllGeneratedMathematicalPrograms then the corresponding generated mathematical program will be replaced (or updated in case the same symbolic mathematical program is involved).

  • All solutions in the solution repository of the generated mathematical program are also copied.

  • The solver selection as specified by GMP::Instance::SetSolver (if any) will not be copied.