From: Fu C. <col...@ho...> - 2004-11-25 13:42:59
|
Hi everyone I still got the problem in my model. The dsol Logger shows that nullPointerException in the line 144 of my Factory class. Here are the code of line 144: this.inventory[(int)productType.draw()]=this.inventory[(int) productType.draw()]+1; But Acually I already initialize inventory array and productType in the constructor of Factory class. I guess the problem might be productType cuz I use "switch"-"case" to initialize the productType. Following are the codes switch(factoryNumber) { case 1: this.productType=new DistDiscreteUniform(stream,0,5); break; case 2: this.productType=new DistDiscreteUniform(stream,6,11); break; case 3: this.productType=new DistDiscreteUniform(stream,3,8); break; case 4: this.productType=new DistDiscreteUniform(stream,1,8); break; default: } Can any one help me? My model is comparison 14 on CVS. Loek, last time your suggestion is correct.Thanks. Kind Regards Hualiang |