谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
. a, M: |; c3 k& o, Dbegin model initialization function( W( t' ^4 }. U* V2 j
create 1 load of load type L_null to P_Creation27 F* L4 @) ]% `) p3 V7 p
create 1 load of load type L_null to P_Creation3: ?8 i, Z& G% [8 o
create 1 load of load type L_null to P_Creation4
3 r, T3 G5 N3 N! Q; V+ z return true " C5 _0 N4 w! J4 K D2 u) e5 e! i5 s
end& h; n/ _1 I9 A: e! D$ A) j
3 {( l0 k2 S/ j$ \( e' o
begin P_Creation2 arriving procedure9 B. D. v9 `, o
while 1=1 do
9 u2 X' |5 n; k8 \ begin7 ^7 }0 t5 R$ i( V2 v) B, \! o
wait for 1 sec
8 b. k! a. L V3 o5 A8 ] create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)3 Q: H: Z' |* G
end P! F3 S$ F/ _" {( U
end1 e* J/ l3 D; L1 }, S$ Q
- W" w. D! @4 u7 J5 W( ~- X
begin P_Creation3 arriving procedure
% A z! S: g' ?) L0 k w: t. Ywhile 1=1 do+ W' a; L1 W# r
begin
& J0 d5 ^# l* a, H" T wait for 1 sec& K0 l4 p# o6 _. F
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)4 Z) U8 {. j* c2 |1 ^6 X' V
end( f- M z# C l# c6 N
end ; b( n. p# h3 Y1 B v8 M
$ P. p% Y/ y: V# @: r/ o, `begin P_Creation4 arriving procedure' ^6 ^7 t/ y0 u$ \0 h' e* [
while 1=1 do
. y+ u% w; o$ t" f! ~ begin
% g6 u$ I% u, b; f1 ~5 X wait for 1 sec
1 F2 z2 @# o- f" H8 u$ V) G" c create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
. {4 ?& Y( L% }) i end9 Z4 u7 z# D. O$ Y
end
9 J/ _+ K9 Q8 \9 Z5 L+ T6 R! n) k, v |
# J. j- K7 m! P( \! A" s但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |