<?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_%28switch%29</id>
	<title>Lotka Volterra fishing problem (switch) - 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_%28switch%29"/>
	<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(switch)&amp;action=history"/>
	<updated>2026-06-09T11:42:02Z</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_(switch)&amp;diff=1637&amp;oldid=prev</id>
		<title>FelixMueller at 17:53, 31 January 2016</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(switch)&amp;diff=1637&amp;oldid=prev"/>
		<updated>2016-01-31T17:53:04Z</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 17:53, 31 January 2016&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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Below you can find the MATLAB file that was used in [[:Category: switch | switch]] to create the reference solution and its plot for the [[Lotka Volterra fishing problem]].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&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;&amp;lt;source lang=&amp;quot;matlab&amp;quot;&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 lang=&amp;quot;matlab&amp;quot;&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;/table&gt;</summary>
		<author><name>FelixMueller</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(switch)&amp;diff=1347&amp;oldid=prev</id>
		<title>ClemensZeile at 17:46, 19 January 2016</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(switch)&amp;diff=1347&amp;oldid=prev"/>
		<updated>2016-01-19T17:46:59Z</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 17:46, 19 January 2016&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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;source lang=&quot;matlab&quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&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;% Copyright 2014 Mathieu Claeys, http://mathclaeys.wordpress.com/&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;% Copyright 2014 Mathieu Claeys, http://mathclaeys.wordpress.com/&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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l87&quot;&gt;Line 87:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 89:&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;% create/update Bocop directory&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;% create/update Bocop directory&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;%toBocop(&amp;#039;initLotka&amp;#039;,ocpDef,t,x,u,l,d);&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;%toBocop(&amp;#039;initLotka&amp;#039;,ocpDef,t,x,u,l,d);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/source&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:switch]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ClemensZeile</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(switch)&amp;diff=1339&amp;oldid=prev</id>
		<title>ClemensZeile: Created page with &quot;% Copyright 2014 Mathieu Claeys, http://mathclaeys.wordpress.com/   %% Data  % Scaling factors: it is essential to scale variables so that everything % falls within a unit box...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(switch)&amp;diff=1339&amp;oldid=prev"/>
		<updated>2016-01-19T16:05:54Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;% Copyright 2014 Mathieu Claeys, http://mathclaeys.wordpress.com/   %% Data  % Scaling factors: it is essential to scale variables so that everything % falls within a unit box...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;% Copyright 2014 Mathieu Claeys, http://mathclaeys.wordpress.com/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%% Data&lt;br /&gt;
&lt;br /&gt;
% Scaling factors: it is essential to scale variables so that everything&lt;br /&gt;
% falls within a unit box, otherwise moment problem will be poorly scaled&lt;br /&gt;
% (Consider moments of the Dirac measure located at 10...)&lt;br /&gt;
xscale = 1;&lt;br /&gt;
tscale = 12;&lt;br /&gt;
%lscale = sqrt(5);&lt;br /&gt;
&lt;br /&gt;
% Relaxation order&lt;br /&gt;
order = 5; % Choose order &amp;gt;= 1;&lt;br /&gt;
&lt;br /&gt;
%% Create problem definition structure&lt;br /&gt;
ocpDef.nModes = 2;&lt;br /&gt;
ocpDef.nStates = 3; &lt;br /&gt;
ocpDef.nControls = 0; &lt;br /&gt;
ocpDef.nLifts = 0;&lt;br /&gt;
ocpDef.scaling.x = [xscale,xscale,xscale];&lt;br /&gt;
ocpDef.scaling.t = tscale;&lt;br /&gt;
ocpDef.scaling.u = 1;&lt;br /&gt;
ocpDef.scaling.l = 1;&lt;br /&gt;
ocpDef.dynamics{1} = @(t,x,u,l) [(x(1)-x(1)*x(2)-0.4*x(1))*tscale;&lt;br /&gt;
                                (-x(2)+x(1)*x(2)-0.2*x(2))*tscale;&lt;br /&gt;
                                ((x(1)-1)^2+(x(2)-1)^2)*tscale]; %[(1-lscale*l(1))*tscale/xscale;(lscale*l(1)-lscale*l(2))*tscale/xscale];&lt;br /&gt;
ocpDef.dynamics{2} = @(t,x,u,l) [(x(1)-x(1)*x(2))*tscale;&lt;br /&gt;
                                (-x(2)+x(1)*x(2))*tscale;&lt;br /&gt;
                                ((x(1)-1)^2+(x(2)-1)^2)*tscale];&lt;br /&gt;
ocpDef.runningCost{1} = @(t,x,u,l) 0;&lt;br /&gt;
ocpDef.runningCost{2} = @(t,x,u,l) 0;&lt;br /&gt;
ocpDef.initialCost = @(t,x,l) 0;&lt;br /&gt;
ocpDef.terminalCost = @(t,x,l) x(3);&lt;br /&gt;
ocpDef.runningConstraints = @(t,x,u,l) [t*(1-t)&amp;gt;=0; % normalized time in [0,1]&lt;br /&gt;
                                        x(1) &amp;gt;= 0; % levels are positive&lt;br /&gt;
                                        x(2) &amp;gt;= 0;&lt;br /&gt;
                                        x(3) &amp;gt;=0;];&lt;br /&gt;
                                       % 0==(lscale*l(1))^2-xscale*x(1); %algebraic lifts for square roots&lt;br /&gt;
                                        %l(1)&amp;gt;=0;&lt;br /&gt;
                                        %0==(lscale*l(2))^2-xscale*x(2);&lt;br /&gt;
                                        %l(2)&amp;gt;=0;]; &lt;br /&gt;
ocpDef.initialConstraints = @(t,x,l) [x(1)==0.5;x(2)==0.7;x(3)==0;t==0];&lt;br /&gt;
ocpDef.terminalConstraints = @(t,x,l) [t==1];&lt;br /&gt;
% NB: to satisfy Putinar&amp;#039;s theorem, there should be for each measure a ball&lt;br /&gt;
% constraint on all variables. Ignore this assumption at your own risks.&lt;br /&gt;
ocpDef.integralConstraints = {};&lt;br /&gt;
&lt;br /&gt;
%% Construct and solve GloptiPoly problem&lt;br /&gt;
% (requires the installation of Yalmip and a SDP solver. We recommend Mosek&lt;br /&gt;
% for speed and SeDuMi for accuracy)&lt;br /&gt;
&lt;br /&gt;
% Create GloptiPoly measure objects with default names (NB: resets all&lt;br /&gt;
% GloptiPoly states to zero). To impose specific names, construct measures&lt;br /&gt;
% by hand.&lt;br /&gt;
measureSystem = switchedMeasureSystem(ocpDef);&lt;br /&gt;
&lt;br /&gt;
% Create GloptiPoly msdp object, modeling a given order moment relaxation&lt;br /&gt;
P = switchedRelaxation( ocpDef, measureSystem, order ); &lt;br /&gt;
&lt;br /&gt;
% Solve GloptiPoly problem&lt;br /&gt;
%mset(&amp;#039;yalmip&amp;#039;,true); % default SDP solver of Yalmip will be called. If&lt;br /&gt;
%commented, Yalmip is not called and GloptiPoly looks for SeDuMi.&lt;br /&gt;
[status,obj,m] = msol(P);&lt;br /&gt;
obj&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%% Solution extraction&lt;br /&gt;
npoints.t = 80;&lt;br /&gt;
npoints.var = 80;&lt;br /&gt;
% NB: extract moments of one order less, because higher order moments are&lt;br /&gt;
% very unprecise, since they are not constrained enough&lt;br /&gt;
[t,x,u,l,d] = extractSolution( ocpDef, measureSystem, order-1, npoints );&lt;br /&gt;
&lt;br /&gt;
figure&lt;br /&gt;
plot(t,x,&amp;#039;*-&amp;#039;);&lt;br /&gt;
xlabel(&amp;#039;t&amp;#039;);&lt;br /&gt;
ylabel(&amp;#039;x&amp;#039;);&lt;br /&gt;
legend(&amp;#039;x_1&amp;#039;,&amp;#039;x_2&amp;#039;,&amp;#039;x_3&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
figure&lt;br /&gt;
plot(t,d(:,1),&amp;#039;o-&amp;#039;,t,d(:,2),&amp;#039;+-&amp;#039;);&lt;br /&gt;
xlabel(&amp;#039;t&amp;#039;);&lt;br /&gt;
ylabel(&amp;#039;duty cycle&amp;#039;);&lt;br /&gt;
legend(&amp;#039;Mode 1&amp;#039;,&amp;#039;Mode 2&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% create/update Bocop directory&lt;br /&gt;
%toBocop(&amp;#039;initLotka&amp;#039;,ocpDef,t,x,u,l,d);&lt;/div&gt;</summary>
		<author><name>ClemensZeile</name></author>
	</entry>
</feed>