TGTGInsightтелеграм анализLIVE / telegram public index
← Такты, стеки, два колеса

TGINSIGHT SIMILAR POSTS

Намери подобно съдържание

Изходен канал @clockstackwheels · Post #1084 · 9.04

В общем, была задача на оптимизацию плана работ: есть набор заказов, и в каждом N тасков. Таски могут зависеть друг от друга или нет, имеют длительность и тип. Ещё есть M работников, каждый из которых может выполнять таски только определённых типов, причём, у каждого своя скорость. Если все таски в заказе выполнены, фирма получает сколько-то денег. У заказа есть дедлайн, за просрочку штраф (за каждый день просрочки), который вычитается из цены заказа. И ещё фирма тратит деньги за каждый день своей работы независимо от того, как загружены её сотрудники (то есть просто платит зарплаты по сути). Ещё важен учёт праздников и выходных. Нужно заработать на определённом наборе заказов и работников как можно больше денег. Полный текст задачи и код программы проверки есть в репозитории. Эта задача является изменённым заказом, который мы с напарником решали в реальной жизни: оптимизация работы печатных станков для типографии. Правда, тогда и мы справились так себе, и заказчик в итоге сначала захотел всё вручную сам делать, а потом и вовсе похоронил проект при смене директора. !!! Не читайте дальше, если хотите сначала попробовать решить самостоятельно, потому что я сейчас опишу эффективные подходы и результаты. ________________________________________ Так вот. Мы с другим экспертом Андреем сразу сели и написали разные варианты, чтобы задать шкалу, по которой будем оценивать решения команд. За пару часов я собрал примитивный жадный алгоритм, который сортировал заказы по прибыльности и укладывал в сетку кое-как, это дало нам нижнюю оценку. Мой алгоритм заработал ~75 млн виртуальных рублей, мы решили для оценки поставить нижней границей 40 млн. То есть всё, что ещё ниже, оценивалось в ноль баллов за качество оптимизации. Затем Андрей закрылся дома на три дня и вышел на свет со сложным жадным алгоритмом, который очень хитро сортировал заказы и очень хитро укладывал их в сетку, попутно выбирая разные способы этой укладки в зависимости от конкретного заказа. Это позволило заработать ~275 млн рублей. Мы сделали верхней границей для оценки 280 млн. К сожалению, в итоге только две команды из десяти прошли нижнюю границу, заработав, соответственно, ~91 и ~105 млн. К верхней границе не приблизился никто. И у четырёх команд алгоритм вообще не смог уложить без нарушений задачи в сетку (то есть, например, произвольно менял длительности, накладывал задачи друг на друга, давал одному работнику две задачи в один момент и так далее). Важной ошибкой команд, на мой взгляд, являлся тот факт, что никто не воспользовался возможностью запустить алгоритм на несколько минут и дать ему поработать. По условиям задания, можно было тянуть до 5 минут на одну оптимизацию, но по факту решения команд отрабатывали за единицы и десятки секунд. На самом конкурсе, пока команды работали, я решил попробовать сделать быстрое (по времени написания) но эффективное решение. Сначала попробовал жадную сортировку + доведение до лучшего варианта методом имитации отжига. В качестве нового состояния я просто менял местами заказы целиком. Этот вариант работал пару минут и дал мне около ~200 млн дохода. К слову, команда-лидер использовала такой же подход, просто не докрутила число итераций и температуру. Ну и потом я взял готовую либу по реализации классической генетики с особями и скрещиванием. Особью был массив с приоритетами заказов (которые конечно же нужно было аккуратно уложить чистым алгоритмом). Тип скрещивания: scattered. Всего 15 поколений по 20 особей, и это за минуту-полторы давало ~230-240 млн. Считаю, что для конкурса это самый лучший выбор: пишется одним человеком за день и даёт почти максимум, при этом легко настраивается на нужную длительность работы, легко параллелится. Ну а потом уже дома я посидел и накодил свой вариант сложного жадного с плавающим окном перебора отсортированных заказов и плавающей же укладкой по работникам. Такая штука за две минуты зарабатывает ~281 млн. Но за три дня в условиях стресса я бы такое не сделал, скорее всего. #dev

