设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10229|回复: 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'& Z8 o! n% o  l8 P- Q
*/
* q3 i' S- f) n1 o# d/ z% wis3 H6 Q- T, f! |0 [$ u$ U$ `
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ w8 d$ c) L6 X2 }5 n0 Ndo* }$ i$ g3 \5 ^6 |1 D
        Lan := rootfolder.Internal.Tools.AOLlanguage;: M( ?* N* y6 N' m. \5 ^  s' d
        if current = @.Destination -- else return- D% C! o/ ]0 t+ x! f) J5 ?
        then' Z. R4 D8 ^, k3 m1 f* e
                @.Destination := void;
: c3 G+ y! q0 A                if @.occupied then
8 H, P2 _, `' J6 E                        part := @.cont;
. M0 i4 a; Q/ L* `; F                        @.transpOrder := void;
7 F9 o  ^7 W) N: b! s0 c                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 L( ~1 h  [( }% m! l5 M* w                                @,root.eventcontroller.simTime);5 ?) S' D9 N/ T/ p" z3 I$ \" R4 i. G8 C
                        @.HasOrder := false;3 k  ]+ {5 c% N
                        @.DrivingHome := true;. C/ ]# T: @/ v" V! i" m
                        rgManager.tryToStartTransOrder;5 f5 x% O2 }6 f
                        if @.Destination = void' ^0 a% u; y: u# a5 i; p" S
                        then -- no transport order for vehicle @
9 u$ h6 ^% ~, L1 P                                @.Destination :=
; g$ J# t3 \4 l; L, L3 i5 [                                rgManager.nearestFreeStation(@,track.~);
' M/ G+ g; {; H7 w                                newDirection(@);   ) N' R, B8 l( ~/ u+ F
                                if @.Destination /= void then
) L7 Z% S# R, D                                        @.Destination.NumReservation :=
5 u7 E' X4 t) ^2 I* D# D5 f1 U9 r                                        @.Destination.NumReservation + 1;. l$ s+ z# q. T( n
                                end;
( _1 y5 ?5 }# ?' y( C                                @.CurrIcon := "drivingHome";+ p: ?3 j/ e& `- E" \3 t
                                @.DrivingHome := true;* E  V5 z: ?4 A, e. N
                        end;
: c. t  K8 s. i7 m. [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* K8 o% p/ g2 Q# L- x6 V1 b
                        part := @.transpOrder;
# q* g. J0 A; s7 \9 w& d) H                        part.move(@);-- load part
/ B, E7 a& V6 f( d- P/ F                        @.CurrIcon := "load";
; J" Z5 v3 J( C. r- R+ N8 g                        GlobalDistObj := part.globDestination;" @% d' s0 A7 P( U2 H6 ?" h
                        assignLObj := rgmanager.rgAssignL;
. F+ Z& L" Y3 V/ m, ]$ K8 r" t$ z; M, q+ v8 w                        row := assignLObj.getRowNo(GlobalDistObj);
) m# n! L9 C" h, Z+ X# h) B                        if Row = -1 then -- since 70
+ H5 _. r+ O4 b- s. l4 e                                if lan=1 then
0 v9 L. f7 S8 u7 o' {                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; C8 @) x3 l$ _7 M) i- S
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* }8 V8 x: A* Q3 T9 [                                else( }' `4 W3 K4 v3 F7 E$ C
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* C7 H- }+ x1 M, e2 ?
                                                to_str("in docking station: \"",?.~.name,"\""));                               
" ^% K( _- m1 z( a4 ]1 E' |# L                                end;
6 g( s! f; g2 i6 t; Y3 K                        else* y1 ?1 T+ a, s" |6 S: _" o
                                @.Destination := assignLObj[1,row];! H) F; H3 {6 H
                        end;                        9 A% l# `( g, k% E" O( T# }
                        newDirection(@);
* ?% r: ^6 ~3 \9 j" m# n                        @.HasOrder := true;+ N, X! F- T5 l* Z" x3 Q
                end;
( |( V  p- B+ R/ s+ Z        end;
! Q: i6 W  P3 y' Q: @end;        -- of the method
* x, d1 c9 `7 t( M0 s) Y9 [
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! U$ [+ G) b; t; F1 m8 h

) p3 c- C! I" u2 Q这是AGV_putin中arrive的method。
: F- C' V0 ?0 i/ m8 D0 O! d) Q) J: G4 ~3 d2 j
当到达物料速度越高时,这个报警更多,8 Y* X$ ?2 j/ g, X2 X- g
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, Z. |8 k( Y2 p& z, c
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; I1 f' Z3 k' T% o' T. |
* t. n+ i! ?& \* C3 h
另外一个小建议,就是move,所有的move都可以这样
$ ?" `: B  C+ \' N% ?if not move() then debug end
/ B' a' w/ Q) E这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
" g* V% W" ?# V  l% ^+ yplant simulation中的free libraries有AGV模板,
- s2 P( L5 E' T7 H1 e里面也有案例。6 q8 Y. s' Z* T
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
! j# r; R2 @" t& y# t' w
4 U" ~. b+ q+ N# _. S. \4 e我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" N- \. G9 }# s4 g5 l& k2 R# d6 A! X# e' ~! N
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) ]; @! `1 {, h, M1 D& Q# H
这是AGV_putin中arrive的method。; i% y  A2 P5 X& ~6 t5 Z
9 [+ \3 `; j% g, C
当到达物料速度越高时,这个报警更多,
) ?: {3 S) ^6 s  J
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-21 10:28 , Processed in 0.017698 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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