I have a question about bij 4Dscript code in one of my servers. The quality of the products in the server should be checked, however the time until the check should be divided into time steps in order to do a good quality prediction, therefore I introduced the For(..) function. This seems to work, because when I press the button 'OK' it is accepted, but when I start running the model I get the following message: ‘Error at “Do”: Access violation at address 0000000. Read of address 00000000.’
Maybe it is not possible to do a Do(..) function in a For(..) function?
Can anyone help me out?
I past the code I developed beneath.
Many thanks in advance!
Annaberth
Code: Select all
Do(
Label([time at manufacturer],i) := Label([end manufacturer time],i) - Label([creation time],i),
For(
i := 0,
i < (Round(Label([time at manufacturer],i)/(60*(Data(12,1))))),
Inc(i),
Do(
Label([Pack permeability],i) := (Data(13,1)) * exp((Data(14,1))*1000/(Data(15,1))) * ((1/(Data(16,1))) - (1/(Data(1,1)))),
Label([O2 influx],i) := Label([Pack permeability],i) * (Data(17,1)) * ((Data(18,1)) - (Data(13,1))) / (Data(19,1)),
Label([O2 consumption],i) := (((2 * exp(-12)) * (exp(0.1069) * (Data(1,1))) * (Data(13,1))) / ((7.52555/100)+(Data(13,1)))) * 24 * 0.25,
Label([O2 concentration],i) := (Data(11,1)) + Label([O2 influx],i) - Label([O2 consumption],i),
Label([visual quality manufacturer],i) := (Label([initial quality],i))+(-0.53356)*exp((73778.9/8.314)*((1/280.15)-(1/Normal((Data(1,1)),(Data(2,1)))))*exp(-5.90263*(0.0275-( Label([O2 concentration],i))))*(Label([time at manufacturer],i)/86400))
)
)
)