设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9795|回复: 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'
" i% G* G. x1 D" Z*/
1 f% u  R# O( a0 Uis% e2 }1 _$ ~( ~
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 _  D& M, V* M2 C" z
do4 U  T2 h- C  r8 ~
        Lan := rootfolder.Internal.Tools.AOLlanguage;, c# u* r7 n! d' J* f2 i, m
        if current = @.Destination -- else return
% v. Z1 }$ E4 R1 ^+ \- x        then
7 j  ^: O5 }& i                @.Destination := void;0 f# ^  {9 Y" o
                if @.occupied then
) I5 e. X& Z* p: N% G7 t                        part := @.cont;5 [2 L+ A2 Q) {- A
                        @.transpOrder := void;
1 f, J6 @9 m9 P. @2 L# f                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ H6 N' i# N( W
                                @,root.eventcontroller.simTime);
1 F7 `' ]; i# g0 I/ w                        @.HasOrder := false;9 b! o" K+ N3 ~' t' O/ Z/ N8 A/ b
                        @.DrivingHome := true;
, u( m: |+ V9 ?/ a                        rgManager.tryToStartTransOrder;
8 K0 N$ R1 H% N9 E2 T7 C9 h. k6 t8 l                        if @.Destination = void# u; U' `, C2 B. Z2 b
                        then -- no transport order for vehicle @( R# D7 u/ h8 G* Y. r
                                @.Destination :=7 M% k; o3 c( ~, u
                                rgManager.nearestFreeStation(@,track.~);5 G* A/ ~0 J7 k' g+ f
                                newDirection(@);   
, l& Y9 [0 j/ h/ W. D3 U3 ]2 R) I                                if @.Destination /= void then
" w% j7 @# Q4 D8 Q# f1 z                                        @.Destination.NumReservation :=4 `# k8 M& r4 ]
                                        @.Destination.NumReservation + 1;
" b2 ?% h- |5 L& K2 u+ |                                end;8 f8 \9 {& D' z
                                @.CurrIcon := "drivingHome";
% a& Y; q: }$ ~3 F( d7 q) A                                @.DrivingHome := true;$ T- ^  A& d0 r# a
                        end;
9 C9 Q  O' n* j: G7 |; V* |& a                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" [: j" O7 m5 `4 K
                        part := @.transpOrder;
" }& o2 B# A# E                        part.move(@);-- load part) r! T* [/ i/ P, |) `, G: n0 t  q0 O( ?
                        @.CurrIcon := "load";7 o9 E* q- K) y" X. J# X0 r$ t) E
                        GlobalDistObj := part.globDestination;. u% j1 P. w" r) q
                        assignLObj := rgmanager.rgAssignL;0 K6 }, H# t4 c; [" e: x
                        row := assignLObj.getRowNo(GlobalDistObj);
9 n* o" U# M* _                        if Row = -1 then -- since 704 y$ @8 Z2 y' N2 Q# W
                                if lan=1 then
+ R% j% k5 L% K3 P* f; b5 R                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. b; u# S8 I. Q! U8 @* G                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ |' t2 w1 s( A
                                else
! S9 c; w: c/ D% ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 p7 t# n2 M( g0 T                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 F9 p7 ^+ o4 Z/ U- f/ q                                end;
4 Q5 p) @' `" E+ z4 g7 X9 i                        else6 y; J( u$ P! o4 F: z/ o
                                @.Destination := assignLObj[1,row];( t# j0 n4 e" }" Y
                        end;                       
1 ]! g; l  g) P) o9 g& T( _8 t                        newDirection(@);
  j. k; T5 t# C                        @.HasOrder := true;. f! V$ k2 L; R7 v2 h
                end;
/ d  I( e4 J5 F        end;8 W' D1 {$ \2 v: V
end;        -- of the method8 A1 a" y/ Q* m
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
3 W( g4 _) v6 l! F6 R& q6 D$ f$ M) j5 V
这是AGV_putin中arrive的method。! |. B+ E  @% ~

9 ?% r! ^% l5 S- r当到达物料速度越高时,这个报警更多,
+ V* s- t4 l9 [# y. p6 d可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 b- n' i0 F" U5 t, ^4 |6 R9 p) O
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  w- a* `$ g/ b, f8 W

/ U1 K& I: D* D" R! I  L, k另外一个小建议,就是move,所有的move都可以这样4 z( V, V& g* T! j
if not move() then debug end
. }' d$ H2 f6 e9 Y! ?% i/ n# h这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 N7 M" C6 }4 a4 e& H9 V2 gplant simulation中的free libraries有AGV模板,% H0 l# J$ _( j$ m; q: ]. _3 j
里面也有案例。8 E* E6 ^; H+ f2 Q2 P6 |  Z5 b
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  A% d$ l4 k) g- ?; f' t

5 V: |5 I9 g9 L6 S3 N/ }我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 y( }$ u; T* I' Q& ~. s" z0 f5 U9 I$ V. ^! R; R
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ W0 @8 s9 \* J' ?9 d1 g这是AGV_putin中arrive的method。* y* m, x* l, i

# D" _* W6 B2 h4 @. K" ?; i3 O当到达物料速度越高时,这个报警更多,
; y' ]2 C! V8 E8 L% [# U
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-25 18:29 , Processed in 0.022310 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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