设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5997|回复: 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'% S9 |2 I7 D/ z: c
*/
" T, U& F, p7 d6 M. w/ K. P6 \is; `" `3 H/ `; V4 |/ Y. _4 L  _
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* f0 [( G+ i9 H4 u& |" ]1 J3 wdo3 r+ a* }/ i" x. h9 X: z
        Lan := rootfolder.Internal.Tools.AOLlanguage;
) }  a& j% f+ v$ Y0 Z" Y  V1 K  M* t        if current = @.Destination -- else return( u& Q' @3 ~& B
        then
7 u; a. U% U7 k                @.Destination := void;
8 d8 a) p5 U' z* d8 N                if @.occupied then
# U) G8 \# r5 V. N# F                        part := @.cont;
5 r' L& g: o# d' a* L1 G* C                        @.transpOrder := void;
; ^& N5 e  R4 R2 {& F                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ ]8 ]+ n# v* e8 S1 J5 d                                @,root.eventcontroller.simTime);  Q# W+ e! k$ J2 k2 W9 H
                        @.HasOrder := false;( W3 p3 {9 y6 n! w4 a- Z8 I
                        @.DrivingHome := true;, \5 L4 P3 ]+ P
                        rgManager.tryToStartTransOrder;
4 Y& {! h# n5 z! l                        if @.Destination = void8 d) u  Z# ?2 X9 k' s3 M
                        then -- no transport order for vehicle @
" l7 B& D: o0 {9 k                                @.Destination :=0 V# [% n% D# p6 K5 J
                                rgManager.nearestFreeStation(@,track.~);
) x8 M. v# r) C, b6 f& \                                newDirection(@);   
2 C1 Z5 B  T* {2 u. y                                if @.Destination /= void then% [: u5 G% G/ c, w* F
                                        @.Destination.NumReservation :=2 o% e% G$ R7 @; B
                                        @.Destination.NumReservation + 1;
8 ~- V' _9 p% H/ H4 A4 }                                end;6 T0 ^1 t& |8 Z; t5 R# E8 I% [0 P9 r
                                @.CurrIcon := "drivingHome";
; I% D/ s; z- w6 N2 Q8 ~                                @.DrivingHome := true;
$ p! M: F+ R, z& r0 j4 O! ]                        end;- @; ~% r- a" o# z: `
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: q  Y5 Z% @* l  O1 j                        part := @.transpOrder;
% Q; n5 F1 b0 |! l0 {                        part.move(@);-- load part& Q  V0 I7 q. V! _1 V! `
                        @.CurrIcon := "load";
# g, V5 S" d  _% S5 K0 T. N( ^                        GlobalDistObj := part.globDestination;6 F; g7 R$ U) C$ Y7 r# g: p
                        assignLObj := rgmanager.rgAssignL;
+ T- @2 `, }7 ]% Y                        row := assignLObj.getRowNo(GlobalDistObj);) t- Z4 w4 Y; ~! |3 F) {
                        if Row = -1 then -- since 70
6 U+ t3 d3 q& Y( E" l% z. U                                if lan=1 then  J9 P3 R7 `8 a5 i
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 b, J1 Y$ R9 l7 t" R' u                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 {6 `- e" T: \! k2 T                                else
5 W9 w- c; s) }! u% v5 ?# D                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ I) y1 \5 }; U! U9 _; e2 Q                                                to_str("in docking station: \"",?.~.name,"\""));                               
, |6 E  w( e# N                                end;
" ]. I0 j  q% s2 w! X& s! b- p                        else
9 y+ I1 W- C$ w  O6 @4 W                                @.Destination := assignLObj[1,row];3 m% P+ ^1 l' D9 P& O* E+ r
                        end;                        7 v: C- c$ P1 _/ G5 N8 C6 u! @
                        newDirection(@);
0 j: X/ d4 ?% u( p( K4 |                        @.HasOrder := true;
) L0 E  Z" e/ v* H                end;
5 q! N4 I0 [9 W& M, `. L( e/ m  S        end;, q( H$ W" v0 [" ^
end;        -- of the method
+ S! Z$ C+ K: ]6 @& R, M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% d+ G% n, [  f: b+ B% e. ?# @% R2 Z: A
这是AGV_putin中arrive的method。& o% r9 h3 _% `' A# u
  w0 k0 a3 o, r8 s# y% `9 b. d( K
当到达物料速度越高时,这个报警更多,7 N5 n1 d- L! x/ f  ]$ l0 E
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- ^, p( n3 B" @! J
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# ?2 F. D% J2 h  s' C$ [; e5 l
9 e9 \( w7 X3 @0 e% p1 q! C
另外一个小建议,就是move,所有的move都可以这样
+ o! B9 V+ `* B* W9 t8 j7 \if not move() then debug end
0 F5 N; S' o  X这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  S) V) U! N6 V4 R: f
plant simulation中的free libraries有AGV模板,
6 |" D! X+ K3 h7 |里面也有案例。
+ D8 P  f) X$ Y* Q) t我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
3 q0 c9 F/ u( b! P, r
% E+ |, A  \7 w! d. R9 k% s* U' Y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 S) u. }% G+ [: Y& N9 {
$ l* l" S7 L7 C- x) H3 s
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 S, s$ ~5 d5 d" s2 f) q$ Z这是AGV_putin中arrive的method。& `& i/ d" p0 }- @
; I  |# b  M+ i4 f4 Q2 j7 ^
当到达物料速度越高时,这个报警更多,
9 A+ }& I- T" _7 s0 y' N
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-12 03:27 , Processed in 0.032012 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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