| | |
| | | import com.zy.acs.manager.manager.enums.*; |
| | | import com.zy.acs.manager.manager.service.*; |
| | | import com.zy.acs.manager.manager.service.impl.WebsocketServiceImpl; |
| | | import com.zy.acs.manager.manager.utils.ActionSorter; |
| | | import com.zy.acs.manager.system.service.ConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private AgvModelService agvModelService; |
| | | @Autowired |
| | | private LaneService laneService; |
| | | @Autowired |
| | | private ActionSorter actionSorter; |
| | | |
| | | |
| | | @SuppressWarnings("all") |
| | |
| | | } |
| | | |
| | | boolean first = true; |
| | | long startTime = System.currentTimeMillis(); |
| | | for (Segment segment : segmentList) { |
| | | |
| | | // 分段所属的Task |
| | |
| | | } |
| | | |
| | | } |
| | | System.out.println("save data: " + (System.currentTimeMillis() - startTime)); |
| | | |
| | | // finish |
| | | actionList.add(new Action( |
| | |
| | | now // 工作时间 |
| | | )); |
| | | |
| | | List<Action> newActionList = new ArrayList<>(actionList); |
| | | // List<Action> newActionList = new ArrayList<>(actionList); |
| | | |
| | | // List<Action> optimizeList = actionService.optimizeSort(actionList); |
| | | |
| | | // List<Action> newActionList = new ArrayList<>(optimizeList); |
| | | List<Action> optimizeList = actionSorter.optimizeSort(actionList); |
| | | List<Action> newActionList = new ArrayList<>(optimizeList); |
| | | |
| | | |
| | | String groupId = String.valueOf(snowflakeIdWorker.nextId()).substring(3); |
| | |
| | | } |
| | | } |
| | | |
| | | log.info(agvNo + "号Agv动作组装完成,指令数量:" + newActionList.size()); |
| | | log.info("{}号Agv动作组装完成,指令数量:{}", agvNo, newActionList.size()); |
| | | } catch (Exception e) { |
| | | log.error("mainService.generateAction", e); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |