| | |
| | | int maxX = 0; |
| | | for (T e : list) { |
| | | int maxLength = Math.max((int) e.getWidth(), (int) e.getHeight()); |
| | | if (bigStorageCageOutTaskList.size() >= outCarMaxSize || maxLength > remainWidth) { |
| | | if (serialNumber > outCarMaxSize || maxLength > remainWidth) { |
| | | remainWidth = carWidth; |
| | | trainNumber = trainNumber + 1; |
| | | serialNumber = 1; |
| | | maxX = 0; |
| | | continue; |
| | | } |
| | | remainWidth = remainWidth - maxLength - glassGap; |
| | | if (isTempering) { |
| | |
| | | e.getWidth() * 10, e.getHeight() * 10, trainNumber, serialNumber++, 1)); |
| | | maxX = Math.max(maxX, e.getXCoordinate()); |
| | | } else { |
| | | remainWidth = carWidth; |
| | | remainWidth = carWidth - maxLength - glassGap; |
| | | ; |
| | | trainNumber = trainNumber + 1; |
| | | serialNumber = 1; |
| | | maxX = 0; |
| | | continue; |
| | | maxX = e.getXCoordinate(); |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.ARTIFICIAL_OUT_TARGET_POSITION, |
| | | e.getWidth() * 10, e.getHeight(), trainNumber, serialNumber++, 1)); |
| | | } |
| | | } else { |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.ARTIFICIAL_OUT_TARGET_POSITION, |