设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5643|回复: 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'
8 |' C- G. y$ W0 Z  ~$ v*/7 x, V1 t: L1 f: g6 i3 S' ?
is
) P# n7 b, i) G& b) g3 o        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! w/ B" G& i  b5 C/ h) \
do
9 {: M9 E  \* [' p        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 z* Q, P+ y4 J+ h$ D8 O        if current = @.Destination -- else return9 |* z2 N% w( r  D" T; X: \
        then
( u, g! I9 S  U                @.Destination := void;
: D1 a  R* [3 a( u                if @.occupied then
) s' X6 p4 s2 r+ m9 Y: h; C/ X  D. ~                        part := @.cont;2 @! m# e; {. H4 F
                        @.transpOrder := void;8 h7 w* a; i8 \; b# J( d# U
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 o. S& _8 n* d! G5 m! |) s8 J
                                @,root.eventcontroller.simTime);  d9 E! }/ H" M. o) d( U6 u7 V
                        @.HasOrder := false;4 p, A0 r0 L% H$ g+ q! o& B
                        @.DrivingHome := true;1 W5 \+ p# n! l$ M! y
                        rgManager.tryToStartTransOrder;+ m: K. l# D, ~- p" A
                        if @.Destination = void
% Z1 a7 C+ t/ P* ^' G                        then -- no transport order for vehicle @
1 U0 }6 c4 ~4 M6 `                                @.Destination :=0 _, H/ Q6 q3 G9 c. u
                                rgManager.nearestFreeStation(@,track.~);4 G0 ?, d1 r& C  r$ s
                                newDirection(@);   " [4 N4 Z/ C3 M! e4 f
                                if @.Destination /= void then
3 A% o0 v# a4 k% V                                        @.Destination.NumReservation :=
( A* ?5 A: p) K- X/ Z5 ?& \                                        @.Destination.NumReservation + 1;
3 I2 u2 y3 |% p6 {! b                                end;9 _- r' Q# p* M% o8 J1 ^; Z* A2 }
                                @.CurrIcon := "drivingHome";
' B) p- G8 e3 _( r1 d8 P                                @.DrivingHome := true;1 }5 |% E- ?9 M
                        end;
9 n7 ^% S/ n( g8 F% v                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; J, ^( b& p9 {: A                        part := @.transpOrder;
; H7 j) r9 Y( W' K                        part.move(@);-- load part
1 B* P& Q$ o( U                        @.CurrIcon := "load";1 I# T6 [' r4 J" s3 S
                        GlobalDistObj := part.globDestination;3 |# E0 `2 i$ c3 r& f# T
                        assignLObj := rgmanager.rgAssignL;
! K  N# K* c& g4 A" `0 ^8 t                        row := assignLObj.getRowNo(GlobalDistObj);
: k0 d" F0 m5 N* u& u5 q                        if Row = -1 then -- since 70* O. Q0 x1 t* O7 K8 h
                                if lan=1 then
" U' Z5 y9 Z4 E# g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: n9 q/ f; d/ T# O0 Y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ G; c5 |" |% Z% O' U                                else
7 D* w9 ~/ Z; }/ W" {% i                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 Y& E1 _. w& [& L* i5 w2 x. q                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 g& b. J+ Z! ^, X5 I) T" d                                end;& o0 Y, \7 N1 m) O' S! s8 ~: v
                        else
  D- M5 |  s- g- O6 r6 Y                                @.Destination := assignLObj[1,row];
% @3 F- i. Q) e, l, @) n                        end;                       
; ^9 r# m& Q- N                        newDirection(@);  j0 s- f% e& c1 A6 P6 E6 |
                        @.HasOrder := true;/ o0 {' _- z+ b0 ^8 w
                end;
: s( K0 t* c+ d7 q8 ?8 _        end;7 |* R: D( l. C. A8 F9 k
end;        -- of the method+ b4 @0 F" v. A; p: N! d
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' c% N% |; W0 j; {3 L& P* Z/ h
9 q: z# s8 |/ Z0 w5 ]
这是AGV_putin中arrive的method。: z' `9 E' B0 ~8 ?
& N2 L' _0 r/ @
当到达物料速度越高时,这个报警更多,) N' v& e+ _( K8 K
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. \7 v7 a6 l4 m  T
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; ~+ X5 t5 Q2 U' T8 _1 o* B
$ V' ]9 z# x& ?3 m
另外一个小建议,就是move,所有的move都可以这样/ v8 o" d+ x; K+ |7 h4 ~$ p6 x9 c
if not move() then debug end+ P7 A$ G1 O  d
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; L* I' p7 M$ N
plant simulation中的free libraries有AGV模板,
- f: b1 x8 B% E% [* k里面也有案例。+ z! A" I  W( ^* s  T1 P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 @, F- ^" I3 X0 i
* w2 L3 J  r% f我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 6 @3 ~" {1 J( W* \6 @
, A& ]0 j, n8 o& N8 {! Q4 }5 E/ q
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
9 b4 U  f& h! e: g这是AGV_putin中arrive的method。3 Z, Y5 [3 r6 ~5 r- u

' M. q$ p( L5 O; @; Y$ E当到达物料速度越高时,这个报警更多,

$ n$ b7 D+ A5 b( U9 _9 W另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-11 01:33 , Processed in 0.018468 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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