Simple Examples
Apps.SimpleExamples History
Hide minor edits - Show changes to markup
$$\begin{align}\mathrm{minimize} \quad & 100-x_1^2-2x_2^2-x_3^2-x_1x_2-x_1x_3 \\ \mathrm{subject\;to}\quad & 8x_1+14x_2+7x_3=56 \\ & x_1^2+x_2^2+x_3^2\geq0 \\ & x_1,x_2,x_3\ge0 \end{align}$$
$$\begin{align}\mathrm{minimize} \quad & 100-x_1^2-2x_2^2-x_3^2-x_1x_2-x_1x_3 \\ \mathrm{subject\;to}\quad & 8x_1+14x_2+7x_3=56 \\ & x_1^2+x_2^2+x_3^2\geq25 \\ & x_1,x_2,x_3\ge0 \end{align}$$
- View APMonitor Solution
- Solve with Python Gekko
$$\begin{align}\mathrm{minimize} \quad & 100-x_1^2-2x_2^2-x_3^2-x_1x_2-x_1x_3 \\ \mathrm{subject\;to}\quad & 8x_1+14x_2+7x_3=56 \\ & x_1^2+x_2^2+x_3^2\geq0 \\ & x_1,x_2,x_3\ge0 \end{align}$$
Solve with'' Python Gekko
Solve with Python Gekko
Solve with'' Python Gekko
(:source lang=python:) from gekko import GEKKO m = GEKKO(remote=False) x1,x2,x3 = m.Array(m.Var,3,lb=0) m.Minimize(1000-x1**2-2*x2**2-x3**2-x1*x2-x1*x3) m.Equations([8*x1+14*x2+7*x3==56,
x1**2+x2**2+x3**2>=25])
m.solve(disp=False) print(x1.value,x2.value,x3.value) (:sourceend:)
Simple Examples
Tutorial Examples
Simple test problem with 2 local minima
Test problem with 2 local minima
Numerical Integration
This problem demonstrates how to numerically integrate a function. In this case, the function of interest is x = 2 t with an exact solution of y = t2 .

The following Python script runs the model and plots the results:


Models presented below are a test suite of optimization problems. They are part of the test suite used to verify modifications to the APMonitor software. Users may also find this collection useful to compare APMonitor syntax to other modeling languages, for solver benchmarking, or as example problems in optimization. Models may be submitted through the online submission platform.
Models presented below are a test suite of optimization problems. They are part of the test suite used to verify modifications to the APMonitor software. Users may also find this collection useful to compare APMonitor syntax to other modeling languages, for solver benchmarking, or as example problems in optimization. Models may be submitted through the (:html:)<a href="/online/view_pass.php">Online Web-based Interface</a>(:htmlend:).
This optimization problem has 2 local minima. The two problem solutions are found at (0,0,8) with objective 936.0 (global minimum) and (7,0,0) with objective 951.0.
Simple Examples
Models presented below are a test suite of optimization problems. They are part of the test suite used to verify modifications to the APMonitor software. Users may also find this collection useful to compare APMonitor syntax to other modeling languages, for solver benchmarking, or as example problems in optimization. Models may be submitted through the online submission platform.
Simple test problem with 2 local minima
