谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
6 z, }6 M# v6 Vbegin model initialization function
. g5 o. Y i+ E% T k% ?9 n4 x create 1 load of load type L_null to P_Creation28 @" `' G' P2 s4 X
create 1 load of load type L_null to P_Creation3
- I/ m8 x+ G) f9 E1 w8 X create 1 load of load type L_null to P_Creation4 O- x$ O7 s1 f# r7 T0 _; w
return true ~0 F9 Z* `' Q# [4 l: w
end
, X! m) y# i' k4 k p# X
9 S- ?% Q8 ~. X F$ R5 I$ v1 Pbegin P_Creation2 arriving procedure
9 o( W5 U; p# z! i, bwhile 1=1 do' |- \# o$ D! h; n5 N
begin# G1 m0 u/ H5 k% @
wait for 1 sec! j% i* Y& P7 p5 r$ i- A9 S+ @, d
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
4 F L# O4 i- ^( N; X, M* z$ l end
! x% j3 O, J& L- aend3 \8 T& r, d0 N- b M
# b9 ^8 p$ ~+ V9 e
begin P_Creation3 arriving procedure
1 ^! M; o9 x4 s+ J% S3 c5 }while 1=1 do
, n8 I+ f: V. @0 X begin
0 @9 r/ F& _6 r, S( U: U# G- t wait for 1 sec
" O$ s ^* B, V6 L# l6 U: U6 d- { create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)4 x0 Z& B: V3 u& z
end6 a) w5 j% T. f, @. p: \
end
3 J7 ?* i8 J- _9 ~/ T. E+ B8 [4 c2 z# @2 n4 N0 l
begin P_Creation4 arriving procedure
x% a7 o0 K$ v$ e1 twhile 1=1 do$ t4 d/ v" j7 \% r
begin6 \! Q+ T0 y6 |. L; B
wait for 1 sec
/ [5 E0 y% K: @, g+ e' Q create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
0 a4 C0 t- V0 u end, ?2 d; j+ M2 n# ?( p, n
end) s9 t- T9 R/ {& y0 \+ s- V/ ?
, c0 ~+ z5 Z1 J- u! n$ r- X但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |