<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mintoc.de/index.php?action=history&amp;feed=atom&amp;title=Lotka_Volterra_fishing_problem_%28GEKKO%29</id>
	<title>Lotka Volterra fishing problem (GEKKO) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mintoc.de/index.php?action=history&amp;feed=atom&amp;title=Lotka_Volterra_fishing_problem_%28GEKKO%29"/>
	<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(GEKKO)&amp;action=history"/>
	<updated>2026-06-09T08:06:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(GEKKO)&amp;diff=2260&amp;oldid=prev</id>
		<title>JohnHedengren at 19:17, 13 March 2019</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(GEKKO)&amp;diff=2260&amp;oldid=prev"/>
		<updated>2019-03-13T19:17:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:17, 13 March 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l56&quot;&gt;Line 56:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 56:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;An MINLP solution is calculated with [https://apopt.com APOPT] with an objective function value of &amp;lt;math&amp;gt;x_2(t_f) = 1.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;36&lt;/del&gt;&amp;lt;/math&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;An MINLP solution is calculated with [https://apopt.com APOPT] with an objective function value of &amp;lt;math&amp;gt;x_2(t_f) = 1.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;349497&lt;/ins&gt;&amp;lt;/math&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Volterra_fishing_GEKKO.png]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Volterra_fishing_GEKKO.png]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Gekko]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Gekko]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JohnHedengren</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(GEKKO)&amp;diff=2258&amp;oldid=prev</id>
		<title>JohnHedengren: Create results page with Python GEKKO</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(GEKKO)&amp;diff=2258&amp;oldid=prev"/>
		<updated>2019-03-13T19:15:50Z</updated>

		<summary type="html">&lt;p&gt;Create results page with Python GEKKO&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page contains a solution of the MIOCP [[Lotka Volterra fishing problem]] in [https://gekko.readthedocs.io/en/latest/ GEKKO] Python format. The model in Python code for a fixed control discretization grid using orthogonal collocation and a simultaneous optimization method. The GEKKO package is available with &amp;#039;&amp;#039;&amp;#039;pip install gekko&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Python&amp;quot;&amp;gt;&lt;br /&gt;
import numpy as np&lt;br /&gt;
import matplotlib.pyplot as plt&lt;br /&gt;
from gekko import GEKKO&lt;br /&gt;
&lt;br /&gt;
m = GEKKO() # create GEKKO model&lt;br /&gt;
&lt;br /&gt;
# Add 0.01 as first step&lt;br /&gt;
# 0,0.01,0.1,0.2,0.3,...11.9,12.0)&lt;br /&gt;
m.time = np.insert(np.linspace(0,12,121),1,0.01)&lt;br /&gt;
&lt;br /&gt;
# change solver options&lt;br /&gt;
m.solver_options = [&amp;#039;minlp_gap_tol 0.001&amp;#039;,\&lt;br /&gt;
                    &amp;#039;minlp_maximum_iterations 10000&amp;#039;,\&lt;br /&gt;
                    &amp;#039;minlp_max_iter_with_int_sol 100&amp;#039;,\&lt;br /&gt;
                    &amp;#039;minlp_branch_method 1&amp;#039;,\&lt;br /&gt;
                    &amp;#039;minlp_integer_tol 0.001&amp;#039;,\&lt;br /&gt;
                    &amp;#039;minlp_integer_leaves 0&amp;#039;,\&lt;br /&gt;
                    &amp;#039;minlp_maximum_iterations 200&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
c0 = 0.4 &lt;br /&gt;
c1 = 0.2&lt;br /&gt;
&lt;br /&gt;
last = m.Param(np.zeros(122))&lt;br /&gt;
last.value[-1] = 1&lt;br /&gt;
&lt;br /&gt;
x0 = m.Var(value=0.5,lb=0)&lt;br /&gt;
x1 = m.Var(value=0.7,lb=0)&lt;br /&gt;
x2 = m.Var(value=0.0,lb=0)&lt;br /&gt;
w = m.MV(value=0,lb=0,ub=1,integer=True)&lt;br /&gt;
w.STATUS = 1&lt;br /&gt;
&lt;br /&gt;
m.Obj(last*x2)&lt;br /&gt;
&lt;br /&gt;
m.Equations([x0.dt() == x0 - x0*x1 - c0*x0*w,\&lt;br /&gt;
             x1.dt() == - x1 + x0*x1 - c1*x1*w,\&lt;br /&gt;
             x2.dt() == (x0-1)**2 + (x1-1)**2])&lt;br /&gt;
&lt;br /&gt;
m.options.IMODE = 6&lt;br /&gt;
m.options.NODES = 3&lt;br /&gt;
m.options.SOLVER = 1&lt;br /&gt;
m.options.MV_TYPE = 0&lt;br /&gt;
m.solve()&lt;br /&gt;
&lt;br /&gt;
plt.figure(1)&lt;br /&gt;
plt.step(m.time,w.value,&amp;#039;r-&amp;#039;,label=&amp;#039;w (0/1)&amp;#039;)&lt;br /&gt;
plt.plot(m.time,x0.value,&amp;#039;b-&amp;#039;,label=r&amp;#039;$x_0$&amp;#039;)&lt;br /&gt;
plt.plot(m.time,x1.value,&amp;#039;k-&amp;#039;,label=r&amp;#039;$x_1$&amp;#039;)&lt;br /&gt;
plt.plot(m.time,x2.value,&amp;#039;g-&amp;#039;,label=r&amp;#039;$x_2$&amp;#039;)&lt;br /&gt;
plt.xlabel(&amp;#039;Time&amp;#039;)&lt;br /&gt;
plt.ylabel(&amp;#039;Variables&amp;#039;)&lt;br /&gt;
plt.legend(loc=&amp;#039;best&amp;#039;)&lt;br /&gt;
plt.show()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An MINLP solution is calculated with [https://apopt.com APOPT] with an objective function value of &amp;lt;math&amp;gt;x_2(t_f) = 1.36&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Volterra_fishing_GEKKO.png]]&lt;br /&gt;
 &lt;br /&gt;
[[Category:Gekko]]&lt;/div&gt;</summary>
		<author><name>JohnHedengren</name></author>
	</entry>
</feed>