设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8917|回复: 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'
) u' c/ Y1 C/ _' d+ S*/
' [# \+ p! G! {: z4 Ais% w; v6 W4 Y$ n8 z( G; D* `
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; i$ i$ t; X6 c) y! f
do
% O' X& o0 \) O& }! [$ `7 G9 m4 K        Lan := rootfolder.Internal.Tools.AOLlanguage;' M. s: z5 F4 w6 m5 r
        if current = @.Destination -- else return1 W* w: z7 q& q- p  O4 O
        then6 l. c  `) f# a, H1 p
                @.Destination := void;
# L) q# O$ C4 _& g! x$ |                if @.occupied then
2 h" T/ p/ x1 Z* G9 n& T  w                        part := @.cont;: s0 k# i# Z+ t, y7 K2 o! X% t- j
                        @.transpOrder := void;6 a. f9 w" N. `3 @- u0 \& Q1 f
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 f' t; V5 \& [2 s" r! U
                                @,root.eventcontroller.simTime);$ h+ D6 R: T2 p8 D
                        @.HasOrder := false;! C' R9 D8 A0 W4 `
                        @.DrivingHome := true;8 O6 J$ ~6 Y7 ]! l. v0 @  V7 {3 @
                        rgManager.tryToStartTransOrder;
  X  j8 P) ^5 Y$ N2 {& n$ ~1 H                        if @.Destination = void
: Y1 ^6 G; ^  q; F7 ^. t+ ^                        then -- no transport order for vehicle @
8 g% f+ R# l$ X                                @.Destination :=/ T* [, H. t+ e$ G! R( G' @
                                rgManager.nearestFreeStation(@,track.~);" m' {6 @4 `& l. `. R
                                newDirection(@);   
! Z( d) A5 [2 v: @% Y  {2 Q                                if @.Destination /= void then7 c* L8 P% S7 [# s" Q& r
                                        @.Destination.NumReservation :=
- k) [& v/ q7 D- _! S                                        @.Destination.NumReservation + 1;0 t- u1 o* V& V& u
                                end;
8 A. z; x+ m( ?7 y' M6 w! r                                @.CurrIcon := "drivingHome";
' u0 ~7 H1 t1 \$ l                                @.DrivingHome := true;
6 W6 q/ i+ Q% X' l                        end;
' h/ T; I) s5 F  [2 d) `                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 r" x" @" r+ _                        part := @.transpOrder;
0 L% P0 Z2 q8 h! b0 L# @: i% Q0 I% W                        part.move(@);-- load part9 A" |+ G6 x- w/ j. ^
                        @.CurrIcon := "load";9 y1 T! [/ f6 V2 ^9 t# |
                        GlobalDistObj := part.globDestination;
) G$ R4 m- B2 D( l7 o, V                        assignLObj := rgmanager.rgAssignL;
5 _4 j- a  L& Z( }: x0 V                        row := assignLObj.getRowNo(GlobalDistObj);' {. o$ z5 @% b0 P1 L( g
                        if Row = -1 then -- since 70
8 u) Q' V/ z( }$ r. N0 D& h                                if lan=1 then
# e. F0 }  j% S+ C2 z                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 f% {" b) R/ }6 e3 k' E- \
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 G: P+ `* c0 y% V' s                                else
6 `* Q: s' `8 V; Z5 c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ {2 k- Z; k! H# F* H, ^                                                to_str("in docking station: \"",?.~.name,"\""));                                # C- T9 I" u! m, c  e
                                end;
" [# E0 {0 V8 Z% v1 e* l% o2 p                        else
4 E- ^$ _4 x- u$ u8 J  m6 f                                @.Destination := assignLObj[1,row];/ i9 s! j+ Y7 G7 T4 B
                        end;                        0 U" p8 R8 l# K' q/ L7 |
                        newDirection(@);
: N# u' L0 g3 A/ E                        @.HasOrder := true;
' ?3 l) \6 i5 l' ~# L" Q                end;2 M3 n4 A# |& c. U
        end;
. }, n7 @7 O, N& Xend;        -- of the method3 \" B& A+ ]; H5 H5 J6 O0 X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + A" |$ C7 C; c! n0 o, U* y

+ o( i1 k) Z" O; [* V  ]这是AGV_putin中arrive的method。6 k) W- {/ O' m: S1 g  ]1 t& W& ]
0 R6 N9 m7 ?6 U, k0 f, d
当到达物料速度越高时,这个报警更多,/ p9 Y" _9 Y1 ?$ Q* u: d
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: L: L  i# t8 j( C- d程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; W: i' u3 q0 v4 v
" W1 H9 p6 A8 E# F另外一个小建议,就是move,所有的move都可以这样
$ a4 n9 m% Z2 M% Nif not move() then debug end  i; |% ?3 O- [+ a) H+ K3 M% w/ n$ Y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 I! Q' p5 s& [6 q* n3 J, b- Tplant simulation中的free libraries有AGV模板,
) P; G) g6 v! I0 K里面也有案例。
2 t9 q. Q1 y0 j& h& \+ }% Y& {我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, @: s- o. L5 A& a! ~

6 D* [0 f2 p/ I7 j  e# {我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 B$ ]# E( |) _6 i, c/ C' V2 G3 ~7 o% p/ D" O7 l
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - m% w1 J4 {8 z* q- n( q. ~# P" a
这是AGV_putin中arrive的method。
  j) W' K/ ^0 ~; b" f$ K+ O3 C' T- C8 P
当到达物料速度越高时,这个报警更多,

& e5 Z5 @( ]7 w6 z2 L另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-4 06:11 , Processed in 0.015879 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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