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

Re: [TRNSYS-users] Problem in using cycle for parameters in owned created component



Chun Kwong,
By setting NP to 51, your source code is going to always look for 51 parameters. If you want to have your Type accept a variable number of parameters, you need to change the variable NP to NPMAX in the parameter statement (you'll have to change the variable in a number of places. Then, during the initialization time of your Type, you need to set the actual (as opposed to the maximum possible) number of parameters for your simulation - probably by setting a new variable called nPars to INFO(4). INFO(4) carries the number of parameters that were found in the input file. You can look at Type14 in the standard source code to see an example of how a variable number of parameters might be handled.
Cheers,
 David


At 07:00 2/12/2008, h8304506@hkusua.hku.hk wrote:
Dear Trnsys users.

I try to use cycle for particular group of parameters in developing my
component.  I set in the source code

PARAMETER (NP=51,NI=3,NOUT=2,ND=0,NSTORED=404000)

where 51 is the maximum numbers of parameters.  However, when I run
the simulation, an error occurs stating

"The TRNSYS TYPE checking routine has found an inconsistency in the
specified component between the input file and the information
expected by the Type

51 PARAMETERs are required and 35 were specified."

Can anyone advise how I can set NP in the source code?  Thank you!


Best Regards
LEE, Chun Kwong
PhD student
Department of Mechanical Engineering
University of Hong Kong




_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@engr.wisc.edu
https://www.cae.wisc.edu/mailman/listinfo/trnsys-users

****************************************************************************************
Thermal Energy System Specialists (TESS), LLC
David BRADLEY                           2916 Marketplace Drive - Suite 104
Partner                                        Madison, WI 53719
Phone: (608) 274-2577 USA
Fax: (608) 278-1475
E-mail: bradley@tess-inc.com
Web Pages:  http://www.tess-inc.com     and      http://www.trnsys.com

"Providing software solutions for today's energy engineering projects"
****************************************************************************************