谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);1 @5 _$ v% q, G, D- E
begin model initialization function( R4 d5 |$ D, q0 C' K% e3 w
create 1 load of load type L_null to P_Creation2
/ n G b( p$ L* a C- r create 1 load of load type L_null to P_Creation3% G6 ?/ m0 |/ K6 P4 I
create 1 load of load type L_null to P_Creation4/ E; l. y3 {8 M; H
return true ) j/ H9 Z4 s* x. |/ Z% ]
end
/ I2 u: H. c* D% O% E
' S' C( H" |, f$ i) B% q! X6 Ybegin P_Creation2 arriving procedure; `+ q7 m/ h) U! E# l9 M' Q) E0 r
while 1=1 do- ~* W8 P, g9 |4 _/ b/ b7 t- g3 p: \
begin2 g, x- y ~6 m* o: h) V
wait for 1 sec) c' o4 E1 P: @9 j! f
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
) U% Z0 _7 Q$ o end- N7 w9 D# _: P- T+ `: F
end& Q* b: H. C [3 E: ]' \- q
- S3 @& P5 E& i1 w4 S+ ?
begin P_Creation3 arriving procedure1 \( C0 s5 i ^* \# \( ^+ [
while 1=1 do
3 {/ {' N# k, h1 {9 a* N begin
5 V# I7 k$ _# x" e) j" K$ u- V wait for 1 sec
$ ^; m' `5 b6 C R$ n# x, _; s create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
* n, v6 O, S/ R, J1 R end# r2 r! i: [; Z$ g
end
7 h6 g6 a H: W+ x; j6 a
* n6 e; `9 U# h2 abegin P_Creation4 arriving procedure
( C3 D+ T- k2 S! r2 \while 1=1 do
& Y, D1 `& j% C4 r+ b) I. V begin5 F* P" u7 J( ]6 Z+ ]" ]4 B, K- n
wait for 1 sec# n5 s1 r3 h' Q2 X4 A
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)* n; ?9 _: W& C# Y, ~
end
9 f3 c* \9 Q5 Rend6 r/ k( G9 j% r* O1 v: S6 |
8 q, W9 T8 A; Q8 |. E0 R" o但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |