设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7860|回复: 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', T4 M9 d& i% v& W. I% k( i' X
*/
: ~, V; P7 o" {6 G  u, V- Mis! H+ U  W3 r2 O2 F, C% A" ~
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* ~% s# _) U1 j' Q( f4 m0 ldo. D6 \7 A  }0 C" ?/ p
        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 F7 y/ Z. w" b5 L) n        if current = @.Destination -- else return
1 A, b4 v5 ^' `( [  M3 b( i) K        then2 Z, k) F0 M4 {1 ?
                @.Destination := void;
* M7 f) R# S4 h/ B5 i7 z8 C                if @.occupied then3 {1 l( n8 c2 e$ F  `5 K& q3 ^0 j. L
                        part := @.cont;
, K1 J7 B) X4 e: M4 d' |0 L' m                        @.transpOrder := void;2 ~$ @* p# `; q$ ^, D* A' i' D
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- J0 T  o$ Y( f9 _" S- ]& |6 N2 T                                @,root.eventcontroller.simTime);
5 i0 H- G! M5 ]% G# ~9 F' \' p% |                        @.HasOrder := false;
! ^* Z' ^8 v( Q+ \; b" o- d( k. J/ {                        @.DrivingHome := true;
% N+ O! _8 g* Y  G" A                        rgManager.tryToStartTransOrder;3 ~* \, r* F. a+ E
                        if @.Destination = void% }5 Q5 `0 c6 g7 T
                        then -- no transport order for vehicle @
3 I4 t* A+ D- P9 Q" O' P                                @.Destination :=
8 J9 {/ Z/ v$ T  ]$ M                                rgManager.nearestFreeStation(@,track.~);
9 J/ T. r$ q% T/ D. q                                newDirection(@);   6 p3 [9 S; I2 t# N! T3 S
                                if @.Destination /= void then) i' ~2 {+ ~* o& j
                                        @.Destination.NumReservation :=  Q4 Q+ u5 u! Z( Z3 u  J0 Q- ^* X
                                        @.Destination.NumReservation + 1;
( U5 a1 e5 a1 D" H- e1 q7 f                                end;" y; o; U% m0 p! `0 y
                                @.CurrIcon := "drivingHome";
3 Z* y8 a5 J/ N- d; p                                @.DrivingHome := true;
6 i' d5 M, v3 |+ R& B' @                        end;
3 P' P) F: ^1 q& Y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station! H  Y) ^* _; s9 ~6 Y1 P
                        part := @.transpOrder;
9 w# R' _8 C5 u! D8 p( [5 h                        part.move(@);-- load part
) S. c% X) {* g9 P                        @.CurrIcon := "load";
" J% e, f( q* t8 W% L* I! U2 K" b                        GlobalDistObj := part.globDestination;2 \. x1 X& R! q0 J! x# a" s
                        assignLObj := rgmanager.rgAssignL;0 u7 G  O- H' E' ], a
                        row := assignLObj.getRowNo(GlobalDistObj);
$ S! G2 O8 }6 y9 N                        if Row = -1 then -- since 70
' g2 |5 n& M; n                                if lan=1 then* u9 \3 Z, j7 ]# P5 q9 J1 V9 r" N
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 u+ t1 x  h! Z. y  L- j9 ^
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 y* \4 e9 O: w' O3 |/ X                                else, U9 W) T, t4 [+ Y% x6 D
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: o6 F' M8 M* _
                                                to_str("in docking station: \"",?.~.name,"\""));                                $ B# N; J6 c5 u1 t5 c3 x8 |6 s
                                end;8 v8 c! z/ U3 _. Y2 E, D
                        else* p8 y8 L( e: l+ d
                                @.Destination := assignLObj[1,row];% |. K8 e9 {8 O4 ]9 e- t5 s. ^9 l4 ^
                        end;                       
# S$ [2 s4 t$ G/ z6 ^9 T. o/ t9 Y                        newDirection(@);( G( L) u, [6 ?! V4 H: ?
                        @.HasOrder := true;5 i% h* m: l6 Y' X
                end;" }; |/ x9 a$ ]1 X+ X0 y
        end;
% y0 u; O4 {  j" g% Gend;        -- of the method
3 }+ A! z7 P3 B2 w+ ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! y/ i5 T$ q) I( [4 l1 f
$ V% \" r1 D0 L0 y3 k& p% y. f
这是AGV_putin中arrive的method。
- {! h! _# s+ C5 V9 W7 y7 c5 S& t' G- y" A! [
当到达物料速度越高时,这个报警更多,7 S% Q; G6 {0 E2 G: T' I. \( w
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。7 w9 y1 a- R+ o% l  g; u
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 ?( i- }1 E2 J5 h3 `9 U) n

5 u3 U  p+ I$ a# x另外一个小建议,就是move,所有的move都可以这样4 a9 Y, @% o4 \* E' j, V' S: S
if not move() then debug end$ p' K2 L5 a4 W0 J$ C' ~4 T: D2 W
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  l8 N7 `% y1 g: ?) R, \' l
plant simulation中的free libraries有AGV模板,
. G( M( J4 m3 y7 M- ~里面也有案例。- l2 B7 p1 u* l% K' F
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 d5 Q* R, z, T& N/ Q6 Q  n
. @+ [# V1 k$ @, w& @
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * F- u9 C! k" l: i5 s5 V

+ z7 T* q$ Y* h- ]那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : R8 G1 [/ h3 Z' o$ U
这是AGV_putin中arrive的method。! [4 A* H, P; M! \. C
  D  _2 M2 O. i9 V
当到达物料速度越高时,这个报警更多,

# E9 y& `2 c4 H- }' f另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-2 08:18 , Processed in 0.020274 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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