<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>numenGo</title>
	<atom:link href="http://www.numengo.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.numengo.com</link>
	<description>Scientific Decentralized Applications</description>
	<lastBuildDate>Wed, 07 Mar 2018 14:48:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>A Super API prototype</title>
		<link>http://www.numengo.com/370/a-super-api-prototype</link>
		<comments>http://www.numengo.com/370/a-super-api-prototype#comments</comments>
		<pubDate>Thu, 14 Jun 2012 13:13:00 +0000</pubDate>
		<dc:creator>Cédric</dc:creator>
				<category><![CDATA[engineering]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[AMESim]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[cross-platform]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[SimulationX]]></category>
		<category><![CDATA[Simulink]]></category>

		<guid isPermaLink="false">http://www.numengo.com/?p=370</guid>
		<description><![CDATA[For a few months, we have been working on spare-time on a in-house development, that may become a product one day. As it is fresh and cool, I can&#8217;t help giving some details about it. Since we have a cross-platform product, we were starting to face a new problem: building and testing system models on ...]]></description>
				<content:encoded><![CDATA[<p>For a few months, we have been working on spare-time on a in-house development, that may become a product one day. As it is fresh and cool, I can&#8217;t help giving some details about it.</p>
<p>Since we have a cross-platform product, we were starting to face a new problem: building and testing system models on each platform at each release. For example, we have a bunch of tutorials and demo cases we distribute with the software. Maintaining and testing all those tutorials is not only boring, but it takes hours to days : we definitely can&#8217;t afford it.</p>
<p>We also have some interesting engineering cases. While working on a big model for a customer on a given platform, we suspected that the solver was responsible for bad CPU performances. Someone asked me : &#8220;how does it run on other platforms ?&#8221;. Very good question, but i really didn&#8217;t have days to spend to reproduce the exact same system on the other platforms to answer this question, as interesting it was.</p>
<p>As a matter of fact, we needed some kind of Super Application Program Interface, to control all our simulation platforms in the same way: we could compare simulation results, and even maybe transform a model of a given platform to the others.</p>
<p>Most platforms provide some kind of API:</p>
<ul>
<li><a title="numenGo|FL - SimulationX interface" href="http://www.numengo.com/software/numengofl/numengofl-simulationx-interface">SimulationX</a> has a COM interface</li>
<li><a title="numenGo|FL - AMESim interface" href="http://www.numengo.com/software/numengofl/numengofl-amesim-interface">AMESim </a>comes with VBA, matlab and python interface</li>
<li><a title="numenGo|FL - Simulink interface" href="http://www.numengo.com/software/numengofl/numengofl-simulink-interface">Matlab/Simulink</a> provides command lines functions for all operations</li>
</ul>
<p>As you may already know&#8230; <a title="I love my Python" href="http://www.numengo.com/314/i-love-my-python">I love python</a> ! No way I would use anything else for such high level programming :</p>
<ul>
<li>COM is very nicely handled in the win32com library.  SimulationX : checked</li>
<li>AMESim has a python interface : checked</li>
<li>Matlab&#8230; there must be something to deal with matlab ! My friend Google found this incredibly powerful library : <a title="matlabwrap" href="http://mlabwrap.sourceforge.net/#function-handles-and-callbacks-into-python">matlabwrap</a>. Matlab: checked</li>
</ul>
<p>What we wanted is to have an object-oriented interface, common for all platforms, to deal with all basic operations :</p>
<ul>
<li>opening/saving/closing a model</li>
<li>adding components and/or modifying the sketch</li>
<li>modifying parameters</li>
<li>getting simulation results</li>
</ul>
<p>For sure, it has been a mess to code (as each platform&#8217;s API is very specific), and it is not completely tested yet. But the prototype is already very handy and quite powerful :</p>
<ul>
<li>we can access any component or variable of a model of any platform in a very clear and simple syntax</li>
<li>parameters/results can be set/returned in standard python or numpy arrays format, for direct post-processing</li>
<li><strong>transforming a model from one platform to another</strong> is almost* automatic</li>
</ul>
<p>(*) : almost&#8230; we didn&#8217;t get to transform platform specific models (for control, mechanics, etc&#8230;), we properly transform the &#8216;numenGo&#8217; part of a system (retrieving position, orientation, parameters, connections, etc&#8230;). Most of the time, it covers 90-95% of the transformation work. The model is even stored in a neutral format corresponding to <a title="Software" href="http://www.numengo.com/software" target="_blank">our metamodel</a>.</p>
<p>As said above, it may never becomes a standard product, but we can use it on demand for clients who would like to share their models on different platforms.</p>
<p>Now, on this basis, our next move is to work out an automatic solution for cross platform testing : it implies to store some reference results, being able to compare them. So far, I am really considering <a title="pytables" href="http://www.pytables.org/moin" target="_blank">pytables</a>. Any better idea ?</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numengo.com/370/a-super-api-prototype/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some code metrics</title>
		<link>http://www.numengo.com/326/some-code-metrics</link>
		<comments>http://www.numengo.com/326/some-code-metrics#comments</comments>
		<pubDate>Wed, 30 May 2012 10:26:49 +0000</pubDate>
		<dc:creator>Cédric</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[automatic generation]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[MDA]]></category>
		<category><![CDATA[metrics]]></category>
		<category><![CDATA[sourcecode]]></category>

		<guid isPermaLink="false">http://www.numengo.com/?p=326</guid>
		<description><![CDATA[Today, I did an interesting exercice I haven&#8217;t done for years : code metrics. I used the very nice software SourceMonitor. My goal was to obtain some key figures regarding our software solution: number of lines % of comments and documentation % of automatically generated code I only selected the source code dedicated for calculation/simulation ...]]></description>
				<content:encoded><![CDATA[<p>Today, I did an interesting exercice I haven&#8217;t done for years : code metrics.</p>
<p>I used the very nice software <a title="SourceMonitor" href="http://www.campwoodsw.com/sourcemonitor.html" target="_blank">SourceMonitor</a>.</p>
<p>My goal was to obtain some key figures regarding our software solution:</p>
<ul>
<li>number of lines</li>
<li>% of comments and documentation</li>
<li>% of automatically generated code</li>
</ul>
<p>I only selected the source code dedicated for calculation/simulation purposes (no data files, no unit tests, no GUI code, no python scripts, no code used for automatic generation, no third party libraries).</p>
<p>I came to the following results:<br />
<img width="630" height="250" title="overall source code : 750k lines" src="http://chart.apis.google.com/chart?cht=p3&#038;chtt=overall source code : 750k lines&#038;chl=automatic code 55%|comments 25%|handwritten code 20%&#038;chco=058DC7,50B432,ED561B&#038;chs=630x250&#038;chd=t:55,25,20&#038;chf=bg,s,ffffff" alt="overall source code : 750k lines" /><br />
I must say that <a title="Python API" href="http://www.numengo.com/software/python-api" target="_blank">python wrappers</a> are very significant in those impressive results (350k lines of automatically generated code).</p>
<p><a title="numenGo|MPS" href="http://www.numengo.com/software/cc-libraries/numengomps" target="_blank">numenGo|MPS</a> and <a title="numenGo|FFC" href="http://www.numengo.com/software/cc-libraries/numengoffc" target="_blank">numenGo|FFC</a> are almost completely handwritten, and are quite some piece of code:</p>
<p><img width="630" height="250" title="MPS : 48k lines" src="http://chart.apis.google.com/chart?cht=p3&#038;chtt=MPS : 48k lines&#038;chl=code|comments 23%&#038;chco=058DC7,50B432&#038;chs=630x250&#038;chd=t:77,23&#038;chf=bg,s,ffffff" alt="MPS : 48k lines" /></p>
<p><img width="630" height="250" title="FFC : 36k lines" src="http://chart.apis.google.com/chart?cht=p3&#038;chtt=FFC : 36k lines&#038;chl=code|comments 35%&#038;chco=058DC7,50B432&#038;chs=630x250&#038;chd=t:65,35&#038;chf=bg,s,ffffff" alt="FFC : 36k lines" /></p>
<p>Regarding <a title="numenGo|FL" href="http://www.numengo.com/software/numengofl" target="_blank">numenGo|FL</a>, as we use <a title="Software" href="http://www.numengo.com/software" target="_blank">Model Driven Architecture</a>, most of it is automatically generated. If we consider only source code (meaning we exclude model description files such a .spe files for AMESim, and .mdl files for Simulink. Note that modelica files for simulationX is both code and model description), we have the following distribution:</p>
<p><img width="630" height="250" title="FL : 270k lines" src="http://chart.apis.google.com/chart?cht=p3&#038;chtt=FL : 270k lines&#038;chl=automatic C++ code 40%|comments 43%|modelica 10%|user code 7%&#038;chco=058DC7,50B432,ED561B,EDEF00&#038;chs=630x250&#038;chd=t:40,43,10,7&#038;chf=bg,s,ffffff" alt="FL : 270k lines" /></p>
<p>See, that&#8217;s already a good piece of software, especially when you consider it is object-oriented programming (few redundancies, inheritance&#8230;). Imagine what it is capable of ! <a title="Evaluation request" href="http://www.numengo.com/software/evaluation-request">Give it a try !</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.numengo.com/326/some-code-metrics/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What my Python does</title>
		<link>http://www.numengo.com/318/what-my-python-does</link>
		<comments>http://www.numengo.com/318/what-my-python-does#comments</comments>
		<pubDate>Sun, 27 May 2012 15:52:32 +0000</pubDate>
		<dc:creator>Cédric</dc:creator>
				<category><![CDATA[engineering]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[buildserver]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[MDA]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[progamming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.numengo.com/?p=318</guid>
		<description><![CDATA[After this declaration of love, let&#8217;s overview where and how Python is so useful at numenGo. Of course, I couldn&#8217;t start with anything else than our python API. To create our wrappers, we are using the excellent py++. With a few tricks, we managed to reuse our doxygen documentation for each method and class. The ...]]></description>
				<content:encoded><![CDATA[<p>After <a title="I love my Python" href="http://www.numengo.com/314/i-love-my-python">this declaration of love</a>, let&#8217;s overview where and how Python is so useful at numenGo.</p>
<p>Of course, I couldn&#8217;t start with anything else than our <a title="Python API" href="http://www.numengo.com/software/python-api" target="_blank">python API</a>. To create our wrappers, we are using the excellent <a title="pyplusplus" href="http://sourceforge.net/projects/pygccxml/" target="_blank">py++</a>. With a few tricks, we managed to reuse our <a title="doxygen" href="http://www.stack.nl/~dimitri/doxygen/" target="_blank">doxygen </a>documentation for each method and class. The python API of our libs is awesome, as many features of our libs really only make sense in a scripting environment, or in a high level programming language (for example the quantities). For engineering studies, we use it for sizing, sensitivity analysis, pre and post treatment. Each time, we try to package it in reusable packages to enrich the API. Our API makes Python an excellent scientific environment, especially when you use it with <a title="numpy" href="http://en.wikipedia.org/wiki/NumPy" target="_blank">numpy</a>, <a href="http://en.wikipedia.org/wiki/SciPy" target="_blank">scipy </a>and <a href="http://en.wikipedia.org/wiki/Matplotlib" target="_blank">matplotlib</a>.</p>
<p>Another very important use of python is the processing of our models. Since we use <a title="Software" href="http://www.numengo.com/software" target="_blank">MDA</a>, all our models are described in a huge xml file, containing all informations related to the models (documentation, parameters, variables, icons, ports, specific methods&#8230;). Thanks to some additional libraries (<a title="lxml" href="http://lxml.de/" target="_blank">lxml </a>for xml handling, <a title="PIL" href="http://www.pythonware.com/products/pil/" target="_blank">PIL </a>libary for image handling&#8230;), we generate all images needed for our icons, create complex html documentation files (with latex equations generated on the fly as pngs). The complete packaging of our libraries for each platform is done with some python scripts.</p>
<p>When we need simple GUIs for small features of our software (for example, the license manager or the pathlist editor), we program them in python using <a title="Tkinter" href="http://docs.python.org/library/tkinter.html" target="_blank">Tkinter </a>(the default GUI toolkit of python, simple but fair enough for our use). When the python code is fine, we package it as a standalone executable using the <a title="pyinstaller" href="http://www.pyinstaller.org/" target="_blank">pyinstaller </a>library.</p>
<p>Lately, we decided to use a build server to compile all our software when we commit new stuff on our CVS. Once again, we choosed a python based solution, the excellent <a title="buildbot" href="http://trac.buildbot.net/" target="_blank">buildbot</a>. We managed to create a script that automates not only the build, but also all the packaging. Once our build is ready, we automatically upload it on our <a title="amazon S3" href="http://aws.amazon.com/s3/" target="_blank">amazon S3</a> bucket thanks to the very powerful <a title="boto amazon python API" href="http://docs.pythonboto.org/en/latest/index.html">amazon S3 python API</a>.</p>
<p>As you see, python is almost everywhere in our process, it is our glue and we use it every time we can automate a task.</p>
<p>Python is cross-platform, this way we make sure that everything we script will be reusable, whatever our developpers will use as coding environment.</p>
<p>Python rocks, I love my Python.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numengo.com/318/what-my-python-does/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I love my Python</title>
		<link>http://www.numengo.com/314/i-love-my-python</link>
		<comments>http://www.numengo.com/314/i-love-my-python#comments</comments>
		<pubDate>Sun, 27 May 2012 11:56:03 +0000</pubDate>
		<dc:creator>Cédric</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.numengo.com/?p=314</guid>
		<description><![CDATA[For this first post, I&#8217;d like to make a declaration of love. Python, I met you about 7 years ago, but at this time, I didn&#8217;t see how beautiful you were. I knew you were sexy, I knew you were elegant and always ready to give a hand. I was just not ready yet. I ...]]></description>
				<content:encoded><![CDATA[<p>For this first post, I&#8217;d like to make a declaration of love.</p>
<p>Python, I met you about 7 years ago, but at this time, I didn&#8217;t see how beautiful you were. I knew you were sexy, I knew you were elegant and always ready to give a hand. I was just not ready yet.</p>
<p>I really got into you 3 years ago. Since, I hardly spend a single day without you. We do so many things together, and you always come to surprise me, to impress me and you never disappointed me.</p>
<p>We have so many projects together, that&#8217;s crazy. For 3 years, I can&#8217;t do anything without thinking how I can teach you how to do it alone.</p>
<p>You may think I am selfish and that our relationship is only based on how i can spend less time with you. Don&#8217;t worry my sweet python, between you and I, that&#8217;s long term&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numengo.com/314/i-love-my-python/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

 Served from: www.numengo.com @ 2026-04-20 17:28:19 by W3 Total Cache -->