设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8269|回复: 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'
$ R: ?( {3 r4 @% Y- z*/( a* L6 S, O' g  q; \/ W
is
0 ~8 h0 F: }% y- P7 ~! F% n        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, K: O  ]! P! W3 X1 ado
  `$ F* M, D3 v0 X: {7 Q        Lan := rootfolder.Internal.Tools.AOLlanguage;
( c8 ~8 k8 R2 v3 D8 H  M3 {        if current = @.Destination -- else return2 h9 k  T9 ?" e( ~' g/ Q+ r. M
        then* @' G, J/ |: M6 l0 c
                @.Destination := void;3 f% x' b! R5 K7 r; ]6 b
                if @.occupied then
7 U1 ?. E" ~$ }% j& g  Y                        part := @.cont;! i3 `4 {( f0 X
                        @.transpOrder := void;
; P7 T0 M( ]0 }, ]+ j! ?                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 e; i$ W' f# ?% Q1 D                                @,root.eventcontroller.simTime);4 m$ q) d6 f4 D; B1 T" q
                        @.HasOrder := false;" }  y) i0 q( R
                        @.DrivingHome := true;/ ^- H% P0 O" T) A
                        rgManager.tryToStartTransOrder;* A! q5 b1 Q+ X- X" Z4 `
                        if @.Destination = void
+ @" V7 f% X. s# \' j                        then -- no transport order for vehicle @
2 _$ Q- q7 e# ^                                @.Destination :=9 k8 s7 Y# X: {# p
                                rgManager.nearestFreeStation(@,track.~);: F- y: a2 A: K  M6 A' E
                                newDirection(@);   
* I1 q7 J% h: |) Q                                if @.Destination /= void then" F$ q3 q9 s3 r" ^1 B( i2 {" }" n
                                        @.Destination.NumReservation :=1 S" D4 y  o6 t; E: }# y( S
                                        @.Destination.NumReservation + 1;" ], F5 ~9 k  u, x$ r
                                end;& Z8 A8 P- [. Q" C5 d+ W
                                @.CurrIcon := "drivingHome";
' I& M4 n# I7 O5 a' Z6 J( |                                @.DrivingHome := true;
0 I3 a" f% ], [  e" X7 B                        end;
+ d6 f  ?1 ?; H) l                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( N# p; V; L- Z9 I- z% {                        part := @.transpOrder;
. Y8 i, h: j1 w+ f/ C! L" n- B                        part.move(@);-- load part
- p$ j+ G9 W, A' K* L* Q                        @.CurrIcon := "load";7 B  J# C- G& r( }
                        GlobalDistObj := part.globDestination;
) K" {$ O; K1 r* }2 C4 ~                        assignLObj := rgmanager.rgAssignL;
6 Z$ |( t! z* p/ x+ h; |9 d                        row := assignLObj.getRowNo(GlobalDistObj);/ ]" |( C- _# E$ L8 X. P
                        if Row = -1 then -- since 70
: D; s# L9 k# {$ A$ {                                if lan=1 then. T5 K5 V7 K! T4 S1 L7 P1 X* a' [
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ b* f& C5 J+ b* v/ x
                                                to_str("in der Andockstation: \"",?.~.name,"\""));0 v5 w4 R. b" D+ x
                                else- ~6 Y( e2 Y; V
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 b$ v* f4 v$ s/ v
                                                to_str("in docking station: \"",?.~.name,"\""));                               
' ^' f' V9 o- Q& k* O% \                                end;
+ k! H& f( p; B) V+ E. C/ R+ \  j! M                        else
. ^; [) G/ v8 F0 G1 o4 B                                @.Destination := assignLObj[1,row];" `  v( R/ V; ?; R2 g4 t0 m7 p
                        end;                       
8 ?8 s  M( A. x) ?                        newDirection(@);" d) ~5 ^" u+ b# r( P3 t$ p
                        @.HasOrder := true;
& n+ e2 k3 S) \                end;
, g1 {% T# s; q' p" z        end;' u. E7 B" G: d* F) F! f  H
end;        -- of the method
7 ?7 S" |  Q( S5 Z. o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 _+ t. M7 _- Z" g1 Q# l9 b# |0 |/ I* d/ n5 T
这是AGV_putin中arrive的method。8 N2 ^* k' v4 ^! M6 a5 F% c: B& a
3 j. b; `0 G4 V( n8 z* n% K5 e
当到达物料速度越高时,这个报警更多,# r7 D5 ~& Q7 d
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- R1 W. q+ M3 p' x* w7 |
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# @- ^4 X' x# I) l  z2 \7 [) w+ g5 z% c& z* I
另外一个小建议,就是move,所有的move都可以这样
, o7 ^! d" L! pif not move() then debug end
0 Q- v, ~, J) y' r0 W这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' U7 E% M% r' v! f( Gplant simulation中的free libraries有AGV模板,1 e" D6 a% k+ @! K! ?5 _( b
里面也有案例。
; w& o# v' Z& W& s" L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 a1 w. X% [! [4 c# G% R
4 l) M. B3 e' u7 U我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ ?, M* V/ X& H

; i" q1 v) l- T% f/ \那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) N) e! X1 y8 t- z9 w5 f这是AGV_putin中arrive的method。
" F" U4 N1 v2 B$ \) N4 ]/ M. G- h
" e7 G  G3 F; s- v0 h/ P8 ?当到达物料速度越高时,这个报警更多,

  @( ?) a; \9 ]2 }2 k7 S8 B另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-24 04:36 , Processed in 0.018525 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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