设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9990|回复: 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'0 d; Z& n5 a! M7 L- Z& m
*/" A3 C( m+ ^* A8 _4 t, H( R! N- L& a" I
is
" y1 P* }  C, n: Y        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' C& v: \6 q. p3 n, E( S
do
9 R% F! J) D3 ?8 m$ i, d. g        Lan := rootfolder.Internal.Tools.AOLlanguage;" Y+ @0 G. c- T- m
        if current = @.Destination -- else return
+ l3 l+ ~: N8 Z0 v        then6 r' {9 }, C7 E: B5 }0 v  s
                @.Destination := void;# [4 _; ^& b/ Y' C6 d+ E0 _
                if @.occupied then
/ M3 j+ ^6 O+ N- A' X                        part := @.cont;+ }/ D2 d; d" r
                        @.transpOrder := void;8 B$ ]" w9 K; M9 M1 N. J+ ~
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& o) c( B9 J  K2 S3 ]- }                                @,root.eventcontroller.simTime);- u! M. F8 W6 ?! Q* ]0 R9 g& N0 |
                        @.HasOrder := false;8 O: b, x1 s6 f5 o; ?6 Y
                        @.DrivingHome := true;( o( m8 F1 w0 ]1 [2 p1 u- `% t
                        rgManager.tryToStartTransOrder;3 t8 i# r* Z# v' u. c+ N2 i9 _
                        if @.Destination = void- [5 D1 w; f2 R% k5 r2 a  q$ N
                        then -- no transport order for vehicle @
' z1 P8 r" N  _, ~1 A                                @.Destination :=
& i2 b& v: U- j1 ^5 W: a/ h( {                                rgManager.nearestFreeStation(@,track.~);
3 b4 F; K% u4 b% f) @                                newDirection(@);   + C, P* |/ ^4 N) M% \
                                if @.Destination /= void then
8 {/ Z/ H0 j% F/ _* E! V5 u& c6 g                                        @.Destination.NumReservation :=7 c9 G' |: V6 v4 m1 b* |5 k8 w
                                        @.Destination.NumReservation + 1;- ]1 ~$ G/ N( p  [: }2 U0 u
                                end;8 g1 |# c) Y3 R- Z& F' {# W
                                @.CurrIcon := "drivingHome";. q5 W% Q9 J2 D6 z# @" C
                                @.DrivingHome := true;
6 B4 C9 r3 K5 n5 b& G6 R                        end;' C1 V8 c0 s. \& X9 N& V8 N
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 o  z  W7 e- q; v* ~: j
                        part := @.transpOrder;
, ?+ g- y( |5 m, P3 e                        part.move(@);-- load part
  e! _4 ~+ B6 H! l( ~( O. [                        @.CurrIcon := "load";# B5 ?0 C+ l3 e+ @
                        GlobalDistObj := part.globDestination;/ H+ t- D6 a4 W, W6 n
                        assignLObj := rgmanager.rgAssignL;$ b; l9 M8 `! }- @3 c. K" \8 _
                        row := assignLObj.getRowNo(GlobalDistObj);
" V' e9 l/ r) G+ Y8 @+ O  p  N                        if Row = -1 then -- since 70
+ H$ Y) W. N' b                                if lan=1 then
! j0 n$ M; J( P+ ^- V$ ~" s                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- H7 }* Z' J, w9 [                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 f! }( }6 j* z7 d! h
                                else
5 w; B1 w" Y) G" j- N                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 G3 x* T( ]8 y/ Y                                                to_str("in docking station: \"",?.~.name,"\""));                                * H! v+ M, [+ z8 T
                                end;* l, \3 X! z( Y# F6 g! w4 j
                        else
! X9 Q2 l; |( }! N                                @.Destination := assignLObj[1,row];: C) E8 A; d5 Y6 R" Y3 W
                        end;                        2 D+ |4 f; Q6 m( C
                        newDirection(@);- G: ~/ w" w# b; ?* S! ]4 ~
                        @.HasOrder := true;
- B+ _/ z3 K2 a: Z0 y# d                end;+ g7 }0 d( s: x. o
        end;
  C8 r. T$ A; @9 N: jend;        -- of the method. K- k1 H3 L3 M& [; @+ G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 ]* ~9 a/ n3 a' \# V4 w+ Y! A% f9 y* [
1 B* U4 Y' n/ g) H5 K
这是AGV_putin中arrive的method。- U- S4 n4 p% \2 e; z
0 `% Q+ k% l$ F
当到达物料速度越高时,这个报警更多,- n& |1 c0 y9 X* U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 ^8 r( h- a& h3 v- S程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?* C9 D9 _$ C' }& g3 t  {# B  V

+ R5 P( e, C. `+ f5 S. ^另外一个小建议,就是move,所有的move都可以这样7 [+ W/ W" x+ A9 v; ?# y
if not move() then debug end4 I" D" v6 j* ^
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' U- ]% s2 L/ Q. W6 d5 gplant simulation中的free libraries有AGV模板,, Y$ U) u, S- Y
里面也有案例。& O- {; o0 B1 k
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, S* N" j+ a; Q( W) n! R! A& o; l/ E; Q# x  W# S( u" R) D0 H
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; t+ j& N- v* C
1 r  e) L1 G& Q5 s' |那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) L$ ^- f+ {. d$ q1 s这是AGV_putin中arrive的method。
4 C7 m, U3 U- Z% Z( g5 l% l  c. s9 f' x# g
当到达物料速度越高时,这个报警更多,
& N0 y+ k. D* X1 x* e: ]
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-6 05:11 , Processed in 0.023772 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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