谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
% D n- z% A# D8 t5 qbegin model initialization function
0 M( ~ d, M6 s7 b% ^6 f% } create 1 load of load type L_null to P_Creation22 @& Y0 _4 K0 ^5 H% `. w& y
create 1 load of load type L_null to P_Creation3# x v; T3 D- L/ u1 y5 K. ~
create 1 load of load type L_null to P_Creation4& a) A7 x6 N7 O1 B! K0 @2 a
return true . U6 D: s" q1 P9 H% B0 h2 v/ K0 b1 j
end" l% k4 K4 ~1 c0 B, K, `
8 t" E8 R4 V6 r$ [% Y; R
begin P_Creation2 arriving procedure, @$ |! f0 W4 V- C! j
while 1=1 do
. o0 F5 y' d# W begin. m# x3 j- g( C( k ~2 o; O w- a
wait for 1 sec
* ~/ t6 H5 Q2 Z+ b9 t create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)" D- Y+ v+ v3 t5 [) g$ ^/ X" u# \
end
9 Y, }. K; e9 d) bend0 W( G) J, \4 S
/ H2 b) T$ k# K3 L4 L' P
begin P_Creation3 arriving procedure l/ m- [0 H! U) k9 U3 k
while 1=1 do" w. o3 q# K, u( ^
begin
* U( [, Q) ^: |# b- j) o2 q+ N wait for 1 sec# T* K, U! s0 Z% o! y7 ^' O$ p
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
+ D3 k7 i6 I. r/ L/ k( q1 V end+ B6 c0 A7 w0 x# g/ @
end
' ~2 O% K8 C: H. U$ [3 x) i A! B6 A1 ^( e
begin P_Creation4 arriving procedure& s9 E4 ? a; D3 y8 J1 Z2 X
while 1=1 do* a* J+ j3 w& `) C$ k! w- W: K
begin8 e3 b l) h4 p+ q$ b! _; a" U0 K4 }
wait for 1 sec
. U$ r6 W, I+ q" j7 J0 d create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)3 ^- z2 h8 y# l2 j+ J2 z
end
% u m% W" y* `2 i% G. wend* m& H8 d* K& X& h3 E- q6 V# s! F# `
; a. v6 Q( n7 E* Y3 e. W+ h
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |