谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);7 q2 [9 R; K. r, q
begin model initialization function
. g8 v8 I; E, A" h, k create 1 load of load type L_null to P_Creation2
9 ]. a H- q; F0 h create 1 load of load type L_null to P_Creation3) ~0 |1 X% e7 ~" b0 D
create 1 load of load type L_null to P_Creation4
|/ m7 }: p+ z! u, D- b& v return true
) L }2 a; P0 ?' B1 l, kend( ~; s' N$ p5 Y
/ V: i' B2 ?/ c! a% _
begin P_Creation2 arriving procedure. D! F6 B5 H8 c7 t: R f; q$ N
while 1=1 do
( a" g0 d( H* [ begin
* x# s0 u$ ], H2 l wait for 1 sec) ~) G+ e7 L; ~# M& r
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
7 O+ T9 _( O% W2 R$ B- w, Z& U3 t end% h, X% e0 K" u3 W0 U
end
; w2 j2 ]2 E0 ^
6 ^7 N% o/ I% n* \: G2 C+ ]begin P_Creation3 arriving procedure
& C+ M5 a# r( Dwhile 1=1 do# |2 { M" g" H# Z" z/ K, Q, D2 T
begin& I! e% |! i, V$ J
wait for 1 sec
- C" L3 }& I* d. p- } create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)" P( g( r7 e& b! t: x9 U
end
1 z/ l0 D: k. }1 E0 @4 b6 |end
, q# m' X' M4 q6 v/ |+ R& E, p% E, `" w+ x# L4 m0 e
begin P_Creation4 arriving procedure4 c: S& X; x/ k0 T. I" l# k
while 1=1 do b; u" H! w9 |- K4 L
begin* T' `5 ~* S8 g- Y# p3 M
wait for 1 sec
+ t9 C" @5 ~# L' v create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die). a `9 t6 L, b, c+ P! c' J6 c
end
- s& t; w' X/ m; v. o4 {3 `% }' Eend$ h0 N. Y2 A9 a4 v' u: r$ b" Y5 y
! I( f. _& Q- T6 b' n/ D1 m
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |