谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
; s3 u$ ^' N3 ~6 E& r% ]% x; B7 \begin model initialization function
6 |4 ^1 T/ U3 g* I create 1 load of load type L_null to P_Creation2
/ g' n2 d) o3 b N! @' Z create 1 load of load type L_null to P_Creation3& @& _+ |3 X: i7 `* q& G- w
create 1 load of load type L_null to P_Creation45 H9 t! }6 A5 D3 g' q- V
return true ' Y; D; A( C% C, x( n O2 N- S1 @0 A: I
end
- x! D, B$ ?1 E( v
( ]$ }; _6 g, Y$ Rbegin P_Creation2 arriving procedure- F' ]* u( @4 W$ }3 R" G
while 1=1 do
2 O, Q9 I4 h. v/ G% d begin$ P6 b2 y1 n/ {5 |5 _7 T/ z% `
wait for 1 sec4 F I! |! J( c* B
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
$ ~4 N- a7 _; T end
9 J7 m- m m* q& c# }1 A* Y5 Eend
2 p: ~/ N9 _% O- ]) }- `7 H" B2 x- d' K. f
begin P_Creation3 arriving procedure
7 x9 c: P" P: T# N2 dwhile 1=1 do
3 }! Z' e7 F0 u7 P" E4 B begin
3 N% q6 k2 |4 ~5 ]/ ]* e: r wait for 1 sec
5 k$ }" R) v* e& b create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)6 o. n" B+ t' X( D+ B
end# P$ v# V- p2 p* I* |0 H5 R
end
0 @7 t/ b5 m% K
5 y: \0 u; r+ k) abegin P_Creation4 arriving procedure
" `! J8 x* i) P7 @' M/ ?while 1=1 do) l' u5 ^2 J, e/ s
begin# D* K o, `; ?/ k9 p- X
wait for 1 sec& z- p& e. F% S! z( K5 Z. k5 S
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
( I* ^& e% N# ^- ^6 w+ { end
5 m2 |& q* ?# h% I' \end
3 ?3 p8 K" i* N5 u3 J( ` F+ K) ^- ]: j9 |5 ]1 q
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |