设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5545|回复: 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'
9 I, H2 w' O! I: t$ i3 ^9 w- l*/. O- s8 G- y: ~" ^8 |
is
9 n; c5 i3 A- r# J" R, `        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 A  t  h/ \4 V5 n: Udo
) F3 q4 O2 O! w! d        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 h3 r  R, S: U4 P        if current = @.Destination -- else return
& e( z' z1 v! y        then" P, j  H" w/ r/ p4 W2 K
                @.Destination := void;* y! ?: Q$ j* M2 |. R& z. E
                if @.occupied then
- R: r- J& K' H/ [, J4 C                        part := @.cont;
% Y3 G6 b9 W6 V2 H# P  d. s                        @.transpOrder := void;
! s' j# h- \8 m1 C0 M% i( X                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 X" _9 ?, v+ z3 E: i                                @,root.eventcontroller.simTime);2 w2 U8 }! t, a
                        @.HasOrder := false;1 x5 S, h+ _& q1 n
                        @.DrivingHome := true;
# ?8 K1 r% h- u. t8 v                        rgManager.tryToStartTransOrder;( |& y5 m" x6 r. v! |
                        if @.Destination = void
/ _: T; _' K4 P8 e- A" }                        then -- no transport order for vehicle @
1 O6 p4 G  G- t/ Y4 U1 ?                                @.Destination :=4 M& g3 g0 `  o- c7 q+ Q# u0 G
                                rgManager.nearestFreeStation(@,track.~);6 s0 }, |5 h9 D- F3 [2 q! b
                                newDirection(@);   + {' r3 L9 D3 q& y7 h! m% L
                                if @.Destination /= void then# u3 s7 f1 H6 P, z
                                        @.Destination.NumReservation :=7 `7 O% N" |1 I& }- R2 Q2 ~
                                        @.Destination.NumReservation + 1;
4 w/ U3 Q' C$ }/ @$ F                                end;4 a& [5 {7 n. }9 P8 x' \
                                @.CurrIcon := "drivingHome";
+ c  f% {# S- E                                @.DrivingHome := true;( U% i# v1 s) K$ V' b* Y
                        end;
# B! [5 ~, F& ?0 D/ e                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 ^; x* |6 G. W- a* O$ N: T                        part := @.transpOrder;+ ?( W/ B) I, {) A0 i, h
                        part.move(@);-- load part
' f; y" N3 q+ K! k7 w                        @.CurrIcon := "load";! _! h2 K. p! a' k
                        GlobalDistObj := part.globDestination;! u+ N5 A" d0 A5 X+ f, r* A3 ]
                        assignLObj := rgmanager.rgAssignL;
! w# p& V5 M2 \$ R% l, C+ T7 ]                        row := assignLObj.getRowNo(GlobalDistObj);
3 F5 y/ P: B# [0 X                        if Row = -1 then -- since 70  z. p( b+ ]- \( g
                                if lan=1 then8 V0 ~5 _2 f0 y# Z
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 O! A( a( {# N5 r' F3 J$ ?$ ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: P& f0 z$ ^$ o, O( R5 W- z                                else
, T! c( d6 B+ T& R/ w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 _+ q+ m; n" S  v- O% j3 X+ ~! R6 p                                                to_str("in docking station: \"",?.~.name,"\""));                                * [& @/ T4 Y, e' G$ Z4 F) w5 d
                                end;
& ^; v! M, N: R" G% n. G+ K                        else8 T& t0 [% p- Z- h6 M4 E
                                @.Destination := assignLObj[1,row];
0 _% L3 u4 |: a: p( @7 _% q" J2 Q# P                        end;                       
" u- `$ U& ?' w( G; l* C                        newDirection(@);9 |% ?* y1 G3 j! a! [
                        @.HasOrder := true;
3 b! o! d4 B$ u7 ^                end;
+ z- n/ s' q8 l/ |; I( C        end;
  g! b& m4 n4 K, B: A: V% lend;        -- of the method
: V, L5 U( j/ `4 L
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" h$ \1 n, |+ q' G/ @4 k7 X5 R& e, h4 R. w4 q7 t+ y
这是AGV_putin中arrive的method。8 l1 ]- c9 `* m2 C) C  ^) L+ J2 J. h6 _
/ o" C- I. q2 ?" E5 r
当到达物料速度越高时,这个报警更多,
6 j7 D- j& b2 k# j2 R! I6 L可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
6 n7 b1 ?  i8 W1 f程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& h  e0 G$ Y8 P& t- N
' m" s( V  }% w2 Z" T' T7 t4 v
另外一个小建议,就是move,所有的move都可以这样
3 j2 `; M- ?' qif not move() then debug end! ^7 k$ `( h; L. f! a/ s
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' [( f) ]! u4 C
plant simulation中的free libraries有AGV模板,
% K2 d+ ~4 e. I, h8 M里面也有案例。
: x! U. m" T" ~% N/ [9 W. S) ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# a$ K; g; t0 C5 p3 `
! Z# r& d' X# G' x3 ~我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& l* w9 ]9 ?; C- ]: s# H
' a3 s: d$ j, p* R5 g/ R" i那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % e! {' i/ i% v8 ]% w+ K! |- `
这是AGV_putin中arrive的method。8 @4 i0 b$ N1 D( d) C. k1 L
7 }# c0 R  b, B7 T! N) H
当到达物料速度越高时,这个报警更多,

$ L  e" T$ J0 S8 G$ m4 G5 u6 @+ ^9 J另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-3 20:33 , Processed in 0.025092 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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