I declare several variables in C code to replace variables in vensim , for example: 'double groundW' is computed, and I write functions to show it and the count result in the same interface in vensim , but the 'groundW' and 'gaW' are just out of my expect , become very huge , at first I think it's the problem of over flow , but I find the difference is the same , for each time I enter the same input .
for example , if enter 180 in 'need' of the vensim interface and u enter 180 again , u'll find that the difference of groundW of two times is 8000 , but the number of groundW should be the same if u key in the same 'need' .
thank you for help !(append file is the C code and vensim file)

[Edited on 7-15-2007 by gk720421]
[Edited on 7-15-2007 by gk720421]
[Edited on 7-15-2007 by gk720421]