<?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=Supermarket_refrigeration_system_%28JModelica%29</id>
	<title>Supermarket refrigeration system (JModelica) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mintoc.de/index.php?action=history&amp;feed=atom&amp;title=Supermarket_refrigeration_system_%28JModelica%29"/>
	<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Supermarket_refrigeration_system_(JModelica)&amp;action=history"/>
	<updated>2026-06-09T08:07:14Z</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=Supermarket_refrigeration_system_(JModelica)&amp;diff=1980&amp;oldid=prev</id>
		<title>FelixMueller at 21:48, 27 June 2016</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Supermarket_refrigeration_system_(JModelica)&amp;diff=1980&amp;oldid=prev"/>
		<updated>2016-06-27T21:48: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 21:48, 27 June 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-l8&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&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;//(c) Madeleine Schroter&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;//(c) Madeleine Schroter&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; 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;  optimization supermarket_opt (objective = cost(finalTime),&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;/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;/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;optimization supermarket_opt (objective = cost(finalTime),&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;                          startTime = 0,&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;                          startTime = 0,&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;                          finalTime=1)&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;                          finalTime=1)&lt;/div&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=Supermarket_refrigeration_system_(JModelica)&amp;diff=1979&amp;oldid=prev</id>
		<title>FelixMueller: Created page with &quot;This page contains the source code to solve the Supermarket refrigeration system problem with JModelica. The automatic differentiation tool CasADI and the solver IPOPT wer...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Supermarket_refrigeration_system_(JModelica)&amp;diff=1979&amp;oldid=prev"/>
		<updated>2016-06-27T21:47:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This page contains the source code to solve the &lt;a href=&quot;/index.php?title=Supermarket_refrigeration_system&quot; title=&quot;Supermarket refrigeration system&quot;&gt;Supermarket refrigeration system&lt;/a&gt; problem with JModelica. The automatic differentiation tool CasADI and the solver IPOPT wer...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page contains the source code to solve the [[Supermarket refrigeration system]] problem with JModelica. The automatic differentiation tool CasADI and the solver IPOPT were used to solve the problem. &lt;br /&gt;
