设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8321|回复: 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'
4 }: |( |! l1 R9 _; V8 t4 x*/
- i8 h$ l3 N. O7 W6 `3 Yis% O# t# `; t$ l  C9 S1 q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 C8 @* o  ~1 r( ~4 [, b; Sdo7 T6 e! F: u5 Q7 k8 q
        Lan := rootfolder.Internal.Tools.AOLlanguage;
; J, D! N% j+ M1 l; \        if current = @.Destination -- else return
0 f( D3 [/ c3 P9 k- }- F! f        then
2 m2 C& n6 A# F. r, @! O                @.Destination := void;( h* H$ h8 d7 J) j' g
                if @.occupied then
0 Q; |1 S2 I/ i1 w( ?& T5 f                        part := @.cont;1 e' `5 q8 Z6 S; C
                        @.transpOrder := void;
) Q2 m$ w( [) x+ Y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ V* i  r& R) |+ g* o
                                @,root.eventcontroller.simTime);/ Y$ T8 B, a" @7 }0 K
                        @.HasOrder := false;, @0 V5 C7 T0 t$ B* f
                        @.DrivingHome := true;/ A2 T% R( y% h- L% w1 C1 e  L3 \4 B: }
                        rgManager.tryToStartTransOrder;2 M% ]  U2 d5 |3 \, u4 A# _7 C
                        if @.Destination = void
0 z3 O0 U! i  [                        then -- no transport order for vehicle @
8 P0 V( L7 w0 m+ U, r: i/ A                                @.Destination :=! A) T! p/ ?5 q$ W% C
                                rgManager.nearestFreeStation(@,track.~);
) @+ ^5 e+ n; Y                                newDirection(@);   * u/ h2 I  c; r2 I/ o4 _
                                if @.Destination /= void then, Z9 M' K8 r; O
                                        @.Destination.NumReservation :=/ k) R3 W8 q* S# L1 Z) Y
                                        @.Destination.NumReservation + 1;5 t- J+ i( F' M3 W8 S  G
                                end;
; j, G/ W# x: L, M: |                                @.CurrIcon := "drivingHome";) |, [+ l6 [* \5 \1 `5 g$ V5 H8 Q
                                @.DrivingHome := true;3 V, L" G0 d' m9 M3 ~5 k
                        end;
: H# _, G) x3 _( Q. u  ^                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 S, z- X4 f& F+ |: i# c$ L0 `
                        part := @.transpOrder;
0 _, [- D5 F5 t% U- z  ]- R# u                        part.move(@);-- load part. M( X  _2 ^+ P; q5 R2 h7 u
                        @.CurrIcon := "load";
& E4 v3 C- t3 _. k# S4 t( V  X7 ]                        GlobalDistObj := part.globDestination;& l# ~8 M" U) f$ c
                        assignLObj := rgmanager.rgAssignL;! p# d" o8 ?: V$ j* Q
                        row := assignLObj.getRowNo(GlobalDistObj);  K4 \2 }& @, y: e2 L# z% D
                        if Row = -1 then -- since 70
1 @/ a. P* l6 Q                                if lan=1 then. v8 g, B/ H7 S" B
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& u: }$ b% y7 g+ R) M) Z  t% }7 a8 s9 \                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 g% P; K. }( H- ^  s8 A7 N                                else
" ~1 e# A- b& s" S: [                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, M6 K% r! e' _1 a                                                to_str("in docking station: \"",?.~.name,"\""));                               
  Z! ?: y" `. d, M' \                                end;, @1 {: @- z7 }0 ^
                        else
# c/ P! v$ }* H, O- S$ R                                @.Destination := assignLObj[1,row];
! r) _9 p- N/ v/ U" Z                        end;                        6 g- q8 R6 I  X7 I
                        newDirection(@);9 F! @9 Z  j5 s8 `+ r
                        @.HasOrder := true;) ?$ Y5 k7 `! l# u+ I+ }/ d
                end;
1 V& C5 s' U9 ~! E        end;
6 Q, G0 s1 ]& e; x1 hend;        -- of the method
1 R+ c& V* X# C6 b" D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 _7 }- M$ ~6 w& ]! U
" C+ K/ G4 A7 v* n) [这是AGV_putin中arrive的method。
, W8 t& ~* B. Q2 _$ |7 F" J0 B- F( m7 ~! U5 `
当到达物料速度越高时,这个报警更多,, S3 l4 a% [( F
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" Y$ ^( |) j) C$ C程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 V  S8 s, N" n7 E8 a
8 f. n& ?( O& w$ v& b( _另外一个小建议,就是move,所有的move都可以这样
1 [) F: Y! y* j0 |" H, p% vif not move() then debug end& e2 q' N3 b9 ]1 P/ E
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' Y6 e: a8 {/ ?3 T& O- w. W
plant simulation中的free libraries有AGV模板,
3 m1 ?* a  L3 e* b1 X/ z: O$ r里面也有案例。' O* T: g0 [6 k" m5 {
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, S% j8 H) T& ]7 z

* z0 G* q2 p5 u; E- S3 i1 m4 ~我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 # G' K0 M3 w  F, a0 Q; c
9 S: m- k3 T" r3 o; B9 D) U1 Y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / ~: L9 F& n3 F/ d" i( A
这是AGV_putin中arrive的method。8 [  K8 h3 ~- v, Z5 f% B5 |
4 f" Z! _2 l) y0 R2 k% ?
当到达物料速度越高时,这个报警更多,

8 Y2 h( Q: s) G/ U& C另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-27 18:54 , Processed in 0.015221 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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