设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8838|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track'3 o4 W6 q! B0 V( |# A
*/
6 R; A) l5 {' e2 g+ S8 cis
1 `6 ]! ?/ j5 ]: y        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 B3 Q4 \, ^: Y0 U1 c' P7 hdo
1 _8 m8 t; Q) X  |        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 p. I1 M/ c; n2 C1 J: R+ p5 R$ O        if current = @.Destination -- else return
& W: V( r, R5 X& y. @/ R7 i3 G- R* C        then
, `& @3 Z7 b/ J5 i                @.Destination := void;
0 a% i, Y9 M* M- Q                if @.occupied then- m8 F  F) W" x1 H5 f8 V: t4 _
                        part := @.cont;5 C, s. Y! S' n
                        @.transpOrder := void;
5 |; ^. ~8 P; o  }8 B                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( ?$ Y: a. R. h3 Q; ^                                @,root.eventcontroller.simTime);3 R$ z8 z/ ~7 q- E0 e
                        @.HasOrder := false;
: [$ K* h+ z3 O& f+ e8 X6 g7 S9 }                        @.DrivingHome := true;
( V4 D) X, ^0 l                        rgManager.tryToStartTransOrder;3 ]2 W0 O7 ~' s9 l; b# z
                        if @.Destination = void! }4 y( j3 v0 b
                        then -- no transport order for vehicle @
  V% \7 Y, A' ~- W                                @.Destination :=$ Y6 O& |- P5 H' l
                                rgManager.nearestFreeStation(@,track.~);
" g) q) w& F9 R. n4 }                                newDirection(@);   7 G) r$ U; B7 s/ L. j; z
                                if @.Destination /= void then
6 O8 D8 r5 U- k2 f. V: f                                        @.Destination.NumReservation :=
9 R& k+ R+ v4 d                                        @.Destination.NumReservation + 1;5 K& P! k/ @: M3 T
                                end;
9 m% Z9 j: x( P+ }! b1 b4 X' G                                @.CurrIcon := "drivingHome";2 s& O, D2 R; p& c# E. L: u: i
                                @.DrivingHome := true;
2 p( l5 p8 `( w: W3 h                        end;; q' i7 I( L2 ?0 z' z' ?0 O
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 i) ^4 R( ~* C9 W  Z. U, F                        part := @.transpOrder;
% h8 {! |% R$ M1 b8 Y! Q) U; L                        part.move(@);-- load part
9 S& X+ \7 G& m7 g                        @.CurrIcon := "load";. S" Y5 `0 f1 i4 X# V. ^# S
                        GlobalDistObj := part.globDestination;' s: c9 A" R: n/ L' s
                        assignLObj := rgmanager.rgAssignL;
* q) w3 h0 k& h6 m4 P6 f5 B2 g                        row := assignLObj.getRowNo(GlobalDistObj);
7 C: s; F' l: G( |                        if Row = -1 then -- since 70
9 [4 P  ?) s! v* w                                if lan=1 then% a; s. d1 a  a3 L
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 i9 g* i/ Z2 P3 m" V5 e- [
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" C: J. v2 i0 m% J) F2 [" Y                                else* \5 v( q+ z" J1 n, m
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. f. Y) R3 h' ?5 N6 \/ c  N
                                                to_str("in docking station: \"",?.~.name,"\""));                                7 E+ Y: a5 L: R- z+ |$ z; r' T2 O% C
                                end;- K( }' A: Q/ N  A+ f$ V
                        else3 u* K, {8 k5 e. q6 s) f% D
                                @.Destination := assignLObj[1,row];
- i$ N8 l" ^$ T& Q                        end;                        ) s: a% N8 G2 r* D" S6 D
                        newDirection(@);
! V# }6 R) O* U* ~9 J                        @.HasOrder := true;6 A' e) ~$ r& t, Q8 g! {
                end;
5 m* ~% v. A& }6 s! O. e        end;6 O! D' q# Y8 j; |- ?# P' P
end;        -- of the method
4 f: C$ D- d% v% g9 G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  _& k6 W1 H/ g: _, ]! o8 }; E( I! [1 i4 \- p; n& h6 |2 `6 O1 x0 y
这是AGV_putin中arrive的method。
) N. e9 F  L1 M
6 ~" Q/ w; a! g0 G当到达物料速度越高时,这个报警更多,/ O1 s' v- v1 Y; Z: O) z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! z1 I1 Y6 D& _' [& s4 {
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- T# }9 M" h2 F# f/ f8 u" w, B# j4 P5 D; C  B: v' o5 W( w
另外一个小建议,就是move,所有的move都可以这样. ~0 e, R+ w. w8 W- U, F
if not move() then debug end
8 o8 |4 M6 _0 A: m. t0 m5 s, w这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' T/ ~: v9 K) i& ]
plant simulation中的free libraries有AGV模板,
* _$ z: e0 e# ^: U% H$ C7 W5 o里面也有案例。
* v4 ^) _6 w7 F! P. S& h1 z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 d" o- U2 N6 h+ Y
3 d, y2 E" M+ ^7 q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 v8 x# p; C6 x# F0 [
/ N7 m; @, Q, s5 `2 X2 O! ~: a
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 , P& r; V# h0 e
这是AGV_putin中arrive的method。
3 @4 W  k9 J+ m  m: |
( B) P0 M( y  {9 n当到达物料速度越高时,这个报警更多,
/ _2 }$ ]1 x, ~$ j
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-6-29 09:41 , Processed in 0.017559 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表