设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7937|回复: 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'
7 J. F) G0 e1 l. n- r' A; n*/
+ g6 l. L- m2 I" cis
; \) b6 i# }' J+ Z. b9 ~  T; ~        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" G( w% P( l2 r$ ]" Vdo% V# S0 R7 C  A$ f6 I
        Lan := rootfolder.Internal.Tools.AOLlanguage;
' H( j1 u/ a( U0 s/ @        if current = @.Destination -- else return; d# k, @$ ]0 G0 }1 m" o6 t
        then6 z8 B$ q% p6 H, d
                @.Destination := void;
1 z% T, R$ z! {7 ?                if @.occupied then+ i5 n2 y- X- C# d
                        part := @.cont;. C& T  `2 x, H/ `; i9 [2 e. v' `
                        @.transpOrder := void;2 S3 a1 q. [" Z( S8 q( k
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 d" P) f/ Q- B% |/ P1 H; L9 t                                @,root.eventcontroller.simTime);, H5 t0 l' o# o* h) ?, R3 G( V
                        @.HasOrder := false;4 m+ c8 ^2 l" a" f/ T
                        @.DrivingHome := true;
. {0 T$ B/ }; z1 n                        rgManager.tryToStartTransOrder;
" J  A9 g! V6 b4 F                        if @.Destination = void) J0 h# c0 V' I) W+ s# V; H* E1 s
                        then -- no transport order for vehicle @
$ R) d# B; M, H/ ]& a& H                                @.Destination :=5 v! r6 ~6 E' z! z) ?, E: g
                                rgManager.nearestFreeStation(@,track.~);4 R' ?& e6 F" T, Q1 D2 T
                                newDirection(@);   # j  Z- |$ ^6 z0 t2 Y
                                if @.Destination /= void then4 Z/ R! h, U5 R+ R* Z) ^2 @: V2 G
                                        @.Destination.NumReservation :=* i) i/ f& E9 `: K, O
                                        @.Destination.NumReservation + 1;
, b2 Q" M; Q5 F+ n                                end;) v' e4 x, w* P+ y
                                @.CurrIcon := "drivingHome";
9 T4 ], [2 f$ b1 j& a3 n" o9 J8 n                                @.DrivingHome := true;+ H; A' [# B$ U
                        end;
5 g! v' E+ T  a( S$ y- H                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 x) }' J8 S, U' J7 X, B4 P& z                        part := @.transpOrder;- {& M) n" h" V4 Q
                        part.move(@);-- load part
* B, X; m* d9 H# P% [( g2 I                        @.CurrIcon := "load";
3 ^5 H- ]% z" z& G                        GlobalDistObj := part.globDestination;
5 L* ~4 z( `4 o& v1 r; R5 _4 \5 f! R                        assignLObj := rgmanager.rgAssignL;* f8 D5 [+ B1 N. ]* W7 N
                        row := assignLObj.getRowNo(GlobalDistObj);9 k) J7 R. W3 Z" i( {. ^* E
                        if Row = -1 then -- since 70% n* @3 f" J* _/ u  k! `; q
                                if lan=1 then
! ^0 d9 x  i( N& m1 b! r" [$ L                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' F; k8 ^! r% @5 O* b$ z; l9 r6 P9 `
                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ d+ C+ I/ ~# ^" ~9 z  `. _
                                else% Y& T, |  G+ E  |
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ H& @  @* g! b
                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 j' @0 V6 X1 W, S. x; t) U6 J" r& N                                end;
  e# ]) P' m; r0 W$ f                        else# W3 l. n! |3 M- G( e8 C. ?
                                @.Destination := assignLObj[1,row];9 b% l: q; y1 \6 m( R
                        end;                       
9 e* L8 D4 R9 M- R  v6 M. o                        newDirection(@);
, M0 D" U2 M+ k. a                        @.HasOrder := true;6 O+ Q, I1 y! g/ Q6 ^8 ~+ @
                end;
1 z' z3 ], y. s% I! t9 }        end;2 m# j6 Z: e; S
end;        -- of the method
/ d  x# @. `: F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 Y9 {# l# _* C7 R0 S
+ ?6 \( y! w4 o' [' w这是AGV_putin中arrive的method。
9 A0 k# h, _! b- T+ I* N3 g& s: B4 W
当到达物料速度越高时,这个报警更多,
" ~' ^6 q0 T; I) X可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) y" u2 ?8 z. i( V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  F. G5 X4 X( m
) o6 H$ m/ K5 U4 D4 _7 Y! K另外一个小建议,就是move,所有的move都可以这样
4 }9 _: l1 @; _2 [( r1 d+ j; y0 @: aif not move() then debug end
# A$ W! S& w+ W8 o' Y2 E7 D这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. P) Z* |" I2 d! U' n0 Mplant simulation中的free libraries有AGV模板,
( U* e/ @  c/ A& r4 D9 q" R8 a" ~' M# i9 g里面也有案例。- ?3 i  Q$ m1 J6 @: i
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  p( A7 ^' i# Z0 A) A

+ v: l8 g4 l8 Q# q4 Y2 k我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 A/ E/ f4 [8 j8 A" q/ v  z; M$ b" ?8 U% X
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 C2 C8 W% V& V. i3 m9 |( z这是AGV_putin中arrive的method。0 @7 S7 l7 P" c3 b! x
' }' P7 Q0 r1 p" [8 B0 x. f2 O) W
当到达物料速度越高时,这个报警更多,

7 U# _8 t$ s# m7 }另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-6 15:23 , Processed in 0.024580 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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