<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Santiago,<br>
I'm not sure that you need to do anything special. The TRNSYS
kernel (the brains that determine when convergence has been reached)
call the Types and then just waits until the Type hits its "return"
statement (returning control to the kernel). The kernel will not
increment the timestep until all of the outputs from Types have
converged (stopped changing from one iteration to the next). I
assume that you have developed some Type in your simulation that
communicates with your controller. The kernel should call that Type
and then wait until the controller is ready to make its decision.
The controller's decision should get placed into the Type's outputs
and then the Type should return control to the kernel as all Types
do. The one thing you might do a little differently is to prevent
your Type/controller from trying to make a new decision at every
simulation iteration; allow it to make one control decision per time
step and then hang on to that control decision until the next time
step. You can do that either by having your Type only process at the
"post convergence" call or it can make its decision on the first
iteration of a new time step and then return without reevaluating at
all other iterations.<br>
Best,<br>
David<br>
<br>
<br>
On 3/24/2011 09:11, Santiago Naranjo Palacio wrote:
<blockquote
cite="mid:AANLkTinwcgecSdGFgje1pwcZfKJNOcOTeX57H318rRsm@mail.gmail.com"
type="cite">
<div><em>Dear TRNSYS Users,</em></div>
<div><em></em> </div>
<div>Is there a way to run TRNSYS on real-time? I am working on a
project where a real controller and a TRNSYS project have to
communicate with each other. One of my problems right now is
trying to force TRNSYS to run on real-time so that the commands
from/to the controller are received at the appropiate time. If
this is not possible, is there a way in which TRNSYS can be
externally paused after each TIME STEP and restarted after
receiving an external signal? (I figure this would be another
way of forcing the system to run on real-time). </div>
<div> </div>
<div>Thanks! <br clear="all">
<br>
-- <br>
Santiago Naranjo Palacio</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
TRNSYS-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:TRNSYS-users@cae.wisc.edu">TRNSYS-users@cae.wisc.edu</a>
<a class="moz-txt-link-freetext" href="https://mailman.cae.wisc.edu/listinfo/trnsys-users">https://mailman.cae.wisc.edu/listinfo/trnsys-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
22 North Carroll Street - suite 370
Madison, WI 53703 USA
P:+1.608.274.2577
F:+1.608.278.1475
<a class="moz-txt-link-abbreviated" href="mailto:d.bradley@tess-inc.com">d.bradley@tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.tess-inc.com">http://www.tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.trnsys.com">http://www.trnsys.com</a></pre>
</body>
</html>