谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
; M9 Q2 m3 p! f( x$ vbegin model initialization function
" k6 B |$ @* \& V# L& \+ @ create 1 load of load type L_null to P_Creation24 C }- { H, R# |: P
create 1 load of load type L_null to P_Creation34 r! z* b! a+ I6 X2 k8 ~
create 1 load of load type L_null to P_Creation4
5 [ o7 d& e p" ]9 g/ S/ {7 G return true # C/ E, x/ p/ ?! D& K4 y: R
end
& n4 B+ r/ Z7 L: r1 N% |
" O# ?' T0 f( z2 S( y6 `+ Ubegin P_Creation2 arriving procedure4 @+ R, a. `7 c- @
while 1=1 do! a v) n+ T; T. h% j5 i
begin- |2 r6 n4 ^( h# F+ S& v0 w- M
wait for 1 sec
5 E7 H3 y- B8 b create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
4 \" a* N3 {2 s% h( v4 L4 a end
4 i( {3 o6 j) Z* Zend
6 v) U, n. R4 L- i p, l% g& h8 J- l5 D1 s6 N3 D- ?- Q, ^
begin P_Creation3 arriving procedure
' l% ?, P& s9 E4 v0 \) E0 R1 ewhile 1=1 do
$ w3 U, U3 h4 y' [9 m: X6 u begin6 ?3 H" o, O+ S, c1 T
wait for 1 sec
1 f3 O! E3 B% N+ J1 m* @ create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)& e& \" d4 x& Y8 L% g
end0 I: c2 z) e! z. b. F
end @/ N, N" M9 o8 d- I3 z# y8 N
0 {/ e# _$ v/ \1 {/ B3 tbegin P_Creation4 arriving procedure
3 n6 o5 H3 C" X, v* C# Pwhile 1=1 do
" D; F5 X, E6 B0 \5 j6 \9 F begin/ Z% K8 N" a. ?7 C6 {" O3 b( ?
wait for 1 sec
8 u5 J% }; z, R+ ~ l& _/ m& D create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
$ L, c" i* V' P& V! @8 k, E) h end
8 u# F- g2 y# S, G+ b0 [) m7 O& d9 Gend/ J S' t: f5 Q2 `7 b9 M8 S
5 {7 k9 W% @3 o$ t& b
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |