Simple Examples

Apps.SimpleExamples History

Show minor edits - Show changes to markup

January 31, 2023, at 09:44 PM by 10.35.117.248 -
Changed line 8 from:

$$\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}$$

to:

$$\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}$$

January 31, 2023, at 09:44 PM by 10.35.117.248 -
Changed lines 10-14 from:

Solve with Python Gekko

(:source lang=python:)

to:
(:source lang=python:)
January 31, 2023, at 09:43 PM by 10.35.117.248 -
Deleted lines 7-10:
Added lines 9-10:
January 31, 2023, at 09:42 PM by 10.35.117.248 -
Added lines 11-12:

$$\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}$$

Changed line 12 from:

Solve with'' Python Gekko

to:

Solve with Python Gekko

Added lines 11-23:

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:)

Changed line 10 from:
to:
Changed line 10 from:
to:
Deleted lines 0-1:

Tutorial Examples

May 28, 2014, at 11:47 AM by 107.188.175.164 -
Changed lines 1-2 from:

Simple Examples

to:

Tutorial Examples

Changed lines 6-7 from:

Simple test problem with 2 local minima

to:

Test problem with 2 local minima

Added lines 13-27:

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:

Download integration example problem

May 26, 2010, at 12:08 PM by 158.35.225.240 -
Changed line 3 from:

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.

to:

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:).

June 23, 2009, at 05:55 PM by 158.35.225.227 -
Added lines 7-8:

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.

June 23, 2009, at 05:52 PM by 158.35.225.227 -
Added lines 1-18:

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


Hock & Schittkowski Collection