谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);, e0 H* g/ H( k X2 h$ r! ]
begin model initialization function
& B" Z; _* w- b0 H4 E7 g8 I create 1 load of load type L_null to P_Creation2
5 x( v4 ~% C! d" c6 Z6 Q create 1 load of load type L_null to P_Creation32 A9 l6 X! u+ h: A! r
create 1 load of load type L_null to P_Creation4
3 G/ C& `) E' T' G h! a return true
3 V% f3 A4 N+ H5 K* rend
$ M( i* ^8 `& u3 F. z
& }4 J, ?& s/ G+ Y! u" L; w- Y1 lbegin P_Creation2 arriving procedure# {% M" C9 [9 ^( }& H
while 1=1 do$ r: T, d( F+ e/ [9 `
begin @5 w" i' k$ p! X% X; q: D
wait for 1 sec
! O$ O- t4 u- W& u create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)& w6 b4 c! H. V6 o
end
$ l$ [- o+ O$ ?end y$ N( G0 l* ?" B& c# L7 l
0 l ?* h, s) ]2 U' F% h. Gbegin P_Creation3 arriving procedure0 s: h. \8 K' U" c+ ]
while 1=1 do5 R$ L; ?: A/ \7 A* k% P9 O
begin# B. k8 ?4 b( ]1 M) d( X
wait for 1 sec
& E# X. ~' T/ c7 j. R b& j7 r2 M create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
2 s5 K! E' i% X) L: k" R6 l, G end7 j. H3 {) W2 }% O0 a2 U, w& ^( M
end , b; U$ E& I, N$ P n _
* t. C' V5 L9 E6 E
begin P_Creation4 arriving procedure
/ V: f$ M H, dwhile 1=1 do
, A8 w) m; s2 ]7 l2 [! C begin
. R* C/ N$ f, H6 e, |% H' E' `5 Q7 K wait for 1 sec
+ L }9 R8 N+ c: D+ n create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
: k# X- V* m& N3 E end
" m& v; l+ ~0 z$ ~: k/ g' d+ k, zend
' _$ q/ _- k0 h, d) d2 n7 P; |
/ H- x1 |) U8 O9 D但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |