设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6639|回复: 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'
% q7 y& M7 f: K* h& J: A*/' C! N. U! t' ?6 T
is% }& w; x- I. G
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. f$ n$ _8 k) U8 L7 U9 a- h
do3 F; A4 Z! j; r
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ _- l: h' [. I) J        if current = @.Destination -- else return$ _! H" a8 |; p9 j6 T; u
        then
, W; q$ B8 P/ s1 Q                @.Destination := void;
0 U9 x. K+ _/ ~4 o5 S3 Z                if @.occupied then
8 G8 T* _6 e! F( d" N- j                        part := @.cont;: [/ q: a) U& T5 N
                        @.transpOrder := void;
/ L% M9 y! f1 H! V1 W                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: L* Q% X1 A! P6 _- i" s$ y# Q1 z
                                @,root.eventcontroller.simTime);2 E/ Q& O3 b, S; |2 m2 H5 f! y
                        @.HasOrder := false;2 K- p  N$ z) T6 I, O
                        @.DrivingHome := true;3 R" A  `& B3 t' H0 J4 k9 L5 s
                        rgManager.tryToStartTransOrder;
, U5 O& [  {: S1 I/ p3 T3 t0 U                        if @.Destination = void( ]4 k8 A! w; R3 {
                        then -- no transport order for vehicle @
+ z+ f  P0 N* E1 ^4 N! L4 B+ m                                @.Destination :=
& S# Q8 A& o! M! B0 N* t                                rgManager.nearestFreeStation(@,track.~);
7 k: F3 O$ f( y/ [                                newDirection(@);   
/ i# P0 {5 V  Y; x3 c1 R3 F                                if @.Destination /= void then
" |7 l5 @: E- l7 Z- l6 I9 J0 K; ?                                        @.Destination.NumReservation :=
- X2 w$ [' }2 ]8 V                                        @.Destination.NumReservation + 1;
% B4 s/ j. E/ l3 }                                end;
: }( p% R/ C3 s" C( [, f+ \                                @.CurrIcon := "drivingHome";
6 y6 E6 D& c$ e& S; S& I                                @.DrivingHome := true;. ^8 {0 W, a+ H8 U
                        end;( Z9 \* v; {: Z9 x, B
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 I* ~4 S: q5 |9 `4 i9 B                        part := @.transpOrder;
3 {! y" j: X4 N4 w9 p6 k                        part.move(@);-- load part
2 u" _, s) u- v$ ~$ T                        @.CurrIcon := "load";
# |1 S1 V. b1 k! N) r                        GlobalDistObj := part.globDestination;
; B9 `; m- V5 n, g                        assignLObj := rgmanager.rgAssignL;
, L, ~7 J+ [9 g. F                        row := assignLObj.getRowNo(GlobalDistObj);
/ `! m, L5 g( m  ]% _- y$ j                        if Row = -1 then -- since 70, Z2 E# O4 k. s" r. Y2 E/ q' Q0 j
                                if lan=1 then% R% W6 I  U4 }" D% b
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) E2 _. Y- t0 T6 l) w, t3 V
                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ j  J/ J; }) j8 U9 R
                                else" C3 I; |! G& C* u3 P) e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- X+ T# Q* M5 D, l5 d$ e                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 l3 x' Q( z$ S  S# K                                end;
! |6 p2 ~5 t6 q! n                        else$ D" Y/ j6 v8 u! Q
                                @.Destination := assignLObj[1,row];8 _- S# ~, _) L6 V  k$ K
                        end;                       
4 o# V2 ]8 B2 n- U7 _& q                        newDirection(@);+ F: k7 E/ ^* @
                        @.HasOrder := true;1 X+ U: Z! L% f" C
                end;' S% ~( ]+ y+ `, z
        end;
# ]9 Q# ]1 g$ [5 |8 @9 Nend;        -- of the method7 F0 w: |8 O. i/ u
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) c3 ~) c# E1 B! l0 k2 c0 E" {) o5 I+ a
这是AGV_putin中arrive的method。) }) N/ z; K- p

/ ^& ?  X+ `" Z4 i当到达物料速度越高时,这个报警更多,
6 z  b; g# H' }3 x3 K; G8 ]  C, G- p可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 @) R/ U, R' K程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- E# @6 U( ]) M/ a% h1 P8 O% q$ d1 W# K' u
另外一个小建议,就是move,所有的move都可以这样
7 k: ^5 u7 F3 I/ ]- b4 L( j# k% b* |if not move() then debug end9 m' W  q3 ^0 |& T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; V. U! v' c/ F9 O$ c1 s$ b, z; `plant simulation中的free libraries有AGV模板,
" P/ ^0 j: m, E$ u$ m. @, C里面也有案例。
3 s# S% C; r1 ?+ S4 F, Y( [我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& P1 F6 T7 h0 [6 p" |: \4 Q7 G0 e$ v
9 {0 H" t; Y* @/ Y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; x6 y# G, q% X/ t3 e9 s7 r: h. g0 _! O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! a: V: s6 ?0 r; L' A7 p这是AGV_putin中arrive的method。$ R8 M" e+ A; a+ B* K2 B6 x* G  p
! Q& ]; I& }, R
当到达物料速度越高时,这个报警更多,
: t8 _" x: ?! Z" F9 A7 p$ o
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-17 22:09 , Processed in 0.019063 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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