设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6576|回复: 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'
$ g( x1 O% M3 q8 R*/; Q7 J0 U4 Y' p6 m  b
is
: K! y; u, h3 M6 ]4 W+ y$ [        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* C* \+ ?: ~. h8 m) \do2 T1 \8 `6 l( }2 ]% \  k" t
        Lan := rootfolder.Internal.Tools.AOLlanguage;
' g" b5 ], ]& E. b3 U/ l" {  ^/ i        if current = @.Destination -- else return
) l) O) f/ }: ]: Z, s# a        then, j' W1 h1 f3 c' c
                @.Destination := void;2 E$ k" R* d. Q$ G8 V. t# K+ \8 n
                if @.occupied then1 |( W6 c& ?( I7 S
                        part := @.cont;
$ \4 C" \. b! t, m0 x                        @.transpOrder := void;$ p" j" Y; w  b, I* j, r
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( @6 ]/ ~& J% v                                @,root.eventcontroller.simTime);- N; m( L7 Z; u# f4 J" y
                        @.HasOrder := false;
" W1 n9 _* y/ q, O/ K                        @.DrivingHome := true;, g+ x  e3 V0 O; d- G
                        rgManager.tryToStartTransOrder;
/ s6 \1 c6 Q: C                        if @.Destination = void
5 U& t- Q5 ]% k; R0 k8 X% D& U. B                        then -- no transport order for vehicle @
$ [( N' q6 j+ x8 n                                @.Destination :=
* ?- M" c+ ~' I5 K: X                                rgManager.nearestFreeStation(@,track.~);
( r3 F' u; t2 Q1 q" m5 p7 L* `                                newDirection(@);   
7 ~9 z/ T/ q: ~2 u0 `                                if @.Destination /= void then
6 j6 D6 I* ]. C* E& }+ |) `2 S                                        @.Destination.NumReservation :=) x# I6 f, D; O  h& O
                                        @.Destination.NumReservation + 1;
9 |) g7 A, E' c" |! m# m) Q9 i                                end;. Q- r, Y8 T# H& f; W( w1 M+ r1 k
                                @.CurrIcon := "drivingHome";
' n9 I% }/ h1 D9 E& u4 e. Z4 ?& {                                @.DrivingHome := true;
+ @( i" h" k% X6 a9 G6 O  f2 E                        end;! ^- s$ w4 v; [7 P
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 k+ t" s: B& d
                        part := @.transpOrder;
( G3 [8 w) o% Z/ ~                        part.move(@);-- load part. j, O: s/ e0 T" j* \
                        @.CurrIcon := "load";
! ^: D: M- y: ?) L) \                        GlobalDistObj := part.globDestination;
. \( C. K. s; }8 u) K7 y                        assignLObj := rgmanager.rgAssignL;( h) T7 o  j- N; f+ \+ {
                        row := assignLObj.getRowNo(GlobalDistObj);
& T* \4 c# W3 }& G0 C                        if Row = -1 then -- since 70
$ a2 R  v, k& C                                if lan=1 then
; j6 R( p5 Z2 S) ]7 G0 S" p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 U8 w( w  _. t  D1 b  t: f                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( {9 m2 ^6 ]' _$ E# ~* x                                else
) e$ X1 }1 G- ?! u4 v( Z                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. {8 Y1 y: y, y( n) F& r+ @
                                                to_str("in docking station: \"",?.~.name,"\""));                                6 d# ]! s1 K  c/ p
                                end;  |. R. u- m: `+ j6 D
                        else: K& X0 X! U+ |+ z' |: a1 b
                                @.Destination := assignLObj[1,row];
2 V7 u( q- P: F0 G% f5 r5 L                        end;                        4 L6 F7 U+ l4 g' r* C" g* t
                        newDirection(@);- ]0 V/ v, x) b& z6 G1 b% W
                        @.HasOrder := true;
0 e; O! N& f7 L                end;
" ~+ f7 [) ~% z6 l        end;
: P# D  C$ W& B. r7 k+ [8 Cend;        -- of the method% C) [. d. v8 u9 u$ ^# Y* ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   Z: \* s( Z6 A& A

2 L5 O9 r& |( o& m7 r这是AGV_putin中arrive的method。
% `9 G4 g8 n3 V; y- `
: D; Y. v! j! y- Y当到达物料速度越高时,这个报警更多,7 H) [. _: p% p
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. v' t/ \6 B& C0 r$ t
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 L- v8 m. N' m* ?% f

4 ~& [# a0 G8 A4 C另外一个小建议,就是move,所有的move都可以这样
: k1 v- L4 l1 i% W- oif not move() then debug end
1 c' _3 C! z0 ~) ~9 r6 T# k这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, ^- [! a* v0 b6 E2 gplant simulation中的free libraries有AGV模板,  l! K9 s& x1 C7 |3 V5 d  g
里面也有案例。( {( l7 _3 X$ `( \4 H! W+ H8 d
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: ?7 i' _& @; n- x- ^  Q
  g# t: X; N5 X+ X1 \
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% h& V3 O: B  X% A: A! D
8 z, k3 `2 [/ m$ C* {那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
2 O( @5 G2 Z1 W这是AGV_putin中arrive的method。
5 S$ X4 J' z) g2 a" Y2 W$ o
& \; x: Z* J. B" @2 ?# W9 z当到达物料速度越高时,这个报警更多,

0 a1 u; z1 g$ a6 ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-13 21:20 , Processed in 0.022743 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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