[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] Real-time simulation



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@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@tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com