设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7719|回复: 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'& h" c; Y2 @, A  y7 w4 @$ ?
*/" V2 K0 h7 h: Z3 Y
is
& S! f, j* f2 V. u* `6 z        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 [/ d8 ~( Z6 Edo
: U( G6 Z% v: j) G. j( X+ r, O        Lan := rootfolder.Internal.Tools.AOLlanguage;- R$ T" _; h" p9 O9 X
        if current = @.Destination -- else return
4 q1 T3 H& O, ]- D! Q        then
% x3 T+ J/ O2 `                @.Destination := void;
+ y3 _% w! t) g+ R                if @.occupied then+ h7 d- l$ l" l) A, v* m
                        part := @.cont;  a6 e1 G! L: G
                        @.transpOrder := void;- V+ w2 y# o5 p0 b* u! Q- S! U
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: L/ ]3 p7 v- M/ i0 R                                @,root.eventcontroller.simTime);
; R! f$ B% q$ B8 P6 i                        @.HasOrder := false;
, p# N( P. b, h7 N. L* ^+ }& Q( o                        @.DrivingHome := true;8 k$ n. f, I' g+ u
                        rgManager.tryToStartTransOrder;
8 S( W  g7 K; `                        if @.Destination = void( u# M9 ]% X; i: t* @2 P
                        then -- no transport order for vehicle @
* q) w4 K  ?, l; ]/ {) x- t                                @.Destination :=
6 ^( F- l& L4 Q( l                                rgManager.nearestFreeStation(@,track.~);
- N% A  p; k3 ?/ s% e4 `" V0 [# S                                newDirection(@);   
: k# F4 n+ j4 {1 S8 _$ o0 y6 [4 h' J                                if @.Destination /= void then; M; U; O6 Q6 O, X
                                        @.Destination.NumReservation :=9 T* O4 \5 U+ c) m( g
                                        @.Destination.NumReservation + 1;; W1 D% c6 L$ ^2 |- I
                                end;/ Q8 z$ }, @- v4 F! D' \. M: r
                                @.CurrIcon := "drivingHome";! X0 ^. i5 X" d8 k- r
                                @.DrivingHome := true;
$ B- ?+ u! d3 N" @% m" \                        end;
, _9 S0 x6 h; I                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; c; y' q6 d5 [& }
                        part := @.transpOrder;/ c* O5 }& b1 Y- _+ O8 ~
                        part.move(@);-- load part# t( E8 V2 d$ p2 Y1 Y, K9 B" ^
                        @.CurrIcon := "load";' C4 K! S  D; m
                        GlobalDistObj := part.globDestination;
! k7 R+ s! v5 ~( x0 r) b1 B+ j                        assignLObj := rgmanager.rgAssignL;
) Z" t6 f* e7 P3 l$ b# l                        row := assignLObj.getRowNo(GlobalDistObj);+ _# n9 c$ d7 D: ^4 m* R
                        if Row = -1 then -- since 70
' l; t. G1 }; W# r& h  d% \0 k                                if lan=1 then
# x; v, g$ X, I' }( X; ^                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& @! g  k2 b  c; a3 c- g( [! k
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ p* V6 `" {/ T% s# \3 @
                                else( I! v" a! |/ \  o
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 g& A2 ]* |  s  S- w* |                                                to_str("in docking station: \"",?.~.name,"\""));                               
( G' v5 q) g: n4 H) D                                end;+ c" p$ ^; s/ e, |! G' v
                        else) _* V! z4 p- B
                                @.Destination := assignLObj[1,row];5 j1 d1 ~- S, x  n; |
                        end;                        2 F8 [# t$ @( n6 n7 u
                        newDirection(@);
4 G8 |& r+ E( n5 A5 L                        @.HasOrder := true;
& I; y2 P9 D/ }$ c0 I: y2 S                end;& H' @& ~1 D% v( S
        end;
  h! f5 n: y# G3 bend;        -- of the method3 n; k1 G5 C% m8 m- Z- m$ s+ S
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , m* Z- `5 h# s' `  J$ |
3 x/ r1 K# }6 J8 r5 ^4 U. f/ G
这是AGV_putin中arrive的method。
- f, n% G( R4 I: L% G. E2 L% i, Q0 L, G. F$ d
当到达物料速度越高时,这个报警更多,$ }0 C* c( s8 m$ X) u* j' A) U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
. f1 V) B! z: Y8 T程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; v5 y; R/ `  b
  G4 a: ~' t) }另外一个小建议,就是move,所有的move都可以这样
7 f1 x8 Q, F6 N, W4 C% k1 z. l0 a' Aif not move() then debug end
: U9 V: X' m4 Y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
2 z4 u  C  N: D3 _# M3 gplant simulation中的free libraries有AGV模板,
* `* o3 E7 C  t/ c; s里面也有案例。  u! V+ U4 ~/ e3 k; f: U1 |" P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 ~0 B  }& l+ V3 `4 U3 m

+ E4 h" J- K& ~( m我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 # c- i; P$ J7 {5 S2 \

$ ]* C, [% d9 ?! b/ o6 x! K那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 u/ V3 c% @4 P
这是AGV_putin中arrive的method。8 ^1 V. w0 D' g5 O

0 ^  m1 I0 g( n6 f4 g. d当到达物料速度越高时,这个报警更多,

- G9 v7 m7 Y5 u# W$ Q2 x1 Z8 d另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-25 21:48 , Processed in 0.018078 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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