谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
/ [: E) U* o" X8 C+ Rbegin model initialization function4 V* m, v) e7 [" ~
create 1 load of load type L_null to P_Creation27 j9 r% E0 m7 D: j, e) h
create 1 load of load type L_null to P_Creation36 Z: Y4 X* Z3 [' {# T3 [8 F
create 1 load of load type L_null to P_Creation4
- j9 ~; @3 A- T" f return true - j/ K# R9 n+ q; G( k
end* Z) Z: c+ \: y5 H
/ z9 f. u0 O; Z6 Z* j3 F
begin P_Creation2 arriving procedure R4 \ D, R \9 `
while 1=1 do5 {' W/ b" x3 @0 ^' O
begin
3 `9 f1 C9 p) q5 C3 |6 w wait for 1 sec
; H5 b5 U2 o2 j J create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)/ [# T, A) c% u0 }) |7 X
end
9 e( P! G6 z( \end
. }- f& F! u! n7 A8 b0 n3 R
" u+ N8 t4 x( t1 o# F; Fbegin P_Creation3 arriving procedure* F8 ?0 y% Q; {! ]9 D
while 1=1 do
& q- ^. j& b* K/ l+ y, O) V! }7 c3 o begin$ x0 B! A6 e: [ f( w6 ]
wait for 1 sec
, ~4 B+ A1 n6 u& ]7 m create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die), G4 `1 Q7 M6 q# E. Z7 U- D+ r( d
end
4 q* J( p4 l# T" Z6 }8 n+ jend 5 N* n1 H4 F; f F
& @" o$ E- M1 Z5 v4 J! R% y
begin P_Creation4 arriving procedure% l+ h; r$ H, Q: [8 j
while 1=1 do
4 G" U5 Q' J: f/ Z$ M1 [/ W3 N" g8 f begin) S6 B/ w1 h. _
wait for 1 sec# I3 d' ~+ b+ \
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
/ U7 p0 X4 B3 Q0 l: p- E end& `/ L; s( v9 k+ s2 t# ~ `: m
end
; `0 K$ b/ I( t! U% J D" @, j1 ?, l$ p& l
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |