谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);7 M/ O( t! r. x( M) H
begin model initialization function
6 M) Y, K" I2 x% d& B+ J create 1 load of load type L_null to P_Creation2
0 A: l! Q, E4 Q- L4 ? create 1 load of load type L_null to P_Creation3
9 `1 A7 u3 f5 o8 U create 1 load of load type L_null to P_Creation4( I0 ?3 q# c+ }/ r
return true " Z3 e( L0 K$ N" ~7 p3 A
end8 r) K6 Q$ j( Y L& S0 j" ~/ U. h
9 F+ [1 H0 Q. Gbegin P_Creation2 arriving procedure
2 A4 o! T7 f5 |' \. n# D+ owhile 1=1 do
4 O% A& K4 q0 n& z* z begin
3 z$ v) v( i* T, w- | wait for 1 sec
& H5 h5 y2 d1 j1 v$ N0 s4 G create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)& a% L) F, w4 i
end
0 q% O" G# ^! t$ Xend
: ~" }& K$ q6 d
7 D, {6 p/ V% Qbegin P_Creation3 arriving procedure+ E$ Y1 O9 a; ^, V! O
while 1=1 do
/ l$ g2 X- m, v, B begin
2 ^! I+ x' S( l6 _% c& D wait for 1 sec8 X0 n" M, c) I& x- y
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die) E8 [2 c! f# @ i
end
, R& [7 G; y5 C' @; [, w- k0 x2 Uend
( ] A: H4 V9 {' R& @$ X, I/ U
begin P_Creation4 arriving procedure
. c* D j) D5 l, T, ?% W9 ^3 ~while 1=1 do7 j, p* O! i; J$ H6 v
begin6 v2 j- t- m4 u
wait for 1 sec
5 _( M9 J/ k: T. X v8 Q3 \ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)6 x- t5 O( z6 N( l0 y9 n2 q
end
0 |, v/ m7 f% C( \* Nend
; H2 c/ y/ A( {6 P8 B7 L9 g2 _' `
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |