<?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=Double_Tank_%28switch%29</id>
	<title>Double Tank (switch) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mintoc.de/index.php?action=history&amp;feed=atom&amp;title=Double_Tank_%28switch%29"/>
	<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Double_Tank_(switch)&amp;action=history"/>
	<updated>2026-06-09T08:04:55Z</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=Double_Tank_(switch)&amp;diff=1065&amp;oldid=prev</id>
		<title>SebastianSager at 14:15, 15 December 2015</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Double_Tank_(switch)&amp;diff=1065&amp;oldid=prev"/>
		<updated>2015-12-15T14:15:31Z</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 14:15, 15 December 2015&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 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;The following code is used for Matlab (2014b), with installed packages Switch and GloptiPoly3 and solved with SeDuMI. Instead of calling SeDuMi, other solvers can be used via Yalmip. In this case, the line beginning with &#039;mset&#039; should be activated.   &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;The following code &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;for the [[Double Tank]] problem &lt;/ins&gt;is used for Matlab (2014b), with installed packages Switch and GloptiPoly3 and solved with SeDuMI. Instead of calling SeDuMi, other solvers can be used via Yalmip. In this case, the line beginning with &#039;mset&#039; should be activated.   &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;=== Switch ===&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;=== Switch ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>SebastianSager</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Double_Tank_(switch)&amp;diff=1063&amp;oldid=prev</id>
		<title>SebastianSager: SebastianSager moved page Double Tank Problem (switch) to Double Tank (switch) without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Double_Tank_(switch)&amp;diff=1063&amp;oldid=prev"/>
		<updated>2015-12-15T14:12:38Z</updated>

		<summary type="html">&lt;p&gt;SebastianSager moved page &lt;a href=&quot;/index.php?title=Double_Tank_Problem_(switch)&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Double Tank Problem (switch) (page does not exist)&quot;&gt;Double Tank Problem (switch)&lt;/a&gt; to &lt;a href=&quot;/index.php?title=Double_Tank_(switch)&quot; title=&quot;Double Tank (switch)&quot;&gt;Double Tank (switch)&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:12, 15 December 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>SebastianSager</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Double_Tank_(switch)&amp;diff=1013&amp;oldid=prev</id>
		<title>ClemensZeile at 17:28, 10 December 2015</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Double_Tank_(switch)&amp;diff=1013&amp;oldid=prev"/>
		<updated>2015-12-10T17:28:48Z</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:28, 10 December 2015&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 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;The following code is used for Matlab (2014b), with installed &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;package &lt;/del&gt;GloptiPoly3 and solved with SeDuMI. Instead of calling SeDuMi, other solvers can be used via Yalmip. In this case, the line beginning with &#039;mset&#039; should be activated.   &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;The following code is used for Matlab (2014b), with installed &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;packages Switch and &lt;/ins&gt;GloptiPoly3 and solved with SeDuMI. Instead of calling SeDuMi, other solvers can be used via Yalmip. In this case, the line beginning with &#039;mset&#039; should be activated.   &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;=== Switch ===&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;=== Switch ===&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=Double_Tank_(switch)&amp;diff=1012&amp;oldid=prev</id>
		<title>ClemensZeile at 17:27, 10 December 2015</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Double_Tank_(switch)&amp;diff=1012&amp;oldid=prev"/>
		<updated>2015-12-10T17:27:25Z</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:27, 10 December 2015&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 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; &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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The following code is used for Matlab (2014b), with installed package GloptiPoly3 and solved with SeDuMI. Instead of calling SeDuMi, other solvers can be used via Yalmip. In this case, the line beginning with &#039;mset&#039; should be activated.  &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;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;=== Switch ===&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;=== Switch ===&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=Double_Tank_(switch)&amp;diff=1011&amp;oldid=prev</id>
		<title>ClemensZeile: Created page with &quot;  === Switch ===  &lt;source lang=&quot;Matlab&quot;&gt; %TANK Implements a switched tank filling example. %   This is the tank problem as considered in %      R. Vasudevan, H. Gonzalez, R. B...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Double_Tank_(switch)&amp;diff=1011&amp;oldid=prev"/>
		<updated>2015-12-10T17:20:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;  === Switch ===  &amp;lt;source lang=&amp;quot;Matlab&amp;quot;&amp;gt; %TANK Implements a switched tank filling example. %   This is the tank problem as considered in %      R. Vasudevan, H. Gonzalez, R. B...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
=== Switch ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Matlab&amp;quot;&amp;gt;&lt;br /&gt;
%TANK Implements a switched tank filling example.&lt;br /&gt;
%   This is the tank problem as considered in&lt;br /&gt;
%      R. Vasudevan, H. Gonzalez, R. Bajcsy, S. S. Sastry. &amp;quot;Consistent&lt;br /&gt;
%      Approximations for the Optimal Control of Constrained Switched&lt;br /&gt;
%      Systems Part 2: An Implementable Algorithm&amp;quot;. SIAM Journal on&lt;br /&gt;
%      Optimization and Control, 2013.&lt;br /&gt;
%   It is however attacked here by the moment technique developped in&lt;br /&gt;
%      M. Claeys, J. Daafouz, D. Henrion. &amp;quot;Modal occupation measures and&lt;br /&gt;
%      LMI relaxations for nonlinear switched systems control.&amp;quot;. To be&lt;br /&gt;
%      published.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&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 = 5;&lt;br /&gt;
tscale = 10;&lt;br /&gt;
lscale = sqrt(5);&lt;br /&gt;
&lt;br /&gt;
% Relaxation order&lt;br /&gt;
order = 3; % 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 = 2; &lt;br /&gt;
ocpDef.nControls = 0; &lt;br /&gt;
ocpDef.nLifts = 2;&lt;br /&gt;
ocpDef.scaling.x = [xscale,xscale];&lt;br /&gt;
ocpDef.scaling.t = tscale;&lt;br /&gt;
ocpDef.scaling.u = 1;&lt;br /&gt;
ocpDef.scaling.l = [lscale,lscale];&lt;br /&gt;
ocpDef.dynamics{1} = @(t,x,u,l) [(1-lscale*l(1))*tscale/xscale;(lscale*l(1)-lscale*l(2))*tscale/xscale];&lt;br /&gt;
ocpDef.dynamics{2} = @(t,x,u,l) [(2-lscale*l(1))*tscale/xscale;(lscale*l(1)-lscale*l(2))*tscale/xscale];&lt;br /&gt;
ocpDef.runningCost{1} = @(t,x,u,l) 2*(x(2)*xscale-3)^2*tscale;&lt;br /&gt;
ocpDef.runningCost{2} = @(t,x,u,l) 2*(x(2)*xscale-3)^2*tscale;&lt;br /&gt;
ocpDef.initialCost = @(t,x,l) 0;&lt;br /&gt;
ocpDef.terminalCost = @(t,x,l) 0;&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;
                                        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==2/xscale;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 = 51;&lt;br /&gt;
npoints.var = 51;&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;);&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;initTank&amp;#039;,ocpDef,t,x,u,l,d);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:switch]]&lt;/div&gt;</summary>
		<author><name>ClemensZeile</name></author>
	</entry>
</feed>