设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7960|回复: 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'! d. x, I* ?: x, [1 Y
*/
% p3 l% A# `) f8 ?5 lis5 j- k5 O5 u, N1 [4 P
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, w( [# n, d' g. H/ Cdo0 b2 o. V2 S) ~- r7 P
        Lan := rootfolder.Internal.Tools.AOLlanguage;. t* _6 x( K1 ]1 ?  {2 m
        if current = @.Destination -- else return# r  _" k) V4 N* [& O4 m' ^* S; ~
        then
% G4 V$ w" D0 W% }' i9 [' ?/ b                @.Destination := void;
9 p+ s1 N9 g- d1 A. @1 u/ _                if @.occupied then# c4 E4 @7 ]* x
                        part := @.cont;3 h# h0 L$ s- Q5 J5 }. T1 j
                        @.transpOrder := void;
( `( r. M0 @4 k- [                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( y- ~) z) ]! j  ?2 B; f
                                @,root.eventcontroller.simTime);. L1 S9 P6 K. ?5 o! H) p
                        @.HasOrder := false;! ~$ q7 L  Z* E* j7 m5 v  B
                        @.DrivingHome := true;
4 V6 [/ ]& z. o6 F) \                        rgManager.tryToStartTransOrder;
+ v3 ?5 L' ~2 G' @9 }                        if @.Destination = void$ N: n5 l% I% m
                        then -- no transport order for vehicle @+ t$ `& W$ e2 a1 m) H: _: i
                                @.Destination :=8 O7 t3 O$ \: X! V- |* f; E1 N
                                rgManager.nearestFreeStation(@,track.~);7 _2 P" `% q) A/ H8 z
                                newDirection(@);   1 d- h* d; X& ^( f$ B" O
                                if @.Destination /= void then
7 M0 q7 C4 _2 Z                                        @.Destination.NumReservation :=
4 ]/ W  _9 f: J. X: [                                        @.Destination.NumReservation + 1;
) q9 }) c2 F0 C( {3 |                                end;
3 J  [) R% ?) ^2 {                                @.CurrIcon := "drivingHome";
$ i+ `; Y2 f, h3 v) H8 r                                @.DrivingHome := true;" u# q" O+ y# |, d4 h
                        end;
. A9 c# E" D3 h) p& l0 [3 ]7 t- l                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  L* j& X1 F7 O" N) N                        part := @.transpOrder;
- n: G4 ~, }4 w                        part.move(@);-- load part
; \" m  U% N  s+ [7 t/ w                        @.CurrIcon := "load";7 a4 H" ^, b, d/ a& r- @( g7 G
                        GlobalDistObj := part.globDestination;
  {0 w" g0 N1 V% Q                        assignLObj := rgmanager.rgAssignL;
: b9 Y$ U5 p( u: h: v/ j+ ?                        row := assignLObj.getRowNo(GlobalDistObj);
0 t1 q% A4 Y6 n6 _                        if Row = -1 then -- since 70
0 }% c9 l) O2 u                                if lan=1 then
% g6 Y, \  h' X8 X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: Z& f/ N/ u  L
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 r1 Y" ]0 l" I! K' a                                else
: q% l$ ]/ E5 Q( v9 T                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 u4 ?* U/ H/ g                                                to_str("in docking station: \"",?.~.name,"\""));                                " I+ v+ e8 g6 e
                                end;
; K+ I3 @, y9 e2 L0 ]; R                        else
+ m7 X  j5 `* ~& [/ t* k                                @.Destination := assignLObj[1,row];8 k+ S6 i$ w! v, F) z$ a0 c
                        end;                        ; a2 F9 P( c4 |9 y
                        newDirection(@);$ F& F- X6 Y+ q6 _. N( V" g
                        @.HasOrder := true;
) T* r* w2 b/ i' U5 |# }                end;1 p# w" }5 l7 O# O: z( ^; V
        end;8 X! R' G0 c3 Q: Z) J2 E- y
end;        -- of the method
0 l5 i1 ?9 e. G+ N( K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  A) n! b2 Y9 q% }: p* \8 U; ^" T! q& A. c# V. c
这是AGV_putin中arrive的method。) U  |  m" ^# W1 k! a- r

6 D0 ^; ~. u+ U( _  B# c当到达物料速度越高时,这个报警更多,
3 A+ H, {1 q) x$ e5 X可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 q  T+ J6 q) \. _$ [2 y8 R程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" d4 M3 j4 x- X7 W
7 E. t. c" G* p
另外一个小建议,就是move,所有的move都可以这样
9 G7 E  M! j  i$ T9 L9 B! l* L4 Kif not move() then debug end
" F' ?2 ^* f/ D- Y( }这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 s7 @/ t) R% p( v, qplant simulation中的free libraries有AGV模板,
0 x  c+ D6 _' w# r+ |' s) Y里面也有案例。+ U+ C) m$ e# W, U
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 x) }$ J- W6 q. R( m/ O7 ?5 Y! P! O1 @- O8 B" N2 z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
+ ?) L' L  p# n! a
; U5 f3 F7 F0 c/ {! x. c% T那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
# Z! P4 N3 G8 a# p: w3 j( q这是AGV_putin中arrive的method。8 D$ L; b- _4 z: z3 z- T
. x5 x* L( L/ y0 s6 `2 a2 L9 K
当到达物料速度越高时,这个报警更多,

5 A5 Z& z* C2 S5 a+ q; e& d另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-7 18:20 , Processed in 0.017985 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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