示例#1
0
        /// <summary>回路網テスト1</summary>
        /// <remarks>2節点の流量計算</remarks>
        private static void circuitTest1()
        {
            //節点作成
            Node node1 = new Node("SampleNode1", 0, 10);
            Node node2 = new Node("SampleNode2", 0, 0);

            //流路作成・接続
            Channel channel = new Channel("SampleChannel", 2, 1.2);
            channel.Connect(node1, node2);

            //流量計算
            double flow = channel.GetFlow();

            Console.WriteLine("流量 : " + flow);
            Console.Read();
        }
示例#2
0
        /// <summary>Circuit test 1</summary>
        /// <remarks>Calculating energy flow between two nodes</remarks>
        private static void circuitTest1()
        {
            //Create new instance of Node class.
            Node node1 = new Node("SampleNode1", 0, 10);
            Node node2 = new Node("SampleNode2", 0, 0);

            //Create new instance of Channel class and connect nodes.
            Channel channel = new Channel("SampleChannel", 2, 1.2);
            channel.Connect(node1, node2);

            //Calculate energy flow.
            double flow = channel.GetFlow();

            Console.WriteLine("Energy flow is : " + flow.ToString("F2"));
            Console.Read();
        }