Это часть кода проекта в Anylogic, где мне нужно обрабатывать запросы и каждый раз, когда я пытаюсь это сделать - один и тот же 1 запрос необработан. [code]for (Request curRequest : request) { System.out.print(curRequest + " "); } //where we can find all requests Collections.sort(request, new Comparator() { @Override public int compare(Request r1, Request r2) { //System.out.println(r1.toString() +" "+ r2.toString()); return Double.compare(r2.pricePriority, r1.pricePriority); } }); /*for (Request curRequest : request) { System.out.print(curRequest + " "); }*/ //the same, but there is some problem with java.lang.IndexOutOfBoundsException, which not influance on all work of code Iterator iterator = request.iterator(); while (iterator.hasNext()) { Request currentRequest = iterator.next(); System.out.println(currentRequest); //where you can find only 8 items Clients currentClient = null; for (Clients client : clients) { if (client.name.equals(currentRequest.to)) { currentClient = client; break; } }
int distance = 1; List matchingBatches = new ArrayList(); for (BatchWithDestination batch : currentWarehouse.batchIn) { if (batch.codeOfProduct == currentRequest.codeOfProduct && (batch.remainedValidity-distance) >= currentRequest.requiredValidity) { matchingBatches.add(batch); } } String status = "не определён";
if (matchingBatches.isEmpty()) { status = "полностью не реализован"; fatalRequest.add(new Request(currentRequest.pricePriority, currentRequest.to, currentRequest.from, currentRequest.quantity, currentRequest.requiredValidity, currentRequest.codeOfProduct, currentRequest.data, status)); break;}
Collections.sort(matchingBatches, new Comparator() { @Override public int compare(BatchWithDestination b1, BatchWithDestination b2) { return Double.compare(b1.remainedValidity, b2.remainedValidity); } });
BatchWithDestination currentBatch = matchingBatches.get(0); if (currentClient == null) { System.out.println("Client not found: " + currentRequest.to); continue; }
if (currentWarehouse == null) { System.out.println("Warehouse not found: " + currentRequest.from); continue; }
if (currentBatch == null) { System.out.println("Batch not found in warehouse for the product: " + currentRequest.codeOfProduct); continue; } double realisedQuantity = currentRequest.quantity;
Workiva — это приложение для создания отчетов, которое можно экспортировать в PDF и XHTML.
Но XHTML включает в себя все данные стилей и изображений.
Данные изображения составляют целый единый XHTML. файл размером 30 МБ и больше. Это неоптимально для...
Когда я запускаю скрипт Python на локальном сервере через Airflow, столбец даты выглядит так, как должен быть в bigquery, но когда я запускаю этот скрипт в функциях Google Cloud (версии библиотек одинаковы), столбец даты отображается как время unix...
Я создаю свой проект iOS на Xcode15 и получил предупреждение:
Имя цветового ресурса «backgroundImage» преобразуется в уже существующий символ «background». Попробуйте переименовать ресурс. Мои ресурсы включают два цвета: «background» и...