Esempio n. 1
0
        public static void SimpleSubcircuit()
        {
            var builder           = new CircuitBuilder();
            var batteryDefinition = builder
                                    .AddVoltageSource(1, 2, 9)
                                    .AddResistor(2, 3, 1.5)
                                    .BuildSubcircuit(new[] { 1, 3 });

            builder.Clear();
            builder
            .AddDevice(new[] { 0, 1 }, new Subcircuit(batteryDefinition))
            .AddSubcircuit(new[] { 0, 1 }, batteryDefinition);
        }