谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null); q4 r! X: u6 L5 [+ @2 w3 `
begin model initialization function* @% i+ V5 J# h+ R+ u
create 1 load of load type L_null to P_Creation2; n7 \7 g* F* B# a
create 1 load of load type L_null to P_Creation3) z# i& F+ N: U; T; U( N( F' }
create 1 load of load type L_null to P_Creation4* N! V7 U: t, W, Y, l
return true 7 E2 U! O" R O! U4 E9 } l9 c
end
, |4 l$ z- h' B) C: Y, ^
% `2 x0 q1 [4 t0 S8 wbegin P_Creation2 arriving procedure' W1 o& V% H# W$ @; g! z' I
while 1=1 do
3 F) T8 [* _' U7 v: |5 I3 J begin4 s& }7 D8 y: {
wait for 1 sec# d8 Y7 p9 {( w' R" ]4 J
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
6 ?4 @ y) \- V5 Y& X4 J; u end
, Q* p' A% d$ j9 H8 Tend
9 E. D' F7 }. ~, _5 A9 |# K# U. e7 l, r4 F+ I4 ]+ V
begin P_Creation3 arriving procedure8 J. X! o# n$ @3 s
while 1=1 do$ b$ t. \7 m! T3 ?
begin, i/ Q% J) p3 Z8 s- c1 s! Y
wait for 1 sec
* Z7 x* P" K2 S create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
2 g3 K; m. R# Z& l5 X4 m2 e' `4 H9 O end
/ }4 x, N6 A; e# [8 }& l4 R3 e( yend . _- H) f! ~7 R7 l
; e- F/ A& s3 A5 wbegin P_Creation4 arriving procedure
$ C1 L; d% R0 Qwhile 1=1 do, u6 F+ z& t& Q5 E( E% S8 h4 V( A
begin
, d" \* I9 K7 I% ?+ z# B wait for 1 sec
5 e0 p4 [( a4 M0 _. _ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die) X' c$ s! x- b& N; ^! n
end
( x* B2 w! I2 u/ P0 y) jend
o# ?7 n3 F5 Z$ y( ^: M
1 y1 s1 @( E4 p1 I3 t8 I2 Q但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |