设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7072|回复: 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'& ~# w$ c$ r/ F6 P" d& y
*/
! l. I4 F; U" Z  `' ?. p/ v% Jis* M9 D: y) [/ a' c& N% c% [
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# E/ N: m+ f7 j
do; j. j; }/ Y) T, ^" l
        Lan := rootfolder.Internal.Tools.AOLlanguage;3 P% j# t% Q. k* |( Y3 X# ?
        if current = @.Destination -- else return
% Y0 K* d. }# A* G1 M# B5 f* ^# B        then
+ r4 g$ E% p* ~, U+ C                @.Destination := void;- X& I- U$ p9 y6 O2 |
                if @.occupied then
9 |/ _6 b4 m2 P                        part := @.cont;; J, m% D. [: h- v$ @6 R
                        @.transpOrder := void;- K( r( r" f$ i8 J$ k- ]
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* j: C" v# E/ \; E                                @,root.eventcontroller.simTime);
  Q* ^! t- U- ^% n: u6 a3 d                        @.HasOrder := false;+ s& t" g2 Z# K/ n, e' h
                        @.DrivingHome := true;: p9 B" O: I9 B# `% W$ Q
                        rgManager.tryToStartTransOrder;
& J3 q& [( t, y9 X9 ?1 q0 L                        if @.Destination = void7 k1 X+ V5 s$ p: ~8 b. x) N
                        then -- no transport order for vehicle @& F) ~/ Q) u# Q9 J+ \! H9 p8 P
                                @.Destination :=
6 }/ Q% D; i. {8 g                                rgManager.nearestFreeStation(@,track.~);: O- o/ j4 Z& B  h& ?* o$ A
                                newDirection(@);   
0 @1 a& S/ x1 q) m; K6 ~                                if @.Destination /= void then
- `  A$ Y4 Z% N1 q5 u% u' V                                        @.Destination.NumReservation :=
. `' S7 J/ g) M3 r5 B  D& y                                        @.Destination.NumReservation + 1;/ ~& _1 m* F' J* a2 i  E2 A' @- T
                                end;* r& {8 ?  z. N) I8 F+ }
                                @.CurrIcon := "drivingHome";* l0 \" @& E4 j2 O6 t
                                @.DrivingHome := true;
  L6 L; \. D' r+ V                        end;
1 W7 c( c' t$ W5 }                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 H9 h) [" f. f/ A2 l7 c0 o                        part := @.transpOrder;* J" U! ~& o3 o6 W5 |. I  F
                        part.move(@);-- load part
6 t3 C; P0 T; U7 r& w+ f- D2 \0 |                        @.CurrIcon := "load";0 D4 E2 b. s! v7 ^
                        GlobalDistObj := part.globDestination;4 I7 j( W  R5 y( M4 P
                        assignLObj := rgmanager.rgAssignL;) X& V+ S# r; k1 Z
                        row := assignLObj.getRowNo(GlobalDistObj);
% q" Y& B, C( u, k4 H4 Z                        if Row = -1 then -- since 70  G- J% i" B9 z) C( c- S+ {
                                if lan=1 then
9 |4 Q1 x7 S' g0 `                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 u9 I7 l, Q' Y! i% c' [                                                to_str("in der Andockstation: \"",?.~.name,"\""));: D8 E0 }  ?! @) z
                                else
! P2 U( {% I/ L! S& [, v+ ?& s7 x                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 c5 b* e7 I2 q5 h- _                                                to_str("in docking station: \"",?.~.name,"\""));                               
: W2 G* f! C6 n& i9 l                                end;
3 T  h" R# q, Y6 `                        else9 G8 l/ O/ `* `6 f! p) `7 A) |
                                @.Destination := assignLObj[1,row];( T7 {4 G' |5 ?% E% \
                        end;                        , D. @, U& P1 Q& E3 C; U* r
                        newDirection(@);
0 j# [5 E) T- c# i$ T5 {1 ^                        @.HasOrder := true;5 D+ t, z& Y6 v6 |  s& f
                end;/ E6 Q/ ]$ J4 c8 c! d! N' A
        end;
3 N/ \( h3 a4 _end;        -- of the method
4 x0 r; R! ?1 M3 p8 _$ a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
& V7 n4 B7 U. j$ g! d! D5 {* {3 ~& z" _! u1 u
这是AGV_putin中arrive的method。
7 {* N$ z4 }+ U3 B3 ^$ i$ @; V7 y  ~; U! g
当到达物料速度越高时,这个报警更多,
# U2 t+ |( i8 ]- ^0 A7 n5 `# l4 W" D可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; S2 V- ~7 K+ l+ @. U8 _程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' `! D- S# c4 F) R9 P
6 |) Y% m- S. i0 L另外一个小建议,就是move,所有的move都可以这样3 Z+ M  _; ^4 S: S' U' @
if not move() then debug end( c' w- h% T1 n+ D8 L7 ]; C
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 p+ |& s! ]9 o: z$ e! V. S, J" Qplant simulation中的free libraries有AGV模板,
7 e, D" [5 L. r7 ~里面也有案例。" [! G# K+ _% R0 c
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" k8 Q' T7 T2 x
/ K$ @1 |  w8 f1 ~8 |/ T( c
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) u+ j! |- V" w& e6 d
- g# y& F5 Y* K, ^/ z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * I* W7 Z: f0 m
这是AGV_putin中arrive的method。7 x1 K. a" {  y& {& B$ G

0 `. m0 ?4 ]' P' ~/ |, w当到达物料速度越高时,这个报警更多,
: A4 A3 n0 L+ a8 f( a! t
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-15 00:38 , Processed in 0.020436 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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