谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
8 n. F; u' R- }begin model initialization function x' N ^4 r6 C7 [: E6 B
create 1 load of load type L_null to P_Creation2
( H6 ^5 r1 F9 t0 } create 1 load of load type L_null to P_Creation3) v* b+ k/ O* @8 D
create 1 load of load type L_null to P_Creation4
: x9 U# ` f# \" x* }" |5 A- M return true 2 K2 n) Y" G" [1 X+ T3 c& T' |; Y
end) o. G A7 e: m( @2 V
) ?3 u f6 H) I9 ]$ `* h' nbegin P_Creation2 arriving procedure6 u- E, [0 [: ^. Z
while 1=1 do
# m' T. a! @# e/ U% p/ U begin4 |, P, @3 v" y9 k- @. ~* i5 W$ P
wait for 1 sec
1 d6 Z! `0 f6 J* s, c create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
( ` r" Z! m: [; G( T' \ end1 N$ a1 r p- H: ]
end
# R- u& |0 R7 L; r* U6 t7 K
( ]$ ?" L# S2 t3 r$ R# ]begin P_Creation3 arriving procedure
2 R8 T1 d% F- |4 uwhile 1=1 do2 v1 b0 Y& b( G+ S
begin
0 [) S) F! n" x- v/ ~2 J wait for 1 sec
- g- I+ I' l" v$ ]* K. o create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)4 |4 |9 J' i: ^) S' ^+ v4 G7 X
end
2 u& R+ z6 F8 U! u1 D, kend
. D, w; r% l+ U
$ X" c9 G6 U0 l$ e- obegin P_Creation4 arriving procedure
/ m1 A# C. Q, j1 }4 i( \while 1=1 do
( {$ n& f2 {& B8 c begin
6 J9 s Z1 c) k" y. R wait for 1 sec7 x" k- u9 C1 z3 R, M- ` D
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
# i* @2 n; Q8 ^6 C end$ e9 c! W: g: h, e7 ]- F# j
end
' A2 o+ ~0 Q0 B; M
, {0 ?5 H! P3 f0 S但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |