设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9498|回复: 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'* H5 b5 w% g, k' L$ X
*/% N' o1 E  B% G. P5 u: a
is0 a8 |- T* _* R* N9 L7 m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ q  Z; K% a9 G2 @1 k1 S+ V5 m
do( I  S1 R% A0 y& {0 ^7 k
        Lan := rootfolder.Internal.Tools.AOLlanguage;( |  t# }1 A3 u1 A0 v  Z6 C
        if current = @.Destination -- else return
1 U7 C6 A$ j* x4 R        then
4 o/ `$ O- [3 Y: l( }8 E$ g, h                @.Destination := void;
# a. @- w2 q) g                if @.occupied then$ q, O7 N0 j! O
                        part := @.cont;# A5 }' V+ r: x+ F+ S! S. @
                        @.transpOrder := void;
+ r8 Y; S, J+ X% G( }- e- d                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# _/ `* y; X  v4 G
                                @,root.eventcontroller.simTime);  D7 `: X$ V2 l% k$ d2 ~
                        @.HasOrder := false;" e8 K3 E- ?% @3 N
                        @.DrivingHome := true;
7 e4 h* K" {( d4 w9 h+ n3 P                        rgManager.tryToStartTransOrder;; T/ P- L/ D2 o. a% I" {
                        if @.Destination = void) Q+ M! Q6 \! D# Z
                        then -- no transport order for vehicle @
$ S# s  j8 \- V5 l! [0 _3 s                                @.Destination :=
& q8 I7 N3 h) m; g2 n+ P  @4 F7 o                                rgManager.nearestFreeStation(@,track.~);& d' [, Q7 F  w5 x& ?5 @' g5 x
                                newDirection(@);   
: ~/ L( [/ ]% o$ ~- ~. B! b                                if @.Destination /= void then
# m: ^/ J; {8 m& }" Y) e1 x                                        @.Destination.NumReservation :=
  ~- }2 ^8 A# J0 A' ^                                        @.Destination.NumReservation + 1;
6 Y  z) e0 I$ Z) k) z- H% q                                end;
+ ]( i  f: I) N2 S                                @.CurrIcon := "drivingHome";
! Y3 J1 z# w! N" L                                @.DrivingHome := true;# x: W' W, |5 k3 {3 b0 u+ K' ?1 X. O
                        end;# C7 I1 R: o# c2 s8 n
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station  z$ o! S& x. M" E1 z" A  M% @
                        part := @.transpOrder;2 b% Z8 P' J+ j4 |% v
                        part.move(@);-- load part
+ p8 y# [0 a; t4 @0 G3 o" K                        @.CurrIcon := "load";* S: z$ g/ t, x9 u( D
                        GlobalDistObj := part.globDestination;2 f* B6 Z( |! R: ]* |& W2 L
                        assignLObj := rgmanager.rgAssignL;0 D0 \1 Z- x* Q' ?+ h1 E# R! f
                        row := assignLObj.getRowNo(GlobalDistObj);4 g/ _& E" _  x$ W6 f
                        if Row = -1 then -- since 70
+ v0 |: G7 V7 L6 z# m& ~( b3 ^                                if lan=1 then7 v6 \, L* J7 d6 z2 w0 ?
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  `5 R+ |' `6 O  Q, F
                                                to_str("in der Andockstation: \"",?.~.name,"\""));& `: g; y/ ]1 S/ d
                                else: W3 `  f+ a3 d) F# I, r, B
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ d! X8 e* H2 K$ K                                                to_str("in docking station: \"",?.~.name,"\""));                                6 Z  G' ]4 @- `+ P- O7 d! i/ J
                                end;% ]& V  ]% o5 `
                        else
3 y. ~4 @7 O( O! P                                @.Destination := assignLObj[1,row];! a& f, W2 p) U+ C( O1 p% _/ j
                        end;                        / ?% ?' p2 _& b/ L& e$ ^% `! ~
                        newDirection(@);0 J+ f8 b% q9 k; P& P9 A/ l- E' L3 E
                        @.HasOrder := true;
9 s( J. `) H* S2 ~+ J2 K* k7 Q9 G                end;9 C$ H' N  J* B
        end;. X  Z# h7 ?$ B& ~1 A7 r# e
end;        -- of the method
  k! i4 Q8 i6 p& E6 F! M/ }$ O! s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % t5 U" `( r3 {- h' ^4 {
8 Q1 T+ C: [2 l; Q
这是AGV_putin中arrive的method。% K8 P; w) M8 l% c
& S; v) j0 c1 `! _, i; T4 J
当到达物料速度越高时,这个报警更多,' p3 P4 R; w% [: ]6 i
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 ~) M7 |7 w# c8 ^3 @9 g6 u
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
: f; ]* f" X& r+ p' _% N  D! o
1 ]$ J  a3 a! A4 d0 J' H& m另外一个小建议,就是move,所有的move都可以这样
+ H7 g" v; }5 M( q6 n& qif not move() then debug end
" u. Z  `1 u. X" I这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) s, {, v( V# }' D! ^/ ?. ]- _
plant simulation中的free libraries有AGV模板,: [3 j# l9 q) t+ j
里面也有案例。
' ~: Y% z. Q' O8 e- n9 S5 U$ {我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# T  N: y2 P: B) F9 D
* i( r/ {  w5 o4 Y8 Z4 s% Y% {, b我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & f$ k: s: p& ]3 t

- B' L1 _- \7 X那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( O: r+ Q+ w1 }, ^
这是AGV_putin中arrive的method。
/ Q: E9 \8 ~& h4 O. q( \% H- H( n# u
. l/ V. ?4 h# n& c: I$ o+ F当到达物料速度越高时,这个报警更多,
7 J- G3 \9 M: C3 t5 F" y7 J
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-4 12:31 , Processed in 0.020163 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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