A Simple Example

MathOptimizer Professional is launched by the command

Needs["MathOptimizerPro`callLGO`"];

Note here that the compiler-specific versions of MathOptimizer Professional may be denoted by added symbols. For example, the LF95 compiler-specific version can be invoked by

Needs["MathOptimizerProLF`callLGO`"];

This convention supports the usage of several compiler-specific versions on the same machine.

The basic definition and usage of the callLGO function can be retrieved by the following statement:

?callLGO

The first example shows the simplest usage of the callLGO function to solve a small constrained nonlinear optimization model:

result1 = 
      callLGO[x^2 + y^2, {x + y - 1 == 0, 
          x^2 + 3*y ≤ 2}, {{x, -2, 1, 3}, {y, -3, 1, 
            2}}]

Notice how easy it is to modify the above model statement, and then solve the new (substantially more difficult) model:

result2 = 
      callLGO[x^2 + y^2 + 
          10. *(Sin[x + 5*y])^2, {x + Log[y] - 1 == 0, 
          x + 3*Cos[y] ≤ 2}, {{x, -2, 1, 3}, {y, -3, 1, 
            2}}]

The next line shows that the constraints in the current model are met with high precision (when using the numerically more precise solution found above):

{x + Log[y], x + 3*Cos[y]} /. {x -> 0.8398234068, 
        y -> 1.1737181234}