设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9063|回复: 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'  {5 Z& ~9 I9 K0 O8 v
*/3 I: q9 Y, b( O% \- f, w
is
  t; o7 n& F0 Y- f+ s4 M1 i" L% K) x        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# o9 v# U. M  q% O1 {" w, m7 f% x
do# M" [' |4 Y* m- w  q: n' ]' Q6 `
        Lan := rootfolder.Internal.Tools.AOLlanguage;  i  J4 }9 e6 K) s& V$ a( Z* ]$ O
        if current = @.Destination -- else return
; x% W, P% Z8 d* R' h/ `$ q        then2 T4 p- u* [* {* ^3 w
                @.Destination := void;
0 B# g  g3 P! C# Y1 S                if @.occupied then
$ v$ V* ]3 X& S8 S" a4 W, Y7 O                        part := @.cont;7 [8 ~( X5 _( f
                        @.transpOrder := void;
5 s$ A( F$ h2 H& w' n* v                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  O1 Z9 t/ @3 s8 w& X2 k! B1 o
                                @,root.eventcontroller.simTime);
1 o+ n2 O: N9 z# Y/ f3 i                        @.HasOrder := false;9 \- H* E' ?6 v$ @0 Y/ }
                        @.DrivingHome := true;
5 v/ a: g) D9 G; j5 m. ?7 A                        rgManager.tryToStartTransOrder;7 d! S! A& E2 G$ w- s3 ^
                        if @.Destination = void) ^- j2 `1 r# H8 @! k8 {8 y/ g% X
                        then -- no transport order for vehicle @
+ u( a8 Z+ d7 y) ]4 |% x# e4 O0 A                                @.Destination :=
+ D1 d5 j& A5 Z8 k* _: v7 G                                rgManager.nearestFreeStation(@,track.~);% o7 Q( j1 ?: e6 `" T
                                newDirection(@);   / G( p2 t/ n% V% m, x4 Q5 |
                                if @.Destination /= void then
+ u6 r( f9 w9 s! K* q                                        @.Destination.NumReservation :=
, ]$ E. l5 `/ e& c6 H                                        @.Destination.NumReservation + 1;- A( Z9 P0 k+ H7 W
                                end;
' [. q0 U- G! b1 P( _# R7 B1 c                                @.CurrIcon := "drivingHome";
7 _6 A% H, G4 o. L                                @.DrivingHome := true;
9 N$ _9 R+ ^) D7 f  W                        end;
+ H- g0 J1 l2 i9 F4 }" t8 S2 k                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  P9 ?; B. f2 a* D) D* w# }                        part := @.transpOrder;
. ?/ }; l7 w! \% S* `% n                        part.move(@);-- load part) j" y9 x8 m5 T* ^2 K
                        @.CurrIcon := "load";1 J7 ?7 K+ I9 Q0 s) j! S
                        GlobalDistObj := part.globDestination;
) f7 X1 {3 Z, y9 Z# F/ \: ~9 v                        assignLObj := rgmanager.rgAssignL;
  o$ H, ?* {9 w& H                        row := assignLObj.getRowNo(GlobalDistObj);
1 a  r6 g2 I/ g0 v                        if Row = -1 then -- since 70: p. e& w1 Q  j0 w: v( T+ n9 X% z: B
                                if lan=1 then8 s" o$ A) D# S
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' \; C5 \& X2 x& K' b. o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 l3 i$ S: q5 H6 ^( a, _                                else& M3 V6 T6 e9 o
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) v9 Y" X5 e- O
                                                to_str("in docking station: \"",?.~.name,"\""));                                ! L7 A. G  q5 ~' P
                                end;
5 Z: M- F" h3 U+ K                        else$ h3 ^& W" V- z3 o/ V
                                @.Destination := assignLObj[1,row];
4 `. s  L$ K# B4 A. h                        end;                       
3 `8 G3 p. G% F) y4 Z4 y+ x) k: g                        newDirection(@);
' L  n8 g3 m$ [; y1 }. X1 _5 o                        @.HasOrder := true;
7 _6 m, h  [) _  N# v1 V: f" P                end;
) |; Y1 I9 D5 v        end;
( y: V( S, L4 D+ h3 i3 I  dend;        -- of the method# ]" G( G/ P+ ^# [0 A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ [* M; Q; S3 D$ `: o+ a) c* C9 c9 d/ }2 L
这是AGV_putin中arrive的method。
- s( Y5 d4 O+ j+ {. @- ^1 Q4 N0 u- p2 z7 ]
当到达物料速度越高时,这个报警更多,* o8 E. g+ y3 m- B  W# k
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, W% q4 @( a- h; W( P( t) o
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 n7 C* n2 |& ?$ i* `5 }

% @0 n: m, h; B1 M) P# C5 j另外一个小建议,就是move,所有的move都可以这样
3 [" n6 K( X4 U$ j* d! ^if not move() then debug end
5 |7 u; M' E3 \, \, A3 g这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 z$ l. R, a: B# _) @7 _plant simulation中的free libraries有AGV模板,' G' a: t. H2 R! @. b8 l
里面也有案例。9 G; I  Y% l7 J
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% S( Q" V  |7 k, ^8 \6 |1 @

& u; h6 B/ R  \& a4 }  l8 |我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 ?7 D1 [# t( ?1 X, e8 ~) H" J6 l2 _+ q
3 ]! g( e; \: g* N那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08   K4 D% h1 n2 }; z# o6 b" s6 I* O7 U; E  Q
这是AGV_putin中arrive的method。
  ]+ Q, B0 l% f. u* c  X& v' L/ I' ~# ^% E' W& T3 M
当到达物料速度越高时,这个报警更多,
/ ]) j2 M& u/ A6 [$ ^
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-11 14:38 , Processed in 0.017830 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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