diff --git a/doc/.buildinfo b/doc/.buildinfo index 8c8de514e942b6b9576cb870fe5962cedb71c654..cd4903b74a902f0c9800c5bda195e243e5abc815 100644 --- a/doc/.buildinfo +++ b/doc/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 5f27badbd8db24052a9e9f9e3b0c32e5 +config: abf217c97f9b6fe49ceee4ba9b9757d9 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/doc/.doctrees/KADMOS.doctree b/doc/.doctrees/KADMOS.doctree index a267a2e01bb300c6dea52fa1223f91f06d460dcf..cddd6a757c0985d9820c3d0963906afe8fdfb48c 100644 Binary files a/doc/.doctrees/KADMOS.doctree and b/doc/.doctrees/KADMOS.doctree differ diff --git a/doc/.doctrees/environment.pickle b/doc/.doctrees/environment.pickle index b5ed02221bdb66ba0b034658750226ac8b57152b..5beffcc68f9c9a88b310fe3c49be508f02c7730e 100644 Binary files a/doc/.doctrees/environment.pickle and b/doc/.doctrees/environment.pickle differ diff --git a/doc/KADMOS.html b/doc/KADMOS.html index 47d0aa2c4137c0906d6d5598dc105321e8b7635d..7780838bd9500b94e9b55b12a30611cbd36e3135 100644 --- a/doc/KADMOS.html +++ b/doc/KADMOS.html @@ -1870,7 +1870,7 @@ deleted. A simple remove_node of a function node might lead to unconnected varia <dl class="method"> <dt id="kadmos.graph.graph_kadmos.KadmosGraph.save"> -<code class="descname">save</code><span class="sig-paren">(</span><em>file_name</em>, <em>file_type='kdms'</em>, <em>graph_check_critical=True</em>, <em>destination_folder=None</em>, <em>mpg=None</em>, <em>description=''</em>, <em>creator=''</em>, <em>version='1.0'</em>, <em>timestamp=datetime.datetime(2018</em>, <em>4</em>, <em>21</em>, <em>11</em>, <em>14</em>, <em>14</em>, <em>243000)</em>, <em>keep_empty_elements=False</em>, <em>pretty_print=False</em>, <em>convention=True</em>, <em>integrity=False</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.graph.graph_kadmos.KadmosGraph.save" title="Permalink to this definition">¶</a></dt> +<code class="descname">save</code><span class="sig-paren">(</span><em>file_name</em>, <em>file_type='kdms'</em>, <em>graph_check_critical=True</em>, <em>destination_folder=None</em>, <em>mpg=None</em>, <em>description=''</em>, <em>creator=''</em>, <em>version='1.0'</em>, <em>timestamp=datetime.datetime(2018</em>, <em>4</em>, <em>21</em>, <em>16</em>, <em>47</em>, <em>29</em>, <em>483000)</em>, <em>keep_empty_elements=False</em>, <em>pretty_print=False</em>, <em>convention=True</em>, <em>integrity=False</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.graph.graph_kadmos.KadmosGraph.save" title="Permalink to this definition">¶</a></dt> <dd><p>Method to save the graph.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> @@ -3514,6 +3514,26 @@ architectures for the same problem in one VISTOMS instance.</p> </div> </dd></dl> +<dl class="method"> +<dt id="kadmos.graph.mixin_vistoms.VistomsMixin.vistoms_add_json"> +<code class="descname">vistoms_add_json</code><span class="sig-paren">(</span><em>mpg=None</em>, <em>function_order=None</em>, <em>graph_id=None</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.graph.mixin_vistoms.VistomsMixin.vistoms_add_json" title="Permalink to this definition">¶</a></dt> +<dd><p>Function to add a graph to a existing VISTOMS instance.</p> +<p>In one VISTOMS instance different graphs can be shown. For example it is possible to include different +architectures for the same problem in one VISTOMS instance.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>mpg</strong> (<a class="reference internal" href="#kadmos.graph.graph_process.MdaoProcessGraph" title="kadmos.graph.graph_process.MdaoProcessGraph"><em>MdaoProcessGraph</em></a>) – optional MPG graph to be saved with MDG as XDSM (if None a DSM is created)</li> +<li><strong>function_order</strong> (<em>list</em>) – optional function order for the diagonal of the graph (only applicable for DSMs)</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + <dl class="method"> <dt id="kadmos.graph.mixin_vistoms.VistomsMixin.vistoms_create"> <code class="descname">vistoms_create</code><span class="sig-paren">(</span><em>vistoms_dir</em>, <em>vistoms_version=None</em>, <em>mpg=None</em>, <em>function_order=None</em>, <em>reference_file=None</em>, <em>compress=False</em>, <em>remove_after_compress=True</em>, <em>graph_id=None</em>, <em>use_png_figs=False</em>, <em>file_refs=None</em>, <em>xml_file=None</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.graph.mixin_vistoms.VistomsMixin.vistoms_create" title="Permalink to this definition">¶</a></dt> @@ -3548,6 +3568,31 @@ architectures for the same problem in one VISTOMS instance.</p> </table> </dd></dl> +<dl class="method"> +<dt id="kadmos.graph.mixin_vistoms.VistomsMixin.vistoms_start"> +<code class="descname">vistoms_start</code><span class="sig-paren">(</span><em>file_dir=None</em>, <em>mpg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.graph.mixin_vistoms.VistomsMixin.vistoms_start" title="Permalink to this definition">¶</a></dt> +<dd><p>Function to open an interactive VISTOMS based on the data graph and (optionally) the MPG. If file_dir is not +provided then the files are stored in a temp directory.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>file_dir</strong> (<em>path</em>) – folder name or path where the graphs used in the interactive VISTOMS will be stored.</li> +<li><strong>mpg</strong> (<a class="reference internal" href="#kadmos.graph.graph_process.MdaoProcessGraph" title="kadmos.graph.graph_process.MdaoProcessGraph"><em>MdaoProcessGraph</em></a>) – MDAO process graph to be used in combination with the data graph.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">interactive VISTOMS</p> +</td> +</tr> +<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">file</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + </dd></dl> </div> @@ -4846,6 +4891,31 @@ dictionary should be in the order though.</p> </table> </dd></dl> +<dl class="function"> +<dt id="kadmos.utilities.general.format_string_for_vistoms_new"> +<code class="descclassname">kadmos.utilities.general.</code><code class="descname">format_string_for_vistoms_new</code><span class="sig-paren">(</span><em>string</em>, <em>prefix=''</em>, <em>suffix=''</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.utilities.general.format_string_for_vistoms_new" title="Permalink to this definition">¶</a></dt> +<dd><p>Function to format a string such that it can be used in VISTOMS.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>string</strong> (<em>str</em>) – string to be formatted</li> +<li><strong>prefix</strong> (<em>basestring</em>) – prefix to be placed in front of the string</li> +<li><strong>suffix</strong> (<em>basestring</em>) – suffix to be appended to the string</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">formatted string</p> +</td> +</tr> +<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">basestring</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + <dl class="function"> <dt id="kadmos.utilities.general.get_element_dict"> <code class="descclassname">kadmos.utilities.general.</code><code class="descname">get_element_dict</code><span class="sig-paren">(</span><em>xpath</em>, <em>var_value=None</em>, <em>var_dim=None</em>, <em>include_reference_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.utilities.general.get_element_dict" title="Permalink to this definition">¶</a></dt> @@ -4855,14 +4925,17 @@ dictionary should be in the order though.</p> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> -<li><strong>xpath</strong> – xpath for the element</li> -<li><strong>var_value</strong> – value of the element in a reference file</li> -<li><strong>var_dim</strong> – dimension of the element in a reference file</li> -<li><strong>include_reference_data</strong> – setting on whether reference data should be include in the path</li> +<li><strong>xpath</strong> (<em>basestring</em>) – xpath for the element</li> +<li><strong>var_value</strong> (<em>float</em>) – value of the element in a reference file</li> +<li><strong>var_dim</strong> (<em>int</em>) – dimension of the element in a reference file</li> +<li><strong>include_reference_data</strong> (<em>bool</em>) – setting on whether reference data should be include in the path</li> </ul> </td> </tr> -<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">nested dictionary</p> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">nested dictionary</p> +</td> +</tr> +<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">dict</p> </td> </tr> </tbody> @@ -5456,6 +5529,79 @@ dictionary should be in the order though.</p> </div> <div class="section" id="module-kadmos.utilities.strings"> <span id="strings"></span><h3>Strings<a class="headerlink" href="#module-kadmos.utilities.strings" title="Permalink to this headline">¶</a></h3> +<dl class="function"> +<dt id="kadmos.utilities.strings.find_between"> +<code class="descclassname">kadmos.utilities.strings.</code><code class="descname">find_between</code><span class="sig-paren">(</span><em>s</em>, <em>first</em>, <em>last</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.utilities.strings.find_between" title="Permalink to this definition">¶</a></dt> +<dd><p>Function to find a target string that is located between two particular strings.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>s</strong> (<em>basestring</em>) – string to search</li> +<li><strong>first</strong> (<em>basestring</em>) – the string in front of the target string</li> +<li><strong>last</strong> (<em>basestring</em>) – the string behind the target string</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">the target string</p> +</td> +</tr> +<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">basestring</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="kadmos.utilities.strings.find_until"> +<code class="descclassname">kadmos.utilities.strings.</code><code class="descname">find_until</code><span class="sig-paren">(</span><em>s</em>, <em>until</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.utilities.strings.find_until" title="Permalink to this definition">¶</a></dt> +<dd><p>Function to find a target string that is located before a particular string.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>s</strong> (<em>basestring</em>) – string to search</li> +<li><strong>until</strong> (<em>basestring</em>) – the string signifying the end of the target string</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">target string</p> +</td> +</tr> +<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">basestring</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="function"> +<dt id="kadmos.utilities.strings.get_correctly_extended_latex_label"> +<code class="descclassname">kadmos.utilities.strings.</code><code class="descname">get_correctly_extended_latex_label</code><span class="sig-paren">(</span><em>label</em>, <em>label_extension</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.utilities.strings.get_correctly_extended_latex_label" title="Permalink to this definition">¶</a></dt> +<dd><p>Function to obtain a correctly extended latex label.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>label</strong> (<em>str</em>) – label to be extended</li> +<li><strong>label_extension</strong> (<em>str</em>) – extensions of the label</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">extended latex label</p> +</td> +</tr> +<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + </div> <div class="section" id="module-kadmos.utilities.printing"> <span id="printing"></span><h3>Printing<a class="headerlink" href="#module-kadmos.utilities.printing" title="Permalink to this headline">¶</a></h3> @@ -5475,12 +5621,15 @@ dictionary should be in the order though.</p> </tr> </tbody> </table> +<div class="admonition note"> +<p class="first admonition-title">Note</p> <p>Kwargs options:</p> -<ul class="simple"> +<ul class="last simple"> <li>‘header’ (str)</li> <li>‘message’ (str)</li> <li>‘print_indeces’ (bool)</li> </ul> +</div> </dd></dl> <dl class="function"> @@ -5518,22 +5667,27 @@ above the indexed column. Can be used in combination with user_prompt_select_opt <p>Below the full KADMOS KnowledgeBase class description can be found.</p> <dl class="class"> <dt id="kadmos.knowledgebase.knowledgebase.KnowledgeBase"> -<em class="property">class </em><code class="descclassname">kadmos.knowledgebase.knowledgebase.</code><code class="descname">KnowledgeBase</code><span class="sig-paren">(</span><em>kb_dir_path</em>, <em>knowledge_base</em>, <em>ignoreFunctions=None</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.knowledgebase.knowledgebase.KnowledgeBase" title="Permalink to this definition">¶</a></dt> +<em class="property">class </em><code class="descclassname">kadmos.knowledgebase.knowledgebase.</code><code class="descname">KnowledgeBase</code><span class="sig-paren">(</span><em>kb_dir_path</em>, <em>knowledge_base</em>, <em>ignore_functions=None</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.knowledgebase.knowledgebase.KnowledgeBase" title="Permalink to this definition">¶</a></dt> <dd><p>Class that imports the data stored in a knowledge base. This is a start point for graph visualizations.</p> <dl class="method"> <dt id="kadmos.knowledgebase.knowledgebase.KnowledgeBase.get_function_dependencies"> <code class="descname">get_function_dependencies</code><span class="sig-paren">(</span><em>funcName</em>, <em>mode</em>, <em>inOut=None</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.knowledgebase.knowledgebase.KnowledgeBase.get_function_dependencies" title="Permalink to this definition">¶</a></dt> -<dd><p>This function builds a directed graph (KadmosGraph object) for the specified function using the “networkx†package. If inOut -argument is specified, only the input or output of the function will be included in the graph, otherwise both.</p> +<dd><p>This function builds a directed graph (KadmosGraph object) for the specified function using the “networkx†+package. If inOut argument is specified, only the input or output of the function will be included in the graph, +otherwise both.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field-odd field"><th class="field-name">Param:</th><td class="field-body">funcName: function name for which the graph is generated; must be present in knowledge base.</td> -</tr> -<tr class="field-even field"><th class="field-name">Param:</th><td class="field-body">inOut: default = None; if specified, must be “input†or “output†string. Specification of this argument enables the generation of the function graph with only input or output variables.</td> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>funcName</strong> (<em>str</em>) – function name for which the graph is generated; must be present in knowledge base.</li> +<li><strong>inOut</strong> (<em>str</em>) – (optional) if specified, must be “input†or “output†string. Specification of this argument +enables the generation of the function graph with only input or output variables.</li> +</ul> +</td> </tr> -<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">functionGraph</td> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">functionGraph</p> +</td> </tr> </tbody> </table> @@ -5542,17 +5696,22 @@ argument is specified, only the input or output of the function will be included <dl class="method"> <dt id="kadmos.knowledgebase.knowledgebase.KnowledgeBase.get_function_graph"> <code class="descname">get_function_graph</code><span class="sig-paren">(</span><em>funcName</em>, <em>inOut=None</em><span class="sig-paren">)</span><a class="headerlink" href="#kadmos.knowledgebase.knowledgebase.KnowledgeBase.get_function_graph" title="Permalink to this definition">¶</a></dt> -<dd><p>This function builds a directed graph (KadmosGraph object) for the specified function using the “networkx†package. If inOut -argument is specified, only the input or output of the function will be included in the graph, otherwise both.</p> +<dd><p>This function builds a directed graph (KadmosGraph object) for the specified function using the “networkx†+package. If inOut argument is specified, only the input or output of the function will be included in the graph, +otherwise both.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field-odd field"><th class="field-name">Param:</th><td class="field-body">funcName: function name for which the graph is generated; must be present in knowledge base.</td> -</tr> -<tr class="field-even field"><th class="field-name">Param:</th><td class="field-body">inOut: default = None; if specified, must be “input†or “output†string. Specification of this argument enables the generation of the function graph with only input or output variables.</td> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>funcName</strong> (<em>str</em>) – function name for which the graph is generated; must be present in knowledge base.</li> +<li><strong>inOut</strong> (<em>str</em>) – (optiona) if specified, must be “input†or “output†string. Specification of this argument +enables the generation of the function graph with only input or output variables.</li> +</ul> +</td> </tr> -<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">functionGraph</td> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">functionGraph</p> +</td> </tr> </tbody> </table> diff --git a/doc/genindex.html b/doc/genindex.html index d4fc7e384b046f18abaab95c16e062935181eeec..b65a1ce98ef24a55b3bbd0fe1a60a909891a6bc2 100644 --- a/doc/genindex.html +++ b/doc/genindex.html @@ -5,27 +5,18 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> + <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Index — KADMOS 0.7.6 documentation</title> <link rel="stylesheet" href="_static/classic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: './', - VERSION: '0.7.6', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '.txt' - }; - </script> + <script type="text/javascript" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="index" title="Index" href="#" /> <link rel="search" title="Search" href="search.html" /> - </head> - <body> + </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> @@ -72,6 +63,8 @@ <h2 id="A">A</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="KADMOS.html#kadmos.utilities.xml.ExtendedElement.add">add() (kadmos.utilities.xml.ExtendedElement method)</a> +</li> <li><a href="KADMOS.html#kadmos.cmdows.cmdows.CMDOWS.add_actor">add_actor() (kadmos.cmdows.cmdows.CMDOWS method)</a> </li> <li><a href="KADMOS.html#kadmos.cmdows.cmdows.CMDOWS.add_contact">add_contact() (kadmos.cmdows.cmdows.CMDOWS method)</a> @@ -141,6 +134,8 @@ <li><a href="KADMOS.html#kadmos.graph.graph_data.FundamentalProblemGraph.add_problem_formulation">add_problem_formulation() (kadmos.graph.graph_data.FundamentalProblemGraph method)</a> </li> <li><a href="KADMOS.html#kadmos.graph.graph_process.MdaoProcessGraph.add_process">add_process() (kadmos.graph.graph_process.MdaoProcessGraph method)</a> +</li> + <li><a href="KADMOS.html#kadmos.utilities.xml.ExtendedElement.add_process_hierarchy">add_process_hierarchy() (kadmos.utilities.xml.ExtendedElement method)</a> </li> <li><a href="KADMOS.html#kadmos.graph.graph_process.MdaoProcessGraph.add_process_partitions">add_process_partitions() (kadmos.graph.graph_process.MdaoProcessGraph method)</a> </li> @@ -184,6 +179,8 @@ </li> </ul></td> <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="KADMOS.html#kadmos.utilities.xml.ExtendedElement.clean">clean() (kadmos.utilities.xml.ExtendedElement method)</a> +</li> <li><a href="KADMOS.html#kadmos.cmdows.cmdows.CMDOWS">CMDOWS (class in kadmos.cmdows.cmdows)</a> </li> <li><a href="KADMOS.html#kadmos.utilities.general.color_list">color_list() (in module kadmos.utilities.general)</a> @@ -236,15 +233,15 @@ <h2 id="E">E</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%; vertical-align: top;"><ul> - <li><a href="KADMOS.html#kadmos.utilities.xml.Element">Element() (in module kadmos.utilities.xml)</a> -</li> <li><a href="KADMOS.html#kadmos.cmdows.cmdows.CMDOWS.ensure_abs_xpath">ensure_abs_xpath() (kadmos.cmdows.cmdows.CMDOWS method)</a> </li> - </ul></td> - <td style="width: 33%; vertical-align: top;"><ul> <li><a href="KADMOS.html#kadmos.graph.mixin_equation.EquationMixin">EquationMixin (class in kadmos.graph.mixin_equation)</a> </li> + </ul></td> + <td style="width: 33%; vertical-align: top;"><ul> <li><a href="KADMOS.html#kadmos.utilities.general.export_as_json">export_as_json() (in module kadmos.utilities.general)</a> +</li> + <li><a href="KADMOS.html#kadmos.utilities.xml.ExtendedElement">ExtendedElement (class in kadmos.utilities.xml)</a> </li> </ul></td> </tr></table> @@ -259,9 +256,17 @@ <li><a href="KADMOS.html#kadmos.utilities.general.filter_group_vars">filter_group_vars() (in module kadmos.utilities.general)</a> </li> <li><a href="KADMOS.html#kadmos.graph.graph_kadmos.KadmosGraph.find_all_nodes">find_all_nodes() (kadmos.graph.graph_kadmos.KadmosGraph method)</a> +</li> + <li><a href="KADMOS.html#kadmos.utilities.strings.find_between">find_between() (in module kadmos.utilities.strings)</a> +</li> + <li><a href="KADMOS.html#kadmos.utilities.strings.find_until">find_until() (in module kadmos.utilities.strings)</a> </li> </ul></td> <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="KADMOS.html#kadmos.utilities.xml.ExtendedElement.findasttext">findasttext() (kadmos.utilities.xml.ExtendedElement method)</a> +</li> + <li><a href="KADMOS.html#kadmos.utilities.xml.ExtendedElement.finddict">finddict() (kadmos.utilities.xml.ExtendedElement method)</a> +</li> <li><a href="KADMOS.html#kadmos.utilities.general.format_string_for_latex">format_string_for_latex() (in module kadmos.utilities.general)</a> </li> <li><a href="KADMOS.html#kadmos.utilities.general.format_string_for_vistoms">format_string_for_vistoms() (in module kadmos.utilities.general)</a> @@ -285,6 +290,8 @@ <li><a href="KADMOS.html#kadmos.graph.graph_kadmos.KadmosGraph.get_categorized_nodes">get_categorized_nodes() (kadmos.graph.graph_kadmos.KadmosGraph method)</a> </li> <li><a href="KADMOS.html#kadmos.graph.graph_kadmos.KadmosGraph.get_contracted_graph">get_contracted_graph() (kadmos.graph.graph_kadmos.KadmosGraph method)</a> +</li> + <li><a href="KADMOS.html#kadmos.utilities.strings.get_correctly_extended_latex_label">get_correctly_extended_latex_label() (in module kadmos.utilities.strings)</a> </li> <li><a href="KADMOS.html#kadmos.graph.graph_data.DataGraph.get_coupling_dictionary">get_coupling_dictionary() (kadmos.graph.graph_data.DataGraph method)</a> </li> @@ -345,11 +352,11 @@ <li><a href="KADMOS.html#kadmos.utilities.general.get_list_entries">get_list_entries() (in module kadmos.utilities.general)</a> </li> <li><a href="KADMOS.html#kadmos.graph.graph_process.MdaoProcessGraph.get_lowest_psn">get_lowest_psn() (kadmos.graph.graph_process.MdaoProcessGraph method)</a> -</li> - <li><a href="KADMOS.html#kadmos.cmdows.cmdows.CMDOWS.get_mathematical_functions_uids">get_mathematical_functions_uids() (kadmos.cmdows.cmdows.CMDOWS method)</a> </li> </ul></td> <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="KADMOS.html#kadmos.cmdows.cmdows.CMDOWS.get_mathematical_functions_uids">get_mathematical_functions_uids() (kadmos.cmdows.cmdows.CMDOWS method)</a> +</li> <li><a href="KADMOS.html#kadmos.utilities.general.get_mdao_setup">get_mdao_setup() (in module kadmos.utilities.general)</a> </li> <li><a href="KADMOS.html#kadmos.graph.graph_data.FundamentalProblemGraph.get_mdg">get_mdg() (kadmos.graph.graph_data.FundamentalProblemGraph method)</a> @@ -728,17 +735,16 @@ </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> - - - <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> + <div class="searchformwrapper"> <form class="search" action="search.html" method="get"> - <div><input type="text" name="q" /></div> - <div><input type="submit" value="Go" /></div> + <input type="text" name="q" /> + <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> + </div> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> @@ -759,7 +765,7 @@ </div> <div class="footer" role="contentinfo"> © Copyright 2017, Imco van Gent. - Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.4. + Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2. </div> </body> </html> \ No newline at end of file diff --git a/doc/objects.inv b/doc/objects.inv index ec589d32f23a7c1f59d5dd166672198a0c9e9861..a6c0d9f522b33f62a841e5e0124cc46041ff3388 100644 Binary files a/doc/objects.inv and b/doc/objects.inv differ diff --git a/doc/py-modindex.html b/doc/py-modindex.html index 6f7d0ebeae5e622e590a38e63c1b3d9e8d567227..f6c3d71f1cc7ec5b75db9e48096caed92afae763 100644 --- a/doc/py-modindex.html +++ b/doc/py-modindex.html @@ -4,20 +4,12 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> + <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Python Module Index — KADMOS 0.7.6 documentation</title> <link rel="stylesheet" href="_static/classic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: './', - VERSION: '0.7.6', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '.txt' - }; - </script> + <script type="text/javascript" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> @@ -26,8 +18,7 @@ - </head> - <body> + </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> @@ -93,12 +84,14 @@ <div class="sphinxsidebarwrapper"> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> + <div class="searchformwrapper"> <form class="search" action="search.html" method="get"> - <div><input type="text" name="q" /></div> - <div><input type="submit" value="Go" /></div> + <input type="text" name="q" /> + <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> + </div> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> @@ -119,7 +112,7 @@ </div> <div class="footer" role="contentinfo"> © Copyright 2017, Imco van Gent. - Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.4. + Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2. </div> </body> </html> \ No newline at end of file diff --git a/doc/search.html b/doc/search.html index 8d349981b06cd242f660667caa714853c69e6ba4..437be4407b3a0dac0410aae202ca98cd7fbea72e 100644 --- a/doc/search.html +++ b/doc/search.html @@ -4,20 +4,12 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> + <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Search — KADMOS 0.7.6 documentation</title> <link rel="stylesheet" href="_static/classic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: './', - VERSION: '0.7.6', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '.txt' - }; - </script> + <script type="text/javascript" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> @@ -31,8 +23,7 @@ <script type="text/javascript" id="searchindexloader"></script> - </head> - <body> + </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> @@ -98,7 +89,7 @@ </div> <div class="footer" role="contentinfo"> © Copyright 2017, Imco van Gent. - Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.4. + Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2. </div> </body> </html> \ No newline at end of file diff --git a/doc/searchindex.js b/doc/searchindex.js index 4dc6909bde7a61480a7d46e5f164afa5c6665519..16efb84e56cc2b5f197010411cf990c1bb1e8d2c 100644 --- a/doc/searchindex.js +++ b/doc/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["KADMOS"],envversion:52,filenames:["KADMOS.rst"],objects:{"":{kadmos:[0,0,0,"-"]},"kadmos.cmdows.cmdows":{CMDOWS:[0,1,1,""]},"kadmos.cmdows.cmdows.CMDOWS":{add_actor:[0,2,1,""],add_contact:[0,2,1,""],add_dc:[0,2,1,""],add_dc_general_info:[0,2,1,""],add_dc_inputs_element:[0,2,1,""],add_dc_outputs_element:[0,2,1,""],add_dc_performance_info:[0,2,1,""],add_dc_remote_component_info:[0,2,1,""],add_dc_verification:[0,2,1,""],add_element_to_element_of_uid:[0,2,1,""],add_header:[0,2,1,""],add_new_parameters_from_element:[0,2,1,""],add_subelement:[0,2,1,""],assert_element_tag:[0,2,1,""],check:[0,2,1,""],check_references:[0,2,1,""],check_schema:[0,2,1,""],check_uids:[0,2,1,""],ensure_abs_xpath:[0,2,1,""],get_design_competences_uids:[0,2,1,""],get_element_of_uid:[0,2,1,""],get_executable_blocks_uids:[0,2,1,""],get_inputs_uids:[0,2,1,""],get_mathematical_functions_uids:[0,2,1,""],get_outputs_uids:[0,2,1,""],get_parameters_uids:[0,2,1,""],get_used_parameter_uids:[0,2,1,""],get_xpath_of_uid:[0,2,1,""],remove_actor:[0,2,1,""],remove_children_of_uid:[0,2,1,""],remove_children_of_xpath:[0,2,1,""],remove_contact:[0,2,1,""],remove_data_graph_element:[0,2,1,""],remove_element_based_on_uid:[0,2,1,""],remove_element_based_on_xpath:[0,2,1,""],remove_in_and_outputs:[0,2,1,""],remove_inputs:[0,2,1,""],remove_outputs:[0,2,1,""],remove_parameter:[0,2,1,""],remove_parameters:[0,2,1,""],remove_parameters_element:[0,2,1,""],remove_process_graph_element:[0,2,1,""],remove_unused_contacts:[0,2,1,""],remove_workflow_element:[0,2,1,""],resolve_uids:[0,2,1,""],save:[0,2,1,""],schema:[0,2,1,""],simplify:[0,2,1,""],simplify_equations:[0,2,1,""],version:[0,2,1,""]},"kadmos.graph.graph_data":{DataGraph:[0,1,1,""],FundamentalProblemGraph:[0,1,1,""],RepositoryConnectivityGraph:[0,1,1,""]},"kadmos.graph.graph_data.DataGraph":{get_coupling_dictionary:[0,2,1,""],get_coupling_matrix:[0,2,1,""],get_feedback_info:[0,2,1,""],get_highest_instance:[0,2,1,""],get_possible_function_order:[0,2,1,""],mark_as_constraint:[0,2,1,""],mark_as_constraints:[0,2,1,""],mark_as_design_variable:[0,2,1,""],mark_as_design_variables:[0,2,1,""],mark_as_objective:[0,2,1,""],mark_as_qois:[0,2,1,""],minimize_feedback:[0,2,1,""],remove_unused_outputs:[0,2,1,""],sort_nodes_for_process:[0,2,1,""],unmark_variable:[0,2,1,""]},"kadmos.graph.graph_data.FundamentalProblemGraph":{add_function_problem_roles:[0,2,1,""],add_problem_formulation:[0,2,1,""],check_and_get_coupled_functions_groups:[0,2,1,""],check_and_get_design_variables:[0,2,1,""],check_and_get_post_coupling_functions:[0,2,1,""],check_and_get_pre_coupling_functions:[0,2,1,""],create_mdg:[0,2,1,""],create_mpg:[0,2,1,""],determine_scope_constraint_functions:[0,2,1,""],determine_scope_design_variables:[0,2,1,""],get_group_couplings:[0,2,1,""],get_mdg:[0,2,1,""],get_mg_function_ordering:[0,2,1,""],get_objective_node:[0,2,1,""],get_partition_info:[0,2,1,""],get_sub_level_functions:[0,2,1,""],get_sys_post_couplings:[0,2,1,""],get_system_level_functions:[0,2,1,""],impose_mdao_architecture:[0,2,1,""],partition_graph:[0,2,1,""],select_distributed_architecture:[0,2,1,""],select_number_of_partitions:[0,2,1,""]},"kadmos.graph.graph_data.RepositoryConnectivityGraph":{create_mathematical_problem:[0,2,1,""],get_fpg_based_on_function_nodes:[0,2,1,""],get_fpg_based_on_list_functions:[0,2,1,""],get_fpg_based_on_sinks:[0,2,1,""],get_fpg_by_function_nodes:[0,2,1,""],get_function_paths_by_objective:[0,2,1,""],get_path_combinations:[0,2,1,""],select_function_combination_from:[0,2,1,""]},"kadmos.graph.graph_kadmos":{KadmosGraph:[0,1,1,""]},"kadmos.graph.graph_kadmos.KadmosGraph":{add_contact:[0,2,1,""],add_contact_roles:[0,2,1,""],add_dc_general_info:[0,2,1,""],add_dc_performance_info:[0,2,1,""],add_dc_remote_component_info:[0,2,1,""],add_default_description:[0,2,1,""],add_default_name:[0,2,1,""],add_edge:[0,2,1,""],add_instance:[0,2,1,""],add_node:[0,2,1,""],add_objective_function_by_nodes:[0,2,1,""],change_graph_class:[0,2,1,""],check:[0,2,1,""],check_cmdows_integrity:[0,2,1,""],check_for_coupling:[0,2,1,""],copy_as:[0,2,1,""],copy_edge:[0,2,1,""],copy_node_with_suffix:[0,2,1,""],count_function_nodes:[0,2,1,""],create_dsm:[0,2,1,""],deepcopy:[0,2,1,""],deepcopy_as:[0,2,1,""],disconnect_problematic_variables_from:[0,2,1,""],find_all_nodes:[0,2,1,""],get_adjacency_matrix:[0,2,1,""],get_architecture_node_ids:[0,2,1,""],get_architecture_node_labels:[0,2,1,""],get_categorized_nodes:[0,2,1,""],get_contracted_graph:[0,2,1,""],get_direct_coupling_nodes:[0,2,1,""],get_first_node_instance:[0,2,1,""],get_function_graph:[0,2,1,""],get_function_metadata:[0,2,1,""],get_function_nodes:[0,2,1,""],get_graph_properties:[0,2,1,""],get_node_attributes:[0,2,1,""],get_node_subcategory:[0,2,1,""],get_nodes_based_on_strings:[0,2,1,""],get_nodes_indegree:[0,2,1,""],get_nodes_outdegree:[0,2,1,""],get_nodes_subcategory:[0,2,1,""],get_number_of_couplings:[0,2,1,""],get_same_graph_class:[0,2,1,""],get_sources:[0,2,1,""],get_subgraph_by_function_nodes:[0,2,1,""],get_system_inputs:[0,2,1,""],get_targets:[0,2,1,""],graph_has_nested_attributes:[0,2,1,""],has_nodes:[0,2,1,""],inspect:[0,2,1,""],inspect_node:[0,2,1,""],inspect_nodes:[0,2,1,""],load_cmdows:[0,2,1,""],make_all_variables_valid:[0,2,1,""],merge_function_modes:[0,2,1,""],merge_function_nodes_based_on_modes:[0,2,1,""],merge_functions:[0,2,1,""],merge_parallel_functions:[0,2,1,""],merge_sequential_functions:[0,2,1,""],node_is_function:[0,2,1,""],node_is_hole:[0,2,1,""],node_is_objective_function:[0,2,1,""],node_is_output:[0,2,1,""],node_is_variable:[0,2,1,""],plot_adjacency_matrix:[0,2,1,""],plot_graph:[0,2,1,""],print_graph:[0,2,1,""],relabel_function_nodes:[0,2,1,""],remove_function_nodes:[0,2,1,""],save:[0,2,1,""],select_objectives_from_graph:[0,2,1,""],split_variables:[0,2,1,""]},"kadmos.graph.graph_process":{MdaoProcessGraph:[0,1,1,""]},"kadmos.graph.graph_process.MdaoProcessGraph":{add_process:[0,2,1,""],add_process_partitions:[0,2,1,""],connect_nested_iterators:[0,2,1,""],get_lowest_psn:[0,2,1,""],get_node_text:[0,2,1,""],get_ordered_cycles:[0,2,1,""],get_process_hierarchy:[0,2,1,""],get_process_list:[0,2,1,""],inspect_process:[0,2,1,""]},"kadmos.graph.mixin_equation":{EquationMixin:[0,1,1,""]},"kadmos.graph.mixin_equation.EquationMixin":{add_equation:[0,2,1,""],add_equation_label:[0,2,1,""],add_equation_labels:[0,2,1,""],add_mathematical_function:[0,2,1,""]},"kadmos.graph.mixin_mdao":{MdaoMixin:[0,1,1,""]},"kadmos.graph.mixin_mdao.MdaoMixin":{insert_node_on_diagonal:[0,2,1,""],remove_node_from_diagonal:[0,2,1,""]},"kadmos.graph.mixin_vistoms":{VistomsMixin:[0,1,1,""]},"kadmos.graph.mixin_vistoms.VistomsMixin":{vistoms_add:[0,2,1,""],vistoms_create:[0,2,1,""]},"kadmos.knowledgebase.knowledgebase":{KnowledgeBase:[0,1,1,""]},"kadmos.knowledgebase.knowledgebase.KnowledgeBase":{get_function_dependencies:[0,2,1,""],get_function_graph:[0,2,1,""],get_kb_graphs:[0,2,1,""],get_rcg:[0,2,1,""],print_circular_connections_in_log:[0,2,1,""]},"kadmos.utilities":{general:[0,0,0,"-"],printing:[0,0,0,"-"],strings:[0,0,0,"-"],xml:[0,0,0,"-"]},"kadmos.utilities.general":{assert_dict_keys:[0,3,1,""],color_list:[0,3,1,""],convert_bytes:[0,3,1,""],dict_to_ord_dict:[0,3,1,""],export_as_json:[0,3,1,""],file_size:[0,3,1,""],file_size_MB:[0,3,1,""],filter_group_vars:[0,3,1,""],format_string_for_latex:[0,3,1,""],format_string_for_vistoms:[0,3,1,""],get_element_dict:[0,3,1,""],get_friendly_id:[0,3,1,""],get_group_vars:[0,3,1,""],get_list_entries:[0,3,1,""],get_mdao_setup:[0,3,1,""],get_uid:[0,3,1,""],get_unique_friendly_id:[0,3,1,""],hex_to_rgb:[0,3,1,""],make_camel_case:[0,3,1,""],make_plural:[0,3,1,""],make_singular:[0,3,1,""],open_file:[0,3,1,""],remove_if_exists:[0,3,1,""],test_attr_cond:[0,3,1,""],transform_data_into_strings:[0,3,1,""],transform_string_into_format:[0,3,1,""],translate_dict_keys:[0,3,1,""],translate_list:[0,3,1,""],unmake_camel_case:[0,3,1,""]},"kadmos.utilities.printing":{print_in_table:[0,3,1,""],print_indexed_list:[0,3,1,""]},"kadmos.utilities.xml":{ExtendedElement:[0,1,1,""],get_element_details:[0,3,1,""],get_uid_search_xpath:[0,3,1,""],merge:[0,3,1,""],recursively_empty:[0,3,1,""],recursively_stringify:[0,3,1,""],recursively_unique_attribute:[0,3,1,""]},"kadmos.utilities.xml.ExtendedElement":{add:[0,2,1,""],add_process_hierarchy:[0,2,1,""],clean:[0,2,1,""],findasttext:[0,2,1,""],finddict:[0,2,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function"},terms:{"13S":0,"1e4":0,"boolean":0,"byte":0,"case":0,"class":0,"default":0,"export":0,"final":0,"float":0,"function":0,"import":0,"int":0,"long":0,"new":0,"return":0,"super":0,"true":0,"try":0,"while":0,Adding:0,For:0,IDs:0,The:0,These:0,Use:0,Will:0,__all__:0,__none__:0,_check_category_a:0,_check_category_b:0,_check_category_c:0,abbreviate_keyword:0,abl:0,abov:0,absolut:0,access:0,accord:0,account:0,action:0,actual:0,add:0,add_actor:0,add_contact:0,add_contact_rol:0,add_dc:0,add_dc_general_info:0,add_dc_inputs_el:0,add_dc_outputs_el:0,add_dc_performance_info:0,add_dc_remote_component_info:0,add_dc_verif:0,add_default_descript:0,add_default_nam:0,add_edg:0,add_element_to_element_of_uid:0,add_equ:0,add_equation_label:0,add_function_problem_rol:0,add_head:0,add_inst:0,add_mathematical_funct:0,add_new_parameters_from_el:0,add_nod:0,add_objective_function_by_nod:0,add_problem_formul:0,add_process:0,add_process_hierarchi:0,add_process_partit:0,add_subel:0,added:0,addit:0,address:0,adher:0,adjac:0,adjust:0,adress:0,advanc:0,aerodynam:0,aerospac:0,after:0,agil:0,aircraft:0,algorithm:0,all:0,all_keys_requir:0,all_nod:0,allow:0,allow_unconverged_coupl:0,alreadi:0,als:0,also:0,american:[],amount:0,analys:0,analysi:0,analyt:0,analyz:0,ani:0,anoth:0,append:0,appli:0,applic:0,appyl:0,arbitrari:0,architect:0,architectur:0,archiv:0,arg:0,argument:0,around:0,as_view:0,ascend:0,ascens:0,ascii:0,ask:0,assert:0,assert_dict_kei:0,assert_element_tag:0,assess:0,assign:0,associ:0,assum:0,ast:0,attr:0,attr_cond:0,attr_dict:0,attr_exclud:0,attr_includ:0,attr_list:0,attr_valu:0,attrb:0,attrib:0,attribut:0,automat:0,avail:0,back:0,base:0,baselin:0,basestr:0,becaus:0,becom:0,been:0,befor:0,being:0,belong:0,below:0,best:0,between:0,bisect:0,bli:0,bliss:0,block:0,bool:0,both:0,bound:0,box:0,bracket:0,branch:0,build:0,busi:0,c14n:0,calcul:0,camel:0,camel_case_convers:0,camelcas:0,can:0,capac:0,care:0,casi:0,categori:0,certain:0,chang:0,change_graph_class:0,charact:0,characterist:0,check:0,check_and_get_coupled_functions_group:0,check_and_get_design_vari:0,check_and_get_post_coupling_funct:0,check_and_get_pre_coupling_funct:0,check_cmdows_integr:0,check_for_coupl:0,check_graph:0,check_list:0,check_refer:0,check_schema:0,check_uid:0,child:0,children:0,children_to_keep:0,children_to_remov:0,choos:0,circular:0,circularconnect:0,clariti:0,clean:0,close:0,clutter:0,cmdowsvers:0,cnstrnt_var:0,collaborative_engin:0,collaborativeengin:0,collect:0,collid:0,collis:0,color:0,color_list:0,color_set:0,colors_based_on:0,column:0,combin:0,common:0,compani:0,compar:0,comparison:0,compet:0,compil:0,compile_pdf:0,complet:0,complex:0,compon:0,compos:0,compress:0,comput:0,condit:0,config:0,configur:0,connect:0,connect_nested_iter:0,conserv:0,consid:0,consider:0,consist:0,consistent_root:0,consol:0,constraint:0,contact:0,contact_uid:0,contain:0,content:0,contig:0,continu:0,contract:0,contracted_graph:0,contraction_level:0,conv:0,convent:0,converg:0,convers:0,convert:0,convert_byt:0,coor:0,copi:0,copy_a:0,copy_edg:0,copy_node_with_suffix:0,copy_typ:0,correspond:0,could:0,count:0,count_function_nod:0,countri:0,coupl:0,coupled_functions_group:0,coupling_dict:0,coupling_functions_group:0,coupling_strength:0,cpac:0,creat:0,create_dsm:0,create_mathematical_problem:0,create_mdg:0,create_mpg:0,creation:0,creation_d:0,creator:0,creator_uid:0,criteria:0,cross:0,current:0,current_group_idx:0,custom:0,cwd:0,cycl:0,d3j:0,data:0,data_exchange_dict:0,date:0,datetim:0,dc_uid:0,declar:0,decrib:0,deep:0,deepcopi:0,deepcopy_a:0,defin:0,definit:0,degre:0,delet:0,delft:0,depart:0,depend:0,deprec:0,des_var:0,descend:0,describ:0,descript:0,design:0,designcompet:0,desir:0,destin:0,destination_fold:0,detail:0,determin:0,determine_scope_constraint_funct:0,determine_scope_design_vari:0,develop:0,dewit:0,diagon:0,diagonal_po:0,diagram:0,dic:0,dict:0,dict_to_ord_dict:0,dictionari:0,differ:0,differenti:0,digraph:0,dimens:0,direct:0,directli:0,directori:0,disciplin:0,disciplinari:0,disconnect:0,disconnect_collided_target:0,disconnect_problematic_variables_from:0,disconnect_shared_sourc:0,disregard:0,distinguis:0,distribut:0,divid:0,doe:0,doe_set:0,doesn:0,doing:0,done:0,download:0,draw:0,dsm:0,dtc:0,dubreuil:0,due:0,dummy_method:0,dummy_result:0,dummy_vers:0,duplic:0,dynam:0,each:0,easi:0,edg:0,edge_label:0,edge_or_nod:0,edu:0,either:0,element:0,element_to_add:0,elementtre:0,email:0,employe:0,empti:0,enabl:0,encod:0,end:0,end_in_iterative_nod:0,engin:0,enrich:0,ensur:0,ensure_abs_xpath:0,entri:0,entries_to_remov:0,equat:0,error:0,especi:0,etc:0,evalu:0,everi:0,everyth:0,exampl:0,exblock_uid:0,exce:0,except:0,exchang:0,exclud:0,exclus:0,execut:0,executableblock:0,exist:0,expect:0,expected_amount:0,expected_kei:0,expected_tag:0,expected_tag_new_el:0,expected_tag_uid_el:0,expected_text:0,explicit:0,export_as_json:0,express:0,extend:0,extendedel:0,extens:0,extern:0,extra:0,extract:0,fals:0,feedback:0,feedforward:0,fidel:0,fidelity_level:0,fig_num:0,fig_siz:0,figur:0,file:0,file_nam:0,file_path:0,file_ref:0,file_s:0,file_size_mb:0,file_typ:0,filenam:0,filevers:0,filter:0,filter_group_var:0,filter_set:0,find:0,find_all_nod:0,findasttext:0,finddict:0,findtext:0,first:0,folder:0,follow:0,form:0,format:0,format_string_for_latex:0,format_string_for_vistom:0,formul:0,found:0,fpg:0,french:0,from:0,front:0,full:0,funcnam:0,function_nod:0,function_ord:0,function_order_method:0,function_typ:0,functiongraph:0,fundament:0,further:0,futur:0,gauss:0,get:0,get_adjacency_matrix:0,get_architecture_node_id:0,get_architecture_node_label:0,get_categorized_nod:0,get_contracted_graph:0,get_coupling_dictionari:0,get_coupling_matrix:0,get_design_competences_uid:0,get_direct_coupling_nod:0,get_element_detail:0,get_element_dict:0,get_element_of_uid:0,get_evalu:0,get_executable_blocks_uid:0,get_feedback_info:0,get_first_node_inst:0,get_fpg_based_on_function_nod:0,get_fpg_based_on_list_funct:0,get_fpg_based_on_sink:0,get_fpg_by_function_nod:0,get_friendly_id:0,get_function_depend:0,get_function_graph:0,get_function_metadata:0,get_function_nod:0,get_function_paths_by_object:0,get_graph_properti:0,get_group_coupl:0,get_group_var:0,get_highest_inst:0,get_inputs_uid:0,get_kb_graph:0,get_list_entri:0,get_lowest_psn:0,get_mathematical_functions_uid:0,get_mdao_setup:0,get_mdg:0,get_mg_function_ord:0,get_node_attribut:0,get_node_subcategori:0,get_node_text:0,get_nodes_based_on_str:0,get_nodes_indegre:0,get_nodes_outdegre:0,get_nodes_subcategori:0,get_number_of_coupl:0,get_objective_nod:0,get_ordered_cycl:0,get_outputs_uid:0,get_parameters_uid:0,get_partition_info:0,get_path_combin:0,get_possible_function_ord:0,get_process_hierarchi:0,get_process_list:0,get_rcg:0,get_same_graph_class:0,get_sourc:0,get_sub_level_funct:0,get_subgraph_by_function_nod:0,get_sys_post_coupl:0,get_system_input:0,get_system_level_funct:0,get_target:0,get_uid:0,get_uid_search_xpath:0,get_unique_friendly_id:0,get_used_parameter_uid:0,get_xpath_of_uid:0,give:0,given:0,gkhome:0,glaro:0,global:0,global_cnstrnt_funct:0,global_objective_funct:0,gov:0,graph_check_crit:0,graph_class:0,graph_data:0,graph_has_nested_attribut:0,graph_id:0,graph_kadmo:0,graph_process:0,graph_properti:0,graphml:0,group:0,group_dict:0,guarante:0,guess:0,handl:0,has:0,has_nod:0,hash:0,hashabl:0,have:0,header:0,hello:0,here:0,hex:0,hex_to_rgb:0,hierarchi:0,higher:0,higher_level_remov:0,highest:0,hold:0,hole:0,how:0,howev:0,html:0,http:0,identifi:0,idf:0,ids:0,ignor:0,ignore_func:0,ignore_list:0,ignore_mod:0,ignore_outdegre:0,ignorefunct:0,illustr:0,implement:0,impose_mdao_architectur:0,includ:0,include_al:0,include_reference_data:0,include_run_tim:0,include_system_var:0,increas:0,indec:0,indegre:0,indent:0,indentifi:0,independ:0,index:0,index_bracket:0,indic:0,info:0,inform:0,initi:0,inout:0,inp:0,input:0,input_list:0,input_nod:0,inputless:0,inputs_el:0,insert:0,insert_node_on_diagon:0,insid:0,inspect:0,inspect_nod:0,inspect_process:0,instanc:0,instance_id:0,instanceid:0,instead:0,integ:0,integr:0,interest:0,invalid:0,invalid_leaf_el:0,italian:[],item:0,iter:0,itertool:0,its:0,itself:0,ivang:0,japanes:[],jet:0,job:0,job_:0,job_nam:0,json:0,just:0,kb_dir_path:0,kdm:0,keep:0,keep_empty_el:0,keep_objective_vari:0,keep_run:0,keep_tex_fil:0,kei:0,kept:0,key_ord:0,keys_to_be_remov:0,keyword:0,knowledg:0,knowledge_bas:0,kwarg:0,lab:0,label:0,label_extens:0,labeling_method:0,lafag:0,languag:0,larg:0,last:0,latex:0,lead:0,leaf:0,least:0,left:0,length:0,less:0,let:0,level:0,librari:0,limit:0,line:0,link:0,list:0,list_of_funct:0,list_of_nod:0,list_of_sink:0,list_of_tool:0,literatur:0,load:0,load_cmdow:0,local:0,local_cnstrnt_func:0,local_objective_funct:0,log:0,loop:0,lost:0,lower:0,lower_bound:0,lower_cas:0,lowest:0,maaik:0,mainli:0,maintain:0,make:0,make_all_variables_valid:0,make_camel_cas:0,make_plur:0,make_plural_opt:0,make_singular:0,mani:0,manipul:0,manual:0,map:0,mark:0,mark_as_constraint:0,mark_as_design_vari:0,mark_as_object:0,mark_as_qoi:0,master:0,match:0,mathemat:0,matplotlib:0,matrix:0,max_func:0,maxim:0,maximum:0,mda:0,mda_typ:0,mdao:0,mdao_architectur:0,mdao_definit:0,mdao_setup:0,mdaodatagraph:0,mdaograph:0,mddewit:0,mdf:0,mdg:0,mdo:0,mdo_architectur:0,meet:0,merg:0,merge_func:0,merge_funct:0,merge_function_mod:0,merge_function_nodes_based_on_mod:0,merge_parallel_funct:0,merge_sequential_funct:0,merger:0,messag:0,metadata:0,method:0,meti:0,mg_function_ord:0,might:0,min_func:0,mind:0,minim:0,minimize_feedback:0,minimum:0,mixin_equ:0,mixin_mdao:0,mixin_vistom:0,mode:0,mode_id:0,modeid:0,model:0,model_definit:0,modul:0,more:0,most:0,mpg:0,multi_start:0,multidigraph:0,multigraph:0,multipl:0,must:0,mutabl:0,my_obj_fcn_nam:0,mygraph:0,n_coupling_var:0,n_disciplin:0,n_global_constraint:0,n_global_var:0,n_limit:0,n_local_constraint:0,n_local_var:0,n_part:0,name:0,named_obj_fcn:0,namespac:0,nasa:0,nativ:[],need:0,neighbor:0,nest:0,networkx:0,new_edg:0,new_label:0,newli:0,next:0,next_sequ:0,node:0,node_id:0,node_is_funct:0,node_is_hol:0,node_is_objective_funct:0,node_is_output:0,node_is_vari:0,node_label:0,node_select:0,nomin:0,nominal_valu:0,non:0,none:0,nonetyp:0,notat:0,note:0,notifi:0,notification_messag:0,ntr:0,num:0,number:0,number_of_group:0,number_of_nod:0,numer:0,obj_vars_cov:0,object:0,obtain:0,off:0,old:0,old_edg:0,one:0,onera:0,ones:0,onli:0,only_add_if_valu:0,only_feedback:0,open:0,open_fil:0,open_pdf:0,openmdao:0,oper:0,operator_uid:0,opt:0,optim:0,option:0,order:0,ordereddict:0,organ:0,organiz:0,origin:0,other:0,otherwis:0,our:0,out:0,outdegre:0,outgo:0,outp:0,output:0,output_nod:0,outputless:0,outputs_el:0,overal:0,overlap:0,overview:0,owner:0,owner_uid:0,packag:0,page:0,pair:0,parallel:0,param:0,param_uid:0,paramet:0,parameters_el:0,params_uid:0,part:0,partit:0,partition_graph:0,partition_rang:0,partition_vari:0,pass:0,pate:0,path:0,path_or_el:0,paus:0,pdf:0,per:0,percentag:0,perform:0,pickl:0,place:0,platform:0,pleas:0,plot:0,plot_adjacency_matrix:0,plot_combo:0,plot_graph:0,plot_pareto_front:0,plural:0,png:0,point:0,posit:0,possibl:0,post:0,post_coupling_funct:0,pre:0,pre_coupling_funct:0,precis:0,predecessor:0,prefer:0,prefix:0,presenc:0,present:0,pretti:0,pretty_print:0,previou:0,previous_sequ:0,print_attribut:0,print_circular_connections_in_log:0,print_combo:0,print_contain:0,print_coupl:0,print_graph:0,print_in_log:0,print_in_t:0,print_indec:0,print_indexed_list:0,problem:0,problem_rol:0,problemat:0,problemgraph:0,process:0,process_hierarchi:0,process_step:0,processgraph:0,produc:0,product:0,project:0,prompt:0,properti:0,propuls:0,provid:0,psg:0,psn:0,pull:0,pure:0,purpos:0,pymerg:0,pyplot:0,python:0,quantiti:0,queri:0,quickli:0,quot:0,rais:0,raise_error:0,raise_error_if_tru:0,rang:0,rce:0,rcg:0,recognis:0,recommend:0,recurs:0,recursively_empti:0,recursively_stringifi:0,recursively_unique_attribut:0,reduc:0,ref:0,refer:0,reference_fil:0,reference_valu:0,refin:0,regular:0,reinstanti:0,rel:0,relabel:0,relabel_function_nod:0,relat:0,remain:0,remi:0,remot:0,remote_engin:0,remov:0,remove_actor:0,remove_after_compress:0,remove_children_of_uid:0,remove_children_of_xpath:0,remove_contact:0,remove_data_graph_el:0,remove_element_based_on_uid:0,remove_element_based_on_xpath:0,remove_function_nod:0,remove_if_exist:0,remove_in_and_output:0,remove_input:0,remove_nod:0,remove_node_from_diagon:0,remove_output:0,remove_paramet:0,remove_parameters_el:0,remove_process_graph_el:0,remove_unused_contact:0,remove_unused_output:0,remove_workflow_el:0,renam:0,replac:0,replacement_id:0,repres:0,request:0,requir:0,resolv:0,resolve_uid:0,resourc:0,respect:0,result:0,retriev:0,revers:0,rgb:0,right:0,role:0,root:0,round:0,row1:0,row2:0,rtype:0,run:0,run_tim:0,runtim:0,safe:0,same:0,sampl:0,sampledir:0,samplefil:0,satisfi:0,save:0,save_a:0,scalar:0,schema:0,scope:0,script:0,search:0,second:0,see:0,seidel:0,select:0,select_distributed_architectur:0,select_function_combination_from:0,select_number_of_partit:0,select_objectives_from_graph:0,self:0,sellar:0,separ:0,sequenc:0,server:0,set:0,sever:0,shallow:0,share:0,shorter:0,should:0,show:0,show_now:0,shown:0,side:0,sidebar:0,signific:0,simpl:0,simpli:0,simplifi:0,simplify_equ:0,sinc:0,singl:0,single_or_multi:0,single_or_multi_execut:0,singular:0,sink:0,situat:0,size:0,slave:0,small:0,some:0,some_fold:0,some_url:0,song:0,sonic:0,sort:0,sort_bi:0,sort_kei:0,sort_nodes_for_process:0,sourc:0,space:0,specif:0,specifi:0,split:0,split_vari:0,splittabl:0,spring:0,squar:0,standard:0,start:0,start_step:0,statement:0,statu:0,step:0,still:0,stop:0,store:0,str:0,stringifi:0,structur:0,student:0,sub:0,subcategori:0,subclass:0,subel:0,subelement_xpath_tag:0,subgraph:0,subgroup:0,subscript:0,subset:0,subsystem:0,suffix:0,suit:0,summar:0,summarize_var:0,suppli:0,sure:0,svg:0,sylvain:0,symbol:0,sys_level_post_coupl:0,system:0,system_input:0,system_vari:0,tabl:0,tabul:0,tag:0,take:0,taken:0,target:0,telephon:0,test:0,test_attr_cond:0,test_valu:0,tex:0,text:0,textfil:0,thank:0,thei:0,them:0,therefor:0,thi:0,think:[],third:0,though:0,through:0,thu:0,time:0,timestamp:0,titl:0,togeth:0,tool:0,tool_specialist:0,toolspecialist:0,total:0,tpwgt:0,transform:0,transform_data_into_str:0,transform_string_into_format:0,translat:0,translate_dict_kei:0,translate_list:0,tree:0,tudelft:0,tupl:0,two:0,type:0,uid:0,uid_length:0,uml:0,umn:0,unconnect:0,under:0,underscor:0,undirect:0,uniqu:0,unmake_camel_cas:0,unmark:0,unmark_vari:0,unnamed_funct:0,until:0,unus:0,updat:0,upper:0,upper_bound:0,urlsit:0,usag:0,use:0,use_d3js_node_id:0,use_png_fig:0,use_pretty_print:0,used:0,used_id:0,useful:0,user:0,user_prompt_select_opt:0,using:0,utf:0,utm:0,uxpath:0,valid:0,valu:0,var_dim:0,var_valu:0,variabl:0,variableinstance1:0,variableinstance2:0,variableinstance3:0,variableinstance4:0,varieti:0,variou:0,verif:0,verifi:0,versatil:0,version:0,vistom:0,vistoms_add:0,vistoms_cr:0,vistoms_dir:0,vistoms_vers:0,visual:0,wai:0,wang:0,want:0,warn:0,weight:0,well:0,were:0,when:0,whether:0,which:0,window:0,wing:0,wit:0,within:0,without:0,work:0,workflow:0,write:0,write_problem_to_textfil:0,written:0,xdsm:0,xml_declar:0,xml_file:0,xmlschema:0,xpath:0,xpath_exclud:0,xpath_includ:0,xsd:0,yet:0,you:0,your:0,zero:0,zhang:0,zip:0},titles:["Welcome to KADMOS\u2019s documentation!"],titleterms:{cmdow:0,code:0,datagraph:0,document:0,equationmixin:0,fundamentalproblemgraph:0,gener:0,graph:0,kadmo:0,kadmosgraph:0,knowledgebas:0,mdaomixin:0,mdaoprocessgraph:0,print:0,repositoryconnectivitygraph:0,string:0,util:0,vistomsmixin:0,welcom:0,xml:0}}) \ No newline at end of file +Search.setIndex({docnames:["KADMOS"],envversion:52,filenames:["KADMOS.rst"],objects:{"":{kadmos:[0,0,0,"-"]},"kadmos.cmdows.cmdows":{CMDOWS:[0,1,1,""]},"kadmos.cmdows.cmdows.CMDOWS":{add_actor:[0,2,1,""],add_contact:[0,2,1,""],add_dc:[0,2,1,""],add_dc_general_info:[0,2,1,""],add_dc_inputs_element:[0,2,1,""],add_dc_outputs_element:[0,2,1,""],add_dc_performance_info:[0,2,1,""],add_dc_remote_component_info:[0,2,1,""],add_dc_verification:[0,2,1,""],add_element_to_element_of_uid:[0,2,1,""],add_header:[0,2,1,""],add_new_parameters_from_element:[0,2,1,""],add_subelement:[0,2,1,""],assert_element_tag:[0,2,1,""],check:[0,2,1,""],check_references:[0,2,1,""],check_schema:[0,2,1,""],check_uids:[0,2,1,""],ensure_abs_xpath:[0,2,1,""],get_design_competences_uids:[0,2,1,""],get_element_of_uid:[0,2,1,""],get_executable_blocks_uids:[0,2,1,""],get_inputs_uids:[0,2,1,""],get_mathematical_functions_uids:[0,2,1,""],get_outputs_uids:[0,2,1,""],get_parameters_uids:[0,2,1,""],get_used_parameter_uids:[0,2,1,""],get_xpath_of_uid:[0,2,1,""],remove_actor:[0,2,1,""],remove_children_of_uid:[0,2,1,""],remove_children_of_xpath:[0,2,1,""],remove_contact:[0,2,1,""],remove_data_graph_element:[0,2,1,""],remove_element_based_on_uid:[0,2,1,""],remove_element_based_on_xpath:[0,2,1,""],remove_in_and_outputs:[0,2,1,""],remove_inputs:[0,2,1,""],remove_outputs:[0,2,1,""],remove_parameter:[0,2,1,""],remove_parameters:[0,2,1,""],remove_parameters_element:[0,2,1,""],remove_process_graph_element:[0,2,1,""],remove_unused_contacts:[0,2,1,""],remove_workflow_element:[0,2,1,""],resolve_uids:[0,2,1,""],save:[0,2,1,""],schema:[0,2,1,""],simplify:[0,2,1,""],simplify_equations:[0,2,1,""],version:[0,2,1,""]},"kadmos.graph.graph_data":{DataGraph:[0,1,1,""],FundamentalProblemGraph:[0,1,1,""],RepositoryConnectivityGraph:[0,1,1,""]},"kadmos.graph.graph_data.DataGraph":{get_coupling_dictionary:[0,2,1,""],get_coupling_matrix:[0,2,1,""],get_feedback_info:[0,2,1,""],get_highest_instance:[0,2,1,""],get_possible_function_order:[0,2,1,""],mark_as_constraint:[0,2,1,""],mark_as_constraints:[0,2,1,""],mark_as_design_variable:[0,2,1,""],mark_as_design_variables:[0,2,1,""],mark_as_objective:[0,2,1,""],mark_as_qois:[0,2,1,""],minimize_feedback:[0,2,1,""],remove_unused_outputs:[0,2,1,""],sort_nodes_for_process:[0,2,1,""],unmark_variable:[0,2,1,""]},"kadmos.graph.graph_data.FundamentalProblemGraph":{add_function_problem_roles:[0,2,1,""],add_problem_formulation:[0,2,1,""],check_and_get_coupled_functions_groups:[0,2,1,""],check_and_get_design_variables:[0,2,1,""],check_and_get_post_coupling_functions:[0,2,1,""],check_and_get_pre_coupling_functions:[0,2,1,""],create_mdg:[0,2,1,""],create_mpg:[0,2,1,""],determine_scope_constraint_functions:[0,2,1,""],determine_scope_design_variables:[0,2,1,""],get_group_couplings:[0,2,1,""],get_mdg:[0,2,1,""],get_mg_function_ordering:[0,2,1,""],get_objective_node:[0,2,1,""],get_partition_info:[0,2,1,""],get_sub_level_functions:[0,2,1,""],get_sys_post_couplings:[0,2,1,""],get_system_level_functions:[0,2,1,""],impose_mdao_architecture:[0,2,1,""],partition_graph:[0,2,1,""],select_distributed_architecture:[0,2,1,""],select_number_of_partitions:[0,2,1,""]},"kadmos.graph.graph_data.RepositoryConnectivityGraph":{create_mathematical_problem:[0,2,1,""],get_fpg_based_on_function_nodes:[0,2,1,""],get_fpg_based_on_list_functions:[0,2,1,""],get_fpg_based_on_sinks:[0,2,1,""],get_fpg_by_function_nodes:[0,2,1,""],get_function_paths_by_objective:[0,2,1,""],get_path_combinations:[0,2,1,""],select_function_combination_from:[0,2,1,""]},"kadmos.graph.graph_kadmos":{KadmosGraph:[0,1,1,""]},"kadmos.graph.graph_kadmos.KadmosGraph":{add_contact:[0,2,1,""],add_contact_roles:[0,2,1,""],add_dc_general_info:[0,2,1,""],add_dc_performance_info:[0,2,1,""],add_dc_remote_component_info:[0,2,1,""],add_default_description:[0,2,1,""],add_default_name:[0,2,1,""],add_edge:[0,2,1,""],add_instance:[0,2,1,""],add_node:[0,2,1,""],add_objective_function_by_nodes:[0,2,1,""],change_graph_class:[0,2,1,""],check:[0,2,1,""],check_cmdows_integrity:[0,2,1,""],check_for_coupling:[0,2,1,""],copy_as:[0,2,1,""],copy_edge:[0,2,1,""],copy_node_with_suffix:[0,2,1,""],count_function_nodes:[0,2,1,""],create_dsm:[0,2,1,""],deepcopy:[0,2,1,""],deepcopy_as:[0,2,1,""],disconnect_problematic_variables_from:[0,2,1,""],find_all_nodes:[0,2,1,""],get_adjacency_matrix:[0,2,1,""],get_architecture_node_ids:[0,2,1,""],get_architecture_node_labels:[0,2,1,""],get_categorized_nodes:[0,2,1,""],get_contracted_graph:[0,2,1,""],get_direct_coupling_nodes:[0,2,1,""],get_first_node_instance:[0,2,1,""],get_function_graph:[0,2,1,""],get_function_metadata:[0,2,1,""],get_function_nodes:[0,2,1,""],get_graph_properties:[0,2,1,""],get_node_attributes:[0,2,1,""],get_node_subcategory:[0,2,1,""],get_nodes_based_on_strings:[0,2,1,""],get_nodes_indegree:[0,2,1,""],get_nodes_outdegree:[0,2,1,""],get_nodes_subcategory:[0,2,1,""],get_number_of_couplings:[0,2,1,""],get_same_graph_class:[0,2,1,""],get_sources:[0,2,1,""],get_subgraph_by_function_nodes:[0,2,1,""],get_system_inputs:[0,2,1,""],get_targets:[0,2,1,""],graph_has_nested_attributes:[0,2,1,""],has_nodes:[0,2,1,""],inspect:[0,2,1,""],inspect_node:[0,2,1,""],inspect_nodes:[0,2,1,""],load_cmdows:[0,2,1,""],make_all_variables_valid:[0,2,1,""],merge_function_modes:[0,2,1,""],merge_function_nodes_based_on_modes:[0,2,1,""],merge_functions:[0,2,1,""],merge_parallel_functions:[0,2,1,""],merge_sequential_functions:[0,2,1,""],node_is_function:[0,2,1,""],node_is_hole:[0,2,1,""],node_is_objective_function:[0,2,1,""],node_is_output:[0,2,1,""],node_is_variable:[0,2,1,""],plot_adjacency_matrix:[0,2,1,""],plot_graph:[0,2,1,""],print_graph:[0,2,1,""],relabel_function_nodes:[0,2,1,""],remove_function_nodes:[0,2,1,""],save:[0,2,1,""],select_objectives_from_graph:[0,2,1,""],split_variables:[0,2,1,""]},"kadmos.graph.graph_process":{MdaoProcessGraph:[0,1,1,""]},"kadmos.graph.graph_process.MdaoProcessGraph":{add_process:[0,2,1,""],add_process_partitions:[0,2,1,""],connect_nested_iterators:[0,2,1,""],get_lowest_psn:[0,2,1,""],get_node_text:[0,2,1,""],get_ordered_cycles:[0,2,1,""],get_process_hierarchy:[0,2,1,""],get_process_list:[0,2,1,""],inspect_process:[0,2,1,""]},"kadmos.graph.mixin_equation":{EquationMixin:[0,1,1,""]},"kadmos.graph.mixin_equation.EquationMixin":{add_equation:[0,2,1,""],add_equation_label:[0,2,1,""],add_equation_labels:[0,2,1,""],add_mathematical_function:[0,2,1,""]},"kadmos.graph.mixin_mdao":{MdaoMixin:[0,1,1,""]},"kadmos.graph.mixin_mdao.MdaoMixin":{insert_node_on_diagonal:[0,2,1,""],remove_node_from_diagonal:[0,2,1,""]},"kadmos.graph.mixin_vistoms":{VistomsMixin:[0,1,1,""]},"kadmos.graph.mixin_vistoms.VistomsMixin":{vistoms_add:[0,2,1,""],vistoms_add_json:[0,2,1,""],vistoms_create:[0,2,1,""],vistoms_start:[0,2,1,""]},"kadmos.knowledgebase.knowledgebase":{KnowledgeBase:[0,1,1,""]},"kadmos.knowledgebase.knowledgebase.KnowledgeBase":{get_function_dependencies:[0,2,1,""],get_function_graph:[0,2,1,""],get_kb_graphs:[0,2,1,""],get_rcg:[0,2,1,""],print_circular_connections_in_log:[0,2,1,""]},"kadmos.utilities":{general:[0,0,0,"-"],printing:[0,0,0,"-"],strings:[0,0,0,"-"],xml:[0,0,0,"-"]},"kadmos.utilities.general":{assert_dict_keys:[0,3,1,""],color_list:[0,3,1,""],convert_bytes:[0,3,1,""],dict_to_ord_dict:[0,3,1,""],export_as_json:[0,3,1,""],file_size:[0,3,1,""],file_size_MB:[0,3,1,""],filter_group_vars:[0,3,1,""],format_string_for_latex:[0,3,1,""],format_string_for_vistoms:[0,3,1,""],format_string_for_vistoms_new:[0,3,1,""],get_element_dict:[0,3,1,""],get_friendly_id:[0,3,1,""],get_group_vars:[0,3,1,""],get_list_entries:[0,3,1,""],get_mdao_setup:[0,3,1,""],get_uid:[0,3,1,""],get_unique_friendly_id:[0,3,1,""],hex_to_rgb:[0,3,1,""],make_camel_case:[0,3,1,""],make_plural:[0,3,1,""],make_singular:[0,3,1,""],open_file:[0,3,1,""],remove_if_exists:[0,3,1,""],test_attr_cond:[0,3,1,""],transform_data_into_strings:[0,3,1,""],transform_string_into_format:[0,3,1,""],translate_dict_keys:[0,3,1,""],translate_list:[0,3,1,""],unmake_camel_case:[0,3,1,""]},"kadmos.utilities.printing":{print_in_table:[0,3,1,""],print_indexed_list:[0,3,1,""]},"kadmos.utilities.strings":{find_between:[0,3,1,""],find_until:[0,3,1,""],get_correctly_extended_latex_label:[0,3,1,""]},"kadmos.utilities.xml":{ExtendedElement:[0,1,1,""],get_element_details:[0,3,1,""],get_uid_search_xpath:[0,3,1,""],merge:[0,3,1,""],recursively_empty:[0,3,1,""],recursively_stringify:[0,3,1,""],recursively_unique_attribute:[0,3,1,""]},"kadmos.utilities.xml.ExtendedElement":{add:[0,2,1,""],add_process_hierarchy:[0,2,1,""],clean:[0,2,1,""],findasttext:[0,2,1,""],finddict:[0,2,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function"},terms:{"13S":0,"1e4":0,"boolean":0,"byte":0,"case":0,"class":0,"default":0,"export":0,"final":0,"float":0,"function":0,"import":0,"int":0,"long":0,"new":0,"return":0,"super":0,"true":0,"try":0,"while":0,Adding:0,For:0,IDs:0,The:0,These:0,Use:0,Will:0,__all__:0,__none__:0,_check_category_a:0,_check_category_b:0,_check_category_c:0,abbreviate_keyword:0,abl:0,abov:0,absolut:0,access:0,accord:0,account:0,action:0,actual:0,add:0,add_actor:0,add_contact:0,add_contact_rol:0,add_dc:0,add_dc_general_info:0,add_dc_inputs_el:0,add_dc_outputs_el:0,add_dc_performance_info:0,add_dc_remote_component_info:0,add_dc_verif:0,add_default_descript:0,add_default_nam:0,add_edg:0,add_element_to_element_of_uid:0,add_equ:0,add_equation_label:0,add_function_problem_rol:0,add_head:0,add_inst:0,add_mathematical_funct:0,add_new_parameters_from_el:0,add_nod:0,add_objective_function_by_nod:0,add_problem_formul:0,add_process:0,add_process_hierarchi:0,add_process_partit:0,add_subel:0,added:0,addit:0,address:0,adher:0,adjac:0,adjust:0,adress:0,advanc:0,aerodynam:0,aerospac:0,after:0,agil:0,aircraft:0,algorithm:0,all:0,all_keys_requir:0,all_nod:0,allow:0,allow_unconverged_coupl:0,alreadi:0,als:0,also:0,amount:0,analys:0,analysi:0,analyt:0,analyz:0,ani:0,anoth:0,append:0,appli:0,applic:0,appyl:0,arbitrari:0,architect:0,architectur:0,archiv:0,arg:0,argument:0,around:0,as_view:0,ascend:0,ascens:0,ascii:0,ask:0,assert:0,assert_dict_kei:0,assert_element_tag:0,assess:0,assign:0,associ:0,assum:0,ast:0,attr:0,attr_cond:0,attr_dict:0,attr_exclud:0,attr_includ:0,attr_list:0,attr_valu:0,attrb:0,attrib:0,attribut:0,automat:0,avail:0,back:0,base:0,baselin:0,basestr:0,becaus:0,becom:0,been:0,befor:0,behind:0,being:0,belong:0,below:0,best:0,between:0,bisect:0,bli:0,bliss:0,block:0,bool:0,both:0,bound:0,box:0,bracket:0,branch:0,build:0,busi:0,c14n:0,calcul:0,camel:0,camel_case_convers:0,camelcas:0,can:0,capac:0,care:0,casi:0,categori:0,certain:0,chang:0,change_graph_class:0,charact:0,characterist:0,check:0,check_and_get_coupled_functions_group:0,check_and_get_design_vari:0,check_and_get_post_coupling_funct:0,check_and_get_pre_coupling_funct:0,check_cmdows_integr:0,check_for_coupl:0,check_graph:0,check_list:0,check_refer:0,check_schema:0,check_uid:0,child:0,children:0,children_to_keep:0,children_to_remov:0,choos:0,circular:0,circularconnect:0,clariti:0,clean:0,close:0,clutter:0,cmdowsvers:0,cnstrnt_var:0,collaborative_engin:0,collaborativeengin:0,collect:0,collid:0,collis:0,color:0,color_list:0,color_set:0,colors_based_on:0,column:0,combin:0,common:0,compani:0,compar:0,comparison:0,compet:0,compil:0,compile_pdf:0,complet:0,complex:0,compon:0,compos:0,compress:0,comput:0,condit:0,config:0,configur:0,connect:0,connect_nested_iter:0,conserv:0,consid:0,consider:0,consist:0,consistent_root:0,consol:0,constraint:0,contact:0,contact_uid:0,contain:0,content:0,contig:0,continu:0,contract:0,contracted_graph:0,contraction_level:0,conv:0,convent:0,converg:0,convers:0,convert:0,convert_byt:0,coor:0,copi:0,copy_a:0,copy_edg:0,copy_node_with_suffix:0,copy_typ:0,correctli:0,correspond:0,could:0,count:0,count_function_nod:0,countri:0,coupl:0,coupled_functions_group:0,coupling_dict:0,coupling_functions_group:0,coupling_strength:0,cpac:0,creat:0,create_dsm:0,create_mathematical_problem:0,create_mdg:0,create_mpg:0,creation:0,creation_d:0,creator:0,creator_uid:0,criteria:0,cross:0,current:0,current_group_idx:0,custom:0,cwd:0,cycl:0,d3j:0,data:0,data_exchange_dict:0,date:0,datetim:0,dc_uid:0,declar:0,decrib:0,deep:0,deepcopi:0,deepcopy_a:0,defin:0,definit:0,degre:0,delet:0,delft:0,depart:0,depend:0,deprec:0,des_var:0,descend:0,describ:0,descript:0,design:0,designcompet:0,desir:0,destin:0,destination_fold:0,detail:0,determin:0,determine_scope_constraint_funct:0,determine_scope_design_vari:0,develop:0,dewit:0,diagon:0,diagonal_po:0,diagram:0,dic:0,dict:0,dict_to_ord_dict:0,dictionari:0,differ:0,differenti:0,digraph:0,dimens:0,direct:0,directli:0,directori:0,disciplin:0,disciplinari:0,disconnect:0,disconnect_collided_target:0,disconnect_problematic_variables_from:0,disconnect_shared_sourc:0,disregard:0,distinguis:0,distribut:0,divid:0,doe:0,doe_set:0,doesn:0,doing:0,done:0,download:0,draw:0,dsm:0,dtc:0,dubreuil:0,due:0,dummy_method:0,dummy_result:0,dummy_vers:0,duplic:0,dynam:0,each:0,easi:0,edg:0,edge_label:0,edge_or_nod:0,edu:0,either:0,element:0,element_to_add:0,elementtre:0,email:0,employe:0,empti:0,enabl:0,encod:0,end:0,end_in_iterative_nod:0,engin:0,enrich:0,ensur:0,ensure_abs_xpath:0,entri:0,entries_to_remov:0,equat:0,error:0,especi:0,etc:0,evalu:0,everi:0,everyth:0,exampl:0,exblock_uid:0,exce:0,except:0,exchang:0,exclud:0,exclus:0,execut:0,executableblock:0,exist:0,expect:0,expected_amount:0,expected_kei:0,expected_tag:0,expected_tag_new_el:0,expected_tag_uid_el:0,expected_text:0,explicit:0,export_as_json:0,express:0,extend:0,extendedel:0,extens:0,extern:0,extra:0,extract:0,fals:0,feedback:0,feedforward:0,fidel:0,fidelity_level:0,fig_num:0,fig_siz:0,figur:0,file:0,file_dir:0,file_nam:0,file_path:0,file_ref:0,file_s:0,file_size_mb:0,file_typ:0,filenam:0,filevers:0,filter:0,filter_group_var:0,filter_set:0,find:0,find_all_nod:0,find_between:0,find_until:0,findasttext:0,finddict:0,findtext:0,first:0,folder:0,follow:0,form:0,format:0,format_string_for_latex:0,format_string_for_vistom:0,format_string_for_vistoms_new:0,formul:0,found:0,fpg:0,french:0,from:0,front:0,full:0,funcnam:0,function_nod:0,function_ord:0,function_order_method:0,function_typ:0,functiongraph:0,fundament:0,further:0,futur:0,gauss:0,get:0,get_adjacency_matrix:0,get_architecture_node_id:0,get_architecture_node_label:0,get_categorized_nod:0,get_contracted_graph:0,get_correctly_extended_latex_label:0,get_coupling_dictionari:0,get_coupling_matrix:0,get_design_competences_uid:0,get_direct_coupling_nod:0,get_element_detail:0,get_element_dict:0,get_element_of_uid:0,get_evalu:0,get_executable_blocks_uid:0,get_feedback_info:0,get_first_node_inst:0,get_fpg_based_on_function_nod:0,get_fpg_based_on_list_funct:0,get_fpg_based_on_sink:0,get_fpg_by_function_nod:0,get_friendly_id:0,get_function_depend:0,get_function_graph:0,get_function_metadata:0,get_function_nod:0,get_function_paths_by_object:0,get_graph_properti:0,get_group_coupl:0,get_group_var:0,get_highest_inst:0,get_inputs_uid:0,get_kb_graph:0,get_list_entri:0,get_lowest_psn:0,get_mathematical_functions_uid:0,get_mdao_setup:0,get_mdg:0,get_mg_function_ord:0,get_node_attribut:0,get_node_subcategori:0,get_node_text:0,get_nodes_based_on_str:0,get_nodes_indegre:0,get_nodes_outdegre:0,get_nodes_subcategori:0,get_number_of_coupl:0,get_objective_nod:0,get_ordered_cycl:0,get_outputs_uid:0,get_parameters_uid:0,get_partition_info:0,get_path_combin:0,get_possible_function_ord:0,get_process_hierarchi:0,get_process_list:0,get_rcg:0,get_same_graph_class:0,get_sourc:0,get_sub_level_funct:0,get_subgraph_by_function_nod:0,get_sys_post_coupl:0,get_system_input:0,get_system_level_funct:0,get_target:0,get_uid:0,get_uid_search_xpath:0,get_unique_friendly_id:0,get_used_parameter_uid:0,get_xpath_of_uid:0,give:0,given:0,gkhome:0,glaro:0,global:0,global_cnstrnt_funct:0,global_objective_funct:0,gov:0,graph_check_crit:0,graph_class:0,graph_data:0,graph_has_nested_attribut:0,graph_id:0,graph_kadmo:0,graph_process:0,graph_properti:0,graphml:0,group:0,group_dict:0,guarante:0,guess:0,handl:0,has:0,has_nod:0,hash:0,hashabl:0,have:0,header:0,hello:0,here:0,hex:0,hex_to_rgb:0,hierarchi:0,higher:0,higher_level_remov:0,highest:0,hold:0,hole:0,how:0,howev:0,html:0,http:0,identifi:0,idf:0,ids:0,ignor:0,ignore_func:0,ignore_funct:0,ignore_list:0,ignore_mod:0,ignore_outdegre:0,illustr:0,implement:0,impose_mdao_architectur:0,includ:0,include_al:0,include_reference_data:0,include_run_tim:0,include_system_var:0,increas:0,indec:0,indegre:0,indent:0,indentifi:0,independ:0,index:0,index_bracket:0,indic:0,info:0,inform:0,initi:0,inout:0,inp:0,input:0,input_list:0,input_nod:0,inputless:0,inputs_el:0,insert:0,insert_node_on_diagon:0,insid:0,inspect:0,inspect_nod:0,inspect_process:0,instanc:0,instance_id:0,instanceid:0,instead:0,integ:0,integr:0,interact:0,interest:0,invalid:0,invalid_leaf_el:0,item:0,iter:0,itertool:0,its:0,itself:0,ivang:0,jet:0,job:0,job_:0,job_nam:0,json:0,just:0,kb_dir_path:0,kdm:0,keep:0,keep_empty_el:0,keep_objective_vari:0,keep_run:0,keep_tex_fil:0,kei:0,kept:0,key_ord:0,keys_to_be_remov:0,keyword:0,knowledg:0,knowledge_bas:0,kwarg:0,lab:0,label:0,label_extens:0,labeling_method:0,lafag:0,languag:0,larg:0,last:0,latex:0,lead:0,leaf:0,least:0,left:0,length:0,less:0,let:0,level:0,librari:0,limit:0,line:0,link:0,list:0,list_of_funct:0,list_of_nod:0,list_of_sink:0,list_of_tool:0,literatur:0,load:0,load_cmdow:0,local:0,local_cnstrnt_func:0,local_objective_funct:0,locat:0,log:0,loop:0,lost:0,lower:0,lower_bound:0,lower_cas:0,lowest:0,maaik:0,mainli:0,maintain:0,make:0,make_all_variables_valid:0,make_camel_cas:0,make_plur:0,make_plural_opt:0,make_singular:0,mani:0,manipul:0,manual:0,map:0,mark:0,mark_as_constraint:0,mark_as_design_vari:0,mark_as_object:0,mark_as_qoi:0,master:0,match:0,mathemat:0,matplotlib:0,matrix:0,max_func:0,maxim:0,maximum:0,mda:0,mda_typ:0,mdao:0,mdao_architectur:0,mdao_definit:0,mdao_setup:0,mdaodatagraph:0,mdaograph:0,mddewit:0,mdf:0,mdg:0,mdo:0,mdo_architectur:0,meet:0,merg:0,merge_func:0,merge_funct:0,merge_function_mod:0,merge_function_nodes_based_on_mod:0,merge_parallel_funct:0,merge_sequential_funct:0,merger:0,messag:0,metadata:0,method:0,meti:0,mg_function_ord:0,might:0,min_func:0,mind:0,minim:0,minimize_feedback:0,minimum:0,mixin_equ:0,mixin_mdao:0,mixin_vistom:0,mode:0,mode_id:0,modeid:0,model:0,model_definit:0,modul:0,more:0,most:0,mpg:0,multi_start:0,multidigraph:0,multigraph:0,multipl:0,must:0,mutabl:0,my_obj_fcn_nam:0,mygraph:0,n_coupling_var:0,n_disciplin:0,n_global_constraint:0,n_global_var:0,n_limit:0,n_local_constraint:0,n_local_var:0,n_part:0,name:0,named_obj_fcn:0,namespac:0,nasa:0,need:0,neighbor:0,nest:0,networkx:0,new_edg:0,new_label:0,newli:0,next:0,next_sequ:0,node:0,node_id:0,node_is_funct:0,node_is_hol:0,node_is_objective_funct:0,node_is_output:0,node_is_vari:0,node_label:0,node_select:0,nomin:0,nominal_valu:0,non:0,none:0,nonetyp:0,notat:0,note:0,notifi:0,notification_messag:0,ntr:0,num:0,number:0,number_of_group:0,number_of_nod:0,numer:0,obj_vars_cov:0,object:0,obtain:0,off:0,old:0,old_edg:0,one:0,onera:0,ones:0,onli:0,only_add_if_valu:0,only_feedback:0,open:0,open_fil:0,open_pdf:0,openmdao:0,oper:0,operator_uid:0,opt:0,optim:0,option:0,optiona:0,order:0,ordereddict:0,organ:0,organiz:0,origin:0,other:0,otherwis:0,our:0,out:0,outdegre:0,outgo:0,outp:0,output:0,output_nod:0,outputless:0,outputs_el:0,overal:0,overlap:0,overview:0,owner:0,owner_uid:0,packag:0,page:0,pair:0,parallel:0,param:0,param_uid:0,paramet:0,parameters_el:0,params_uid:0,part:0,particular:0,partit:0,partition_graph:0,partition_rang:0,partition_vari:0,pass:0,pate:0,path:0,path_or_el:0,paus:0,pdf:0,per:0,percentag:0,perform:0,pickl:0,place:0,platform:0,pleas:0,plot:0,plot_adjacency_matrix:0,plot_combo:0,plot_graph:0,plot_pareto_front:0,plural:0,png:0,point:0,posit:0,possibl:0,post:0,post_coupling_funct:0,pre:0,pre_coupling_funct:0,precis:0,predecessor:0,prefer:0,prefix:0,presenc:0,present:0,pretti:0,pretty_print:0,previou:0,previous_sequ:0,print_attribut:0,print_circular_connections_in_log:0,print_combo:0,print_contain:0,print_coupl:0,print_graph:0,print_in_log:0,print_in_t:0,print_indec:0,print_indexed_list:0,problem:0,problem_rol:0,problemat:0,problemgraph:0,process:0,process_hierarchi:0,process_step:0,processgraph:0,produc:0,product:0,project:0,prompt:0,properti:0,propuls:0,provid:0,psg:0,psn:0,pull:0,pure:0,purpos:0,pymerg:0,pyplot:0,python:0,quantiti:0,queri:0,quickli:0,quot:0,rais:0,raise_error:0,raise_error_if_tru:0,rang:0,rce:0,rcg:0,recognis:0,recommend:0,recurs:0,recursively_empti:0,recursively_stringifi:0,recursively_unique_attribut:0,reduc:0,ref:0,refer:0,reference_fil:0,reference_valu:0,refin:0,regular:0,reinstanti:0,rel:0,relabel:0,relabel_function_nod:0,relat:0,remain:0,remi:0,remot:0,remote_engin:0,remov:0,remove_actor:0,remove_after_compress:0,remove_children_of_uid:0,remove_children_of_xpath:0,remove_contact:0,remove_data_graph_el:0,remove_element_based_on_uid:0,remove_element_based_on_xpath:0,remove_function_nod:0,remove_if_exist:0,remove_in_and_output:0,remove_input:0,remove_nod:0,remove_node_from_diagon:0,remove_output:0,remove_paramet:0,remove_parameters_el:0,remove_process_graph_el:0,remove_unused_contact:0,remove_unused_output:0,remove_workflow_el:0,renam:0,replac:0,replacement_id:0,repres:0,request:0,requir:0,resolv:0,resolve_uid:0,resourc:0,respect:0,result:0,retriev:0,revers:0,rgb:0,right:0,role:0,root:0,round:0,row1:0,row2:0,rtype:0,run:0,run_tim:0,runtim:0,safe:0,same:0,sampl:0,sampledir:0,samplefil:0,satisfi:0,save:0,save_a:0,scalar:0,schema:0,scope:0,script:0,search:0,second:0,see:0,seidel:0,select:0,select_distributed_architectur:0,select_function_combination_from:0,select_number_of_partit:0,select_objectives_from_graph:0,self:0,sellar:0,separ:0,sequenc:0,server:0,set:0,sever:0,shallow:0,share:0,shorter:0,should:0,show:0,show_now:0,shown:0,side:0,sidebar:0,signifi:0,signific:0,simpl:0,simpli:0,simplifi:0,simplify_equ:0,sinc:0,singl:0,single_or_multi:0,single_or_multi_execut:0,singular:0,sink:0,situat:0,size:0,slave:0,small:0,some:0,some_fold:0,some_url:0,song:0,sonic:0,sort:0,sort_bi:0,sort_kei:0,sort_nodes_for_process:0,sourc:0,space:0,specif:0,specifi:0,split:0,split_vari:0,splittabl:0,spring:0,squar:0,standard:0,start:0,start_step:0,statement:0,statu:0,step:0,still:0,stop:0,store:0,str:0,stringifi:0,structur:0,student:0,sub:0,subcategori:0,subclass:0,subel:0,subelement_xpath_tag:0,subgraph:0,subgroup:0,subscript:0,subset:0,subsystem:0,suffix:0,suit:0,summar:0,summarize_var:0,suppli:0,sure:0,svg:0,sylvain:0,symbol:0,sys_level_post_coupl:0,system:0,system_input:0,system_vari:0,tabl:0,tabul:0,tag:0,take:0,taken:0,target:0,telephon:0,temp:0,test:0,test_attr_cond:0,test_valu:0,tex:0,text:0,textfil:0,thank:0,thei:0,them:0,therefor:0,thi:0,third:0,though:0,through:0,thu:0,time:0,timestamp:0,titl:0,togeth:0,tool:0,tool_specialist:0,toolspecialist:0,total:0,tpwgt:0,transform:0,transform_data_into_str:0,transform_string_into_format:0,translat:0,translate_dict_kei:0,translate_list:0,tree:0,tudelft:0,tupl:0,two:0,type:0,uid:0,uid_length:0,uml:0,umn:0,unconnect:0,under:0,underscor:0,undirect:0,uniqu:0,unmake_camel_cas:0,unmark:0,unmark_vari:0,unnamed_funct:0,until:0,unus:0,updat:0,upper:0,upper_bound:0,urlsit:0,usag:0,use:0,use_d3js_node_id:0,use_png_fig:0,use_pretty_print:0,used:0,used_id:0,useful:0,user:0,user_prompt_select_opt:0,using:0,utf:0,utm:0,uxpath:0,valid:0,valu:0,var_dim:0,var_valu:0,variabl:0,variableinstance1:0,variableinstance2:0,variableinstance3:0,variableinstance4:0,varieti:0,variou:0,verif:0,verifi:0,versatil:0,version:0,vistom:0,vistoms_add:0,vistoms_add_json:0,vistoms_cr:0,vistoms_dir:0,vistoms_start:0,vistoms_vers:0,visual:0,wai:0,wang:0,want:0,warn:0,weight:0,well:0,were:0,when:0,where:0,whether:0,which:0,window:0,wing:0,wit:0,within:0,without:0,work:0,workflow:0,write:0,write_problem_to_textfil:0,written:0,xdsm:0,xml_declar:0,xml_file:0,xmlschema:0,xpath:0,xpath_exclud:0,xpath_includ:0,xsd:0,yet:0,you:0,your:0,zero:0,zhang:0,zip:0},titles:["Welcome to KADMOS\u2019s documentation!"],titleterms:{cmdow:0,code:0,datagraph:0,document:0,equationmixin:0,fundamentalproblemgraph:0,gener:0,graph:0,kadmo:0,kadmosgraph:0,knowledgebas:0,mdaomixin:0,mdaoprocessgraph:0,print:0,repositoryconnectivitygraph:0,string:0,util:0,vistomsmixin:0,welcom:0,xml:0}}) \ No newline at end of file diff --git a/kadmos/knowledgebase/knowledgebase.py b/kadmos/knowledgebase/knowledgebase.py index f411c852507f7e03dba95188243ac8f5dadb0da2..e89097a05e52b09fd6c9f9c81ba393e942821412 100644 --- a/kadmos/knowledgebase/knowledgebase.py +++ b/kadmos/knowledgebase/knowledgebase.py @@ -20,31 +20,36 @@ class KnowledgeBase(object): # TODO: ADD DETAILED CLASS DESCRIPTION - def __init__(self, kb_dir_path, knowledge_base, ignoreFunctions = None): - """ - Standard class __init__ function. Includes input checks and hardcoded values. + def __init__(self, kb_dir_path, knowledge_base, ignore_functions=None): + """Standard class __init__ function. Includes input checks and hardcoded values. + :param kb_dir_path: path to the knowledge base directory + :type kb_dir_path: str :param knowledge_base: name of the folder that contains the knowledge base - :param ignoreFunctions: list of functions to ignore from knowledge base + :type knowledge_base: str + :param ignore_functions: (optional) functions to ignore from knowledge base + :type ignore_functions: list + :return: saved instances of the knowledge base """ logger.error('Deprecation warning! The KnowledgeBase class will soon be deprecated. Use load function instead.') - self.kb_dir = kb_dir_path # path to kb + self.kb_dir = kb_dir_path # path to kb self.use_sensitivities = False self.name = knowledge_base - if ignoreFunctions is None: ignoreFunctions = [] - self.ignoreFunctions = ignoreFunctions + if ignore_functions is None: + ignore_functions = [] + self.ignore_functions = ignore_functions self.circularConnections = {} # Hardcoded values and naming convention - self.EXEC_INFO = ["mode", "description", "precision"] # prescribed execution info + self.EXEC_INFO = ["mode", "description", "precision"] # prescribed execution info # TODO: add option for info file checks: "fidelity", "runtime", "prog_env", "toolspecific", self.GEN_INFO = ["name", "version", "creator", "description"] # prescribed general info # TODO: add option for info file checks: , "schema_input", "schema_output" - self.IGNORE_VALID = ['toolspecific'] # nodes to ignore in basefile validation - self.FILEPATTERN = "(-input.xml)$|(-output.xml)$|(-info.json)$|(-sensitivities.xml)$" # file patterns for matching - self.BSPATTERN = "(-base.xml)$|(.xsd)$" # base and schema pattern for matching - self.BRACKETPATTERN = re.compile('\[.*?\]') # compile bracketpattern once for faster checks of xpaths + self.IGNORE_VALID = ['toolspecific'] # nodes to ignore in basefile validation + self.FILEPATTERN = "(-input.xml)$|(-output.xml)$|(-info.json)$|(-sensitivities.xml)$" # file patterns to match + self.BSPATTERN = "(-base.xml)$|(.xsd)$" # base and schema pattern for matching + self.BRACKETPATTERN = re.compile('\[.*?\]') # compile bracketpattern once for faster checks of xpaths # check if knowledge base exists, get all files in kb directory self._check_knowledge_base() @@ -59,10 +64,10 @@ class KnowledgeBase(object): self._get_base_file() # validate base file against provided xml schema - #self._validate_base_against_schema(self.IGNORE_VALID) + # self._validate_base_against_schema(self.IGNORE_VALID) # validate all input and output files versus the base file - #self._validate_function_files() + # self._validate_function_files() # get all data from the input and output files, and save in instance self._get_function_data() @@ -70,23 +75,26 @@ class KnowledgeBase(object): # get graphs for all functions and save them in instance self.get_kb_graphs() - # TODO: when scanning for files, make sure that filename only exists once! Check for uniqueness in name and info:name + # TODO: when scanning for files, make sure that filename is unique! Check for uniqueness in name and info: name def _check_knowledge_base(self): """ - (PRIVATE) This method checks for the existence of the specified knowledge base and returns a list of all present files. + (PRIVATE) This method checks for the existence of the specified knowledge base and returns a list of all present + files. :return: kbFiles: list of all files found in specified knowledge base directory """ # assert that KnowledgeBase() input are valid assert isinstance(self.name, basestring), "The specified knowledge base must be a string." - assert isinstance(self.ignoreFunctions, list), 'If specified, ignoreFunctions argument must be a list of strings.' + assert isinstance(self.ignore_functions, list), 'If specified, ignore_functions must be a list of strings.' assert os.path.exists(self.kb_dir), 'KNOWLEDGE_BASE directory {} does not exist!'.format(self.kb_dir) - if self.ignoreFunctions: - assert all([isinstance(i, basestring) for i in self.ignoreFunctions]), 'Every element in list of argument ignoreFunctions must be a string.' + if self.ignore_functions: + assert all([isinstance(i, basestring) for i in self.ignore_functions]), 'Every element in list of argument' \ + 'ignore_functions must be a string.' kbPath = os.path.join(self.kb_dir, self.name) - assert os.path.exists(kbPath), 'The specified knowledge "{}" base can not be found in the knowledge base directory!'.format(kbPath) + assert os.path.exists(kbPath), 'The specified knowledge "{}" base can not be found in the knowledge base ' \ + 'directory!'.format(kbPath) self.path = kbPath logger.info("Knowledge base '{}' found.".format(self.name)) @@ -94,14 +102,15 @@ class KnowledgeBase(object): logger.info('Reading files in the knowledge base... ') # self.kb_files = [f for f in os.listdir(kbPath) if os.path.isfile(os.path.join(kbPath, f))] - self.kb_files, ignoredFunctions = [], [] # initiate list of kb files, list of ignored funcs + self.kb_files, ignoredFunctions = [], [] # initiate list of kb files, list of ignored funcs - for file in os.listdir(kbPath): # TODO: input/output files should be indicated in info file (info becomes pivot and must be always checked) + # TODO: input/output files should be indicated in info file (info becomes pivot and must be always checked) + for file in os.listdir(kbPath): if os.path.isfile(os.path.join(kbPath, file)): match = re.search(self.FILEPATTERN, file) if match: func = file[:-len(match.group(0))] - if func in self.ignoreFunctions: + if func in self.ignore_functions: ignoredFunctions.append(func) else: self.kb_files.append(file) @@ -117,7 +126,8 @@ class KnowledgeBase(object): return - # TODO: ensure that info file is filled in properly (syntax errors will be picked up when parsed; later need to except syntax errors) + # TODO: ensure that info file is filled in properly (syntax errors will be picked up when parsed; later need to + # TODO: except syntax errors) def _get_data_schema(self): """ @@ -147,8 +157,8 @@ class KnowledgeBase(object): def _get_function_files(self): """ - (PRIVATE) This function reads input and output XML files and info json files, and saves them in self.function_files. - It ensures that all names are according to convention. + (PRIVATE) This function reads input and output XML files and info json files, and saves them in + self.function_files. It ensures that all names are according to convention. :return: self.function_files: dictionary containing lists of function files according to input, output, and info :return: self.number_of_tools: amount of tools provided in the knowledge base @@ -160,7 +170,6 @@ class KnowledgeBase(object): if self.use_sensitivities: self.function_files['sensitivities'] = [] - # setup pattern for matching typePattern = "-[a-zA-Z]*." @@ -172,8 +181,8 @@ class KnowledgeBase(object): self.function_files[matchType.group()[1:-1]].append(file) else: if not re.search(self.BSPATTERN, file): - logger.warning("Could not match {}, please make sure files adhere to naming conventions".format(file)) - + logger.warning("Could not match {}, please make sure files adhere to naming conventions" + .format(file)) # assert that the correct function files present, not just amount inout_list = ['input', 'output'] @@ -184,12 +193,16 @@ class KnowledgeBase(object): inOutfuncs = [file[:-len('-' + inout + '.xml')] for file in self.function_files[inout]] for file in self.function_files['info']: functionName = file[:-len('-info.json')] - assert functionName in inOutfuncs, "Can not find function {0}-{1}.xml! Please check for correct spelling of info, input and output files!".format(functionName, inout) + assert functionName in inOutfuncs, "Can not find function {0}-{1}.xml! Please check for correct " \ + "spelling of info, input and output files!".format(functionName, + inout) - assert len(self.function_files['input']) == len(self.function_files['output']), 'Amount of function input and output XML files does not match.' - assert len(self.function_files['input']) == len(self.function_files['info']), 'Amount of function input XML files and info json files does not match.' + assert len(self.function_files['input']) == len(self.function_files['output']), \ + 'Amount of function input and output XML files does not match.' + assert len(self.function_files['input']) == len(self.function_files['info']), \ + 'Amount of function input XML files and info json files does not match.' - # check info files for name and type + # check info files for name and type for file in self.function_files["info"]: with open(os.path.join(self.path, file)) as info: infoData = json.load(info) @@ -210,7 +223,8 @@ class KnowledgeBase(object): else: return - #TODO: check for unique function names in KB directory and info files! SHOULD BE THE SAME IN BOTH CASES? >> string.lower() should be the same >> always use the name in info-file! + # TODO: check for unique function names in KB directory and info files! SHOULD BE THE SAME IN BOTH CASES? + # TODO: >> string.lower() should be the same >> always use the name in info-file! def _get_base_file(self): """ @@ -224,11 +238,11 @@ class KnowledgeBase(object): foundBaseFile = False for file in self.kb_files: matchObj = re.search(basePattern, file) - if matchObj and foundBaseFile == False: + if matchObj and not foundBaseFile: self.baseFile = file foundBaseFile = True logger.info("Base file {} found.".format(file)) - elif matchObj and foundBaseFile == True: + elif matchObj and foundBaseFile: raise IOError("Multiple '-base.xml' files found! Please ensure only one file present.") assert self.baseFile is not None, "No '-base.xml' found! Please provide a '-base.xml' file." @@ -285,8 +299,8 @@ class KnowledgeBase(object): :return: IOError """ - # TODO: this could be by simply replacing all indeces with UIDs, create sets containing ALL paths, and simply comparing the sets - + # TODO: this could be by simply replacing all indeces with UIDs, create sets containing ALL paths, and simply + # TODO: comparing the sets leafNodesMissing = {} baseTree = etree.parse(os.path.join(self.path, self.baseFile)) @@ -364,7 +378,7 @@ class KnowledgeBase(object): print k self._print_nodes(v) else: - print '%s : %s'.format(k,v) + print '%s : %s'.format(k, v) elif type(obj) == list: for v in obj: if hasattr(v, '__iter__'): @@ -376,22 +390,27 @@ class KnowledgeBase(object): def _get_function_data(self): """" - (PRIVATE) This function adds a new attribute functionData to the class instance that contains all information in the knowledge base. + (PRIVATE) This function adds a new attribute functionData to the class instance that contains all information in + the knowledge base. functionData = [ { "info": { - "general_info": {"name": str, "type": str, "version": float, "creator": str, "description": str}, - "execution_info": [{"mode": str, "runtime": int, "precision": float, "fidelity": str}, ... ] + "general_info": {"name": str, "type": str, "version": float, "creator": str, + "description": str}, + "execution_info": [{"mode": str, "runtime": int, "precision": float, "fidelity": str}, + ... ] } , "input": { - "leafNodes": [ {"xpath": str, "tag": str, "attributes": dict, "value": str, "level": int}, ...] # list of all input leafNodes + "leafNodes": [ {"xpath": str, "tag": str, "attributes": dict, "value": str, + "level": int}, ...] # list of all input leafNodes "completeNodeSet": [] # list of ALL nodes (for convenience) "leafNodeSet": [] # list of all leaf nodes (for convenience) }, "output": { - "leafNodes": [ {"xpath": str, "tag": str, "attributes": dict, "value": str, "level": int}, ...], # list of all output leafNodes + "leafNodes": [ {"xpath": str, "tag": str, "attributes": dict, "value": str, + "level": int}, ...], # list of all output leafNodes "completeNodeSet": [] # list of ALL nodes (for convenience) "leafNodeSet": [] # list of all leaf nodes (for convenience) @@ -407,7 +426,7 @@ class KnowledgeBase(object): for file in self.function_files["info"]: # initiate a dict for each function - funcDict = {'info': {'general_info': {}, 'execution_info': [] }} + funcDict = {'info': {'general_info': {}, 'execution_info': []}} with open(os.path.join(self.path, file)) as info: infoData = json.load(info) @@ -416,34 +435,40 @@ class KnowledgeBase(object): assert ex in infoData, "{}-key is missing in {}. Please check for spelling errors.".format(ex, file) # add function info from file to funcDict - for inf in self.GEN_INFO: # looping through general info + for inf in self.GEN_INFO: # looping through general info if inf == 'name': # make sure that function name and type is defined, is string funcName = infoData["general_info"].get(inf) - assert isinstance(funcName, basestring), "Function name in {} must be non-empty string!".format(file) - assert len(funcName)>0, "Function name in {} must be non-empty string!".format(file) + assert isinstance(funcName, basestring), "Function name in {} must be non-empty " \ + "string!".format(file) + assert len(funcName) > 0, "Function name in {} must be non-empty string!".format(file) # add info if given try: funcDict['info']['general_info'][inf] = infoData["general_info"].get(inf) except KeyError: - logger.warning("Function {} was not found for {} and not added to knowledge base.".format(inf, funcName)) + logger.warning("Function {} was not found for {} and not added to knowledge base.".format(inf, + funcName)) exInfo = infoData["execution_info"] assert isinstance(exInfo, list), "'execution_info' in info-file for {} must be a list.".format(funcName) - assert len(exInfo)>0, "The {} 'execution_info' must have at least one defined mode. Please add a function mode to the info-file.".format(funcName) + assert len(exInfo) > 0, "The {} 'execution_info' must have at least one defined mode. Please add a " \ + "function mode to the info-file.".format(funcName) - for n, modeDict in enumerate(exInfo): # looping through execution info + for n, modeDict in enumerate(exInfo): # looping through execution info - assert isinstance(modeDict, dict), "Each element in 'execution_info'-list in {} must be dictionary.".format(file) + assert isinstance(modeDict, dict), "Each element in 'execution_info'-list in {} must be " \ + "dictionary.".format(file) - #add mode dict to exec info + # add mode dict to exec info funcDict['info']['execution_info'].append({}) # make sure mode name is defined mode = modeDict["mode"] - assert isinstance(mode, basestring), "Execution mode names in {} must be defined string(s) in the info-file.".format(file) - assert re.match("^[a-zA-Z0-9_]+$", mode), "Execution mode name in {} must be non-empty string of alphanumeric characters (and underscore).".format(file) + assert isinstance(mode, basestring), "Execution mode names in {} must be defined string(s) in the " \ + "info-file.".format(file) + assert re.match("^[a-zA-Z0-9_]+$", mode), "Execution mode name in {} must be non-empty string of " \ + "alphanumeric characters (and underscore).".format(file) # add execution info by mode to function dictionary (if that information is provided) for inf in self.EXEC_INFO: @@ -451,7 +476,8 @@ class KnowledgeBase(object): funcDict['info']['execution_info'][n][inf] = modeDict[inf] # add the information to dictionary else: pass - #raise KeyError, "'{}'-information for mode {} of {} is not available in the info-file!".format(inf, mode, funcName) + # raise KeyError, "'{}'-information for mode {} of {} is not available in the info-file!" + # .format(inf, mode, funcName) # get input and output data for inOut in ['input', 'output']: @@ -473,7 +499,6 @@ class KnowledgeBase(object): else: return - def print_circular_connections_in_log(self): """ This function prints the circular connections present in the graph. @@ -492,10 +517,10 @@ class KnowledgeBase(object): return - def _get_in_out_data(self, file, inOut, functionDict): """ - (PRIVATE) This helper function writes the information on all leaf nodes from the input and output XML files to a dictionary. \ + (PRIVATE) This helper function writes the information on all leaf nodes from the input and output XML files to + a dictionary. \ If XML file is empty, it empty dict is returned. The element paths are checked for uniqueness. :param file: info-file corresponding to the analyzed function @@ -535,7 +560,7 @@ class KnowledgeBase(object): # append path to list of all nodes completeNodeList.append(path) - if not el.getchildren(): # if leaf node + if not el.getchildren(): # if leaf node # append path to list of leaf nodes leafNodesList.append(path) @@ -553,7 +578,7 @@ class KnowledgeBase(object): # # add 'modes' attribute if it does not exist # if 'modes' not in data['attributes']: # data['attributes']['modes'] = '' #if 'modes' exists, it's a string, otherwise empty string - # # TODO: check parents iteratively to check if they have modes attribute >> will take a lot of time/iterations! + # TODO: check parents iteratively to check if they have modes attribute >> will take a lot of time! # remove whitespace from start/end of string, or add None if el.text is not None: @@ -580,7 +605,6 @@ class KnowledgeBase(object): return dataDict - def _get_execution_modes_for_element(self, element, tree, file, functionDict): """ (PRIVATE) This function retrieves the modes attribute of the child node or of its ancestors. If multiple modes @@ -601,11 +625,14 @@ class KnowledgeBase(object): # get function modes from info file and assert that they are unique funcModes = [execDict['mode'] for execDict in functionDict['info']['execution_info']] - execModes = '' # NOTE: if no modes indicated, all modes are applied to node + execModes = '' # NOTE: if no modes indicated, all modes are applied to node modesFound = False - if 'modes' in element.attrib and re.search("[^\s]", element.attrib['modes']): # if 'modes' key present and has characters - assert isinstance(element.attrib['modes'], basestring), "If provided, modes-attribute of elemeent {} in {} must be of type string.".format(elementPath, file) + # if 'modes' key present and has characters + if 'modes' in element.attrib and re.search("[^\s]", element.attrib['modes']): + assert isinstance(element.attrib['modes'], basestring), "If provided, modes-attribute of elemeent {} in " \ + "{} must be of type string.".format(elementPath, + file) execModes = element.attrib['modes'] modesFound = True @@ -615,7 +642,8 @@ class KnowledgeBase(object): modesFound = True execModes = anc.attrib['modes'] else: - print "WARNING: Multiple 'modes' attributes found in ancestry of element {} in {}; lowest one is applied.".format(elementPath, file) + print "WARNING: Multiple 'modes' attributes found in ancestry of element {} in {}; lowest one is " \ + "applied.".format(elementPath, file) break if re.search("[^\s]", execModes): # if contains any characters @@ -630,18 +658,22 @@ class KnowledgeBase(object): modesNegative = True assert all(re.search(negPattern, mode) for mode in modesList), \ - "Either all or none of the 'modes'-attributes of element {} in {} must be negative!".format(elementPath, file) + "Either all or none of the 'modes'-attributes of element {} in {} must be " \ + "negative!".format(elementPath, file) # check if each mode is valid (use its positive if modesNegative) for mode in modesList: if modesNegative: - assert mode[1:] in funcModes, "Execution mode '{}' of node {} (or its ancestor) in {} was not found in the info-file. Please check spelling or alter info-file.".format(mode[1:], elementPath, file) + assert mode[1:] in funcModes, "Execution mode '{}' of node {} (or its ancestor) in {} was not " \ + "found in the info-file. Please check spelling or alter " \ + "info-file.".format(mode[1:], elementPath, file) else: - assert mode in funcModes, "Execution mode '{}' of node {} (or its ancestor) in {} was not found in the info-file. Please check spelling or alter info-file.".format(mode, elementPath, file) + assert mode in funcModes, "Execution mode '{}' of node {} (or its ancestor) in {} was not found" \ + " in the info-file. Please check spelling or alter " \ + "info-file.".format(mode, elementPath, file) return execModes - def _add_uids_to_xpath(self, xpath, element): """ This function adds element UIDs to the corresponding elements in the xpath. The ancestors of the element that @@ -649,10 +681,10 @@ class KnowledgeBase(object): approriate place in the xpath. If xpath contains indeces in elements that have no defined UID, the indeces are kept. - :param xpath: xpath of xml-element - :type basestring + :type xpath: basestring :param element: lxml-element + :type element: element :return: uid_xpath :rtype basestring """ @@ -683,12 +715,12 @@ class KnowledgeBase(object): return uid_xpath - def _replace_indeces_in_element_xpath(self, xpath, element): """ (PRIVATE) This function takes a CPACS xpath and replaces its indeces with UIDs. The search-pattern matches all integers between squared brackets. If matched on a given node, that node is searched for a UID - using etree.iterancestors() and self._get_element_uID(), and its index is replaced by the found UID in the xpath. + using etree.iterancestors() and self._get_element_uID(), and its index is replaced by the found UID in the + xpath. If no UID is found, the index is not replaced. :param xpath: Argument must be a CPACS xpath (string) @@ -699,7 +731,7 @@ class KnowledgeBase(object): # check if xpath has indeces, e.g. ".../wing[1]/...", replace them w/ UIDs indexPattern = ('\[[0-9]+\]') match = re.search(indexPattern, xpath) - loopCount = 0 # to prevent overflow + loopCount = 0 # to prevent overflow precedingPathLen = 0 # changes during loop, different for each re.search() """ @@ -756,16 +788,18 @@ class KnowledgeBase(object): def _get_element_uID(self, element): """ - (PRIVATE) This function takes an element and returns its UID attribute, or the value of a child UID-element (a child-node containing "UID" in its tag). + (PRIVATE) This function takes an element and returns its UID attribute, or the value of a child UID-element (a + child-node containing "UID" in its tag). Most CPACS nodes with multiplicity have a UID attribute, however some carry UID-information in a child element. - The "IDENT_KEYWORDS"-list contains the attributes that are checked for the UID-string. The node element is checked for - UID-info in the order of the attribute in that list. If a UID is found, it is immediately returned. Otherwise, None is returned. + The "IDENT_KEYWORDS"-list contains the attributes that are checked for the UID-string. The node element is + checked for UID-info in the order of the attribute in that list. If a UID is found, it is immediately returned. + Otherwise, None is returned. :param element: Argument must be lxml etree element :return: UID-string or None: If a UID is found, it is returned. Otherwise, None. """ - IDENT_KEYWORDS = ["uID","name"] + IDENT_KEYWORDS = ["uID", "name"] if any(kw in element.attrib for kw in IDENT_KEYWORDS): for attr in IDENT_KEYWORDS: @@ -782,7 +816,6 @@ class KnowledgeBase(object): return - def get_kb_graphs(self): """ This class method generates all graphs for all present functions in the knowledge base. @@ -800,14 +833,17 @@ class KnowledgeBase(object): self.functionGraphs = graphList return - def get_function_graph(self, funcName, inOut=None): """ - This function builds a directed graph (KadmosGraph object) for the specified function using the "networkx" package. If inOut - argument is specified, only the input or output of the function will be included in the graph, otherwise both. - - :param: funcName: function name for which the graph is generated; must be present in knowledge base. - :param: inOut: default = None; if specified, must be "input" or "output" string. Specification of this argument enables the generation of the function graph with only input or output variables. + This function builds a directed graph (KadmosGraph object) for the specified function using the "networkx" + package. If inOut argument is specified, only the input or output of the function will be included in the graph, + otherwise both. + + :param funcName: function name for which the graph is generated; must be present in knowledge base. + :type funcName: str + :param inOut: (optiona) if specified, must be "input" or "output" string. Specification of this argument + enables the generation of the function graph with only input or output variables. + :type inOut: str :return: functionGraph """ @@ -827,7 +863,7 @@ class KnowledgeBase(object): funcIndex = None for idx, funcDict in enumerate(self.function_data): if funcDict['info']['general_info']['name'] == funcName: - funcIndex = idx #funcIndex is index of the function in list + funcIndex = idx # funcIndex is index of the function in list break assert funcIndex is not None, "The provided function name can not be found in knowledge base." @@ -850,7 +886,8 @@ class KnowledgeBase(object): modesAttr = nodeDict['modes'] node = nodeDict['xpath'] - assert isinstance(modesAttr, basestring), "The 'modes' attribute of the {}-node {} of {} must be a string.".format(io, node, funcName) + assert isinstance(modesAttr, basestring), "The 'modes' attribute of the {}-node {} of {} must be a " \ + "string.".format(io, node, funcName) if re.search("[^\s]", modesAttr): #if contains any characters @@ -876,7 +913,7 @@ class KnowledgeBase(object): # add node to the indicated nodes if modesNegative: # add to all modes but the ones indicated - addModes = [mode for mode in funcModes if not mode in nodeModes] + addModes = [mode for mode in funcModes if mode not in nodeModes] else: # add to all modes the ones indicated addModes = list(set(nodeModes) & set(funcModes)) @@ -900,11 +937,15 @@ class KnowledgeBase(object): def get_function_dependencies(self, funcName, mode, inOut=None): """ - This function builds a directed graph (KadmosGraph object) for the specified function using the "networkx" package. If inOut - argument is specified, only the input or output of the function will be included in the graph, otherwise both. - - :param: funcName: function name for which the graph is generated; must be present in knowledge base. - :param: inOut: default = None; if specified, must be "input" or "output" string. Specification of this argument enables the generation of the function graph with only input or output variables. + This function builds a directed graph (KadmosGraph object) for the specified function using the "networkx" + package. If inOut argument is specified, only the input or output of the function will be included in the graph, + otherwise both. + + :param funcName: function name for which the graph is generated; must be present in knowledge base. + :type funcName: str + :param inOut: (optional) if specified, must be "input" or "output" string. Specification of this argument + enables the generation of the function graph with only input or output variables. + :type inOut: str :return: functionGraph """ @@ -939,9 +980,10 @@ class KnowledgeBase(object): modesAttr = nodeDict['modes'] node = nodeDict['xpath'] - assert isinstance(modesAttr, basestring), "The 'modes' attribute of the {}-node {} of {} must be a string.".format(io, node, funcName) + assert isinstance(modesAttr, basestring), "The 'modes' attribute of the {}-node {} of {} must be a " \ + "string.".format(io, node, funcName) - if re.search("[^\s]", modesAttr): #if contains any characters + if re.search("[^\s]", modesAttr): # if contains any characters # get all modes nodeModes = modesAttr.split() @@ -951,7 +993,9 @@ class KnowledgeBase(object): negPattern = "^-" if any(re.search(negPattern, mode) for mode in nodeModes): modesNegative = True - assert all(re.search(negPattern, mode) for mode in nodeModes), "Either all or none of the modes in the {} {}-node {} must be negative!".format(funcName, io, node) + assert all(re.search(negPattern, mode) for mode in nodeModes), \ + "Either all or none of the modes in the {} {}-node {} must be negative!".format(funcName, + io, node) # make sure that all modes in list "positive" for later processing; remove minus sign # (modesNegative ensures that modes are still regarded as negative) @@ -960,7 +1004,9 @@ class KnowledgeBase(object): # check if modes are valid for mode in nodeModes: - assert mode in funcModes, "The execution mode '{}' as used in the {} {}-node {} was not found in the info-file. Please check spelling or alter info-file.".format(mode, funcName, io, node) + assert mode in funcModes, "The execution mode '{}' as used in the {} {}-node {} was not " \ + "found in the info-file. Please check spelling or alter " \ + "info-file.".format(mode, funcName, io, node) # add node to the indicated nodes if modesNegative: @@ -1046,8 +1092,9 @@ class KnowledgeBase(object): modePattern = "\[.+\]" match = re.search(modePattern, node) if match: - fMode = match.group(0)[1:-1] # take matching string and remove brackets - assert fMode in funcModes, 'Something went wrong! Could not find execution mode {} for {} in list of execution modes.'.format(fMode, funcName) + fMode = match.group(0)[1:-1] # take matching string and remove brackets + assert fMode in funcModes, 'Something went wrong! Could not find execution mode {} for {} in list' \ + ' of execution modes.'.format(fMode, funcName) else: fMode = next(iter(funcModes)) # get only element in set @@ -1061,7 +1108,8 @@ class KnowledgeBase(object): G.node[node][info] = execMode[info] else: pass - #raise KeyError, "{} information for mode {} of {} is not available in knowledgebase-object!".format(info, execMode, funcName) + # raise KeyError, "{} information for mode {} of {} is not available in knowledgebase- + # object!".format(info, execMode, funcName) else: # otherwise variable node # TODO: add elif node in [list of leafnodes] @@ -1069,7 +1117,7 @@ class KnowledgeBase(object): G.node[node]['category'] = 'variable' G.node[node]['label'] = node.split('/')[-1] G.node[node]['level'] = node.count('/') - 1 - G.node[node]['execution_time'] = 1 # TODO: this is not really needed for nodes + G.node[node]['execution_time'] = 1 # TODO: this is not really needed for nodes return G @@ -1092,7 +1140,7 @@ class KnowledgeBase(object): logger.info('Successfully composed RCG.') # Add kb_path attribute - MCG = RepositoryConnectivityGraph(MCG, kb_path=self.path, name=name) # TODO: check why this is necessary! + MCG = RepositoryConnectivityGraph(MCG, kb_path=self.path, name=name) # TODO: check why this is necessary! MCG = RepositoryConnectivityGraph(MCG, kb_path=self.path) MCG.name = "{}-Graph".format(self.name) diff --git a/kadmos/utilities/general.py b/kadmos/utilities/general.py index 29febdd75f8b867a28f4c16578b374fcffc19db9..a54c761d344694fe73bc2561e0bddaff5e0c10ca 100644 --- a/kadmos/utilities/general.py +++ b/kadmos/utilities/general.py @@ -613,6 +613,7 @@ def open_file(filename): Utility to open a file cross-platform. :param filename: Filename including extension and path, e.g. 'sampledir/samplefile.pdf' + :type filenama: str :return: An opened file """ @@ -629,10 +630,15 @@ def get_element_dict(xpath, var_value=None, var_dim=None, include_reference_data Function to create a D3.js-type dictionary for a nested tree based on an xpath. :param xpath: xpath for the element + :type xpath: basestring :param var_value: value of the element in a reference file + :type var_value: float :param var_dim: dimension of the element in a reference file + :type var_dim: int :param include_reference_data: setting on whether reference data should be include in the path + :type include_reference_data: bool :return: nested dictionary + :rtype: dict """ # Make tree dictionary diff --git a/kadmos/utilities/printing.py b/kadmos/utilities/printing.py index 213d207a73625b9fea3dcc326572c8977279d4b4..016716106702a01082bd31eb591323ccfdddd625 100644 --- a/kadmos/utilities/printing.py +++ b/kadmos/utilities/printing.py @@ -44,11 +44,11 @@ def print_in_table(print_container, **kwargs): :param kwargs: keyword arguments for printing :type kwargs: str, bool - Kwargs options: + .. note:: Kwargs options: - * 'header' (str) - * 'message' (str) - * 'print_indeces' (bool) + * 'header' (str) + * 'message' (str) + * 'print_indeces' (bool) """ # headers = None, print_indeces = False message = "" diff --git a/kadmos/utilities/strings.py b/kadmos/utilities/strings.py index 50b4fd9c4a5db461effd29435234943b62624b23..762edf484ba0dd2d06c2a747a3409ce594e1bf22 100644 --- a/kadmos/utilities/strings.py +++ b/kadmos/utilities/strings.py @@ -1,4 +1,15 @@ def find_between(s, first, last): + """Function to find a target string that is located between two particular strings. + + :param s: string to search + :type s: basestring + :param first: the string in front of the target string + :type first: basestring + :param last: the string behind the target string + :type last: basestring + :return: the target string + :rtype: basestring + """ try: start = s.index(first)+len(first) end = s.index(last, start) @@ -8,6 +19,15 @@ def find_between(s, first, last): def find_until(s, until): + """Function to find a target string that is located before a particular string. + + :param s: string to search + :type s: basestring + :param until: the string signifying the end of the target string + :type until: basestring + :return: target string + :rtype: basestring + """ try: until = s.index(until) return s[0:until] @@ -16,6 +36,16 @@ def find_until(s, until): def get_correctly_extended_latex_label(label, label_extension): + """Function to obtain a correctly extended latex label. + + :param label: label to be extended + :type label: str + :param label_extension: extensions of the label + :type label_extension: str + :return: extended latex label + :rtype: str + """ + if '^{' in label and '^{' in label_extension: return label[:-1] + ',' + label_extension[2:] else: diff --git a/kadmos/utilities/xmls.py b/kadmos/utilities/xmls.py index 1b7d9b5f452ee4bf723f8df79ede40c28a6f7e63..85504a1db65035fb967e28374cdcb69eb771f0fc 100644 --- a/kadmos/utilities/xmls.py +++ b/kadmos/utilities/xmls.py @@ -154,9 +154,9 @@ def merge(a, b): def get_uid_search_xpath(uid): - """ Method to get the XPath expression for a UID which might contain quote characters. + """ Method to get the XPath expression for a uID which might contain quote characters. - :param uid: uID string + :param uid: uID :type uid: str :return: XPath expression :rtype: str @@ -171,20 +171,28 @@ def get_uid_search_xpath(uid): class ExtendedElement(etree.ElementBase): def add_process_hierarchy(self, process_hierarchy, mpg): - """Method to add the hierarchy of the process as metadata to the workflow/processGraph.""" + """Method to add the hierarchy of the process as metadata to the workflow/processGraph. + + :param process_hierarchy: process hierarchy to be added + :type process_hierarchy: list + :param mpg: processGraph to add the hierarchy to + :type mpg: MdaoProgressGraph + :return: processGraph with process hierarchy + :rtype: MdaoProcessGraph + """ base_element = self # Add loopElements and functionElements for getting the right order for idx, element in enumerate(process_hierarchy): if isinstance(element, basestring): - if mpg.node[element]['architecture_role'] in mpg.ARCHITECTURE_ROLES_FUNS[0:4]: + if mpg.nodes[element]['architecture_role'] in mpg.ARCHITECTURE_ROLES_FUNS[0:4]: if self.find('loopElements') is None: self.add('loopElements') loop_elements = self.find('loopElements') base_element = loop_elements.add('loopElement', relatedUID=element) else: if self.find('functionElements') is None: - loop_elements = self.add('loopElements') # Added in front to meet schema requirements + loop_elements = self.add('loopElements') # Added in front to meet schema requirements self.add('functionElements') function_elements = self.find('functionElements') function_elements.add('functionElement', element) @@ -201,7 +209,7 @@ class ExtendedElement(etree.ElementBase): return def add(self, tag, value=None, attrib=None, camel_case_conversion=False, only_add_if_valued=False, **extra): - """Method to add a new sub element to the element + """Method to add a new sub element to the element. :param tag: The sub element tag :type tag: str @@ -232,11 +240,10 @@ class ExtendedElement(etree.ElementBase): else: child = self._add_element(tag, value, attrib, **extra) - return child def _add_dictionary(self, tag, dictionary, attrib=None, camel_case_conversion=False, **extra): - """Method to add a new sub element to the element based on a dictionary + """Method to add a new sub element to the element based on a dictionary. :param tag: The sub element tag :type tag: str @@ -268,7 +275,7 @@ class ExtendedElement(etree.ElementBase): return child def _add_array(self, tag, array, attrib=None, camel_case_conversion=False, **extra): - """Method to add a new sub element to the element based on an array + """Method to add a new sub element to the element based on an array. :param tag: The sub element tag :type tag: str @@ -347,7 +354,15 @@ class ExtendedElement(etree.ElementBase): parent.remove(elem) def findasttext(self, path=None, namespaces=None): - """Method which extends the findtext method by trying to evaluate the string with the ast module""" + """Method which extends the findtext method by trying to evaluate the string with the last module. + + :param path: (optional) path of the element + :type path: str + :param namespaces: (optional) namespace of the element + :type namespaces: basestring + :return: evaluated text + :rtype: str + """ if path is None: element = self @@ -372,6 +387,7 @@ class ExtendedElement(etree.ElementBase): :param path_or_element: (Path to) the element to be analysed :type path_or_element: str, Element :param namespaces: A prefix-to-namespace mapping that allows the usage of XPath prefixes in path_or_element + :type namespaces: str :param ordered: Option for creation of a OrderedDict or a dict respectively :type ordered: bool :param camel_case_conversion: Option for conversion of the element tags from camelCase to lower_case