コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            openFileDialog1.ShowDialog( );

            VSource         src  = new VSource(openFileDialog1.FileName);
            VCompiler       comp = new VCompiler();
            VCompiledSource s    = comp.Compile(src);

            RebuildTree(s.EntryPoint);
        }
コード例 #2
0
        private static void Main(string [] args)
        {
            VSource         src  = new VSource("test1.vs");
            VCompiler       comp = new VCompiler();
            VCompiledSource s    = comp.Compile(src);

            while (true)
            {
            }
        }
コード例 #3
0
        public static Circuit ACVSourceTestCircuit()
        {
            var testCkt = new Circuit("ACVSourceTestCircuit");
            var gnd     = testCkt.Ground;
            var node0   = testCkt.GenNode();

            testCkt.AddComponent(new Resistor("R1", 1, node0, gnd));

            var vs = new VSource("vSin", 1, node0, gnd);

            vs.SetSine(2, 4, 50E-3, -Math.PI / 4);
            testCkt.AddComponent(vs);
            return(testCkt);
        }
コード例 #4
0
        public static Circuit RLTestCircuit()
        {
            var testCkt = new Circuit("RLTestCircuit");
            var gnd     = testCkt.Ground;
            var node0   = testCkt.GenNode();
            var node1   = testCkt.GenNode();

            testCkt.AddComponent(new Resistor("R1", 1E3, node0, node1));
            testCkt.AddComponent(new Inductor("L1", 1, node1, gnd));

            var vs = new VSource("vStep", 1, node0, gnd);

            vs.SetStep(0, 0, 1E-9);
            testCkt.AddComponent(vs);
            return(testCkt);
        }