设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9430|回复: 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 W9 U/ E$ ^6 P- @# \. |*/" B) G" \- n: _" t
is: r* B$ B) o- X9 n, m& b, Y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 x" V8 L, t5 c  _, m  Q, I" e
do
2 n/ U: s: o& j- i        Lan := rootfolder.Internal.Tools.AOLlanguage;& R+ `( H5 e1 Q! `  I" T3 `
        if current = @.Destination -- else return. ^. h9 U* b8 e8 \* Q# ~# ~" p
        then- p- i" r* c' y) r
                @.Destination := void;
0 \9 e9 Y9 M9 [  \                if @.occupied then
( q" q0 `+ ~' o/ H" O' @9 s                        part := @.cont;
0 \5 u7 Y' B/ C2 `* A+ H                        @.transpOrder := void;
+ q9 J" }8 M3 D                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 s% B) c4 G8 m0 b. Y. h) E                                @,root.eventcontroller.simTime);6 P" g' V% v& o* [
                        @.HasOrder := false;) o, Q& k2 y; w8 H! a$ b2 N
                        @.DrivingHome := true;5 \0 J8 [3 \2 c1 [# c- a
                        rgManager.tryToStartTransOrder;+ h3 W0 D$ j# {6 x" s- f- \) r
                        if @.Destination = void
9 f5 H! K  g$ P+ V. o                        then -- no transport order for vehicle @
) _2 t* {$ O, d! `! f7 d, x                                @.Destination :=3 B" ?1 J' [5 K( I" U7 v- y4 y6 C
                                rgManager.nearestFreeStation(@,track.~);
5 b6 Z3 [2 b4 m% s                                newDirection(@);   
1 h, \9 W6 m& n2 @                                if @.Destination /= void then! w, _7 \0 U: G5 S3 c7 f/ \
                                        @.Destination.NumReservation :=7 Q- ~  H+ k  {* o; s
                                        @.Destination.NumReservation + 1;' g# w8 v  o/ B# G) r3 s, d/ i! ], q
                                end;" l  W) r5 C0 v9 Z; p) z# X7 A
                                @.CurrIcon := "drivingHome";
- D$ y) ]& z& ]. m/ m, j' M                                @.DrivingHome := true;. T% ~! |5 J# S; V
                        end;! U  a5 ]' j  G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) ?: F7 m' ^# m7 y9 l9 b, {8 P
                        part := @.transpOrder;
' y7 b3 O$ e# }                        part.move(@);-- load part6 r' @; X! J5 W1 t) @8 @
                        @.CurrIcon := "load";  }. h3 d5 a! J9 l! y: c
                        GlobalDistObj := part.globDestination;
6 H- N, w9 m3 U3 V                        assignLObj := rgmanager.rgAssignL;
1 K- B! w6 }. V$ I                        row := assignLObj.getRowNo(GlobalDistObj);; t) D; v0 X2 J0 V/ Q0 G# K
                        if Row = -1 then -- since 70
3 ?* _1 f" c! Y9 j# `/ L9 }$ W                                if lan=1 then- P' R( {4 L5 N
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; l) j  B# W: q$ J8 l& k8 `  A/ I                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: L7 H8 J3 r; u1 [6 s5 A6 `- @                                else2 e: K8 V* k7 p9 }1 ^+ O: p; ]
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) P; e. x. |+ I# W% u% ]& L8 j, [
                                                to_str("in docking station: \"",?.~.name,"\""));                               
# r1 ~4 G. O$ `/ _                                end;
1 [6 {$ @- O" y+ N5 I7 h                        else# `  {' s& ?! M4 z- k* K& ]" V) X
                                @.Destination := assignLObj[1,row];6 W2 @' t9 `1 q: g  j8 a  e
                        end;                       
& O( V% y, c+ l! i) P. F: h" q                        newDirection(@);! K- n2 |5 U9 h. G
                        @.HasOrder := true;; C3 z; L1 M1 q* [# g
                end;8 L8 w  ]1 \( l/ u% q" q
        end;' e" c7 j) I4 t
end;        -- of the method
/ ?9 t& r% U2 n4 I2 h! w/ N) [8 v; p. S2 }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; P  Z, ?1 H' A' Q* L
* R1 w5 F4 m2 x0 K% m* [这是AGV_putin中arrive的method。7 v, f  R; X. Q7 O+ @$ [0 w: ^

: x0 j. z$ G* r9 M9 Z8 B8 V4 F8 y当到达物料速度越高时,这个报警更多,7 x% z. \. ^" w- u3 K
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
3 S# m/ F' K- h/ f) ~' _程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% y( c# t2 v% v
8 t( k* v: _& r  z- Y+ W另外一个小建议,就是move,所有的move都可以这样
) a9 N! J. ]0 A- X) n5 X9 v. [if not move() then debug end+ n4 K8 T  G6 v, T) @+ ?3 G
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 F- t& L* [* L7 j
plant simulation中的free libraries有AGV模板,
6 @- E2 Z: {& K0 }" A) h4 A( C) [里面也有案例。/ V- C8 k6 }  F
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, Y3 C; i" \, f, |8 n$ y
& ?  B% H6 ~+ V# x5 T
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + j- X8 P6 q/ P/ a- k
5 F* i& N- @( G/ ^' O9 W
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 `( `, E1 {' v- b* L
这是AGV_putin中arrive的method。* m7 F. _3 U8 t- G# {0 g& V4 K

# N. U4 s9 y$ K; h当到达物料速度越高时,这个报警更多,

, v; o  G- b, n, C' w! p$ ~- j8 j. L* r: k另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-31 22:25 , Processed in 0.026476 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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