As this problem is numerically challenging, the following implementation does not result in a fully converged optimal solution.&lt;br /&gt;
&lt;br /&gt;
Model file (supermarket_opt.mop)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Optimica&amp;quot;&amp;gt;&lt;br /&gt;
//-------------------------------------------------------------------------&lt;br /&gt;
//Supermarket refrigeration system with direct collocation using JModelica&lt;br /&gt;
//(c) Madeleine Schroter&lt;br /&gt;
//--------------------------------------------------------------------------&lt;br /&gt;
 optimization supermarket_opt (objective = cost(finalTime),&lt;br /&gt;
                         startTime = 0,&lt;br /&gt;
                         finalTime=1)&lt;br /&gt;
 &lt;br /&gt;
    // Parameters&lt;br /&gt;
    parameter Real Q_airload = 3000.00;             &lt;br /&gt;
    parameter Real m_ref = 0.20;             &lt;br /&gt;
    parameter Real M_goods=200.00;&lt;br /&gt;
    parameter Real Cp_goods=1000.00;&lt;br /&gt;
    parameter Real UA_goods=300.00;&lt;br /&gt;
    parameter Real M_wall=260.00;&lt;br /&gt;
    parameter Real Cp_wall=385.00;&lt;br /&gt;
    parameter Real UA_air=500.00;&lt;br /&gt;
    parameter Real M_air=50.00;&lt;br /&gt;
    parameter Real Cp_air=1000.00;&lt;br /&gt;
    parameter Real UA_wall=4000.00;&lt;br /&gt;
    parameter Real t_fill=40.00;&lt;br /&gt;
    parameter Real T_sh=10.00;&lt;br /&gt;
    parameter Real M_ref=1.00;&lt;br /&gt;
    parameter Real V_suc=5.00;&lt;br /&gt;
    parameter Real V_sl=0.08;             &lt;br /&gt;
    parameter Real eta_vol=0.81;&lt;br /&gt;
    parameter Real tf(free=true,min=650,max=750)=650;&lt;br /&gt;
 &lt;br /&gt;
   // Differential states&lt;br /&gt;
    Real x0;&lt;br /&gt;
    Real x1;&lt;br /&gt;
    Real x2;&lt;br /&gt;
    Real x3;&lt;br /&gt;
    Real x4;&lt;br /&gt;
    Real x5;&lt;br /&gt;
    Real x6;&lt;br /&gt;
    Real x7;&lt;br /&gt;
    Real x8;&lt;br /&gt;
    Real cost(start=0);&lt;br /&gt;
 &lt;br /&gt;
    // The control signal&lt;br /&gt;
    input Real u0(free=true,min=0,max=1,initialGuess=0.5);&lt;br /&gt;
    input Real u1(free=true,min=0,max=1,initialGuess=0.5);&lt;br /&gt;
    input Real u2(free=true,min=0,max=1,initialGuess=1);&lt;br /&gt;
 &lt;br /&gt;
  equation&lt;br /&gt;
    der(x0) = ((1.0/(V_suc*(-0.0329*x0*x0*x0+0.2161*x0*x0-0.4742*x0+5.4817)))*((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*(x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005))+x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))+M_ref-eta_vol*V_sl*0.5*(u2)*(4.6073*x0+0.3798)))*tf;&lt;br /&gt;
    der(x1) =(-UA_goods*(x1-x3)/(M_goods*Cp_goods))*tf;&lt;br /&gt;
    der(x2)=((UA_air*(x3-x2)-(UA_wall/M_ref)*x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005)))/(M_wall*Cp_wall))*tf;&lt;br /&gt;
    der(x3)=((UA_goods*(x1-x3)+Q_airload-UA_air*(x3-x2))/(M_air*Cp_air))*tf;&lt;br /&gt;
    der(x4)=(((M_ref-x4)/t_fill)*u0-((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005)))*(1-u0))*tf;&lt;br /&gt;
    der(x5)=(-UA_goods*(x5-x7)/(M_goods*Cp_goods))*tf;&lt;br /&gt;
    der(x6)=((UA_air*(x7-x6)-(UA_wall/M_ref)*x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))/(M_wall*Cp_wall))*tf;&lt;br /&gt;
    der(x7)=((UA_goods*(x5-x7)+Q_airload-UA_air*(x7-x6))/(M_air*Cp_air))*tf;&lt;br /&gt;
    der(x8)=(((M_ref-x8)/t_fill)*u1-((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))*(1-u1))*tf;&lt;br /&gt;
    der(cost) = ((-1.0/(((1/*time*/)*tf)))*cost+(1.0/(((1/*time*/))*tf))*((u2)*0.5*eta_vol*V_sl*((0.0265*x0*x0*x0-0.4346*x0*x0+2.4923*x0+1.2189)*10^5)))*tf;&lt;br /&gt;
//    der(cost) = 1.0 / 650 * (((u2)*0.5*eta_vol*V_sl*((0.0265*x0*x0*x0-0.4346*x0*x0+2.4923*x0+1.2189)*10^5)))*tf;&lt;br /&gt;
 &lt;br /&gt;
  constraint&lt;br /&gt;
    x3&amp;gt;=2.0;&lt;br /&gt;
    x3&amp;lt;=5.0;&lt;br /&gt;
    x7&amp;gt;=2.0;&lt;br /&gt;
    x7&amp;lt;=5.0;&lt;br /&gt;
    x0&amp;lt;=1.7;&lt;br /&gt;
    cost(startTime)=0.0;&lt;br /&gt;
    x0(finalTime)=x0(startTime);&lt;br /&gt;
    x1(finalTime)=x1(startTime);&lt;br /&gt;
    x2(finalTime)=x2(startTime);&lt;br /&gt;
    x3(finalTime)=x3(startTime);&lt;br /&gt;
    x4(finalTime)=x4(startTime);&lt;br /&gt;
    x5(finalTime)=x5(startTime);&lt;br /&gt;
    x6(finalTime)=x6(startTime);&lt;br /&gt;
    x7(finalTime)=x7(startTime);&lt;br /&gt;
    x8(finalTime)=x8(startTime);&lt;br /&gt;
 &lt;br /&gt;
  end supermarket_opt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run file&lt;br /&gt;
&amp;lt;source lang =&amp;quot;Python&amp;quot;&amp;gt;&lt;br /&gt;
#Import the function for transfering a model to CasADiInterface&lt;br /&gt;
from pyjmi import transfer_optimization_problem&lt;br /&gt;
&lt;br /&gt;
op=transfer_optimization_problem(&amp;quot;supermarket_opt&amp;quot;, &amp;quot;supermarket_opt.mop&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
res=op.optimize()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:JModelica]]&lt;/div&gt;</summary>
		<author><name>FelixMueller</name></author>
	</entry>
</feed>