夜光精讲 Opentcs 三大算法(十三)调度算法

48 篇文章 63 订阅
39 篇文章 39 订阅

夜光序言:

 

 

达到重要目标有二个途径——势力与毅力,势力只是少数人所有,但坚韧不拔的毅力则多数人均可拥有。它沉默的力量随着时间发展而至无可抵抗。

 

 

 

 

 

 

 

 

 

正文:

 

中心系统控制约束条件


1.整个系统是协同交互的,但机器人各自相互独立,不需要依靠其他机器人去完成自己的任务,但他们可以共同去完成一个客户的大订单order。
2.仓库中AGV的数目限制:一般小于仓库点的个数,此系统要求不能多于允许停靠的站点数目(过道和特殊点不能停靠)。
3.控制中心存储所有资源占用情况,资源的状态有3类:可用,不可用和被预定。


 

调度决策控制实现流程


本文通过优化资源配置,将冲突拥堵发生区域缩减控制到Bund le区中,通过决策机制对该区域进行资源锁的控制调度:

(1)AGV向控制中心申请资源。


(2)控制中心维护一个申请同一资源的车辆的集合表(进行优先级顺序排列)。


(3)当Bundle区未存在车辆时,分配资源给优先级最高的小车,其他车辆排队等待。



(4)小车驶入Bundle区,扫描Bundle区内当前占用点,将该点状态修改为"已被占用’’,给资源上锁。


(5)小车驶离Bundle区,释放资源(释放锁)。

(6)跳转至流程(3),直至所有车辆均通行完毕。
 

/*
 * Copyright (c) The openTCS Authors.
 *
 * This program is free software and subject to the MIT license. (For details,
 * see the licensing information (LICENSE.txt) you should have received with
 * this copy of the software.)
 */
package org.opentcs.strategies.basic.routing.jgrapht;

import javax.annotation.Nonnull;
import javax.inject.Inject;
import org.jgrapht.Graph;
import org.jgrapht.alg.interfaces.AStarAdmissibleHeuristic;
import org.jgrapht.alg.interfaces.ShortestPathAlgorithm;
import org.jgrapht.alg.shortestpath.AStarShortestPath;
import org.jgrapht.alg.shortestpath.BidirectionalDijkstraShortestPath;
import org.jgrapht.alg.shortestpath.DijkstraShortestPath;
import org.opentcs.components.kernel.services.TCSObjectService;

/**
 *
 * @author  Genius夜光
 */
public class AstarPointRouterFactory extends AbstractPointRouterFactory {

    /**
     * Creates a new instance.
     *
     * @param objectService The object service providing model data.
     * @param mapper Maps the plant model to a graph.
     */
    @Inject
    public AstarPointRouterFactory(@Nonnull TCSObjectService objectService,
                                   @Nonnull ModelGraphMapper mapper) {
        super(objectService, mapper);
    }

    @Override
    protected ShortestPathAlgorithm<String, ModelEdge> createShortestPathAlgorithm(
            Graph<String, ModelEdge> graph) {

        return new DijkstraShortestPath<>(graph);
        // return new AStarShortestPath<>(graph);

    }

}

 

opentcs通信涉及使用TCP/IP协议进行通信。具体实现流程如下: 1. 主机(host)建立一个新的TCP/IP连接,呼叫TCS。 2. 主机发送一个简单的报文(XML telegram),描述需要被创建的订单。 3. 主机关闭自己的TCP/IP连接的output stream流,让TCS的kernel知道数据已经发送完毕。 4. TCS解析报文(来自主机的),创建指定格式的订单并激活订单。 5. TCS发送一个XML telegram,确认来自主机的电报XML被处理了。 6. TCS关闭TCP/IP连接。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [【opentcs】模拟真实车辆和opentcs通信的简单ui界面,opentcs与实物车辆对接步骤一](https://blog.csdn.net/qq_20826539/article/details/131933460)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [夜光精讲 Opentcs 通信系统](https://blog.csdn.net/weixin_41987706/article/details/90374918)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 19
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值