设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5777|回复: 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') v% K1 M# {/ w$ \# V4 X
*/& C. k! {$ g6 e# `; `
is1 B( r  Z2 o7 t4 l: z( u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% q* b2 R8 R) s7 \& t/ a5 O. rdo
! p7 o6 H" Q* N7 {        Lan := rootfolder.Internal.Tools.AOLlanguage;
# e( l4 ?& B2 u5 w        if current = @.Destination -- else return
5 Y- ^3 ?7 F( N4 ]! w5 a        then  W* [) B# w# C& I% {
                @.Destination := void;4 w  @& x/ j! j* M$ l7 H
                if @.occupied then2 j* Z, u2 l% Z% e, z
                        part := @.cont;
. u# z0 i& i/ \$ w7 P) O  q                        @.transpOrder := void;
" y8 O3 M2 p- x3 m                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 e8 s) N7 i# v3 X' P
                                @,root.eventcontroller.simTime);0 e6 G. n/ Y# |  T# p# \
                        @.HasOrder := false;
) [* k9 D7 E. }& R* D. i" P                        @.DrivingHome := true;
, O; j, Y- x+ g5 {0 j8 e2 N5 {4 A                        rgManager.tryToStartTransOrder;
! `" P7 M6 U0 C) O9 h% o8 R                        if @.Destination = void
9 W8 G8 }$ D# r                        then -- no transport order for vehicle @
& F2 g  P- t$ K! C9 r                                @.Destination :=: w- h$ F! g, G3 P3 r! A* U/ k
                                rgManager.nearestFreeStation(@,track.~);" I$ ?. E" B& ?3 l1 x/ @" D- @0 W% ^
                                newDirection(@);   
+ ^+ P8 l  W9 ~7 }( B/ ]                                if @.Destination /= void then
$ R4 C1 j' X$ _5 E  S                                        @.Destination.NumReservation :=
: Q, u; n" v: i                                        @.Destination.NumReservation + 1;
% i& K3 @  I" R4 }                                end;0 S$ X3 o( o/ r4 y( U: Q
                                @.CurrIcon := "drivingHome";- `; I5 w: k. j9 i5 c/ E$ |% C1 ?
                                @.DrivingHome := true;( J. u! q4 t% P0 [
                        end;
' a% y( l0 H: ]; D6 M                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" D" f  u* v3 ~                        part := @.transpOrder;0 ?7 Y. c  G% H/ R7 l: H
                        part.move(@);-- load part; ^( Y+ `$ e- P8 J6 i7 S' {: @
                        @.CurrIcon := "load";
* G7 d, J6 i* m1 Z/ B7 S7 T                        GlobalDistObj := part.globDestination;
7 T( S0 x4 ~0 A+ H! ?# e                        assignLObj := rgmanager.rgAssignL;& {$ n3 H3 n; m  h& R, i( W
                        row := assignLObj.getRowNo(GlobalDistObj);! V$ \5 S- ~/ x
                        if Row = -1 then -- since 70
$ E8 I( C1 f9 f' B: b, O  J$ |5 r/ Q                                if lan=1 then
: C) C1 T" O! z5 S* u" K2 O                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& v6 E7 W) m7 l# A! I: m
                                                to_str("in der Andockstation: \"",?.~.name,"\""));: [* i' E$ d  C- R8 R% s3 \& ~
                                else
- \% l  X7 A" O- R                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% g- [; N, Y# c& C8 M$ l                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ C% h; U4 S  Y+ V8 N3 x                                end;# F4 p' M. H' }) l3 h) H5 b
                        else% z3 f" ?+ |5 O2 H
                                @.Destination := assignLObj[1,row];
8 w7 v. N3 p) i0 F+ ~                        end;                        " _; x5 S5 K" S5 \4 |( V( ?0 U7 M
                        newDirection(@);
' f4 w9 i( H; B8 T# i' r4 Q                        @.HasOrder := true;
; b2 b, O3 G% ?9 k& K                end;! q1 r' I* G4 g3 X
        end;
* T6 Z+ o( L7 v7 P0 ?, o+ k6 nend;        -- of the method
' D' D% B- s1 K7 A, s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% v/ v- Q( l' X; A% M1 _& \$ ^. L
! p; L+ w  g5 G5 s6 c  R+ s这是AGV_putin中arrive的method。9 k4 f$ ]8 \9 y6 t; I" [
% j' D* i* Z+ E* ^2 |
当到达物料速度越高时,这个报警更多,0 }1 z* L2 o' u3 o; s
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 g7 ~9 Z9 c* [8 k9 \/ I
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 {$ k) B0 s" {
! M  U8 b$ W6 ~9 k5 S- J另外一个小建议,就是move,所有的move都可以这样8 i) F, m2 v( ~0 a1 \
if not move() then debug end; V* g. h) j( s# Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
" e; |' |  a% c& L5 I# x) ]plant simulation中的free libraries有AGV模板,
- ~- k$ |5 r& f里面也有案例。1 q. F: j0 ]- `5 J
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  N' b. ^( i0 O/ h1 y8 V
1 E( y" e, c! }9 H" p我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) W/ P# \  A( k9 Y7 B0 x
" J0 ~' t- x$ v- k9 t6 j7 l那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
6 x1 E/ |/ n& @, {0 i1 A: o9 R  ^这是AGV_putin中arrive的method。
& p& J4 F0 G. _* E6 ~- H
$ _- Q; S5 f( h% }2 E2 W当到达物料速度越高时,这个报警更多,
4 U3 f$ V0 ]5 x4 J  H2 x6 d. r" E
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-19 22:02 , Processed in 0.020178 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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