{"id":366211,"date":"2024-05-21T02:54:29","date_gmt":"2024-05-21T02:54:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=366211"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=366211","title":{"rendered":"<span>\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0432 \u0433\u0440\u0430\u0444<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u0430\u043a-\u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0447\u0435\u0431\u044b \u043d\u0430 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430-\u0442\u0435\u043f\u043b\u043e\u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u043a\u0430 \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u0443 \u043a\u043d\u0438\u0433\u0443 [\u041f\u043e\u043f\u044b\u0440\u0438\u043d\u00a0\u041b.\u0421.\u00a0\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u00a0\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u043f\u043b\u043e\u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a. \u041c. \u042d\u043d\u0435\u0440\u0433\u0438\u044f 1978\u0433.],<strong> <\/strong>\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u043d\u044b\u0445 \u0441\u0445\u0435\u043c \u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u0432 \u0421\u0438\u0431\u0438\u0440\u0441\u043a\u043e\u043c \u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0442\u0435 (\u043d\u044b\u043d\u0435 &#8212; \u0418\u0421\u042d\u041c \u0421\u041e \u0420\u0410\u041d). \u042d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0437\u0430\u043b\u043e\u0436\u0435\u043d \u0432 \u043e\u0441\u043d\u043e\u0432\u0443 \u0421\u041c\u041f\u041f (\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c) &#8212; \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0432 \u0418\u0421\u042d\u041c \u0438 \u043f\u043e \u0441\u0435\u0439 \u0434\u0435\u043d\u044c. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u0438, \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043e\u0431\u043e\u0431\u0449\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u0432\u0441\u0435\u043c \u0438\u0437 \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b.<\/p>\n<h3>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h3>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u044d\u043d\u0435\u0440\u0433\u043e\u0431\u043b\u043e\u043a\u043e\u0432 \u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u0441\u0442\u0430\u043d\u0446\u0438\u0439 \u0432 \u0446\u0435\u043b\u043e\u043c \u0447\u0430\u0441\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 &#8212; \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0430\u0440\u0430 (\u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434 \u0442\u0443\u0440\u0431\u0438\u043d\u043e\u0439), \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430 \u0442\u0443\u0440\u0431\u0438\u043d\u043e\u0439, \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0433\u0440\u0435\u0432\u0430 \u043a\u043e\u0442\u043b\u0430, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u041a\u041f\u0414 \u0446\u0438\u043a\u043b\u0430 \u0441\u0442\u0430\u043d\u0446\u0438\u0438, \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0437\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434, \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0437 \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0441\u0445\u0435\u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/222\/6f9\/f3f\/2226f9f3f86eda47f9ed7b0936099aae.png\" width=\"673\" height=\"702\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/222\/6f9\/f3f\/2226f9f3f86eda47f9ed7b0936099aae.png\"\/><\/figure>\n<p>\u041a\u0430\u0436\u0434\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0445\u043e\u0434\u0430, \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u044d\u043d\u0442\u0430\u043b\u044c\u043f\u0438\u0438 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0441\u0440\u0435\u0434\u044b, \u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u044b, \u044d\u043d\u0435\u0440\u0433\u0438\u0438, \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0442.\u0434. \u041e\u0431\u044b\u0447\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0442\u0435\u043d. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 (\u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445) \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 (\u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439). \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435.<\/p>\n<p>\u0412 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"https:\/\/github.com\/oemof\/tespy\" rel=\"noopener noreferrer nofollow\">TESPy <\/a>\u0442\u0430\u043a\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u041d\u044c\u044e\u0442\u043e\u043d\u0430-\u0420\u0430\u0444\u0441\u043e\u043d\u0430. \u0414\u043b\u044f \u0441\u0445\u0435\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u0441\u0442\u0430\u043d\u0446\u0438\u0439, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0432 (\u043a\u043e\u0442\u043b\u043e\u0432, \u0442\u0443\u0440\u0431\u0438\u043d, \u0431\u043e\u0439\u043b\u0435\u0440\u043d\u044b\u0445), \u0432\u0440\u0435\u043c\u044f \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c 1 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u0447\u0442\u043e \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e 30-40 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u0441\u0445\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u0432 \u0418\u0421\u042d\u041c, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0438 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043f\u043e\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u0438\u043c \u043f\u0443\u0442\u0451\u043c, \u043a\u0430\u043a \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u043e\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0435, \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u0432 10-20 \u0440\u0430\u0437.<\/p>\n<h3>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435<\/h3>\n<p>\u0412\u043e\u0437\u044c\u043c\u0451\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e30\/a95\/f06\/e30a95f0686d3d5e642a624de0e54cd5.png\" width=\"259\" height=\"98\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e30\/a95\/f06\/e30a95f0686d3d5e642a624de0e54cd5.png\"\/><\/figure>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u043c \u0435\u0451 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x_{3} \" alt=\"x_{3} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/081\/30d\/09d\/08130d09dadf1fc09e41b521bb6d0fa2.svg\" width=\"20\" height=\"15\"\/>. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u043e \u0441\u0443\u0442\u0438 2 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438 2 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a\u0438\u0435 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0435 (\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0451\u043b\u0435\u043d\u043d\u044b\u0435) \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u0430\u043a \u0440\u0430\u0437 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 (\u0440\u0430\u0441\u0445\u043e\u0434 \u0441\u0440\u0435\u0434\u044b \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 = \u0440\u0430\u0441\u0445\u043e\u0434 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435). \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0435\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u0443\u0434\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430: \u0432 \u043e\u0434\u043d\u043e\u0439 \u0434\u043e\u043b\u0435 \u2014  \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014  \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0430 \u0440\u0435\u0431\u0440\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7be\/fe9\/f5f\/7befe9f5f331b9f75f9006fc3b930b55.png\" width=\"260\" height=\"360\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7be\/fe9\/f5f\/7befe9f5f331b9f75f9006fc3b930b55.png\"\/><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435<img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"X_{0}=\\left\\{ x_{3} \\right\\}\" alt=\"X_{0}=\\left\\{ x_{3} \\right\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/572\/a40\/b00\/572a40b00ba2d621c12890870917ef58.svg\" width=\"89\" height=\"22\"\/>. \u0417\u0430\u0434\u0430\u0447\u0430 \u2014  \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u0438\u0437 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0451\u0431\u0440\u0430 \u043c\u0435\u0436\u0434\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 <em>X<\/em><sub>0<\/sub> \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u042d\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043f\u0430\u0440\u043e\u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f. \u0421\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u2014 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u043e\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u0433\u043e \u043f\u0443\u0442\u0438 (augmenting path), \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u043d\u0433\u0435\u0440\u0441\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u0445 (Constraint Programming), \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440. <\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0447\u0435\u0431\u044b \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432 \u041c\u0430\u0442\u043b\u0430\u0431\u0435 \u0432\u0435\u043d\u0433\u0435\u0440\u0441\u043a\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b \u043a \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044e, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u2014  \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0448\u0430\u0433\u043e\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0431\u044b\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0438 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043b\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 <em>X<\/em><sub>0<\/sub> \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b. \u0420\u0435\u0448\u0430\u043b\u043e\u0441\u044c \u044d\u0442\u043e \u0447\u0443\u0434\u043e 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0437 22 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u043d\u0435 \u0434\u0430\u0432\u0430\u043b\u043e \u043c\u043d\u0435 \u043f\u043e\u043a\u043e\u044f, \u0438 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0434\u043e\u0448\u043b\u0438 \u0440\u0443\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u0440\u0430\u0434\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u0412\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u0441\u043e\u043b\u0432\u0435\u0440 Max-flow \u0438\u0437 Google OR Tools. \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430. \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0431\u044b\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Y_{0}=\\left\\{ x_{1} \\right\\}\" alt=\"Y_{0}=\\left\\{ x_{1} \\right\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5af\/577\/d77\/5af577d7752a69cb503492459d909a85.svg\" width=\"85\" height=\"22\"\/>.<\/p>\n<h3>\u0428\u0430\u0433 1. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a<\/h3>\n<p>\u041e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0451\u0431\u0440\u0430 (\u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0434\u0443\u0433\u0438) \u043e\u0442 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443 <strong>s<\/strong>, \u0434\u0443\u0433\u0438 \u043e\u0442 \u043d\u0435\u0435 \u043a \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c \u0441 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e (capacity) = 1, \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443 <strong>t<\/strong>. <\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 3 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 <em>Y<\/em><sub>0<\/sub>: \u0434\u0443\u0433\u0438 (\u0437\u0435\u043b\u0435\u043d\u044b\u0435) \u0441 capacity = 1 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043a <strong>t<\/strong>;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (\u043a\u0440\u0430\u0441\u043d\u044b\u0445) \u0432 <em>X<\/em><sub>0<\/sub>: \u0434\u0443\u0433\u0438 \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u044f\u0442, \u0438 \u043f\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0432 <em>X<\/em><sub>0<\/sub> \u0431\u0443\u0434\u0435\u0442 \u0432 \u043b\u044e\u0431\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445: \u0434\u0443\u0433\u0438 (\u0441\u0438\u043d\u0438\u0435) \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0441 capacity = 1 \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443 <strong>t0<\/strong>, \u0438 \u043e\u0434\u043d\u0430 \u0434\u0443\u0433\u0430 \u0438\u0434\u0435\u0442 \u0438\u0437 <strong>t0<\/strong> \u0432 <strong>t<\/strong> \u0441 capacity, \u0440\u0430\u0432\u043d\u043e\u0439 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0432 <strong>t0<\/strong> \u0434\u0443\u0433.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u044b\u0448\u0435 \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u00abCirculation with demands with lower bounds\u00bb, \u0430 \u0437\u0430\u0442\u0435\u043c \u043a Max-flow. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430, \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7af\/c3f\/fc6\/7afc3ffc61d27dd20ed4e12ec013df2f.png\" width=\"660\" height=\"360\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7af\/c3f\/fc6\/7afc3ffc61d27dd20ed4e12ec013df2f.png\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043f\u0430\u0440\u043e\u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u0432 \u0433\u0440\u0430\u0444\u0435 \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043d\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0441\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. <\/p>\n<p>\u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043c\u043e\u0435\u0439 \u043d\u0430\u0438\u0432\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0432 \u041c\u0430\u0442\u043b\u0430\u0431\u0435, \u0441\u043e\u043b\u0432\u0435\u0440 max-flow \u0432 OR Tools \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0438\u0437 6000 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043c\u0435\u043d\u0435\u0435, \u0447\u0435\u043c \u0437\u0430 0,01 \u0441. <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 Max-flow \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u043b\u0435\u0432\u0443\u044e \u0438 \u043f\u0440\u0430\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u0438 \u0433\u0440\u0430\u0444\u0430, \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0443\u0433\u0438 \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/704\/5fc\/349\/7045fc349f593b8289ad3e126834f203.png\" width=\"260\" height=\"360\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/704\/5fc\/349\/7045fc349f593b8289ad3e126834f203.png\"\/><\/figure>\n<h3>\u0428\u0430\u0433 2. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0430\u0440\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0432 \u043e\u0434\u043d\u0443 \u0432\u0435\u0440\u0448\u0438\u043d\u0443 (\u0441\u043b\u0435\u0432\u0430) \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0422\u0430\u0440\u044c\u044f\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430 (\u0441\u043f\u0440\u0430\u0432\u0430).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/216\/d7f\/535\/216d7f535cafa9ac75b24a5199bb333f.png\" width=\"702\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/216\/d7f\/535\/216d7f535cafa9ac75b24a5199bb333f.png\"\/><\/figure>\n<h3>\u0428\u0430\u0433 3. \u0420\u0430\u0437\u0440\u044b\u0432 \u0446\u0438\u043a\u043b\u043e\u0432<\/h3>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043e\u0440\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0446\u0438\u043a\u043b\u044b, \u043f\u0440\u0438\u0447\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u0443\u0434\u0430\u043b\u0438\u0432 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0443\u0433. \u042d\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0437\u0430\u044e\u0449\u0435\u0433\u043e \u0446\u0438\u043a\u043b\u044b \u043d\u0430\u0431\u043e\u0440\u0430 \u0440\u0451\u0431\u0435\u0440 (Minimum feedback arc set), \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f NP-\u0441\u043b\u043e\u0436\u043d\u043e\u0439, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u043e\u0447\u043d\u044b\u0435 \u0438 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. \u041f\u043e\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0434\u0443\u0433 \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0433\u0440\u0430\u0444\u0430. <\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u043f\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b (\u043f\u0430\u0440\u044b \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f), \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0443\u0434\u0430\u043b\u044f\u0435\u043c\u044b\u0435 \u0434\u0443\u0433\u0438, \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435, \u0430 \u0441\u0430\u043c \u0446\u0438\u043a\u043b \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 \u043c\u0435\u0442\u043e\u0434\u0430 \u0417\u0435\u0439\u0434\u0435\u043b\u044f, \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0439. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e8f\/1c6\/3c5\/e8f1c63c5621de6c9b22a4c8cb3f8c87.png\" width=\"691\" height=\"402\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e8f\/1c6\/3c5\/e8f1c63c5621de6c9b22a4c8cb3f8c87.png\"\/><\/figure>\n<h3>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u0434<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. <\/p>\n<pre><code class=\"python\">def solve(x):   # \u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c x3 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445   x3 = x[0]   # \u0417\u0430\u0434\u0430\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f x2 \u0438 x1   x2 = 0.5   x1 = 0.5   while True:     temp_x2 = x2     temp_x1 = x1     # \u0412\u044b\u0440\u0430\u0436\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0438\u0437 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0435\u0439 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f     x0 = x2                            #eq2     x2 = ((x0 - x1**2)\/x3)**(1\/3)      #eq0     x1 = x2**0.5 - x0                  #eq1     # \u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0441 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c\u044e 1e-4     # +1e-8 \u0432 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u043e\u043b\u044c     if abs((x2 - temp_x2) \/ (temp_x2 + 1e-8)) > 1e-4: continue     if abs((x1 - temp_x1) \/ (temp_x1 + 1e-8)) > 1e-4: continue     break   # \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430   y = [0.0] * 3   y[0] = x2   y[1] = x1   y[2] = x0   return y<\/code><\/pre>\n<pre><code class=\"python\">%timeit res = solve([2])<\/code><\/pre>\n<p><code>8.76 \u00b5s \u00b1 59.2 ns per loop (mean \u00b1 std. dev. of 7 runs, 100,000 loops each)<\/code>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0440\u0435\u0448\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e fsolve \u0438\u0437 scipy:<\/p>\n<pre><code class=\"python\">def func(x,x3):     out = np.empty(3)     out[0] = x[1]**2 + x3*x[2]**2 - x[0]     out[1] = (x[0] + x[1])**2 - x[2]     out[2] = x[0] - x[2]     return out  x = np.array([0.5,0.5,0.5]) x3 = 2 %timeit res = fsolve(func, x, args=(x3))<\/code><\/pre>\n<p><code>43.8 \u00b5s \u00b1 1.27 \u00b5s per loop (mean \u00b1 std. dev. of 7 runs, 10,000 loops each)<\/code>  <\/p>\n<p><a href=\"https:\/\/github.com\/ameshalkin\/eqsystem\" rel=\"noopener noreferrer nofollow\">\u0421\u044e\u0434\u0430 <\/a>\u0432\u044b\u043b\u043e\u0436\u0438\u043b \u043a\u043e\u0434 \u0442\u0430\u043a\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"python\">from eqsystem import EqSystem, EqSystemGraph, PyScriptGenerator   S = EqSystem() # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 S.add_var('x0', 0.5) S.add_var('x1', 0.5) S.add_var('x2', 0.5) S.add_var('x3', 0.5)  eq0 = {'x0': (True, f\"x0 = x1**2 + x3 * x2**3\"),        'x1': (True, f\"x1 = (x0 - x3 * x2**3)**0.5\"),        'x2': (True, f\"x2 = ((x0 - x1**2)\/x3)**(1\/3)\"),        'x3': (False, f\"x1**2 + x * x2**3 - x0\")} eq1 = {'x0': (True, f\"x0 = x2**0.5 - x1\"),        'x1': (True, f\"x1 = x2**0.5 - x0\"),        'x2': (True, f\"x2 = (x0 + x1)**2\")} eq2 = {'x0': (True, f\"x0 = x2\"),        'x2': (True, f\"x2 = x0\")} S.add_std_eq('eq0', eq0) S.add_std_eq('eq1', eq1) S.add_std_eq('eq2', eq2)  S.set_desired_x({'x3'}) S.set_desired_y({'x1'})  G = EqSystemGraph(S) G.solve_matching_maxflow_ortools() G.scc() G.mfas() gen = PyScriptGenerator(\"out.py\", \"solve\") G.generate_code(gen)<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e (\u0438\u043b\u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f) \u0438\u0437 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043c\u043e\u0436\u043d\u043e \u044d\u0442\u0443 \u043f\u0430\u0440\u0443 \u0440\u0435\u0448\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e fsolve. \u0422\u0430\u043a, \u0434\u043b\u044f x3 <code>False<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <code>x<\/code>.<\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0435\u0437\u0438\u0441\u044b<\/h3>\n<ol>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0430 (\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438) \u0431\u0435\u0437 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0445, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0446\u0435\u043b\u044f\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u043c \u044f\u0437\u044b\u043a\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 \u0446\u0438\u043a\u043b\u0430\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u0438, \u0441\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u042f \u043b\u0438\u0447\u043d\u043e \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0430 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0430\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443.<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/788630\/\"> https:\/\/habr.com\/ru\/articles\/788630\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u0430\u043a-\u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0447\u0435\u0431\u044b \u043d\u0430 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430-\u0442\u0435\u043f\u043b\u043e\u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u043a\u0430 \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u0443 \u043a\u043d\u0438\u0433\u0443 [\u041f\u043e\u043f\u044b\u0440\u0438\u043d\u00a0\u041b.\u0421.\u00a0\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u00a0\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u043f\u043b\u043e\u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a. \u041c. \u042d\u043d\u0435\u0440\u0433\u0438\u044f 1978\u0433.],<strong> <\/strong>\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u043d\u044b\u0445 \u0441\u0445\u0435\u043c \u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u0432 \u0421\u0438\u0431\u0438\u0440\u0441\u043a\u043e\u043c \u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0442\u0435 (\u043d\u044b\u043d\u0435 &#8212; \u0418\u0421\u042d\u041c \u0421\u041e \u0420\u0410\u041d). \u042d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0437\u0430\u043b\u043e\u0436\u0435\u043d \u0432 \u043e\u0441\u043d\u043e\u0432\u0443 \u0421\u041c\u041f\u041f (\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c) &#8212; \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0432 \u0418\u0421\u042d\u041c \u0438 \u043f\u043e \u0441\u0435\u0439 \u0434\u0435\u043d\u044c. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u0438, \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043e\u0431\u043e\u0431\u0449\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u0432\u0441\u0435\u043c \u0438\u0437 \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b.<\/p>\n<h3>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h3>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u044d\u043d\u0435\u0440\u0433\u043e\u0431\u043b\u043e\u043a\u043e\u0432 \u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u0441\u0442\u0430\u043d\u0446\u0438\u0439 \u0432 \u0446\u0435\u043b\u043e\u043c \u0447\u0430\u0441\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 &#8212; \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0430\u0440\u0430 (\u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434 \u0442\u0443\u0440\u0431\u0438\u043d\u043e\u0439), \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430 \u0442\u0443\u0440\u0431\u0438\u043d\u043e\u0439, \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0433\u0440\u0435\u0432\u0430 \u043a\u043e\u0442\u043b\u0430, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u041a\u041f\u0414 \u0446\u0438\u043a\u043b\u0430 \u0441\u0442\u0430\u043d\u0446\u0438\u0438, \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0437\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434, \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0437 \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0441\u0445\u0435\u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041a\u0430\u0436\u0434\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0445\u043e\u0434\u0430, \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u044d\u043d\u0442\u0430\u043b\u044c\u043f\u0438\u0438 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0441\u0440\u0435\u0434\u044b, \u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u044b, \u044d\u043d\u0435\u0440\u0433\u0438\u0438, \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0442.\u0434. \u041e\u0431\u044b\u0447\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0442\u0435\u043d. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 (\u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445) \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 (\u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439). \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435.<\/p>\n<p>\u0412 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"https:\/\/github.com\/oemof\/tespy\" rel=\"noopener noreferrer nofollow\">TESPy <\/a>\u0442\u0430\u043a\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u041d\u044c\u044e\u0442\u043e\u043d\u0430-\u0420\u0430\u0444\u0441\u043e\u043d\u0430. \u0414\u043b\u044f \u0441\u0445\u0435\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u0441\u0442\u0430\u043d\u0446\u0438\u0439, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0432 (\u043a\u043e\u0442\u043b\u043e\u0432, \u0442\u0443\u0440\u0431\u0438\u043d, \u0431\u043e\u0439\u043b\u0435\u0440\u043d\u044b\u0445), \u0432\u0440\u0435\u043c\u044f \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c 1 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u0447\u0442\u043e \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e 30-40 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u0441\u0445\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u0432 \u0418\u0421\u042d\u041c, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0438 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043f\u043e\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u0438\u043c \u043f\u0443\u0442\u0451\u043c, \u043a\u0430\u043a \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u043e\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0435, \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u0432 10-20 \u0440\u0430\u0437.<\/p>\n<h3>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435<\/h3>\n<p>\u0412\u043e\u0437\u044c\u043c\u0451\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u043c \u0435\u0451 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 . \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u043e \u0441\u0443\u0442\u0438 2 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438 2 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a\u0438\u0435 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0435 (\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0451\u043b\u0435\u043d\u043d\u044b\u0435) \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u0430\u043a \u0440\u0430\u0437 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 (\u0440\u0430\u0441\u0445\u043e\u0434 \u0441\u0440\u0435\u0434\u044b \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 = \u0440\u0430\u0441\u0445\u043e\u0434 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435). \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0435\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u0443\u0434\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430: \u0432 \u043e\u0434\u043d\u043e\u0439 \u0434\u043e\u043b\u0435 \u2014  \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014  \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0430 \u0440\u0435\u0431\u0440\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435. \u0417\u0430\u0434\u0430\u0447\u0430 \u2014  \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u0438\u0437 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0451\u0431\u0440\u0430 \u043c\u0435\u0436\u0434\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 <em>X<\/em><sub>0<\/sub> \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u042d\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043f\u0430\u0440\u043e\u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f. \u0421\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u2014 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u043e\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u0433\u043e \u043f\u0443\u0442\u0438 (augmenting path), \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u043d\u0433\u0435\u0440\u0441\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u0445 (Constraint Programming), \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440. <\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0447\u0435\u0431\u044b \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432 \u041c\u0430\u0442\u043b\u0430\u0431\u0435 \u0432\u0435\u043d\u0433\u0435\u0440\u0441\u043a\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b \u043a \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044e, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u2014  \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0448\u0430\u0433\u043e\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0431\u044b\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0438 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043b\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 <em>X<\/em><sub>0<\/sub> \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b. \u0420\u0435\u0448\u0430\u043b\u043e\u0441\u044c \u044d\u0442\u043e \u0447\u0443\u0434\u043e 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0437 22 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u043d\u0435 \u0434\u0430\u0432\u0430\u043b\u043e \u043c\u043d\u0435 \u043f\u043e\u043a\u043e\u044f, \u0438 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0434\u043e\u0448\u043b\u0438 \u0440\u0443\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u0440\u0430\u0434\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u0412\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u0441\u043e\u043b\u0432\u0435\u0440 Max-flow \u0438\u0437 Google OR Tools. \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430. \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0431\u044b\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, .<\/p>\n<h3>\u0428\u0430\u0433 1. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a<\/h3>\n<p>\u041e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0451\u0431\u0440\u0430 (\u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0434\u0443\u0433\u0438) \u043e\u0442 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443 <strong>s<\/strong>, \u0434\u0443\u0433\u0438 \u043e\u0442 \u043d\u0435\u0435 \u043a \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c \u0441 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e (capacity) = 1, \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443 <strong>t<\/strong>. <\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 3 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 <em>Y<\/em><sub>0<\/sub>: \u0434\u0443\u0433\u0438 (\u0437\u0435\u043b\u0435\u043d\u044b\u0435) \u0441 capacity = 1 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043a <strong>t<\/strong>;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (\u043a\u0440\u0430\u0441\u043d\u044b\u0445) \u0432 <em>X<\/em><sub>0<\/sub>: \u0434\u0443\u0433\u0438 \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u044f\u0442, \u0438 \u043f\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0432 <em>X<\/em><sub>0<\/sub> \u0431\u0443\u0434\u0435\u0442 \u0432 \u043b\u044e\u0431\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445: \u0434\u0443\u0433\u0438 (\u0441\u0438\u043d\u0438\u0435) \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0441 capacity = 1 \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443 <strong>t0<\/strong>, \u0438 \u043e\u0434\u043d\u0430 \u0434\u0443\u0433\u0430 \u0438\u0434\u0435\u0442 \u0438\u0437 <strong>t0<\/strong> \u0432 <strong>t<\/strong> \u0441 capacity, \u0440\u0430\u0432\u043d\u043e\u0439 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0432 <strong>t0<\/strong> \u0434\u0443\u0433.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u044b\u0448\u0435 \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u00abCirculation with demands with lower bounds\u00bb, \u0430 \u0437\u0430\u0442\u0435\u043c \u043a Max-flow. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430, \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043f\u0430\u0440\u043e\u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u0432 \u0433\u0440\u0430\u0444\u0435 \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043d\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0441\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. <\/p>\n<p>\u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043c\u043e\u0435\u0439 \u043d\u0430\u0438\u0432\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0432 \u041c\u0430\u0442\u043b\u0430\u0431\u0435, \u0441\u043e\u043b\u0432\u0435\u0440 max-flow \u0432 OR Tools \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0438\u0437 6000 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043c\u0435\u043d\u0435\u0435, \u0447\u0435\u043c \u0437\u0430 0,01 \u0441. <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 Max-flow \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u043b\u0435\u0432\u0443\u044e \u0438 \u043f\u0440\u0430\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u0438 \u0433\u0440\u0430\u0444\u0430, \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0443\u0433\u0438 \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438:<\/p>\n<figure class=\"\"><\/figure>\n<h3>\u0428\u0430\u0433 2. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0430\u0440\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0432 \u043e\u0434\u043d\u0443 \u0432\u0435\u0440\u0448\u0438\u043d\u0443 (\u0441\u043b\u0435\u0432\u0430) \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0422\u0430\u0440\u044c\u044f\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430 (\u0441\u043f\u0440\u0430\u0432\u0430).<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u0428\u0430\u0433 3. \u0420\u0430\u0437\u0440\u044b\u0432 \u0446\u0438\u043a\u043b\u043e\u0432<\/h3>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043e\u0440\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0446\u0438\u043a\u043b\u044b, \u043f\u0440\u0438\u0447\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u0443\u0434\u0430\u043b\u0438\u0432 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0443\u0433. \u042d\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0437\u0430\u044e\u0449\u0435\u0433\u043e \u0446\u0438\u043a\u043b\u044b \u043d\u0430\u0431\u043e\u0440\u0430 \u0440\u0451\u0431\u0435\u0440 (Minimum feedback arc set), \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f NP-\u0441\u043b\u043e\u0436\u043d\u043e\u0439, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u043e\u0447\u043d\u044b\u0435 \u0438 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. \u041f\u043e\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0434\u0443\u0433 \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0433\u0440\u0430\u0444\u0430. <\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u043f\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b (\u043f\u0430\u0440\u044b \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f), \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0443\u0434\u0430\u043b\u044f\u0435\u043c\u044b\u0435 \u0434\u0443\u0433\u0438, \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435, \u0430 \u0441\u0430\u043c \u0446\u0438\u043a\u043b \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 \u043c\u0435\u0442\u043e\u0434\u0430 \u0417\u0435\u0439\u0434\u0435\u043b\u044f, \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0439. <\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u0434<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. <\/p>\n<pre><code class=\"python\">def solve(x):   # \u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c x3 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445   x3 = x[0]   # \u0417\u0430\u0434\u0430\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f x2 \u0438 x1   x2 = 0.5   x1 = 0.5   while True:     temp_x2 = x2     temp_x1 = x1     # \u0412\u044b\u0440\u0430\u0436\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0438\u0437 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0435\u0439 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f     x0 = x2                            #eq2     x2 = ((x0 - x1**2)\/x3)**(1\/3)      #eq0     x1 = x2**0.5 - x0                  #eq1     # \u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0441 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c\u044e 1e-4     # +1e-8 \u0432 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u043e\u043b\u044c     if abs((x2 - temp_x2) \/ (temp_x2 + 1e-8)) > 1e-4: continue     if abs((x1 - temp_x1) \/ (temp_x1 + 1e-8)) > 1e-4: continue     break   # \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430   y = [0.0] * 3   y[0] = x2   y[1] = x1   y[2] = x0   return y<\/code><\/pre>\n<pre><code class=\"python\">%timeit res = solve([2])<\/code><\/pre>\n<p><code>8.76 \u00b5s \u00b1 59.2 ns per loop (mean \u00b1 std. dev. of 7 runs, 100,000 loops each)<\/code>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0440\u0435\u0448\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e fsolve \u0438\u0437 scipy:<\/p>\n<pre><code class=\"python\">def func(x,x3):     out = np.empty(3)     out[0] = x[1]**2 + x3*x[2]**2 - x[0]     out[1] = (x[0] + x[1])**2 - x[2]     out[2] = x[0] - x[2]     return out  x = np.array([0.5,0.5,0.5]) x3 = 2 %timeit res = fsolve(func, x, args=(x3))<\/code><\/pre>\n<p><code>43.8 \u00b5s \u00b1 1.27 \u00b5s per loop (mean \u00b1 std. dev. of 7 runs, 10,000 loops each)<\/code>  <\/p>\n<p><a href=\"https:\/\/github.com\/ameshalkin\/eqsystem\" rel=\"noopener noreferrer nofollow\">\u0421\u044e\u0434\u0430 <\/a>\u0432\u044b\u043b\u043e\u0436\u0438\u043b \u043a\u043e\u0434 \u0442\u0430\u043a\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"python\">from eqsystem import EqSystem, EqSystemGraph, PyScriptGenerator   S = EqSystem() # \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 S.add_var('x0', 0.5) S.add_var('x1', 0.5) S.add_var('x2', 0.5) S.add_var('x3', 0.5)  eq0 = {'x0': (True, f\"x0 = x1**2 + x3 * x2**3\"),        'x1': (True, f\"x1 = (x0 - x3 * x2**3)**0.5\"),        'x2': (True, f\"x2 = ((x0 - x1**2)\/x3)**(1\/3)\"),        'x3': (False, f\"x1**2 + x * x2**3 - x0\")} eq1 = {'x0': (True, f\"x0 = x2**0.5 - x1\"),        'x1': (True, f\"x1 = x2**0.5 - x0\"),        'x2': (True, f\"x2 = (x0 + x1)**2\")} eq2 = {'x0': (True, f\"x0 = x2\"),        'x2': (True, f\"x2 = x0\")} S.add_std_eq('eq0', eq0) S.add_std_eq('eq1', eq1) S.add_std_eq('eq2', eq2)  S.set_desired_x({'x3'}) S.set_desired_y({'x1'})  G = EqSystemGraph(S) G.solve_matching_maxflow_ortools() G.scc() G.mfas() gen = PyScriptGenerator(\"out.py\", \"solve\") G.generate_code(gen)<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e (\u0438\u043b\u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f) \u0438\u0437 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043c\u043e\u0436\u043d\u043e \u044d\u0442\u0443 \u043f\u0430\u0440\u0443 \u0440\u0435\u0448\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e fsolve. \u0422\u0430\u043a, \u0434\u043b\u044f x3 <code>False<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <code>x<\/code>.<\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0435\u0437\u0438\u0441\u044b<\/h3>\n<ol>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0430 (\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438) \u0431\u0435\u0437 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0445, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0446\u0435\u043b\u044f\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u043c \u044f\u0437\u044b\u043a\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 \u0446\u0438\u043a\u043b\u0430\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u0438, \u0441\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u042f \u043b\u0438\u0447\u043d\u043e \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0430 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0430\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443.<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/788630\/\"> https:\/\/habr.com\/ru\/articles\/788630\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-366211","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/366211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=366211"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/366211\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=366211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=366211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=366211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}