谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);! E% a" x# x2 q' s. `
begin model initialization function p$ c0 k( N R8 J Y# S# G; `; [
create 1 load of load type L_null to P_Creation2+ T9 z/ l; ?1 C# x' \! u
create 1 load of load type L_null to P_Creation3' j5 Y9 N" a" Q4 L
create 1 load of load type L_null to P_Creation4
! v; _, }. p) S; r( J { return true 5 ^% B' @0 V8 {/ {7 s9 Z
end0 r" m' M, H( H& V+ Y" K
. ?& T. q3 q5 abegin P_Creation2 arriving procedure
' U: [6 n2 T/ h$ D3 L, ]while 1=1 do% }1 m$ x9 ~3 ?$ m
begin) F# y6 O" F8 g) B! O* s, y9 }9 o$ @
wait for 1 sec
. l7 p( B/ P5 i create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
1 p0 A, W( X" ` end, M/ V, w, N1 Q
end4 A- L! e2 j( @' Q% U* I
9 C" f8 ~( f% gbegin P_Creation3 arriving procedure
6 j1 e' J/ G1 h6 Ywhile 1=1 do1 X& e1 {& f% e/ @" {
begin; x4 O7 y. ?9 |" O" l3 G) N: G- j' c
wait for 1 sec) c# m& K+ t7 Y' j
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
" a, o9 ~( \0 Y0 I end
/ ]9 l& ], ^8 I) M2 S4 hend , O3 v& \+ n+ d. [, J
8 x2 e" c X( G F+ g2 O6 `% `
begin P_Creation4 arriving procedure& z. n' W$ E; u' B0 N S9 a) ]! K
while 1=1 do/ w# ?( _, @/ w+ z4 u1 W
begin1 {3 n# d, ^3 U7 |1 p: k
wait for 1 sec
7 r9 y7 i+ K8 e) c3 a/ F create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
R6 f4 k9 |" X5 s5 `, I end
. b5 \7 c: a1 p5 qend& w$ N L5 D- j5 d! D4 m( b
- a4 |1 c) k# L- ?' u @
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |