设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7906|回复: 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'
7 c) _) m, j6 x% Y$ E$ j*/
1 V7 a' `* R! Gis  @  j+ b) f% \
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 d  g0 _8 ~2 M+ u
do, b& |' F/ [1 A: ~1 e" j
        Lan := rootfolder.Internal.Tools.AOLlanguage;
& o8 G3 C6 F9 v# [% [7 k; {( s# ~7 r        if current = @.Destination -- else return' W5 ?; j6 |: l% R$ g2 |- h
        then
8 r9 t4 L/ ^& d& \2 L( H                @.Destination := void;. k. m/ C- c! V4 m
                if @.occupied then
% m$ c2 N9 s. j                        part := @.cont;
/ s8 N& F2 R: G                        @.transpOrder := void;' L, F0 ]8 A# R4 d. ?7 L
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 H5 f4 w* `4 _8 d6 D% S                                @,root.eventcontroller.simTime);
0 C0 w0 |$ z3 C                        @.HasOrder := false;0 q2 v+ H( E! b; k; O4 f
                        @.DrivingHome := true;5 \1 F  n0 N1 A+ V
                        rgManager.tryToStartTransOrder;
0 s+ |, b, F# n) }+ X  o( [  L/ u                        if @.Destination = void) I  W* ?- h' e: [5 X
                        then -- no transport order for vehicle @
' c' B/ ]' J: E+ w7 {, W3 i                                @.Destination :=- z/ B5 X  W+ f/ R
                                rgManager.nearestFreeStation(@,track.~);% ~' m" A/ j) h0 R; P
                                newDirection(@);   ! I: q1 _+ ^% x- |
                                if @.Destination /= void then
* z% W6 |) R! ^% @$ R                                        @.Destination.NumReservation :=8 }7 {- j: G) y* Y  @8 l& W% ~
                                        @.Destination.NumReservation + 1;
6 i! l! W3 Q, E                                end;, l9 P3 b, z  Q$ k! q' p% \$ v2 d* P
                                @.CurrIcon := "drivingHome";3 ^1 N+ x) Y" r; O, d6 M! q
                                @.DrivingHome := true;. U' [# d+ D" `- ^" b
                        end;3 i) ^1 a" Y- ~
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* j& P/ o. j- B                        part := @.transpOrder;5 S* @+ w) ]2 d% y; F6 n
                        part.move(@);-- load part
# {7 X, k( _5 `1 q3 Y1 L                        @.CurrIcon := "load";* l0 i1 v5 N7 Q1 O( e
                        GlobalDistObj := part.globDestination;* O+ Y# I% k1 o0 c7 u1 y+ E- O
                        assignLObj := rgmanager.rgAssignL;
" g* |2 k8 c9 W: Q; g                        row := assignLObj.getRowNo(GlobalDistObj);. D  A5 W; F$ k. I  Y
                        if Row = -1 then -- since 70
# ^/ i9 M9 m6 y& i3 Z& Q                                if lan=1 then
, W3 |! Q7 M" [  K0 O0 r2 Y& J: O                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 h2 I7 D$ O# _5 T
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# @, F) W3 p5 J( h- h' m6 A                                else9 ~' @" S" B" J$ j7 s
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: D6 j) n. }* C                                                to_str("in docking station: \"",?.~.name,"\""));                               
: }4 n- m) z" U9 l4 B# _# s: w                                end;
0 ^* P" i, o' J2 O9 _- {- `# u                        else2 U! f. Y& s& {# @
                                @.Destination := assignLObj[1,row];
. q1 ^4 Z9 Q/ ?- [9 {( N9 }                        end;                        " E0 X; w0 w) v9 L: }' l3 j+ }9 O
                        newDirection(@);- L- |/ C4 ]5 O, r* S
                        @.HasOrder := true;
# V! \& b' a9 |' j* v2 b7 i0 H                end;
, }! ?6 w* ~1 l1 B) H/ k& ?% R        end;
  |9 S% w; F6 V# ?8 y- Xend;        -- of the method2 z7 d- C; g" [; D5 ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * C' _1 i* {% r- a" j! G; }$ h
, z9 p. ]/ i: A6 d! ^% Q4 o
这是AGV_putin中arrive的method。4 ], P& a. l; A

& l8 e% [3 o* ]2 t) s& |) e: [当到达物料速度越高时,这个报警更多,0 E0 E. o6 u1 q' C! Q
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
9 P( O& j+ [+ u; h' U8 r程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?! o' z/ S! a3 |  Q7 n
/ U  z2 [3 S7 u; E7 V' C
另外一个小建议,就是move,所有的move都可以这样
2 e: G( a$ H% s+ b+ i9 P2 q, Eif not move() then debug end( o3 L$ @8 D) K0 M# r% b, i8 q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( C' ]$ M* }& R  s; C4 @plant simulation中的free libraries有AGV模板,$ P/ I' Z  v: n5 n% G$ ?. ?
里面也有案例。
2 g. V( p8 {$ a, d我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  t9 W- x1 e7 Z* n2 S( v& k+ b0 p% U
1 s' n# m1 r4 d& V% q* U
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" G( L- ?! Y3 o) O) ^# F
9 I. T! Y* U2 m, \那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / P2 ~9 Y0 i3 [
这是AGV_putin中arrive的method。
) d' {! V# ]1 a: ]' o" f
: s9 O) ^; b. _$ z/ D6 H% K: w当到达物料速度越高时,这个报警更多,
8 P5 z5 _4 K+ s% H4 |
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-4 11:11 , Processed in 0.019208 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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