[TRNSYS-users] Real-time simulation
David BRADLEY
d.bradley at tess-inc.com
Mon Mar 28 14:28:21 PDT 2011
Santiago,
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.
Best,
David
On 3/24/2011 09:11, Santiago Naranjo Palacio wrote:
> /Dear TRNSYS Users,/
> //
> 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).
> Thanks!
>
> --
> Santiago Naranjo Palacio
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at cae.wisc.edu
> https://mailman.cae.wisc.edu/listinfo/trnsys-users
--
***************************
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
d.bradley at tess-inc.com
http://www.tess-inc.com
http://www.trnsys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20110328/de4e0b47/attachment-0005.htm>
More information about the TRNSYS-users
mailing list