<?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[How to run a compiled .rex model from command line for fast repeated cost-function evaluation]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I have the following use case.</p>
<p dir="auto">My REXYGEN model contains blocks with tunable parameters. One of the model outputs represents the value of interest, for example a cost function.</p>
<p dir="auto">I would like to run the compiled model (<code>*.rex</code>) from the command line as fast as possible, ideally offline rather than in real time. For each run, I need to:</p>
<ul>
<li>provide a specific set of parameter values,</li>
<li>execute one full evaluation of the model,</li>
<li>obtain the resulting value of the selected output.</li>
</ul>
<p dir="auto">More specifically, I want to call the model repeatedly from an external environment such as Python or Julia in order to tune the parameters and minimize the cost function.</p>
<p dir="auto">Could you please advise what is the recommended workflow for this in REXYGEN?</p>
<p dir="auto">In particular, I would like to know:</p>
<ul>
<li>whether this can be done with the compiled <code>.rex</code> model directly,</li>
<li>how to pass parameter values from an external program,</li>
<li>how to read back the value of a selected output,</li>
<li>and whether Local Simulation mode is the right approach for this kind of fast offline repeated evaluation, for example with a fixed number of simulation steps or counter ticks.<br />
Is this workflow supported, and if so, what is the simplest way to implement it?<br />
Thanks Stepan</li>
</ul>
]]></description><link>https://forum.rexygen.com/topic/624/how-to-run-a-compiled-rex-model-from-command-line-for-fast-repeated-cost-function-evaluation</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 22:53:22 GMT</lastBuildDate><atom:link href="https://forum.rexygen.com/topic/624.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Apr 2026 13:05:20 GMT</pubDate><ttl>60</ttl></channel></rss>