<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Calling REXYGEN block from PYTHON]]></title><description><![CDATA[<p dir="auto">Hi, I wonder if it's possible to call some standard REXYGEN block from python code embedded inside PYTHON block.<br />
Let's say I use PYTHON block and its main() function needs to solve some optimization task using python solver for predicitive control . To do so, I need to compute cost function, therefore I need to call parallel simulations to predict the states over some prediction horizon. Currently I can run such parallel simulation (time-scaled, faster) using REXLANG and its CallExt functions such as CallExt(".STATESAVE"), CallExt(".STATELOAD"); and CallExt(".SubModel") inside FOR loop inside main(void) of the REXLANG. Now I'd like to create similar solution using python code but I see no way how to call REXYGEN blocks from python. Any help appreciated. Thanks Stepan</p>
]]></description><link>https://forum.rexygen.com/topic/588/calling-rexygen-block-from-python</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 11:07:35 GMT</lastBuildDate><atom:link href="https://forum.rexygen.com/topic/588.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Jun 2024 05:53:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Calling REXYGEN block from PYTHON on Tue, 18 Jun 2024 09:47:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/26">@stepan-ozana</a> Thanks for sharing your solution with the community!</p>
<p dir="auto">Good luck with your project.</p>
<p dir="auto">Tomas</p>
]]></description><link>https://forum.rexygen.com/post/1605</link><guid isPermaLink="true">https://forum.rexygen.com/post/1605</guid><dc:creator><![CDATA[cechurat]]></dc:creator><pubDate>Tue, 18 Jun 2024 09:47:41 GMT</pubDate></item><item><title><![CDATA[Reply to Calling REXYGEN block from PYTHON on Tue, 18 Jun 2024 09:12:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/5">@cechurat</a> Thanks for info. As my model of the plant is created in external program in the form of FMU, I found that I could run fast parallel simulations in order to compute my cost function over future prediction horizon using <a href="https://github.com/CATIA-Systems/FMPy">https://github.com/CATIA-Systems/FMPy</a> which can be called from the PYTHON block within the REXYGEN project</p>
]]></description><link>https://forum.rexygen.com/post/1604</link><guid isPermaLink="true">https://forum.rexygen.com/post/1604</guid><dc:creator><![CDATA[stepan.ozana]]></dc:creator><pubDate>Tue, 18 Jun 2024 09:12:42 GMT</pubDate></item><item><title><![CDATA[Reply to Calling REXYGEN block from PYTHON on Mon, 17 Jun 2024 08:56:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/26">@stepan-ozana</a> Hi Stepan,</p>
<p dir="auto">thanks for your question. It is not possible to call REXYGEN function blocks within the PYTHON block. The implementation of this functionality is not scheduled yet.</p>
<p dir="auto">Kind regards,<br />
Tomas</p>
]]></description><link>https://forum.rexygen.com/post/1601</link><guid isPermaLink="true">https://forum.rexygen.com/post/1601</guid><dc:creator><![CDATA[cechurat]]></dc:creator><pubDate>Mon, 17 Jun 2024 08:56:25 GMT</pubDate></item></channel></rss>