谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);, u! ]4 W$ p+ x* b
begin model initialization function# x: M/ B' N! B) R8 z: F5 s' }, }
create 1 load of load type L_null to P_Creation23 F' z. |5 Y2 c, g6 N+ {) h: e
create 1 load of load type L_null to P_Creation3
. V9 A5 m. I0 O+ O create 1 load of load type L_null to P_Creation4; i( W( c0 X+ [& f) g
return true
8 I- T$ `6 m5 G2 C2 l: gend
# W+ n) L5 Z: C) t7 P& C( u! C( x/ s/ r% L+ |+ Z! l
begin P_Creation2 arriving procedure
$ m+ l. C% }9 d4 F3 uwhile 1=1 do2 S* D' H& j. E. \( B/ H
begin0 {9 V: Z3 Z4 O9 `" M( h0 a
wait for 1 sec* w% F4 J) r* q0 \0 j
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
2 s9 G5 `* @' A6 A end1 H2 Z/ w3 `$ @ N! f
end
! J W _( i Y5 u D: {1 q$ u- f7 l6 J: X
begin P_Creation3 arriving procedure
( @4 h* B# F0 ?while 1=1 do# s; e8 d( i0 b3 B1 Q$ F5 V- x
begin% @8 I1 t2 b- P; R
wait for 1 sec
6 N3 s7 f J% k& H: G0 ?8 h) N, p create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)# E3 f) B& q* N8 ]: K: @
end
! S9 C6 Q) X( C; c8 M; _7 xend + c( L Q( v2 e2 n6 X. \' W
/ X5 @( `9 C4 }; u
begin P_Creation4 arriving procedure
: m' C6 r# a2 m% n; v& x, B9 W5 a6 Gwhile 1=1 do
, d+ w. `& K6 G: d begin4 Z: y" o$ n9 o/ ?
wait for 1 sec; J, `; p9 d2 n! w
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
$ M5 K+ F8 N Q! P6 R$ N end9 Z. G( C' _3 T, d3 z- ~4 W
end- s4 J @0 C+ D ]7 U2 _
( W* `( x( d' Z$ ~! v" i但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |