{"id":555,"date":"2024-12-16T08:24:48","date_gmt":"2024-12-16T04:54:48","guid":{"rendered":"http:\/\/rgholizadehr.com\/fa\/?p=555"},"modified":"2024-12-16T08:29:47","modified_gmt":"2024-12-16T04:59:47","slug":"%d8%aa%d8%b1%d8%b3%db%8c%d9%85-%d8%b4%d8%a8%da%a9%d9%87-%d9%86%d9%85%d9%88%d9%86%d9%87-%d8%af%d8%b1-%d9%be%d8%a7%db%8c%d8%aa%d9%88%d9%86","status":"publish","type":"post","link":"https:\/\/rgholizadehr.com\/?p=555","title":{"rendered":"\u062a\u0631\u0633\u06cc\u0645 \u0634\u0628\u06a9\u0647 \u0646\u0645\u0648\u0646\u0647 \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"819\" src=\"http:\/\/rgholizadehr.com\/fa\/wp-content\/uploads\/2024\/12\/full_network_graph-1024x819.png\" alt=\"\" class=\"wp-image-557\" srcset=\"https:\/\/rgholizadehr.com\/wp-content\/uploads\/2024\/12\/full_network_graph-1024x819.png 1024w, https:\/\/rgholizadehr.com\/wp-content\/uploads\/2024\/12\/full_network_graph-300x240.png 300w, https:\/\/rgholizadehr.com\/wp-content\/uploads\/2024\/12\/full_network_graph-768x614.png 768w, https:\/\/rgholizadehr.com\/wp-content\/uploads\/2024\/12\/full_network_graph-600x480.png 600w, https:\/\/rgholizadehr.com\/wp-content\/uploads\/2024\/12\/full_network_graph.png 1500w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0628\u0631\u0627\u06cc \u062a\u0631\u0633\u06cc\u0645 \u0634\u0628\u06a9\u0647\u200c\u0647\u0627\u06cc \u0646\u0645\u0648\u0646\u0647 \u062f\u0631 \u0633\u06cc\u0633\u062a\u0645 \u0642\u062f\u0631\u062a \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0632 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f. \u062f\u0631 \u0627\u062f\u0627\u0645\u0647\u060c \u0631\u0648\u0634 \u062a\u0631\u0633\u06cc\u0645 \u0634\u06a9\u0644 \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u0634\u0628\u06a9\u0647 \u0646\u0645\u0648\u0646\u0647 \u0628\u0631\u0627\u06cc \u0645\u0637\u0627\u0644\u0639\u0647 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0631\u06cc\u0632\u06cc \u062a\u0648\u0633\u0639\u0647 \u0634\u0628\u06a9\u0647 \u062a\u0648\u0632\u06cc\u0639 \u0627\u0631\u0627\u0626\u0647 \u06af\u0631\u062f\u06cc\u062f\u0647 \u0627\u0633\u062a.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">from matplotlib.pyplot import savefig, show, figure, axis\nfrom numpy import array<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u062f\u0631 \u062f\u0627\u062e\u0644 \u06cc\u06a9 \u062f\u0627\u062f\u0647 \u0646\u0648\u0639 dictionary\u060c \u06af\u0631\u0647\u200c\u0647\u0627 \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645. \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0646\u0645\u0648\u0646\u0647\u060c \u062f\u0631 \u06a9\u062f \u0632\u06cc\u0631 \u062f\u0648 \u06af\u0631\u0647 \u0627\u0632 \u0646\u0648\u0639 \u0628\u0627\u0631 \u062f\u0631 \u0645\u062e\u062a\u0635\u0627\u062a \u0637\u0648\u0644 \u0648 \u0639\u0631\u0636 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647\u060c \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647 \u0627\u0633\u062a:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">Vertex = {'n1': {'position': array([1, 3.5]), 'type': 'load'}}\nVertex['n2'] = {'position': array([2, 3.5]), 'type': 'load'}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u062e\u0637\u0648\u0637 \u0634\u0628\u06a9\u0647 \u0648 \u0646\u0648\u0639 \u0622\u0646\u0647\u0627 \u062f\u0631 \u062f\u0627\u062e\u0644 \u06cc\u06a9 \u062f\u0627\u062f\u0647 \u0627\u0632 \u0646\u0648\u0639 \u0644\u06cc\u0633\u062a \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0633\u062a\u0648\u0646 \u0627\u0648\u0644 \u06af\u0631\u0647 \u0627\u0628\u062a\u062f\u0627\u060c \u0633\u062a\u0648\u0646 \u062f\u0648\u0645 \u06af\u0631\u0647 \u0627\u0646\u062a\u0647\u0627 \u0648 \u0633\u062a\u0648\u0646 \u0633\u0648\u0645 \u0646\u0648\u0639 \u062e\u0637 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u0622\u0646 1 \u0646\u0634\u0627\u0646\u06af\u0631 \u062e\u0637 \u0645\u0648\u062c\u0648\u062f\u060c 2 \u062e\u0637 \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0631\u062a\u0642\u0627\u061b \u0648 3 \u062e\u0637 \u06a9\u0627\u0646\u062f\u06cc\u062f \u0645\u06cc\u200c\u0628\u0627\u0634\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">Edges = [\n[\t19\t,\t10\t, 1],\n[\t1\t,\t5\t, 2],\n[\t9\t,\t17\t, 3]]<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u062f\u0631 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc\u060c \u0628\u062e\u0634 \u062a\u0631\u0633\u06cc\u0645 \u0622\u0645\u0627\u062f\u0647\u200c\u0633\u0627\u0632\u06cc \u0645\u06cc\u200c\u0634\u0648\u062f. \u062f\u0631 \u062f\u0648 \u0633\u0637\u0631 \u0627\u0628\u062a\u062f\u0627\u06cc\u06cc \u0627\u0646\u062f\u0627\u0632\u0647 \u06a9\u0627\u062f\u0631 \u0634\u06a9\u0644 \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc\u200c\u0634\u0648\u062f. \u062f\u0631 \u062f\u0648 \u0633\u0637\u0631 \u0628\u0639\u062f\u06cc \u062d\u0627\u0634\u06cc\u0647 \u0644\u0627\u0632\u0645 \u0628\u0631\u0627\u06cc \u0634\u06a9\u0644 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06af\u0631\u062f\u062f \u0648 \u062f\u0631 \u0627\u0646\u062a\u0647\u0627 \u062e\u0637\u0648\u0637 \u0627\u0637\u0631\u0627\u0641 \u0634\u06a9\u0644 \u063a\u06cc\u0631\u0641\u0639\u0627\u0644 \u0645\u06cc\u200c\u06af\u0631\u062f\u062f.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\"># initialize figure\nfh = figure(1, figsize=(5,4))\nax = fh.add_axes([0.0, 0.0, 1.0, 1.0])\nax.set_xlim([0, 4.5])\nax.set_ylim([0, 4.0])\nax.axis('off')<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0628\u0631\u0627\u06cc \u062a\u0631\u0633\u06cc\u0645 \u062e\u0637\u0648\u0637 \u0634\u0628\u06a9\u0647\u060c \u06cc\u06a9 \u062d\u0644\u0642\u0647 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06af\u0631\u062f\u062f. \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0631\u0648\u0634 \u062a\u0631\u0633\u06cc\u0645 \u062e\u0637 \u0646\u0648\u0639 1 \u062f\u0631 \u06a9\u062f \u0632\u06cc\u0631 \u0627\u0631\u0627\u0626\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\"># plot network branches\nfor n in range(len(Edges)):\n    prim_node = 'n' + str(Edges[n][0])\n    seco_node = 'n' + str(Edges[n][1])\n    brch_type = Edges[n][2]\n    if brch_type==1:\n        ax.plot(\n            [Vertex[prim_node]['position'][0],\n             Vertex[seco_node]['position'][0]],\n            [Vertex[prim_node]['position'][1],\n             Vertex[seco_node]['position'][1]],\n            color='g',\n            linestyle='-',\n            linewidth=1)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u06af\u0631\u0647\u200c\u0647\u0627 \u0646\u06cc\u0632 \u0628\u0647 \u0635\u0648\u0631\u062a \u062d\u0644\u0642\u0647 \u062a\u0631\u0633\u06cc\u0645 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f. \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u062f\u0631 \u062f\u0631 \u06a9\u062f \u0632\u06cc\u0631 \u06af\u0631\u0647\u200c\u0647\u0627 \u0627\u0632 \u0646\u0648\u0639 \u0628\u0627\u0631 \u0628\u0647 \u0635\u0648\u0631\u062a \u06cc\u06a9 \u062f\u0627\u06cc\u0631\u0647 \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062a\u062f annoatate \u0634\u0645\u0627\u0631\u0647 \u062f\u0627\u06cc\u0631\u0647 \u062f\u0631 \u062f\u0627\u062e\u0644 \u062f\u0627\u06cc\u0631\u0647 \u0646\u0648\u0634\u062a\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\"># plot the nodes\nfor i in range(len(Vertex)):\n    node = 'n' + str(i+1)\n    if Vertex[node]['type']=='load':\n        ax.plot(\n            Vertex[node]['position'][0],\n            Vertex[node]['position'][1],\n            'o',\n            ms=25,\n            mec='b',\n            mfc='w',\n            )\n        ax.annotate(\n            str(i+1),\n            xy=(Vertex[node]['position'][0], \n                Vertex[node]['position'][1]),\n            ha='center',\n            va='center',\n            fontsize=14,\n            color='blue')<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u062f\u0631 \u0627\u0646\u062a\u0647\u0627 \u0634\u06a9\u0644 \u062a\u0631\u0633\u06cc\u0645 \u0634\u062f\u0647 \u062f\u0631 \u062f\u0627\u062e\u0644 \u0641\u0627\u06cc\u0644 \u0646\u0648\u0639 png \u0630\u062e\u06cc\u0631\u0647 \u0645\u06cc\u200c\u06af\u0631\u062f\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">fh.savefig('full_network_graph.png', dpi=300)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0628\u0631\u0627\u06cc \u062a\u0631\u0633\u06cc\u0645 \u0634\u0628\u06a9\u0647\u200c\u0647\u0627\u06cc \u0646\u0645\u0648\u0646\u0647 \u062f\u0631 \u0633\u06cc\u0633\u062a\u0645 \u0642\u062f\u0631\u062a \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0632 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f. \u062f\u0631 \u0627\u062f\u0627\u0645\u0647\u060c \u0631\u0648\u0634 \u062a\u0631\u0633\u06cc\u0645 \u0634\u06a9\u0644 \u0628\u0631\u0627\u06cc \u06cc\u06a9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":560,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[],"tags":[],"class_list":["post-555","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/rgholizadehr.com\/index.php?rest_route=\/wp\/v2\/posts\/555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rgholizadehr.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rgholizadehr.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rgholizadehr.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rgholizadehr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=555"}],"version-history":[{"count":4,"href":"https:\/\/rgholizadehr.com\/index.php?rest_route=\/wp\/v2\/posts\/555\/revisions"}],"predecessor-version":[{"id":563,"href":"https:\/\/rgholizadehr.com\/index.php?rest_route=\/wp\/v2\/posts\/555\/revisions\/563"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rgholizadehr.com\/index.php?rest_route=\/wp\/v2\/media\/560"}],"wp:attachment":[{"href":"https:\/\/rgholizadehr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rgholizadehr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rgholizadehr.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}