yaocptool.modelling.network package¶
Submodules¶
yaocptool.modelling.network.network module¶
Created on Fri Jul 07 16:05:50 2017
@author: marco
-
class
Network(nodes=None, name='network')[source]¶ Bases:
object-
connect(y, u, node1, node2)[source]¶ - Connect the variables of two subsystems (nodes) by creating an edge
Parameters: - y – output variable of node1
- u – input variable of node2
- node1 – node1 (which has ‘y’)
- node2 – node2 (which has ‘u’)
-
connections¶ - All connections (edges) from the self.graph
Return type: networkx.reportviews.OutEdgeView
-
create_node(name=None, model=None, problem=None, **kwargs)[source]¶ - Creat a node in the network
Parameters: - name (str) –
- model (SystemModel) –
- problem (OptimalControlProblem) –
Return type: Returns: node
-
get_model()[source]¶ - Create a single model which is the composition of all models and the connections
Returns: model Return type: SystemModel
-
get_problem()[source]¶ - Create a single OCP which is the composition of all problems and connections.
Returns: problem Return type: OptimalControlProblem
-
include_nodes(nodes)[source]¶ - Include node or list of nodes in the network
Parameters: nodes (list|Node) – node/nodes
-
models¶ - List of models of all nodes
Return type: list of SystemModel Returns: list of all models
-
nodes¶ - All nodes (from the self.graph)
Return type: networkx.reportviews.NodeView
-
problems¶ - List of problems of all nodes
Return type: list of OptimalControlProblem Returns: list of all problems
-
yaocptool.modelling.network.node module¶
Created on Fri Jul 07 16:33:52 2017
@author: marco