设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8439|回复: 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'$ m! p; Q0 L" N! J2 S4 R/ ^: U7 e
*/
" T' w2 s# E, O& w- d4 j' o% t% u6 |2 wis7 B& T- E+ ^6 N" `: x; F/ g
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 E  f0 ^: C. ?& n9 w8 K+ F
do
9 c# I: @+ N, D. R% G        Lan := rootfolder.Internal.Tools.AOLlanguage;
( V( {! h. C  j' a9 f) y: \        if current = @.Destination -- else return+ t/ J0 R1 c% u' |1 c* O+ G$ A9 t! o
        then" Q' J$ X3 c  N) y% I3 `
                @.Destination := void;/ I& v9 v* t  k8 l' p' T" n
                if @.occupied then7 n9 i% [# I& P/ v. [! W1 e* ]
                        part := @.cont;. ]- J' S2 }% K4 r) h3 o  w
                        @.transpOrder := void;9 Z" y2 X" b+ F, O/ U' T6 e
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 t. r( E& W9 y9 V6 P                                @,root.eventcontroller.simTime);  `4 Q* h- e- H, M2 u
                        @.HasOrder := false;% N; _2 n) x, n3 m
                        @.DrivingHome := true;# g% n' X# y- g2 m2 w' C4 E
                        rgManager.tryToStartTransOrder;
6 I8 w3 Q5 _' ]                        if @.Destination = void/ h0 ]* E' C9 O* H: L. T
                        then -- no transport order for vehicle @
7 [' {# S; L5 v8 h9 l4 H" A                                @.Destination :=/ B8 J9 w" B: n: u
                                rgManager.nearestFreeStation(@,track.~);- {/ B) a3 m9 h+ \) O* N. C
                                newDirection(@);   
7 y1 C7 d5 g: n) x$ r                                if @.Destination /= void then* }2 p" ^# B; w
                                        @.Destination.NumReservation :=
6 o- ?( E3 M/ Y) v5 r7 B                                        @.Destination.NumReservation + 1;# K, o" \& J. K) {
                                end;
' {9 D" k0 \) X0 z4 X) U                                @.CurrIcon := "drivingHome";
2 Z3 l& v  T9 y5 C) L  t                                @.DrivingHome := true;# r4 D. r& G: R% T! J
                        end;
1 f) ?3 L6 R  H& s                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! g1 _. A* j$ Q" U# [. r                        part := @.transpOrder;
1 ]* e, b+ P' c& }6 q% P* `  A  x' c0 x6 B* q                        part.move(@);-- load part5 U4 J, d# G: |+ x
                        @.CurrIcon := "load";
# K# B0 g# C. K9 q                        GlobalDistObj := part.globDestination;
8 G, b. L  D" R  [" }                        assignLObj := rgmanager.rgAssignL;* S9 E8 a3 ^' P
                        row := assignLObj.getRowNo(GlobalDistObj);
/ i, K5 J/ i! i9 L2 Q                        if Row = -1 then -- since 70
- p, b0 Y3 F' m: f: w  i$ u                                if lan=1 then
1 j9 O5 [+ B  m! f                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) Y$ W- [& f  u, w( F
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' B% _  I% }: Z; R7 w# `$ r& _/ z                                else& R4 y. e6 `9 @- W6 ]
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 f7 ~2 D" |. J, @. z) Q
                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 `2 b) W: ]) g$ S9 G                                end;+ {% [' \1 @+ L( Y: A. T0 ?
                        else, n! L# \: n9 C
                                @.Destination := assignLObj[1,row];
, I* O# W' |7 M5 v+ E* }& d7 N                        end;                       
7 S( F; a; R; o                        newDirection(@);  W8 s" g1 l6 x, P+ W
                        @.HasOrder := true;4 K  c* }% U) e; y1 t/ \
                end;
8 E; {0 P* d& D+ [. _# F        end;
) o$ {+ U5 _" b- \. q2 gend;        -- of the method; S' \0 e# }2 b# W3 ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! p# L4 y$ t  C  Q3 I0 A$ Z+ c7 s1 p$ M1 E: W
这是AGV_putin中arrive的method。
3 B% T" ?3 }* K- I5 I) M$ o- U
# ]$ _2 O$ J* \% Y; W* j当到达物料速度越高时,这个报警更多,7 h- h8 h5 ~! o8 `# M( d$ C% o9 R  c; c
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ v5 @* C; P8 j0 x) _3 R) ]程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  d& P/ a1 |# v. l3 o
! e* h3 g3 H, X; c1 V/ q. F. S
另外一个小建议,就是move,所有的move都可以这样
  s7 ?9 o4 D7 ^3 Eif not move() then debug end) a* r& u7 A4 G* O
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) Q7 ~! R9 {5 v8 k  b4 C3 m
plant simulation中的free libraries有AGV模板,
6 Z' L, H" |) j* f, l里面也有案例。8 n; K7 w& E4 _* V4 D2 W0 {
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( H) P/ }2 @  \9 _/ c/ F
0 R. k, d, C$ y' C) V我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% D# J1 y3 |4 T3 o# J
# S+ O! f. n6 H" _1 B4 f那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - M5 t2 N( Q9 ?* e) }$ ^
这是AGV_putin中arrive的method。
* g) u! j3 c6 G4 C* }0 ^; d* h' W# R7 S% `- T4 p
当到达物料速度越高时,这个报警更多,

; c  ]5 p4 Q+ W- b另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-4 01:46 , Processed in 0.015900 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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