设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8157|回复: 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'
2 {, o3 N/ _- m- ~! K  t5 W  o*// J2 S. }5 c9 c% c4 v6 ^! v
is; t5 m8 r( L/ N) X6 V) x  ~
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 i- c# G: {) _+ O' i7 f1 X
do9 c' n7 ~- x6 Y
        Lan := rootfolder.Internal.Tools.AOLlanguage;$ ^& h7 b8 Q1 g2 B' S
        if current = @.Destination -- else return+ O7 }& e! k" P! ]6 W% R
        then
8 B6 B. @; t( Z                @.Destination := void;8 B* L5 @& I4 L. z# A0 A# A3 Q1 {6 Y
                if @.occupied then6 `- O2 J. ], A! N
                        part := @.cont;4 F. K" h) |% ~
                        @.transpOrder := void;
( _6 X' ?9 L; R                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 ?* a  y/ s7 j. u( g9 `3 {3 R                                @,root.eventcontroller.simTime);+ Z/ K( y9 ?5 R8 F
                        @.HasOrder := false;
, K. k; L4 v/ m" M& Y6 N/ k0 f                        @.DrivingHome := true;
- Z9 s0 U! o% p1 _                        rgManager.tryToStartTransOrder;& R" ^- |$ |2 W* r. I4 j7 T6 s
                        if @.Destination = void
$ U8 @) j9 f7 u% N/ j4 ?  [% j7 y                        then -- no transport order for vehicle @3 K3 ^/ @/ k! R+ }9 ]% u
                                @.Destination :=1 j+ m& k6 a' U8 F
                                rgManager.nearestFreeStation(@,track.~);! ?; k8 _% h- r0 [
                                newDirection(@);   - ^1 U9 J7 [& x5 v/ f1 t
                                if @.Destination /= void then5 q. [* S4 D4 {( |8 o9 V
                                        @.Destination.NumReservation :=. q+ L) F$ G4 e: X. [$ O6 b( j
                                        @.Destination.NumReservation + 1;! U5 G/ q% a+ H0 O! b/ d0 C% K
                                end;# `  E- ~+ N0 T( w. t7 W8 r% y0 R, b
                                @.CurrIcon := "drivingHome";. v; |" c& ~' r4 _  q. f
                                @.DrivingHome := true;- }0 x1 |& U, k' |  U# ?
                        end;
( h3 P9 M5 d/ s$ u# I9 N: a                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- @' j* f" f2 V                        part := @.transpOrder;
8 G: l/ t( f$ N" e. M                        part.move(@);-- load part
% x4 f/ d! ]9 e4 {3 c- w! H  F$ F                        @.CurrIcon := "load";
9 T/ U7 H( _* N& y* f) O5 f                        GlobalDistObj := part.globDestination;
& n1 G9 e2 @3 P/ K- r% |# n: o                        assignLObj := rgmanager.rgAssignL;8 v# i  \6 F/ \
                        row := assignLObj.getRowNo(GlobalDistObj);
9 |8 ]2 A! H& N3 D' E7 H                        if Row = -1 then -- since 70' Y: r6 `) R) [
                                if lan=1 then. j% C: i/ T4 L) j
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% ~- b. {3 l$ V8 O                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( \; X- [6 S: I7 Z5 E. A& Y                                else
5 q6 `7 j/ S! b  c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 u0 U$ M& n7 d                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 }8 y' O  P. n# S                                end;; t1 Z  N* k- T* ]
                        else5 ]! X; a9 K: r/ z" B
                                @.Destination := assignLObj[1,row];
: Z* n. z( Y- u* r2 m, g: \0 O7 L                        end;                        6 j3 O9 b! W4 C/ s' U
                        newDirection(@);
6 b: H& O) Y4 E+ A% V. Y# i                        @.HasOrder := true;+ e7 i" [! ?$ V( I# A/ b
                end;; a& W$ w3 d; @; d# }
        end;
! z$ D9 B5 @2 x2 E  a' J/ Gend;        -- of the method
$ p* M' e- [8 M$ V/ m2 {$ B' K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 X: f/ W3 L2 E7 k2 P: C. i$ @. L4 ^& T( g5 }: e( J: m
这是AGV_putin中arrive的method。, _  j9 \8 R5 S. c7 K% s) z* t
2 p  u3 Y& y3 v
当到达物料速度越高时,这个报警更多,
7 x7 r4 l) M  F6 p; L7 p7 C: y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) {9 l  R7 ?+ V2 Y1 ^2 g$ `/ Z  L) C$ W
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  U0 L. A* L2 o1 Q% ^9 |

- s3 y! ~; S0 `另外一个小建议,就是move,所有的move都可以这样
. ]' `+ U& B/ }( V7 M, iif not move() then debug end4 b3 B) }' y. j3 @! r1 D
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 I' H8 b$ n% s" q; w9 P3 Z
plant simulation中的free libraries有AGV模板,
" s9 J8 l3 q) a6 U* |+ ^里面也有案例。" g  I* s- m0 Q' V* J  I4 q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
' \+ f; H6 n8 J" n  k3 a
8 B$ S/ }% a3 R; v* M* l# G我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ h% T' K2 p% V2 t1 w* p4 z4 T$ `0 \. f8 \* p0 v. c
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 B* ^( {9 `) ^7 q- q! X
这是AGV_putin中arrive的method。
  v; {% o  e) \/ O! c5 l2 r: X3 O+ j- ^  U5 R4 @
当到达物料速度越高时,这个报警更多,
4 T& U+ Y0 E8 Q- ]; ^& G+ H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-17 23:33 , Processed in 0.017674 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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