<?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=Annihilation_of_calcium_oscillations_%28jModelica%29</id>
	<title>Annihilation of calcium oscillations (jModelica) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mintoc.de/index.php?action=history&amp;feed=atom&amp;title=Annihilation_of_calcium_oscillations_%28jModelica%29"/>
	<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Annihilation_of_calcium_oscillations_(jModelica)&amp;action=history"/>
	<updated>2026-06-09T08:07:20Z</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=Annihilation_of_calcium_oscillations_(jModelica)&amp;diff=1977&amp;oldid=prev</id>
		<title>FelixMueller at 21:46, 27 June 2016</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Annihilation_of_calcium_oscillations_(jModelica)&amp;diff=1977&amp;oldid=prev"/>
		<updated>2016-06-27T21:46:27Z</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:46, 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-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;This page contains the source code to solve the [[Annihilation of calcium oscillations]] problem with JModelica. The automatic differentiation tool CasADI and the solver IPOPT were used to solve the problem.&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;This page contains the source code to solve the [[Annihilation of calcium oscillations]] problem with JModelica. The automatic differentiation tool CasADI and the solver IPOPT were used to solve the problem&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;As this problem is numerically challenging, the following implementation does not result in a fully converged optimal solution&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;Model file (calcium_opt.mop)&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;Model file (calcium_opt.mop)&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=Annihilation_of_calcium_oscillations_(jModelica)&amp;diff=1976&amp;oldid=prev</id>
		<title>FelixMueller: Created page with &quot;This page contains the source code to solve the Annihilation of calcium oscillations problem with JModelica. The automatic differentiation tool CasADI and the solver IPOPT...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Annihilation_of_calcium_oscillations_(jModelica)&amp;diff=1976&amp;oldid=prev"/>
		<updated>2016-06-27T21:45:43Z</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=Annihilation_of_calcium_oscillations&quot; title=&quot;Annihilation of calcium oscillations&quot;&gt;Annihilation of calcium oscillations&lt;/a&gt; problem with JModelica. The automatic differentiation tool CasADI and the solver IPOPT...&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 [[Annihilation of calcium oscillations]] problem with JModelica. The automatic differentiation tool CasADI and the solver IPOPT were used to solve the problem.&lt;br /&gt;
&lt;br /&gt;
Model file (calcium_opt.mop)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Optimica&amp;quot;&amp;gt;&lt;br /&gt;
//-------------------------------------------------------------------------&lt;br /&gt;
//Annihilation of calcium oscillations with direct collocation using JModelica&lt;br /&gt;
//(c) Madeleine Schroter&lt;br /&gt;
//--------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  optimization calcium_opt (objective = cost(finalTime),&lt;br /&gt;
                         startTime = 0,&lt;br /&gt;
                         finalTime = 22)&lt;br /&gt;
 &lt;br /&gt;
    // Parameters&lt;br /&gt;
    parameter Real k1 = 0.09;             // Parameter k1&lt;br /&gt;
    parameter Real k2 = 2.30066;          // Parameter k2&lt;br /&gt;
    parameter Real k3 = 0.64;             // Parameter k3&lt;br /&gt;
    parameter Real K4 = 0.19;             // Parameter K4&lt;br /&gt;
    parameter Real k5 = 4.88;             // Parameter k5&lt;br /&gt;
    parameter Real K6 = 1.18;             // Parameter K6&lt;br /&gt;
    parameter Real k7 = 2.08;             // Parameter k7&lt;br /&gt;
    parameter Real k8 = 32.24;            // Parameter k8&lt;br /&gt;
    parameter Real K9 = 29.09;            // Parameter K9&lt;br /&gt;
    parameter Real k10 = 5.0;             // Parameter k10&lt;br /&gt;
    parameter Real K11 = 2.67;            // Parameter K11&lt;br /&gt;
    parameter Real k12 = 0.7;             // Parameter k12&lt;br /&gt;
    parameter Real k13 = 13.58;           // Parameter k13&lt;br /&gt;
    parameter Real k14 = 153.0;           // Parameter k14&lt;br /&gt;
    parameter Real K15 = 0.16;            // Parameter K15&lt;br /&gt;
    parameter Real k16 = 4.85;            // Parameter k16&lt;br /&gt;
    parameter Real K17 = 0.05;            // Parameter K17&lt;br /&gt;
    parameter Real p17 = 1.0;             // Parameter p17&lt;br /&gt;
    parameter Real p18 = 1.0;             // Parameter p18&lt;br /&gt;
    parameter Real umax = 1.3;     &lt;br /&gt;
 &lt;br /&gt;
    parameter Real p1 = 100;              // Parameter p1&lt;br /&gt;
    parameter Real x0tilde = 6.78677;     // Parameter x0tilde &lt;br /&gt;
    parameter Real x1tilde = 22.65836;    // Parameter&lt;br /&gt;
    parameter Real x2tilde = 0.384306;    // Parameter x2tilde &lt;br /&gt;
    parameter Real x3tilde = 0.28977;     // Parameter x3tilde &lt;br /&gt;
 &lt;br /&gt;
    // The states&lt;br /&gt;
    Real x0(start=0.03966, fixed=true);&lt;br /&gt;
    Real x1(start=1.09799, fixed=true);&lt;br /&gt;
    Real x2(start=0.00142, fixed=true);&lt;br /&gt;
    Real x3(start=1.65431, fixed=true);&lt;br /&gt;
    Real cost(start=0, fixed=true);&lt;br /&gt;
 &lt;br /&gt;
    // The control signal&lt;br /&gt;
    input Real u(free=true);&lt;br /&gt;
 &lt;br /&gt;
  equation&lt;br /&gt;
    der(x0) = k1+k2*x0-((k3*x0*x1)/(x0+K4))-((k5*x0*x2)/(x0+K6));&lt;br /&gt;
    der(x1) = k7*x0 - ((k8*x1)/(x1+K9));&lt;br /&gt;
    der(x2)=(k10*x1*x2*x3)/(x3+K11)+p18*k12*x1+k13*x0-(k14*x2)/(  p17*(1.0 + u*( umax - 1.0))  *x2+K15)-(k16*x2)/(x2+K17)+x3/10;&lt;br /&gt;
    der(x3)=-(k10*x1*x2*x3)/(x3+K11)+(k16*x2)/(x2+K17)-x3/10;&lt;br /&gt;
    der(cost)=(x0-x0tilde)*(x0-x0tilde)+(x1-x1tilde)*(x1-x1tilde)+&lt;br /&gt;
              (x2-x2tilde)*(x2-x2tilde)+(x3-x3tilde)*(x3-x3tilde)+p1*u;&lt;br /&gt;
 &lt;br /&gt;
  constraint&lt;br /&gt;
     x0&amp;gt;=0;&lt;br /&gt;
     x1&amp;gt;=0;&lt;br /&gt;
     x2&amp;gt;=0;&lt;br /&gt;
     x3&amp;gt;=0;&lt;br /&gt;
&lt;br /&gt;
  end calcium_opt;&lt;br /&gt;
 &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;calcium_opt&amp;quot;, &amp;quot;calcium_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>