{"id":6070,"date":"2019-11-23T14:11:56","date_gmt":"2019-11-23T10:11:56","guid":{"rendered":"https:\/\/jenyay.net\/blog\/?p=6070"},"modified":"2019-11-23T14:11:56","modified_gmt":"2019-11-23T10:11:56","slug":"optlib-0-2-biblioteka-dlya-optimizacii-na-yazyke-rust","status":"publish","type":"post","link":"https:\/\/jenyay.net\/blog\/2019\/11\/23\/optlib-0-2-biblioteka-dlya-optimizacii-na-yazyke-rust\/","title":{"rendered":"Optlib 0.2. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust"},"content":{"rendered":"<div class=\"postavatar\"><img class=\"border0solid000\" src=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/icons\/rust_100.jpg\" width=\"100\" height=\"100\" alt=\"Optlib 0.2. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust\" \/><\/div>\n<p data-select-like-a-boss=\"1\">\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 <a href=\"https:\/\/github.com\/Jenyay\/rust-optimization\">optlib<\/a>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u043f\u043e\u0434 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>f<\/em>(<strong>x<\/strong>) \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>x&#8217;<\/strong> (\u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <strong>x<\/strong> &#8212; \u0432\u0435\u043a\u0442\u043e\u0440), \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>f<\/em>(<strong>x&#8217;<\/strong>) \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u0434\u043b\u044f <strong>x<\/strong>. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 optlib \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u043e \u0435\u0441\u0442\u044c, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u044d\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 \u043a \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c).<\/p>\n<p><!--more--><\/p>\n<p>\u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0432 optlib \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u0435\u043d\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c\u0430, \u043e \u0447\u0435\u043c \u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0438\u0441\u0430\u043b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435\u00a0<a href=\"https:\/\/jenyay.net\/Programming\/OptlibGenetic\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Optlib. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 Rust<\/a> (\u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0430). \u0412 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 optlib \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u043e\u044f \u0447\u0430\u0441\u0442\u0438\u0446, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u043f\u0438\u0441\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/jenyay.net\/Programming\/ParticleSwarm\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u043e\u044f \u0447\u0430\u0441\u0442\u0438\u0446. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u044f\u0437\u044b\u043a\u0430\u0445 Python \u0438 C#<\/a>.<\/p>\n<p>\u0412\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u0431\u044b\u043b\u0430 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0442\u0438\u043f\u043e\u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 optlib. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0438\u043f\u0430\u0436\u0438 \u0431\u044b\u043b\u0438 \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u044b \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f \u0433\u0435\u043d\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0432 \u043e\u0431\u0449\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c, \u0442\u0430\u043a \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0440\u043e\u044f \u0447\u0430\u0441\u0442\u0438\u0446. \u041f\u043e\u0441\u043b\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/448870\/\">\u0441\u0442\u0430\u0442\u044c\u0438 \u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>, \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0441 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0442\u044c \u043a\u043e\u0434 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0432 Rust. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0437 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u044f \u043f\u0440\u0438\u043d\u044f\u043b \u043a \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044e \u0438 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b \u043a\u043e\u0434.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0442 \u043a\u0440\u0435\u0439\u0442\u0430 <a href=\"https:\/\/crates.io\/crates\/optlib\">optlib<\/a> \u043e\u0442\u043f\u043e\u0447\u043a\u043e\u0432\u0430\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043a\u0440\u0435\u0439\u0442 <a href=\"https:\/\/crates.io\/crates\/optlib-testfunc\">optlib-testfunc<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 optlib-testfunc \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\u041f\u0430\u0440\u0430\u0431\u043e\u043b\u043e\u0438\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439 <a href=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/paraboloid_equation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6086\" style=\"vertical-align: middle;\" src=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/paraboloid_equation.png\" alt=\"\" width=\"147\" height=\"60\" \/><\/a>\u00a0\u0438 \u0438\u043c\u0435\u0435\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c \u0432 \u0442\u043e\u0447\u043a\u0435 x&#8217; = (1, 2, 3, &#8230;, N).<\/li>\n<li>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0428\u0432\u0435\u0444\u0435\u043b\u044f (Schwefel function) <a href=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_equation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6089\" style=\"vertical-align: middle;\" src=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_equation.png\" alt=\"\" width=\"308\" height=\"60\" srcset=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_equation.png 308w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_equation-300x58.png 300w\" sizes=\"auto, (max-width: 308px) 100vw, 308px\" \/><\/a>. \u0418\u043c\u0435\u0435\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c \u0432 \u0442\u043e\u0447\u043a\u0435 x&#8217; = (420.9687, 420.9687, &#8230;). \u0414\u043b\u044f N = 2 \u0433\u0440\u0430\u0444\u0438\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0428\u0432\u0435\u0444\u0435\u043b\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/li>\n<\/ul>\n<p><a href=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_2d.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-middle wp-image-6074\" src=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_2d-500x274.png\" alt=\"\" width=\"500\" height=\"274\" srcset=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_2d-500x274.png 500w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_2d-300x164.png 300w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_2d-1024x561.png 1024w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_2d-768x421.png 768w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_2d-1536x842.png 1536w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/schwefel_2d.png 1920w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<ul>\n<li>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0420\u0430\u0441\u0442\u0440\u0438\u0433\u0438\u043d\u0430 (Rastrigin function) <a href=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rastrigin_equation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6087\" style=\"vertical-align: middle;\" src=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rastrigin_equation.png\" alt=\"\" width=\"289\" height=\"60\" \/><\/a>. \u0418\u043c\u0435\u0435\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c \u0432 \u0442\u043e\u0447\u043a\u0435 x&#8217; = (0, 0, 0, &#8230;). \u0414\u043b\u044f N = 2 \u0433\u0440\u0430\u0444\u0438\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0420\u0430\u0441\u0442\u0440\u0438\u0433\u0438\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/li>\n<\/ul>\n<p><a href=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rastrigin_2d.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-middle wp-image-6071\" src=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rastrigin_2d-500x274.png\" alt=\"\" width=\"500\" height=\"274\" srcset=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rastrigin_2d-500x274.png 500w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rastrigin_2d-300x164.png 300w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rastrigin_2d-1024x561.png 1024w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rastrigin_2d-768x421.png 768w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rastrigin_2d-1536x842.png 1536w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rastrigin_2d.png 1920w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<ul>\n<li>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0420\u043e\u0437\u0435\u043d\u0431\u0440\u043e\u043a\u0430 (Rosenbrock function) <a href=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_equation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6088\" style=\"vertical-align: middle;\" src=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_equation.png\" alt=\"\" width=\"302\" height=\"60\" srcset=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_equation.png 302w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_equation-300x60.png 300w\" sizes=\"auto, (max-width: 302px) 100vw, 302px\" \/><\/a>.\u00a0\u0418\u043c\u0435\u0435\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c \u0432 \u0442\u043e\u0447\u043a\u0435 x&#8217; = (1, 1, 1, &#8230;). \u0414\u043b\u044f N = 2 \u0433\u0440\u0430\u0444\u0438\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0420\u043e\u0437\u0435\u043d\u0431\u0440\u043e\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/li>\n<\/ul>\n<p><a href=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_2d.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-middle wp-image-6072\" src=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_2d-500x274.png\" alt=\"\" width=\"500\" height=\"274\" srcset=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_2d-500x274.png 500w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_2d-300x164.png 300w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_2d-1024x561.png 1024w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_2d-768x421.png 768w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_2d-1536x842.png 1536w, https:\/\/jenyay.net\/blog\/wp-content\/uploads\/2019\/11\/rosenbrock_2d.png 1920w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>\u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 optlib \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0435\u043d\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0440\u043e\u044f \u0447\u0430\u0441\u0442\u0438\u0446 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0430\u043f\u043a\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<blockquote><p><code>cargo run --example \u0438\u043c\u044f_\u043f\u0440\u0438\u043c\u0435\u0440\u0430 --release<\/code><\/p><\/blockquote>\n<p>\u0413\u0434\u0435 <em>\u0438\u043c\u044f_\u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/em> \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430:<\/p>\n<ul>\n<li>genetic-paraboloid<\/li>\n<li>genetic-rastrigin<\/li>\n<li>genetic-rosenbrock<\/li>\n<li>genetic-schwefel<\/li>\n<li>particleswarm-paraboloid<\/li>\n<li>particleswarm-rastrigin<\/li>\n<li>particleswarm-rosenbrock<\/li>\n<li>particleswarm-schwefel<\/li>\n<\/ul>\n<p>\u0412\u043e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 15-\u043c\u0435\u0440\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0428\u0432\u0435\u0444\u0435\u043b\u044f:<\/p>\n<blockquote>\n<pre>$ cargo run --example genetic-schwefel --release\r\n\r\nSolution:\r\n420.974975585937500\r\n420.969146728515625\r\n420.955078125000000\r\n421.004760742187500\r\n420.999511718750000\r\n421.007263183593750\r\n420.987487792968750\r\n421.001800537109375\r\n420.980499267578125\r\n420.991180419921875\r\n421.001068115234375\r\n420.942718505859375\r\n420.964080810546875\r\n420.951721191406250\r\n420.961029052734375\r\n\r\nGoal: 0.000488281250000\r\nIterations count: 3000\r\nTime elapsed: 2352 ms<\/pre>\n<\/blockquote>\n<p>\u0412 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0441 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u0440\u0443\u0433\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<br \/>\n\u0421\u0441\u044b\u043b\u043a\u0438:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/Jenyay\/rust-optimization\">Optlib \u043d\u0430 github<\/a><\/li>\n<li><a href=\"https:\/\/crates.io\/crates\/optlib\">Optlib \u043d\u0430 crates.io<\/a><\/li>\n<li><a href=\"https:\/\/docs.rs\/optlib\/0.2.0\/optlib\/\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e optlib<\/a><\/li>\n<li><a href=\"https:\/\/crates.io\/crates\/optlib-testfunc\">Optlib-testfunc \u043d\u0430 crates.io<\/a><\/li>\n<li><a href=\"https:\/\/docs.rs\/optlib-testfunc\/0.1.0\/optlib_testfunc\/\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f optlib-testfunc<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<div class=\"postavatar\"><img class=\"border0solid000\" src=\"https:\/\/jenyay.net\/blog\/wp-content\/uploads\/icons\/rust_100.jpg\" width=\"100\" height=\"100\" alt=\"Optlib 0.2. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust\" \/><\/div>\n<p>\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 optlib, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Rust. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u043f\u043e\u0434 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 f(x) \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f x&#8217; (\u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 x &#8212; \u0432\u0435\u043a\u0442\u043e\u0440), \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 f(x&#8217;) \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u0434\u043b\u044f x. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 optlib \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u043e \u0435\u0441\u0442\u044c, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[182,67,144],"class_list":["post-6070","post","type-post","status-publish","format-standard","hentry","category-soft","tag-rust","tag-algoritmy","tag-programmizm"],"_links":{"self":[{"href":"https:\/\/jenyay.net\/blog\/wp-json\/wp\/v2\/posts\/6070","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jenyay.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jenyay.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jenyay.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jenyay.net\/blog\/wp-json\/wp\/v2\/comments?post=6070"}],"version-history":[{"count":4,"href":"https:\/\/jenyay.net\/blog\/wp-json\/wp\/v2\/posts\/6070\/revisions"}],"predecessor-version":[{"id":6091,"href":"https:\/\/jenyay.net\/blog\/wp-json\/wp\/v2\/posts\/6070\/revisions\/6091"}],"wp:attachment":[{"href":"https:\/\/jenyay.net\/blog\/wp-json\/wp\/v2\/media?parent=6070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jenyay.net\/blog\/wp-json\/wp\/v2\/categories?post=6070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jenyay.net\/blog\/wp-json\/wp\/v2\/tags?post=6070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}