Hashtags

Резултати

Намерени 16 подобни публикации

Търсене: #witkoff

当前筛选 #witkoff清除筛选
Kurash & Co 🇷🇺

@kurash_and_Co · Post #680 · 06.08.2025 г., 20:32

🇷🇺 🇺🇸 Rencontre #Poutine-#Witkoff : quel bilan ? Vladimir Poutine a reçu Steve Witkoff, l'envoyé spécial du président américain, au Kremlin. La rencontre a duré environ trois heures et a porté sur nombre de questions importantes, notamment la crise ukrainienne. Les détails avec Igor Kourachenko. RT en français • Osez questionner !

Ultimora.net - POLITICS

@ULTIMORAPOLITICS · Post #45781 · 20.11.2025 г., 20:35

❗Guerra in #Ucraina, la Casa Bianca: "#Witkoff e #Rubio hanno lavorato silenziosamente a un piano per circa l'ultimo mese. Hanno interagito con entrambe le parti in modo equo per capire a cosa si impegnerebbero questi paesi per vedere una pace duratura e stabile. È un buon piano sia per la #Russia che per l'Ucraina." @UltimoraPolitics

American Оbserver

@american_observer · Post #5401 · 17.03.2026 г., 15:34

🔠🅰️🔠🔠2️⃣ That next round of talks was due to take place in Vienna on Monday 2 March, but never happened. The US and Israel had launched their all-out attack two days earlier. Powell’s attendance at the Geneva talks, as well as a previous set of meetings earlier in the month in the Swiss city, helps in part to explain the UK government’s reluctance to back the US attack on Iran, a reluctance that has put the UK-US relationship under unprecedented strain. The UK saw no compelling evidence of an imminent threat of a Iranian missile attack on Europe, or of Iran securing a nuclear weapon. This is the first time it has become clear that Britain was so closely involved in the talks, and so had good reason to decide whether diplomatic options had been exhausted and a US attack was necessary. Instead the UK regarded the attack as unlawful and premature since Powell believed the path remained open to a negotiated solution to the long-running issue of how Iran could reassure the US that it was not seeking a nuclear weapon. Starmer has been repeatedly lambasted by Trump for not doing more to support the US attack, including by initially refusing to let America use British military bases, and only allowing them to be used later for defensive purposes after Iran started attacking UK Gulf allies. Trump has warned it could be bad for Nato if its European member states do not answer his call to help open the strait of Hormuz, a demand that has been declined. The indirect talks in Geneva between Iran and the US were being mediated by Oman’s foreign minister, Badr bin Hamad Al Busaidi. Gulf diplomats did not specify on what basis Powell had been given access to the talks, but it may reflect the relationship he has managed to build with the US over the years, including previously as chief of staff to Tony Blair. UK officials have subsequently explained they were impressed that Iran was prepared for the deal to be permanent and, unlike the 2015 nuclear agreement, would not have cut-off dates, or sunset clauses ending the restrictions on its programme. Iran had also agreed to down-blend the 400kg stockpile of highly enriched uranium under the supervision of the IAEA inside Iran. It agreed no stockpiles of highly enriched uranium would be built up in the future. In the final session of the talks, Iran agreed to a three- to-five-year pause on domestic enrichment, but the US in the afternoon session, after consultations with Trump, demanded a 10-year pause. In practice, Iran had no means to enrich domestically because of the bombing of its enrichment plants in 2015. Iran had also made an offer of what the mediators described as an economic bonanza, with the US being given the chance to participate in a future civil nuclear programme. In return, nearly 80% of the economic sanctions on Iran would have been lifted, including assets frozen in Qatar, a demand Iran made in the 2025 talks. The Oman mediator believed the offer of zero stockpiling of highly enriched uranium was a breakthrough that meant an agreement was within reach. Accounts differ on whether Kushner left the talks giving the impression Trump would welcome what had been agreed, or that the US negotiators knew it would take something massive to persuade Trump that war was not the best option. One diplomat with knowledge of the talks said: “We regarded Witkoff and Kushner as Israeli assets that dragged a president into a war he wants to get out of.” #trump#iran#witkoff#kushner#iran#nuclear 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #5400 · 17.03.2026 г., 15:03

