设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7639|回复: 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'
) l1 a) `. v9 ~2 B*/* c0 m( h$ L" [* c4 ~
is, B# T  [8 C. l3 r' a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" o( `, j& O$ ~# y" C2 K7 `, [/ edo* r6 P4 b6 L1 C* j, I/ t( g
        Lan := rootfolder.Internal.Tools.AOLlanguage;
: n; H  K2 I, E8 g  {& ^* Y        if current = @.Destination -- else return9 A  n/ y3 s8 S: {, B) @
        then6 F" |" Y5 B# X" Q& h
                @.Destination := void;- t% P* T* b3 ~$ l/ Z; h5 V! d: f
                if @.occupied then
# z3 I! W2 n/ k8 I0 B                        part := @.cont;
6 Q( L3 r* ?' T                        @.transpOrder := void;
. v8 ]" W0 p, Y2 b                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% }9 N8 ~- h$ ?% j& ~
                                @,root.eventcontroller.simTime);
; S& h2 D( j  N& \                        @.HasOrder := false;
: \9 Z( A' ]5 X& {& @( [                        @.DrivingHome := true;
7 a: `8 E$ e0 L5 m                        rgManager.tryToStartTransOrder;/ _6 t: L5 Q- V& X1 U: {
                        if @.Destination = void# c- _5 A/ d- V9 A5 A
                        then -- no transport order for vehicle @
2 A. e' F' o: f/ b# V+ F! ?                                @.Destination :=
6 }% M3 h$ {4 n8 Z                                rgManager.nearestFreeStation(@,track.~);" e" v" j! p& k8 g+ t! |7 ~) m
                                newDirection(@);   
) h. R5 y7 `- C- V9 t/ j                                if @.Destination /= void then
. r: ^) {& @8 g  @                                        @.Destination.NumReservation :=
( F  D% Q- V9 \) R$ Y8 s, Q                                        @.Destination.NumReservation + 1;
8 P2 R- T* |! n! P. r  [# R                                end;
/ ^1 F7 }. C' b  U, k                                @.CurrIcon := "drivingHome";! U1 c" Y, w3 U- h7 ^8 B
                                @.DrivingHome := true;: H. p8 Q* h- Y1 ~3 @
                        end;% S! p9 s' P' |3 {2 h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. e2 u" v/ e+ G- N" ]/ Y. D
                        part := @.transpOrder;
2 X3 G& m' U+ G1 O9 ?                        part.move(@);-- load part
. G- H; D) h8 f+ ]                        @.CurrIcon := "load";- _/ D9 Z  u6 U3 o
                        GlobalDistObj := part.globDestination;
6 C% Y) C0 R4 S2 H. T  C                        assignLObj := rgmanager.rgAssignL;1 K) e: `, }2 e5 ]) @
                        row := assignLObj.getRowNo(GlobalDistObj);, Q' h% p& D- D: E! p
                        if Row = -1 then -- since 70
! ^8 T2 q- D( h, l                                if lan=1 then
+ r6 k' J6 x, K3 p1 _7 X4 T: }                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 S7 s8 R8 G) O2 C% ?+ O                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  S* t" n4 O" k* J3 r6 p0 Z2 |8 O                                else
% ^2 F, c9 D5 _                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ `* H* S, t0 s2 e, w                                                to_str("in docking station: \"",?.~.name,"\""));                               
, P8 O9 T8 D7 e3 F, H0 i  v# ?                                end;
& J, G/ F8 `, N, F' h                        else
1 q: Q$ d: E. D. B$ [                                @.Destination := assignLObj[1,row];/ l( |8 o% c9 g# ]1 f7 L
                        end;                        " O7 F* t1 b* I4 e
                        newDirection(@);  Y4 W5 {  J" m( |, E8 H" V
                        @.HasOrder := true;
3 `( m4 p4 O) H' Z                end;* j6 [% ~" R/ h
        end;
+ O( n, f- O( g8 M+ ?8 xend;        -- of the method
  |8 }# c$ y+ {3 m( e6 w# ]& A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 V% W! |' w7 ]& I; n3 X8 @7 d2 B) m  Z) s. ~
这是AGV_putin中arrive的method。
; x/ d2 ~2 U& E: O* w% g) L7 w/ w4 Q4 P
当到达物料速度越高时,这个报警更多,% Q7 d5 F# x( e/ f& M% f3 b
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! G$ X- C1 E6 q% R1 ~0 n
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- i: s* f5 T& ^6 B( }" k
1 t( t" ]5 z% j/ z. H; V另外一个小建议,就是move,所有的move都可以这样1 b7 h: @9 H$ N: U
if not move() then debug end
: x4 v& p* B; v8 d! u& V5 N这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% h8 z+ F) ]: C7 P2 ?+ u- M& Kplant simulation中的free libraries有AGV模板,  `. X% }9 c( z6 ^+ v( z. @6 L
里面也有案例。
5 p) e, B, l& h! z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 B" U( ^* D; s% p! U6 A' S8 g3 ]( ?8 D; b
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 ]8 m* {8 u) {8 Y4 \, n. T0 B9 c! F  S1 R) {6 G" }. `. E# i
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - A3 w& E6 J" j# p& p5 F
这是AGV_putin中arrive的method。  N2 d% C1 a, y' V' X' _1 k7 b! E% y$ m) m
- A3 h. V) o& Y# l0 \
当到达物料速度越高时,这个报警更多,
& I( L# U& Z: t6 F$ l/ [9 k) _
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-21 17:51 , Processed in 0.022639 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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