设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6825|回复: 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', h4 |$ c) g3 F# O( C$ Q
*/" J+ ~+ K! w/ \2 y: i4 m# o
is8 V1 a# B+ y, s/ j
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 d+ o( F  o$ _
do: t5 h* ~* |  @1 y7 k
        Lan := rootfolder.Internal.Tools.AOLlanguage;8 E* {3 E8 }  s9 }6 |! R. y! G
        if current = @.Destination -- else return9 j1 N3 ]- c" H
        then0 @% R! }: x, C. _2 N+ x
                @.Destination := void;
7 N; D$ Y: M% h% O                if @.occupied then: }" a# L& I# k# Q
                        part := @.cont;9 c) |( K& p  J/ J2 w$ z& ?
                        @.transpOrder := void;
( H( |/ E& {% X7 w' O2 X                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. k% X% M# r9 s! h0 y: N8 }
                                @,root.eventcontroller.simTime);: p! r" A8 o3 q: u
                        @.HasOrder := false;4 O+ Q( }: S, H; J) o
                        @.DrivingHome := true;
& Y' Y5 [- d0 M$ Z$ }8 a& Y* h                        rgManager.tryToStartTransOrder;: |; R" X5 P3 u: d7 Y7 P7 s! f1 `
                        if @.Destination = void- \& p9 E# l* v4 @; m- U, o. C- d
                        then -- no transport order for vehicle @) ~  m& K5 E& c2 y/ S# k/ e3 V
                                @.Destination :=+ g, G( h/ v% v6 W3 s
                                rgManager.nearestFreeStation(@,track.~);3 I# b1 Z' l6 i' }; n, E4 ]$ n
                                newDirection(@);   
4 w4 ?- D/ l7 e2 \% z                                if @.Destination /= void then
6 y, V! G9 B; z7 N+ X                                        @.Destination.NumReservation :=
, [- O1 i" _  W5 W2 U                                        @.Destination.NumReservation + 1;0 g  y- V+ z6 q$ \; B
                                end;
+ X1 F5 k7 _6 ~, ~6 k" U- A$ w                                @.CurrIcon := "drivingHome";
  U9 u: F5 z+ N0 Y( g                                @.DrivingHome := true;! U5 q5 [) o# t3 o+ K
                        end;" D7 Y' {7 _# o( R
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 j. `5 i9 ?. D; B                        part := @.transpOrder;8 |! B2 r) Z0 M7 s
                        part.move(@);-- load part
% T' \* o+ r9 c8 t$ _  p* i                        @.CurrIcon := "load";6 ?1 k) b* \; V
                        GlobalDistObj := part.globDestination;
2 R, U  Q7 c  s8 d                        assignLObj := rgmanager.rgAssignL;% U) d; J( ~) Y  v) [! [
                        row := assignLObj.getRowNo(GlobalDistObj);
. V2 U/ M3 J2 A: U* U" P( h                        if Row = -1 then -- since 70
% R% ?$ i+ P3 f  x7 o9 r                                if lan=1 then6 D8 ~3 ~9 f7 _! C
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ x9 F# _/ ~' @1 e
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 L' T4 t& w( v  o                                else  C/ W% `8 H# m# H% G! ~4 Q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  g) U1 H4 B6 E4 U$ x
                                                to_str("in docking station: \"",?.~.name,"\""));                                & Z- |1 N! A2 Z3 }
                                end;
8 G4 B6 W: |3 K0 ~; s+ u0 b- [                        else! N3 V9 Y2 M6 W( ~9 B" u" }
                                @.Destination := assignLObj[1,row];% g6 d7 _* v3 V$ r9 X1 J
                        end;                       
7 L: J3 V- ^2 N( F                        newDirection(@);; W$ b. P  V2 Q# K
                        @.HasOrder := true;- q( Y6 j2 Q* w
                end;' }. J; {/ u% H4 F6 y. r
        end;
& [7 z; s4 l& r* hend;        -- of the method& A/ _! I3 d, `1 w0 e$ s; ]
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # K3 O+ V/ z: h( \5 y: b% ?
6 B. Y0 L" K" |! _. U, ]2 s/ ]" \
这是AGV_putin中arrive的method。' X# {7 H+ z& ^+ l% F; _
& Q9 p2 [6 y8 o3 g
当到达物料速度越高时,这个报警更多,8 Q- T! [$ y* g! p" P
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* Y$ U+ }% i" T* j
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ d+ l* c2 c0 i) q6 l

3 P1 @7 ?, P1 @8 M: k0 [6 N& A" j; ?另外一个小建议,就是move,所有的move都可以这样+ M. U5 ]' ^! }4 ]6 z. R
if not move() then debug end
# n* {0 f" R7 l1 n3 B* v这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# n% z& D' Z) V* K. y
plant simulation中的free libraries有AGV模板,
$ X/ z: J& A5 T8 L' @/ E3 |里面也有案例。
5 _$ u$ }9 E, q# H* X6 Q9 ^1 K我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 [( \) B! o. T# E; B! I/ b: J% `1 L' M3 W  m& ~+ ~" \# u( V: K
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 3 d& e% z2 B) j9 I; }% Q" F. ~( c
4 P' W) p  K1 }! U6 d6 |% y5 A
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) c" V+ M9 P( K: _. W0 U8 R: T
这是AGV_putin中arrive的method。4 b0 F  N6 S: p

% Y  ~5 K- P( Q* {# O  o1 q  U当到达物料速度越高时,这个报警更多,

# W0 a# g( ^/ i$ ?1 S另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-28 21:01 , Processed in 0.018284 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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