Is Trump Close To Wring Promises Of a Nuclear Decrease in Iranian Program 🔠🅰️🔠🔠1️⃣ Britain’s national security adviser, Jonathan Powell, attended the final talks between the US and Iran and judged that the offer made by Tehran on its nuclear programme was significant enough to prevent a rush to war, the Guardian can reveal. Powell thought progress had been made in Geneva and that the deal proposed by Iran was “surprising”, according to sources. Two days after the talks ended, and after a date had been agreed for a further round of technical talks in Vienna, the US and Israel launched the attack on Iran. Powell’s presence at the talks, and his close knowledge of how they were progressing, was confirmed by three sources. One source said he was in the building at Oman’s ambassadorial residence in Cologny acting as an adviser, reflecting widespread concern about the US expertise on the talks represented by Donald Trump’s son-in-law Jared Kushner and Steve Witkoff, Trump’s special envoy on several issues. Kushner and Witkoff had invited Rafael Grossi, the director general of the International Atomic Energy Agency (IAEA), to the Geneva talks, to provide technical expertise, though Kushner would later claim that he and Witkoff had “a pretty deep understanding of the issues that matter in this”. Nuclear experts would later say that Witkoff’s pronouncements on the Iran nuclear programme were riddled with basic errors. Powell has long experience as a mediator, and one source said Powell brought an expert from the UK Cabinet Office with him. One western diplomat said: “Jonathan thought there was a deal to be done, but Iran were not quite there yet, especially on the issue of UN inspections of its nuclear sites.” A former official who was briefed on the Geneva talks by some of the participants said: “Witkoff and Kushner did not bring a US technical team with them. They used Grossi as their technical expert, but that is not his job. So Jonathan Powell took his own team. “The UK team were surprised by what the Iranians put on the table,” the former official added. “It was not a complete deal, but it was progress and was unlikely to be the Iranians’ final offer. The British team expected the next round of negotiations to go ahead on the basis of the progress in Geneva.” #trump#iran#witkoff#kushner#iran#nuclear 📱American Оbserver - Stay up to date on all important events 🇺🇸

RT France actualités

@rt_fra · Post #40399 · 02.05.2026 г., 13:34

⏺Steve #Witkoff et Jared #Kushner ont reporté leur visite en Ukraine, car ils n’ont constaté aucun progrès dans les négociations, rapporte le Kyiv Independent. La fermeture de l'espace aérien ukrainien pourrait également avoir influencé la décision des représentants de #Washington, la délégation devant alors se rendre à #Kiev en train. RT en français • Osez questionner !

RT en français

@RTenfrancais · Post #80665 · 02.05.2026 г., 13:33

⏺Steve #Witkoff et Jared #Kushner ont reporté leur visite en Ukraine, car ils n’ont constaté aucun progrès dans les négociations, rapporte le Kyiv Independent. La fermeture de l'espace aérien ukrainien pourrait également avoir influencé la décision des représentants de #Washington, la délégation devant alors se rendre à #Kiev en train. RT en français • Osez questionner !

Kurash & Co 🇷🇺

@kurash_and_Co · Post #681 · 07.08.2025 г., 18:29

🇷🇺 🇺🇸#Russie-#États-Unis : rencontre décidée entre Poutine et Trump ⏺ Une lueur d’espoir pour la paix. Une rencontre #Poutine-#Trump est désormais en préparation. Ce serait le résultat majeur de la visite du conseiller spécial Steve #Witkoff à Moscou. Igor Kourachenko revient sur les coulisses de cette rencontre potentielle, la première du genre depuis 2021. RT en français • Osez questionner !

12
ПредишнаСтр. 1 от 2Следваща