<?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 &#187; engineering</title>
	<atom:link href="http://www.numengo.com/category/engineering/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>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>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

 Served from: www.numengo.com @ 2026-05-25 03:58:18 by W3 Total Cache -->