设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6072|回复: 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'
$ L0 r: F+ a( ]8 J*/
1 o7 z5 A3 b4 l5 lis8 W( n7 p9 B3 Q' u7 d4 G5 J
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  y0 r. d5 o4 ~do
1 f' L  w" W; d3 a, M8 L5 c! c& s        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 Z8 \' T$ o0 s8 {( x+ A8 e8 I% x+ r: Q        if current = @.Destination -- else return
, ^: m. g5 I) y# a4 ?& w6 A        then
/ G1 @2 q" j9 x  |/ S# @$ o                @.Destination := void;! G9 Y& S! Q# |
                if @.occupied then! X( O% K# y4 _7 r( z# [+ Z
                        part := @.cont;8 p& e7 O2 g  _& U1 v) z" i; o
                        @.transpOrder := void;4 `  u5 T' X& c' Q/ v
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 v( u# x: {# W5 f( k
                                @,root.eventcontroller.simTime);
# M8 M4 [) _9 b) `3 ^- K                        @.HasOrder := false;
* S7 Z# M# x) o3 V% Y1 r6 X7 q                        @.DrivingHome := true;
3 q+ C% s2 d* w4 f/ J                        rgManager.tryToStartTransOrder;
0 Z' y) {# D4 C* ]  q2 h                        if @.Destination = void5 v9 N& `* L& ?1 U# P
                        then -- no transport order for vehicle @
& I- ~* S' o# y( |: j$ ?                                @.Destination :=! f3 x: B0 b' b( y, q# J
                                rgManager.nearestFreeStation(@,track.~);" i4 b" L# N& Z, [' k- o2 t/ m
                                newDirection(@);   
) f4 C4 ^6 O; B2 R3 l0 Z4 |                                if @.Destination /= void then
% ~7 o7 Y: n0 l1 q( X                                        @.Destination.NumReservation :=
" ~4 ]4 T- `: r* _                                        @.Destination.NumReservation + 1;
2 v0 [& Z* e2 H5 X9 C2 {+ N7 j  P                                end;, _6 ]$ T4 g) i  T/ w
                                @.CurrIcon := "drivingHome";
% i- L) X; T) b8 [4 U. K) W                                @.DrivingHome := true;5 d  l: e3 U" L* r- d
                        end;! w( p2 [$ U0 h; j9 l
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 m, W2 R  K& x3 r
                        part := @.transpOrder;
8 h$ i- T4 z( M  b1 |' R+ @) D                        part.move(@);-- load part
5 T5 Y$ U; L0 y4 ~! T' V0 h5 b                        @.CurrIcon := "load";
8 A# f! X8 x* K, M- N                        GlobalDistObj := part.globDestination;! _1 O, O# n! C& Q, T2 u1 z
                        assignLObj := rgmanager.rgAssignL;* Q  h& F: r; N6 J$ W0 H
                        row := assignLObj.getRowNo(GlobalDistObj);! g; t3 p0 N' k! ?2 _
                        if Row = -1 then -- since 70' `- @1 ?% ]3 h/ k' ~7 ]
                                if lan=1 then" O7 E$ }# f% U, V" P- m
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 G6 r  h9 [' R" j                                                to_str("in der Andockstation: \"",?.~.name,"\""));; n$ F" {: P6 `1 g- H5 P; Q
                                else
! I8 A# s  |# l: q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 t$ O) T% v2 |9 N% |
                                                to_str("in docking station: \"",?.~.name,"\""));                                5 W: Y4 V5 H& H
                                end;
; y  K" M8 i0 j- k$ X                        else* f0 k* v% L* C3 E
                                @.Destination := assignLObj[1,row];
! a6 u* j! C8 f% k; {                        end;                        6 h/ s" }/ S  n7 h; f9 U' a( X8 w
                        newDirection(@);/ X, I$ T5 e, h6 B- n' G
                        @.HasOrder := true;
; f2 s& |+ G% v                end;
0 S: g2 G6 F( N' ?+ K        end;
# Y1 J! {" f( ^# t" J  Rend;        -- of the method6 R0 ~& C2 a% T$ R/ n7 Y' m, @; T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( s8 \+ M3 D; ?# n5 p; [# m

. x' c% h8 |( k1 y  V6 Q5 r9 s这是AGV_putin中arrive的method。$ q! `6 a4 i3 r

' b+ Y4 t7 G8 G/ A3 t) _( H当到达物料速度越高时,这个报警更多,( ^% g. q2 `  c
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ G4 Q* V: Z8 Z3 r
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 a# H0 A  F% R, o$ Q5 s

. j" b' t! [3 q8 p' x- g7 d& ]9 \另外一个小建议,就是move,所有的move都可以这样
: m6 T  j, ?4 X  E, T0 Sif not move() then debug end8 [. K" w+ G- b9 ~. j; j% |, G) n
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
5 n6 g( O& k+ o9 E- lplant simulation中的free libraries有AGV模板,9 ^' Q* p% n" p/ W6 x
里面也有案例。
5 g- E* [9 O' Z/ m' U0 S我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ q* p% l& l& u+ \3 I
( Z2 x3 D* p' @0 H3 P$ z8 {
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" ]& F- h* X6 I# K' G, ?- E
+ r; O5 z5 n0 N. t# M: U: F1 `那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 9 N8 D; C  K, D+ j* \2 {
这是AGV_putin中arrive的method。* P* B/ Y* \# S9 A- j

* q* @0 W9 ]7 p! x当到达物料速度越高时,这个报警更多,
4 ]+ ~7 c8 t* h' M0 k
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-16 04:58 , Processed in 0.021760 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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