В общем, была задача на оптимизацию плана работ: есть набор заказов, и в каждом N тасков. Таски могут зависеть друг от друга или нет, имеют длительность и тип. Ещё есть M работников, каждый из которых может выполнять таски только определённых типов, причём, у каждого своя скорость.
Если все таски в заказе выполнены, фирма получает сколько-то денег. У заказа есть дедлайн, за просрочку штраф (за каждый день просрочки), который вычитается из цены заказа. И ещё фирма тратит деньги за каждый день своей работы независимо от того, как загружены её сотрудники (то есть просто платит зарплаты по сути). Ещё важен учёт праздников и выходных.
Нужно заработать на определённом наборе заказов и работников как можно больше денег. Полный текст задачи и код программы проверки есть в репозитории. Эта задача является изменённым заказом, который мы с напарником решали в реальной жизни: оптимизация работы печатных станков для типографии. Правда, тогда и мы справились так себе, и заказчик в итоге сначала захотел всё вручную сам делать, а потом и вовсе похоронил проект при смене директора.
!!! Не читайте дальше, если хотите сначала попробовать решить самостоятельно, потому что я сейчас опишу эффективные подходы и результаты.
________________________________________
Так вот. Мы с другим экспертом Андреем сразу сели и написали разные варианты, чтобы задать шкалу, по которой будем оценивать решения команд. За пару часов я собрал примитивный жадный алгоритм, который сортировал заказы по прибыльности и укладывал в сетку кое-как, это дало нам нижнюю оценку. Мой алгоритм заработал ~75 млн виртуальных рублей, мы решили для оценки поставить нижней границей 40 млн. То есть всё, что ещё ниже, оценивалось в ноль баллов за качество оптимизации.
Затем Андрей закрылся дома на три дня и вышел на свет со сложным жадным алгоритмом, который очень хитро сортировал заказы и очень хитро укладывал их в сетку, попутно выбирая разные способы этой укладки в зависимости от конкретного заказа. Это позволило заработать ~275 млн рублей. Мы сделали верхней границей для оценки 280 млн.
К сожалению, в итоге только две команды из десяти прошли нижнюю границу, заработав, соответственно, ~91 и ~105 млн. К верхней границе не приблизился никто. И у четырёх команд алгоритм вообще не смог уложить без нарушений задачи в сетку (то есть, например, произвольно менял длительности, накладывал задачи друг на друга, давал одному работнику две задачи в один момент и так далее). Важной ошибкой команд, на мой взгляд, являлся тот факт, что никто не воспользовался возможностью запустить алгоритм на несколько минут и дать ему поработать. По условиям задания, можно было тянуть до 5 минут на одну оптимизацию, но по факту решения команд отрабатывали за единицы и десятки секунд.
На самом конкурсе, пока команды работали, я решил попробовать сделать быстрое (по времени написания) но эффективное решение. Сначала попробовал жадную сортировку + доведение до лучшего варианта методом имитации отжига. В качестве нового состояния я просто менял местами заказы целиком. Этот вариант работал пару минут и дал мне около ~200 млн дохода. К слову, команда-лидер использовала такой же подход, просто не докрутила число итераций и температуру.
Ну и потом я взял готовую либу по реализации классической генетики с особями и скрещиванием. Особью был массив с приоритетами заказов (которые конечно же нужно было аккуратно уложить чистым алгоритмом). Тип скрещивания: scattered. Всего 15 поколений по 20 особей, и это за минуту-полторы давало ~230-240 млн. Считаю, что для конкурса это самый лучший выбор: пишется одним человеком за день и даёт почти максимум, при этом легко настраивается на нужную длительность работы, легко параллелится.
Ну а потом уже дома я посидел и накодил свой вариант сложного жадного с плавающим окном перебора отсортированных заказов и плавающей же укладкой по работникам. Такая штука за две минуты зарабатывает ~281 млн. Но за три дня в условиях стресса я бы такое не сделал, скорее всего.
#dev
😄Schedule
➖➖➖➖➖➖
🔘Schedule as a noun can be a plan or list of when things happen.
🔜 According to the schedule we start at 9 tomorrow.
🔘A schedule can tell when planes, trains and buses are planned to arrive at and depart from different places.
🔜The flight schedule says that we should be leaving at 1015.
🔘As a verb, schedule means to plan to for something to happen at a certain time. It’s often used in the passive to talk about when things will or should happen.
🔜The meeting was scheduled for 9:30, but everyone was late.
#Schedule👨🏫@America
➖➖➖➖➖➖➖➖➖➖➖➖
🆕 Crypto News @Money
😁 Crypto Game @Egame
🇺🇸 US News @America
🇯🇵 Japan News @Japan
🇦🇪 UAE News @Dubai
▶️ Popular Movies @Videos
😜 Best Funny Video @Funnys
😄Schedule
➖➖➖➖➖➖
🔘Schedule as a noun can be a plan or list of when things happen.
🔜 According to the schedule we start at 9 tomorrow.
🔘A schedule can tell when planes, trains and buses are planned to arrive at and depart from different places.
🔜The flight schedule says that we should be leaving at 1015.
🔘As a verb, schedule means to plan to for something to happen at a certain time. It’s often used in the passive to talk about when things will or should happen.
🔜The meeting was scheduled for 9:30, but everyone was late.
#Schedule👨🏫@America
➖➖➖➖➖➖➖➖➖➖➖➖
🆕 Crypto News @Money
😁 Crypto Game @Egame
🇺🇸 US News @America
🇯🇵 Japan News @Japan
🇦🇪 UAE News @Dubai
▶️ Popular Movies @Videos
😜 Best Funny Video @Funnys
IELTS BAND8.5+ #Schedule
✅A - READING!
Make sure that you spend at least 1 hour a day on the following (don’t forget to record vocab, underline useful collocations, copy them into your vocab book... if you have one):
✅ B - WATCHING
Don't watch your content passively with the video/radio etc. playing in the background. You need to listen attentively since you'll need to do the same in the exam. Train your ear at an early stage and make life easier for yourself down the line. Oh, and if watching something.... subtitles OFF! 1 hour a day, too.
📆 MONDAY
📖National Geographic: select THEMES and randomly read an article whether science, travel, adventure, animals etc.
💻Documentary: think about what you might have read and type the theme into YouTube
📆 TUESDAY
📖Time Magazine: click the box top left next to TIME and randomly read an article whether politics, business, tech, health etc.
💻YouTube Videos: I have put together a number of YouTube channels I enjoy in a post.
📆WEDNESDAY
📖 The Guardian: Randomly select different themes and select an article at random to read
💻BBC World service is a good one. Loads of different themes for background listening: https://www.bbc.co.uk/sounds/play/live:bbc_world_serv..
📆THURSDAY
📖Scientific American : randomly select a news article to read.
💻 Documentary: Curiosity Stream is a good one, but it's a paid website.
📆FRIDAY (Entertainment)
📖 Continue reading a book of your choice PROVIDING it’s not a classic (continue with that after your course)
💻 Watch a film of your choice but still have pen and paper ready! Subtitles off!!!
📆SATURDAYS AND SUNDAYS
Focus on doing your grammar and vocab exercises, practice tests as well as go over the vocab and things you have recorded during the week. Use the weekend to write your essays.
My guidelines:
📌 It doesn't matter if you're interested in the themes or not. In the exam you don't have a choice. So stop being selective. Move beyond Friends and The Big Bang Theory.
📌 Record "chunks of language". Once you've done the article or video, summarize it out aloud recycling that language you have just jotted down. Maybe even write a small summary.
📌 Less is more! Do one article or video a day. That's enough. Better do one, learn and recycle the language rather than watch/read too many and remember nothing.
⚡️@ieltsulugbeks⚡️
IELTS BAND8.5+ #Schedule
✅A - READING!
Make sure that you spend at least 1 hour a day on the following (don’t forget to record vocab, underline useful collocations, copy them into your vocab book... if you have one):
✅ B - WATCHING
Don't watch your content passively with the video/radio etc. playing in the background. You need to listen attentively since you'll need to do the same in the exam. Train your ear at an early stage and make life easier for yourself down the line. Oh, and if watching something.... subtitles OFF! 1 hour a day, too.
📆 MONDAY
📖National Geographic: select THEMES and randomly read an article whether science, travel, adventure, animals etc.
💻Documentary: think about what you might have read and type the theme into YouTube
📆 TUESDAY
📖Time Magazine: click the box top left next to TIME and randomly read an article whether politics, business, tech, health etc.
💻YouTube Videos: I have put together a number of YouTube channels I enjoy in a post.
📆WEDNESDAY
📖 The Guardian: Randomly select different themes and select an article at random to read
💻BBC World service is a good one. Loads of different themes for background listening: https://www.bbc.co.uk/sounds/play/live:bbc_world_serv..
📆THURSDAY
📖Scientific American : randomly select a news article to read.
💻 Documentary: Curiosity Stream is a good one, but it's a paid website.
📆FRIDAY (Entertainment)
📖 Continue reading a book of your choice PROVIDING it’s not a classic (continue with that after your course)
💻 Watch a film of your choice but still have pen and paper ready! Subtitles off!!!
📆SATURDAYS AND SUNDAYS
Focus on doing your grammar and vocab exercises, practice tests as well as go over the vocab and things you have recorded during the week. Use the weekend to write your essays.
My guidelines:
📌 It doesn't matter if you're interested in the themes or not. In the exam you don't have a choice. So stop being selective. Move beyond Friends and The Big Bang Theory.
📌 Record "chunks of language". Once you've done the article or video, summarize it out aloud recycling that language you have just jotted down. Maybe even write a small summary.
📌 Less is more! Do one article or video a day. That's enough. Better do one, learn and recycle the language rather than watch/read too many and remember nothing.
⚡️@ieltsulugbeks⚡️
IELTS BAND8.5+ #Schedule
✅A - READING!
Make sure that you spend at least 1 hour a day on the following (don’t forget to record vocab, underline useful collocations, copy them into your vocab book... if you have one):
✅ B - WATCHING
Don't watch your content passively with the video/radio etc. playing in the background. You need to listen attentively since you'll need to do the same in the exam. Train your ear at an early stage and make life easier for yourself down the line. Oh, and if watching something.... subtitles OFF! 1 hour a day, too.
📆 MONDAY
📖National Geographic: select THEMES and randomly read an article whether science, travel, adventure, animals etc.
💻Documentary: think about what you might have read and type the theme into YouTube
📆 TUESDAY
📖Time Magazine: click the box top left next to TIME and randomly read an article whether politics, business, tech, health etc.
💻YouTube Videos: I have put together a number of YouTube channels I enjoy in a post.
📆WEDNESDAY
📖 The Guardian: Randomly select different themes and select an article at random to read
💻BBC World service is a good one. Loads of different themes for background listening: https://www.bbc.co.uk/sounds/play/live:bbc_world_serv..
📆THURSDAY
📖Scientific American : randomly select a news article to read.
💻 Documentary: Curiosity Stream is a good one, but it's a paid website.
📆FRIDAY (Entertainment)
📖 Continue reading a book of your choice PROVIDING it’s not a classic (continue with that after your course)
💻 Watch a film of your choice but still have pen and paper ready! Subtitles off!!!
📆SATURDAYS AND SUNDAYS
Focus on doing your grammar and vocab exercises, practice tests as well as go over the vocab and things you have recorded during the week. Use the weekend to write your essays.
My guidelines:
📌 It doesn't matter if you're interested in the themes or not. In the exam you don't have a choice. So stop being selective. Move beyond Friends and The Big Bang Theory.
📌 Record "chunks of language". Once you've done the article or video, summarize it out aloud recycling that language you have just jotted down. Maybe even write a small summary.
📌 Less is more! Do one article or video a day. That's enough. Better do one, learn and recycle the language rather than watch/read too many and remember nothing.
⚡️@ieltsulugbeks⚡️
Due to the #coronavirus
the #schedule of #BFIC 's #Koreanclass
is delayed #😢
⠀
Check changed annual schedule
at www.bfic.kr
⠀
✔ 1st Semester: Mar. 2 ~ Jun. 12
✔ Level Test: Feb. 24 ~ Feb. 26
⠀
http://masnun.com/2015/11/20/python-asyncio-future-task-and-the-event-loop.html
On any platform, when we want to do something #asynchronously, it usually involves an #event loop. An event loop is a loop that can register #tasks to be executed, execute them, delay or even cancel them and handle different events related to these operations. Generally, we #schedule multiple async functions to the event loop. The loop runs one function, while that function waits for #IO, it pauses it and runs another. When the first function completes IO, it is resumed. Thus two or more functions can #co_operatively run together. This the main goal of an event loop.
How I Can Study 10h a Day: The Perfect Schedule for Chaotic People
#YouTube#liked#howtostudy#study#howtocreateacalendar#schedulingtips#schedule#howtoschedule#productive
Уважаемые пассажиры,
Рейс Улан Батор - Улан Удэ - Улан Батор будет выполняться согласно расписанию, по вторникам и субботам. Желающие приобрести билеты на апрель могут обратиться по эл.адресу [email protected]. Также билеты из Улан Удэ в Улан Батор можно купить в кассе аэропорта Байкал.
Дни рейсов: 02, 05, 09, 12, 16, 19, 23, 26, 30-ое апреля.
Номер телефона нашего представителя в Улан Удэ:
+7 950 388 22 20
#Hunnu_Air#Ulan_Ude#Ulaanbaatar#Tuesday#Saturday#Schedule#Flight#April_2022
FTX Announces Preliminary Fund Distribution Schedule
🔵 FTX reveals a preliminary payment distribution schedule for creditors.
🔵 Claims under $50k total $1.2 billion.
🔴 By January 20: Preliminary claims must be met.
🔴February 25 - March 4: Expected period for fund distribution begins.
🤔 Will this bring additional liquidity to the market?
Read more
#FTX#Crypto#Market#Liquidity#Payments#Claims#Finance#Investments#Bitcoin#News#Updates#Distribution#Schedule#CryptoTwitter#Investors#Creditors#Funds#Return#January#February#March