设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6840|回复: 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'
( T: \1 w" Y; T2 \% k6 E# ]*/: z3 I: H* X  }
is
4 y$ R8 W8 d3 U3 E/ f" P8 l        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" R$ _- U% I* q" P4 Q% s
do
; T, U, _* J! W  N7 m0 W* t; A8 B        Lan := rootfolder.Internal.Tools.AOLlanguage;' E9 Q: {6 f" B5 m2 v0 j
        if current = @.Destination -- else return" z; ]- T8 P8 J9 C/ V: t! J
        then
) B1 H* ]# P  J% {8 q, V                @.Destination := void;
! N! z$ o1 n2 T6 u) ?1 g* ?1 _                if @.occupied then8 z1 m  T9 W9 b3 R0 e
                        part := @.cont;
+ w8 f' q5 K3 o/ q! t                        @.transpOrder := void;$ H5 S. x, a$ G/ i6 r: B4 ^1 X
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 C& k3 ~6 Q9 `/ h                                @,root.eventcontroller.simTime);/ F1 q2 |0 j% R: ]. T
                        @.HasOrder := false;$ I, ?* M; j, @; s9 H* x
                        @.DrivingHome := true;
5 E5 [8 ?( v1 y* K# ~                        rgManager.tryToStartTransOrder;
! v/ D5 u( G, P. i$ g                        if @.Destination = void+ F& z5 w) s0 e+ y; u
                        then -- no transport order for vehicle @) D" m$ [- J( t+ N6 E  I& N6 K
                                @.Destination :=
1 n, R2 j; S3 y' L                                rgManager.nearestFreeStation(@,track.~);, j" P- D# g4 t- @. F
                                newDirection(@);   1 P6 g# `( P/ t9 r7 z
                                if @.Destination /= void then
9 S! P- |, m' y" c                                        @.Destination.NumReservation :=, l6 B+ `% b# |, {* d+ q* A3 [
                                        @.Destination.NumReservation + 1;6 w  R; `) G8 t7 t6 n3 l1 s
                                end;' I# n8 \8 d+ g% i
                                @.CurrIcon := "drivingHome";
0 s/ |2 s  Z' J7 X4 \2 S8 I                                @.DrivingHome := true;
# h% A( v& E6 _# I4 w* ]4 d                        end;
$ q# [0 `4 r4 P! m                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 T. I# x! z  f9 \: t
                        part := @.transpOrder;" r; _# o6 u) j0 Q- {
                        part.move(@);-- load part
# ]9 O% j5 d, }! e. }                        @.CurrIcon := "load";
2 |) O: ]: A9 y' W* j& h2 v                        GlobalDistObj := part.globDestination;
: b5 r2 y- i2 ]                        assignLObj := rgmanager.rgAssignL;
0 m/ F; f) k) w1 X6 R                        row := assignLObj.getRowNo(GlobalDistObj);! ~$ {+ ~5 l# h% ]1 c2 S: P: i: ^
                        if Row = -1 then -- since 70! S) z; P, v, Z' _
                                if lan=1 then, G9 }* n6 _$ j5 {' E  [0 b
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ d: k+ G* A$ O& c
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# t) G0 }+ f+ A. d7 z                                else) Z7 Q& w+ ~/ g0 e1 Q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' \7 H8 }8 H) j1 v) n
                                                to_str("in docking station: \"",?.~.name,"\""));                                % H! l* \; I$ W; R) |- Z
                                end;
: N! D! P& J% A- p                        else
  Q3 p6 n5 r2 P, J# z. ^8 G; C$ P                                @.Destination := assignLObj[1,row];: C- L5 i, ^& r1 K
                        end;                       
: x! a( w- m6 a0 a; g                        newDirection(@);# j) i3 E2 w  z7 {, \
                        @.HasOrder := true;
& l; @" b3 B! s( h% L8 p                end;5 V" G* B) n4 |. J$ {5 E1 N2 @+ B9 T
        end;
$ F; b+ {3 H5 h% |9 b  L* Mend;        -- of the method7 x4 Z/ p3 o& _4 M# J' r. o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : p: f4 T6 N9 H8 c. W% b! l

  b) X4 m2 c8 _' k+ W1 P这是AGV_putin中arrive的method。
, X& y, M/ O/ ]; K6 [' ^9 `3 ^3 J
当到达物料速度越高时,这个报警更多,4 v8 P" K2 r: T2 S
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 B. o2 T5 r7 H& M# F6 C  O! X# ?
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ x0 {7 b, P  C2 m5 h6 l, s( h
) c3 E. g; b1 s
另外一个小建议,就是move,所有的move都可以这样
: Y! J$ m5 S  t' q1 bif not move() then debug end5 u" ]1 w# B$ H( |) K
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
! p. A" k3 u7 p( g+ pplant simulation中的free libraries有AGV模板,
; {; f; D6 p* B里面也有案例。0 Y+ F" x; f" N3 M
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
9 ^* e; T6 R' v5 C7 t
9 l( M. c% T, f8 p* `5 i  v我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; S! V8 z2 N- c: e1 O
( e% w9 H# g* H/ M那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . G4 v6 H0 v6 w, M" v  R/ O
这是AGV_putin中arrive的method。
9 {) ~; _/ `' k( y' p2 c# _& j
' Y/ N* S  Z( e$ n当到达物料速度越高时,这个报警更多,
7 I" v5 r% D4 U% p4 b$ T& w7 f3 O
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-1 20:53 , Processed in 0.024722 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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