谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);* j9 k$ M# d* s$ L0 z( l) v
begin model initialization function
- o- i) k6 o- I5 V: q- p create 1 load of load type L_null to P_Creation2
V5 ~7 E0 Y' c, _ create 1 load of load type L_null to P_Creation3
1 J5 H2 Z9 Y7 u' p" q create 1 load of load type L_null to P_Creation4
% z! g/ a1 d3 T& x" Z return true
* f* w9 B; i& d+ A" ?end
9 b+ w9 Z4 \/ G3 i0 d$ w1 u$ F, j! B4 z9 A4 l
begin P_Creation2 arriving procedure
% |+ N! P8 g0 m1 U4 y8 g7 K1 p, e/ owhile 1=1 do, W2 I6 f- b i S( E* J( Q4 H
begin
# h d w% Y# W: l4 d wait for 1 sec
, G( V V g1 s6 u6 y w create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)% j l+ F. v* v+ f5 H! C
end) U+ C) o$ M' P. v6 ~7 K
end* h! S9 R; D% V* H$ ~$ Q
! N, X I0 q* a! q
begin P_Creation3 arriving procedure' ?8 _$ J% Y" [* o- U
while 1=1 do% R: t+ Y" J0 j6 W4 R
begin4 Q0 X3 M1 h# K! N
wait for 1 sec
2 u& d' [& B7 L4 j* S F7 p create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)$ e$ ^, |+ p3 I- e, y6 D+ f; i/ F
end1 s: c' z8 ^. Y) f+ Y; b$ w
end : l6 S" \! w2 O% a
3 `- ^) p6 q+ e& p
begin P_Creation4 arriving procedure% ~4 H! w6 n" f7 S5 V; ?: P
while 1=1 do
2 j1 E& w8 ]/ n' {1 j, M begin/ h7 b, t5 A# Y& u2 X) c
wait for 1 sec
9 u7 M5 ]. a! T1 t. d create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)- C: h& ~0 Y2 |
end- R% e1 ^( u, W4 p! L; o% Z! x6 Q
end
u) }% a+ K0 C0 T. C: G. M( }. s5 {' h# C9 ~. t0 Y6 W% s
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |