Sub Class_Globals
Private netlist, netlistDCCurrent, netlistDCVoltage, NetlistResistor As JavaObject
End Sub
Public Sub Initialize
netlist.InitializeNewInstance("org.knowm.jspice.netlist.Netlist", Null)
End Sub
Public Sub RunI1V1R6() As JavaObject
Dim val As Double = 0.02
netlistDCCurrent.InitializeNewInstance("org.knowm.jspice.netlist.NetlistDCCurrent", Array("a", val, Array As String("0", "4")))
netlist.RunMethod("addNetListComponent", Array(netlistDCCurrent))
val = 10.0
netlistDCVoltage.InitializeNewInstance("org.knowm.jspice.netlist.NetlistDCVoltage", Array("x", val, Array As String("2", "5")))
netlist.RunMethod("addNetListComponent", Array(netlistDCVoltage))
val = 100
NetlistResistor.InitializeNewInstance("org.knowm.jspice.netlist.NetlistResistor", Array("R1", val, Array As String("5", "0")))
netlist.RunMethod("addNetListComponent", Array(NetlistResistor))
val = 1000
NetlistResistor.InitializeNewInstance("org.knowm.jspice.netlist.NetlistResistor", Array("R2", val, Array As String("0", "3")))
netlist.RunMethod("addNetListComponent", Array(NetlistResistor))
NetlistResistor.InitializeNewInstance("org.knowm.jspice.netlist.NetlistResistor", Array("R3", val, Array As String("2", "3")))
netlist.RunMethod("addNetListComponent", Array(NetlistResistor))
val = 100
NetlistResistor.InitializeNewInstance("org.knowm.jspice.netlist.NetlistResistor", Array("R4", val, Array As String("1", "2")))
netlist.RunMethod("addNetListComponent", Array(NetlistResistor))
val = 1000
NetlistResistor.InitializeNewInstance("org.knowm.jspice.netlist.NetlistResistor", Array("R5", val, Array As String("3", "0")))
netlist.RunMethod("addNetListComponent", Array(NetlistResistor))
val = 10000
NetlistResistor.InitializeNewInstance("org.knowm.jspice.netlist.NetlistResistor", Array("R6", val, Array As String("1", "4")))
netlist.RunMethod("addNetListComponent", Array(NetlistResistor))
Return netlist
End Sub