谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);1 R- u* T3 V- B ^: g- u/ r& X& c
begin model initialization function8 m7 K( ]! a+ m- R8 B
create 1 load of load type L_null to P_Creation23 m' @4 W+ \7 {. t) m
create 1 load of load type L_null to P_Creation35 C# W, z- t- m- p4 U6 z
create 1 load of load type L_null to P_Creation4
& o7 Q: L2 S' f2 E3 H! c return true $ A4 J7 K: h. \; A$ d
end
0 r( y/ d# ]- o1 H& a, C' \3 S+ D5 T F, b( G% {* P
begin P_Creation2 arriving procedure
4 S1 s5 _2 P7 l/ B3 Ewhile 1=1 do
L- Y: X# B. i$ e; |, Y begin; c9 L3 e. T: ?! D7 |: A1 X0 j
wait for 1 sec1 T: A) e2 {9 c9 O3 q8 e
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
& E$ q+ W/ z' ^7 ~' [9 Z end
* ?/ M J+ u# M2 dend
8 _ |$ b: u; v0 h! U% K4 o- [4 k3 w; B- T% G2 b$ H( |
begin P_Creation3 arriving procedure e7 j `5 Y- e7 f
while 1=1 do
, k& t$ e6 w& Q% z begin
, q1 M2 O6 }- @) [ wait for 1 sec4 n6 X& i4 H7 S3 C% {5 x
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
) o! B) F& }. G& a end
' P& |$ x& [, j0 }* q# R Kend . C" d* A. \# f; I" g, q
( b' a9 }/ U: ^( {# o9 w# E1 p4 g$ X
begin P_Creation4 arriving procedure2 v1 v' |* j$ x, n% s8 R3 F
while 1=1 do" K5 z4 A& a: |& C$ E
begin
6 E. W% k9 c' h, h. l wait for 1 sec5 u1 O: p# M' b+ b, Z
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)/ V( a9 s" z% g: p/ Y% a
end
2 X& `+ r$ ?, |% i, d7 w9 Z, v' Eend% J( V5 L( w! h/ y2 y0 w
/ i) Z* m" c' ]- G; Y6 ~
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |