diff --git a/BioChem/Compartments/Compartment.mo b/BioChem/Compartments/Compartment.mo index 625c85a..96590bf 100644 --- a/BioChem/Compartments/Compartment.mo +++ b/BioChem/Compartments/Compartment.mo @@ -1,13 +1,13 @@ within BioChem.Compartments; model Compartment "Default compartment (constant volume)" + extends BioChem.Interfaces.Compartments.Compartment(V(stateSelect=StateSelect.prefer)); +equation + der(V)=0 "Compartment volume is constant"; annotation(Documentation(info="
Default compartment model.
", revisions=""), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10}), graphics={Text(fillColor={0,85,0}, fillPattern=FillPattern.Solid, extent={{-100,-170},{100,-120}}, textString="%name", fontName="Arial"),Rectangle(lineColor={0,85,0}, fillColor={199,199,149}, fillPattern=FillPattern.Solid, lineThickness=10, extent={{-110,-110},{110,110}}, radius=20)}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10}))); - extends BioChem.Interfaces.Compartments.Compartment(V(stateSelect=StateSelect.prefer)); -equation - der(V)=0 "Compartment volume is constant"; end Compartment; diff --git a/BioChem/Examples/package.mo b/BioChem/Examples/package.mo index cb62c30..f62e5e1 100644 --- a/BioChem/Examples/package.mo +++ b/BioChem/Examples/package.mo @@ -1,7 +1,7 @@ within BioChem; package Examples "Some examples of BioChem models" - extends Icons.Library; + extends Modelica.Icons.ExamplesPackage; model InsulinSignaling_Sedaghat "Metabolic insulin signaling pathway in rat adipocytes" extends BioChem.Compartments.Compartment; diff --git a/BioChem/Icons/Substances/Package/package.mo b/BioChem/Icons/Substances/Package/package.mo new file mode 100644 index 0000000..c0f4bfe --- /dev/null +++ b/BioChem/Icons/Substances/Package/package.mo @@ -0,0 +1,8 @@ +within BioChem.Icons.Substances; + +partial package Package + extends BioChem.Icons.Library; +annotation( + Icon(coordinateSystem(extent = {{-100, 100}, {100, -100}}, preserveAspectRatio = true, grid = {10, 10}), graphics = {Ellipse(origin = {-10, -50}, lineColor = {0, 56, 0}, fillColor = {0, 85, 0}, fillPattern = FillPattern.Sphere, extent = {{-60, -20}, {-20, 20}}), Ellipse(origin = {38, -10}, lineColor = {100, 100, 0}, fillColor = {255, 255, 0}, fillPattern = FillPattern.Sphere, extent = {{-28, -60}, {12, -20}}), Ellipse(origin = {-30.0032, -2.75056}, lineColor = {0, 0, 71}, fillColor = {0, 0, 127}, fillPattern = FillPattern.Sphere, extent = {{0.0032, -13.4697}, {40, 26.5303}})}), + Diagram(coordinateSystem(extent = {{-100, 100}, {100, -100}}, preserveAspectRatio = true, grid = {10, 10}))); +end Package; diff --git a/BioChem/Icons/Substances/Package/package.order b/BioChem/Icons/Substances/Package/package.order new file mode 100644 index 0000000..e69de29 diff --git a/BioChem/Icons/Substances/package.mo b/BioChem/Icons/Substances/package.mo new file mode 100644 index 0000000..4e18a57 --- /dev/null +++ b/BioChem/Icons/Substances/package.mo @@ -0,0 +1,5 @@ +within BioChem.Icons; + +partial package Substances + extends BioChem.Icons; +end Substances; diff --git a/BioChem/Icons/Substances/package.order b/BioChem/Icons/Substances/package.order new file mode 100644 index 0000000..1ac7932 --- /dev/null +++ b/BioChem/Icons/Substances/package.order @@ -0,0 +1 @@ +Package diff --git a/BioChem/Icons/UnitsPackage.mo b/BioChem/Icons/UnitsPackage.mo new file mode 100644 index 0000000..6f356fc --- /dev/null +++ b/BioChem/Icons/UnitsPackage.mo @@ -0,0 +1,6 @@ +within BioChem.Icons; + +partial package UnitsPackage + extends Icons.Library; + annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10}), graphics={Text(origin={0,-13.3333}, fillPattern=FillPattern.Solid, extent={{-100,-86.6667},{73.34,43.3333}}, textString="C", fontName="Arial"),Text(origin={0,-10}, fillPattern=FillPattern.Solid, extent={{6.51,6.81},{50,53.19}}, textString="o", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10}))); +end UnitsPackage; diff --git a/BioChem/Icons/package.mo b/BioChem/Icons/package.mo index 492548e..c1e1f48 100644 --- a/BioChem/Icons/package.mo +++ b/BioChem/Icons/package.mo @@ -1,9 +1,10 @@ within BioChem; package Icons "Icons" - extends Library; + extends Modelica.Icons.IconsPackage; partial package Library - annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10}), graphics={Rectangle(fillColor={235,235,235}, fillPattern=FillPattern.Solid, extent={{-100,-100},{80,50}}),Polygon(fillColor={210,210,210}, fillPattern=FillPattern.Solid, points={{-100,50},{-80,70},{100,70},{80,50},{-100,50}}),Polygon(fillColor={210,210,210}, fillPattern=FillPattern.Solid, points={{100,70},{100,-80},{80,-100},{80,50},{100,70}})}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10}))); + annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10}), graphics={Rectangle(fillColor={235,235,235}, fillPattern=FillPattern.Solid, extent={{-100,-100},{80,50}}),Polygon(fillColor={210,210,210}, fillPattern=FillPattern.Solid, points={{-100,50},{-80,70},{100,70},{80,50},{-100,50}}),Polygon(fillColor={210,210,210}, fillPattern=FillPattern.Solid, points={{100,70},{100,-80},{80,-100},{80,50},{100,70}})}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10})), + Documentation(info = "Remark This package is somehow equivalent to Modelica.Icons.Package. However, the graphics is nicer and therefore I am leaving it.")); end Library; model IconBase @@ -11,11 +12,15 @@ package Icons "Icons" end IconBase; partial package Example "Icon for an example model" - annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10}), graphics={Rectangle(fillColor={255,255,255}, fillPattern=FillPattern.Solid, extent={{-100,-100},{80,50}}),Polygon(fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{-100,50},{-80,70},{100,70},{80,50},{-100,50}}),Polygon(fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{100,70},{100,-80},{80,-100},{80,50},{100,70}}),Text(fillColor={0,0,255}, fillPattern=FillPattern.Solid, extent={{-85,-85},{65,35}}, textString="Example", fontName="Arial"),Text(fillColor={255,0,0}, extent={{-120,73},{120,132}}, textString="%name", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10}))); + annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10}), graphics={Rectangle(fillColor={255,255,255}, fillPattern=FillPattern.Solid, extent={{-100,-100},{80,50}}),Polygon(fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{-100,50},{-80,70},{100,70},{80,50},{-100,50}}),Polygon(fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{100,70},{100,-80},{80,-100},{80,50},{100,70}}),Text(fillColor={0,0,255}, fillPattern=FillPattern.Solid, extent={{-85,-85},{65,35}}, textString="Example", fontName="Arial"),Text(fillColor={255,0,0}, extent={{-120,73},{120,132}}, textString="%name", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, grid={10,10})), + Documentation(info = "The implementation of this Icon looks nicer than the implementation of Modelica.Icoms.Example.")); end Example; + + + annotation(Documentation(info="