设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7212|回复: 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'7 ?2 J' U: e$ ?) o
*/
: x% C% l" w1 p3 B# @( f7 c$ F  ]is. {9 u7 J" r9 `1 H6 i. `
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! M" ]) m9 W) \, o4 Ldo: r$ }+ ?% o& D! t: Y5 A
        Lan := rootfolder.Internal.Tools.AOLlanguage;% N% ^8 T8 {" p1 H. d4 O7 D# I9 c
        if current = @.Destination -- else return5 P+ t4 |) d* m4 q0 [! G
        then/ p5 H, z5 H/ H, k; c! M; q
                @.Destination := void;
% w% Y- P  k: E, r5 n                if @.occupied then3 F- {/ b- p1 D* P
                        part := @.cont;
" G: |" V! D. P                        @.transpOrder := void;) m! S: o0 x2 T( c* |' y% I$ t
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( i  G+ G/ L4 K$ D                                @,root.eventcontroller.simTime);
" x7 S; S4 k; z* N8 P, r' Z1 w                        @.HasOrder := false;
! j# [/ w5 V9 F' |" C& e                        @.DrivingHome := true;
7 ^5 `! @# `0 v4 o: a+ F                        rgManager.tryToStartTransOrder;  O- I5 C" e0 X4 A& r4 x5 X
                        if @.Destination = void
* N. k2 o$ D& A8 q0 c- b                        then -- no transport order for vehicle @
5 d4 U) b6 X& K* V/ ~5 }7 t% p                                @.Destination :=5 Q( i4 Z# }& o( I
                                rgManager.nearestFreeStation(@,track.~);! t( `/ h% L5 Y3 p) ^' Y) y
                                newDirection(@);   5 }8 _' ^; ^9 J1 {% z6 j
                                if @.Destination /= void then; j7 v1 F. o) h0 T( @
                                        @.Destination.NumReservation :=
3 e1 c, \7 g8 K+ C1 q  y                                        @.Destination.NumReservation + 1;1 {$ P5 _/ {5 {; G- V& a) Q5 b* v/ S
                                end;
  s) O, i$ y( g0 ~                                @.CurrIcon := "drivingHome";! }/ b. Y9 p% }, y0 s% k- x
                                @.DrivingHome := true;6 L, R9 |) p9 g$ ?7 S
                        end;( F# O; Y/ Y' K, Q4 }4 r! q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 `$ Y; I% b+ a9 f
                        part := @.transpOrder;5 A; c1 f  G* u5 @
                        part.move(@);-- load part& S& O" f; J. j+ v& s
                        @.CurrIcon := "load";  R- y3 S; {- j  ^& Z- d
                        GlobalDistObj := part.globDestination;& \7 `* T& l; U. @0 T
                        assignLObj := rgmanager.rgAssignL;
# h7 U0 g/ \* p; ]% x! M                        row := assignLObj.getRowNo(GlobalDistObj);
" b3 O8 N; E% J) F! w  ?- [                        if Row = -1 then -- since 70
( Y4 c! b' K8 ?  \$ j                                if lan=1 then
8 X" f% K- I. l$ Z. j                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- E' n8 {' r+ e4 m: w                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 _+ i  I! A; v/ _                                else' w3 H% m1 @: C6 \. C  ]
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, C% h' F) n* F0 o# b# _7 O" ~5 W
                                                to_str("in docking station: \"",?.~.name,"\""));                                3 ^) m) n' v; n' M7 W/ i4 s+ Q* D
                                end;
" b9 }4 W/ X1 i* D4 d( r9 Q  T6 a                        else
( Z( c& h7 i/ w: z8 V+ d                                @.Destination := assignLObj[1,row];" V, W: W0 W$ l7 U7 r3 p
                        end;                        ! V  i/ e. x5 G' x* t
                        newDirection(@);
; {7 n  \- k* |3 O" |                        @.HasOrder := true;8 T8 v/ ^. m3 s. B/ ?- L2 Y
                end;
  u, I/ S1 A& V3 U        end;. m4 U, w1 L7 d0 ]$ E3 I
end;        -- of the method
$ h) e4 N9 u/ ]# [
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 2 A; Q, S* z) X) }

, y8 d% G  P+ U, w" O8 F6 j1 j0 K  Z; B这是AGV_putin中arrive的method。# R) {+ n+ _3 q" P

( }0 k0 J: L& E" F% |- H' U. w当到达物料速度越高时,这个报警更多," w' M; \* ^# B+ j/ r
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: R" v( w% H- r程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% }9 r+ b; o) U+ ]& l, \9 c9 S  o; ?  v
另外一个小建议,就是move,所有的move都可以这样( {) n+ A8 D5 ~/ u
if not move() then debug end3 M$ p, \  R. @, w1 R5 H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ i2 @% v# F4 w' J6 j7 yplant simulation中的free libraries有AGV模板,& z3 u  X( M3 s  f1 D
里面也有案例。
, i! x; m" A# f+ J8 f我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
' e. G- N1 J3 B! A$ Q0 Q; `/ J, r8 i' {9 j5 d9 R$ s( s
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , a/ |0 V9 y( }7 b5 C
3 c# q* u- k; B6 y) B' `$ f
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # {" ]5 _& X) ?$ I+ a. i
这是AGV_putin中arrive的method。; |; W5 o- T6 ^7 S4 b8 }+ v

9 O& G$ }" @& I当到达物料速度越高时,这个报警更多,
5 p% g% L3 |3 c) F
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-27 09:04 , Processed in 0.018673 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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