谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);: ~( s' P# t% H- X
begin model initialization function% X1 C% I* Q* G" |. i, I* B6 s. z# D
create 1 load of load type L_null to P_Creation21 C5 F3 D# T+ `/ f' _' \
create 1 load of load type L_null to P_Creation3
. {8 w: |1 m2 D# Q6 Z create 1 load of load type L_null to P_Creation46 w, ~: J! B' q4 ?
return true & k2 ? D( Y, ?+ W" p' w+ d1 ^ x
end
" P% B/ H7 B% f+ A( y7 ~# B
4 t& L. x, l/ w5 Ebegin P_Creation2 arriving procedure" y- [- S* M, T
while 1=1 do# i0 K& q& T" Q" O' }
begin
- f% h" ~" G/ q6 ^- x$ I wait for 1 sec
8 g7 X) }& J; x M+ g create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
/ K+ S0 \8 l- B# s k end
; c3 ?( z; F2 v" p: h8 `end* b0 T$ o" U7 Q2 I& B
/ a# Q: s% [* S$ S5 I" H
begin P_Creation3 arriving procedure, ~2 L. Y# g, s; @$ G
while 1=1 do+ `" Z% u7 H% E% o1 \+ w( f' G3 B$ T
begin( L; M3 r# G; ]; B: p# o, G
wait for 1 sec
. d3 I7 o$ k5 ~ create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
- C& m% N: y, J, b5 z$ V& t end
" M4 A9 [) \ xend
' ~7 M. N- G- [7 r0 _( o! @2 Y: h2 _7 N: v7 Z
begin P_Creation4 arriving procedure
7 D+ I4 h( Y/ p' I0 i5 `/ lwhile 1=1 do
8 q7 A7 ]$ P M( G8 Q; W2 a0 D begin' R4 S$ y( f2 x' d
wait for 1 sec
5 g7 u. e# [9 W; k& {% a3 `; g. x! z5 g create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
+ g+ {& w3 w* p& } end6 n" l: B2 y. @. Q
end- s- y* \7 B8 E3 `+ c
" ?) g1 |' [. ?" p3 ]8 ?2 _
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |