谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);+ b. [: o& s+ I6 v. s
begin model initialization function
- t- a- p6 ^- ]$ t' j create 1 load of load type L_null to P_Creation2& l& r9 t) O; e T
create 1 load of load type L_null to P_Creation3$ G) a) @% P- y
create 1 load of load type L_null to P_Creation4& g8 i1 h- A9 s8 V
return true
- Y( o5 T, h( X) A. O7 p" R+ |end
9 @9 ^$ t3 y8 _
0 S2 _- `5 s& p+ U, }begin P_Creation2 arriving procedure3 D5 B6 C6 v# z5 u$ I
while 1=1 do
/ |; {: U- s( d; C @$ y begin
, k: f6 r6 ^+ g: p2 |# ^8 T wait for 1 sec
, s1 k$ N+ G; t$ {# W Y create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
+ D, w8 ^6 q1 [# \! M end
/ T- }' \- g- t. n2 F4 y( ?end
0 Q. w4 p8 V* l+ @: d/ n5 @! j
! z! X6 a& \ c% O4 r& mbegin P_Creation3 arriving procedure) J' l }, A, |, h
while 1=1 do
1 d. v5 v, u0 V/ v# [! p begin. s1 b) k8 v& ~! E c; x
wait for 1 sec, r0 _6 B/ \3 K F' u
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
- z ^3 C3 F" W W6 X0 [' e end
9 k. u) u* d+ Send 1 {) ~9 l, u. m
1 c$ y4 C# x1 |2 p1 ? h( C
begin P_Creation4 arriving procedure8 ^( y: v9 K0 r$ N: B& B/ y/ G+ P
while 1=1 do
( B0 O6 P$ Z }$ o/ I+ R begin
7 X! E* H+ B8 i+ k/ }: L wait for 1 sec
; \8 { `9 {1 `7 |! S9 z create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)( c4 `( j$ `% v0 k! x. d" ?
end
) z* [+ @! K% H# F ` N5 fend: g3 Z% q. ^4 C5 r# c8 T5 t. r& p: ]
3 w0 @" m5 H: l, A7 d8 _但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |