设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8988|回复: 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'; @' r0 z5 m1 D3 p
*/
+ T( s3 }0 x8 vis1 f( d0 s% I1 @6 k& `0 V; u$ l
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* F. k) R( y5 l$ q% p/ U
do7 p0 }' E7 r7 P  ^0 \2 d4 D  ~4 A
        Lan := rootfolder.Internal.Tools.AOLlanguage;7 T6 ^4 l- V% M" F5 s
        if current = @.Destination -- else return
4 @& _( @. h+ U# ?7 X4 @        then
' G0 w2 b" V% P) d$ G- o1 q                @.Destination := void;
0 @2 _! M1 e- G" g4 L6 T. {. Q9 a                if @.occupied then
  q& X8 }, P0 d  ~0 `- X  M5 B                        part := @.cont;
1 c/ i  ^8 n( ?. y  F                        @.transpOrder := void;
3 n7 q, P5 c+ s                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 k- k7 |# Z+ W& k% X' ?9 h                                @,root.eventcontroller.simTime);% I* L0 E* \) F, ?
                        @.HasOrder := false;
+ I3 V7 ^! U3 ]                        @.DrivingHome := true;2 O# F+ T6 {4 t6 U/ [' l) d
                        rgManager.tryToStartTransOrder;+ k6 `+ `4 s# t5 D& \
                        if @.Destination = void
% s! Q" n- Y! F                        then -- no transport order for vehicle @
' B2 d% N. R4 t$ Q$ A. ]; e                                @.Destination :=
* J; \1 D4 C$ f1 |- k                                rgManager.nearestFreeStation(@,track.~);
$ [4 F/ q9 }' o                                newDirection(@);   
+ Z2 t6 ]7 K* B+ o) J" y+ s                                if @.Destination /= void then2 e+ [/ J+ o( Q3 B
                                        @.Destination.NumReservation :=: v7 y. |6 J( f. a! C, k% W8 Q
                                        @.Destination.NumReservation + 1;
6 W- N% e6 q/ b7 y6 `& M                                end;
1 P% @' i, R% c% t. y                                @.CurrIcon := "drivingHome";
! z% F/ h6 C& T  y0 [) R                                @.DrivingHome := true;
- E5 I; k0 |( ~6 A  a4 z# U; D1 ~                        end;
6 U0 k) k2 _7 p; I9 U2 `: d                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ R# X' S# Z/ U9 ~
                        part := @.transpOrder;
8 {+ _/ P( J5 J  W- U& I                        part.move(@);-- load part
+ ~; G" _6 n# l* X' v7 G                        @.CurrIcon := "load";
0 S7 R2 K! O) s9 g                        GlobalDistObj := part.globDestination;
! Z- r7 ^7 f) |0 S, @% S$ @                        assignLObj := rgmanager.rgAssignL;' G6 `: G, |: Z; s- Y
                        row := assignLObj.getRowNo(GlobalDistObj);' `5 p+ C' L+ Z, w* ]6 \+ x, ~, w
                        if Row = -1 then -- since 70
' e/ e% f/ m& e2 U                                if lan=1 then: s! i( w0 K) V' \5 B) W7 i
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: q6 x2 Y  d& Z9 \5 ?: r7 ?8 L" G
                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 {9 W& S! ]$ s) X9 v. S
                                else
0 o; L; N4 e3 J3 I+ ]                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 H/ H6 O( s) Z- G# f
                                                to_str("in docking station: \"",?.~.name,"\""));                                : H7 T$ `5 E& E- l
                                end;9 b! X# L3 ~6 ?4 T4 K) d
                        else
& G, d; l6 Y/ {! R                                @.Destination := assignLObj[1,row];  Q; L# V  y3 T; G' B
                        end;                        9 y" Y/ {* s" P$ X) ^$ A, R
                        newDirection(@);
  W# p, e2 E/ R4 ]/ s  e0 {                        @.HasOrder := true;/ [9 ~4 F. T4 L* i: [2 p: ^
                end;
; m% ]: F/ h9 u6 W        end;8 h3 {! T5 O& \) o# w" E
end;        -- of the method
: z( k2 ^* z, K, T/ D4 O; N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' I* z6 B( X6 o, ~
0 R1 m) v/ y1 R这是AGV_putin中arrive的method。1 U1 S& F$ S/ `, a/ R

' _/ W6 |4 G4 x- J+ u当到达物料速度越高时,这个报警更多,/ f/ q9 f) j1 f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
0 `+ V" G$ N; ?. x程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 F9 f: m0 v3 d, n2 l; ^$ a& F6 I& _" t4 H- b* P! T! G3 ~: k
另外一个小建议,就是move,所有的move都可以这样
/ {8 G" g- I; A7 [2 lif not move() then debug end
% X' i- |  c0 ^& m这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ _4 x+ m: y3 I0 i. W5 q- C6 S
plant simulation中的free libraries有AGV模板,
" E, d0 N4 l4 D1 t- J1 ?里面也有案例。  m+ L, h4 j7 P, v8 W- N$ F
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) e  N, H# M. b" f
6 u+ @5 q9 ^; Y9 z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 d, t2 A) \/ ^$ f

  @5 l* r$ g# F0 ~那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( H5 ~) a, n. X) @/ S
这是AGV_putin中arrive的method。* D& j' E  l# S& v; c) Z
) A' e# T* T! ^  }* V2 ^
当到达物料速度越高时,这个报警更多,
( w3 h2 I& e  a  V* @5 r
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-7 20:37 , Processed in 0.014384 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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