alert('Warning!!! Circuit has a voltage source loop or a source or current probe shorted by a wire, please remove the source or the wire causing the short.');
alert('Warning!!! Simulator might produce meaningless results or no result with illegal circuits.');
returnfalse;
}
}
}
returntrue;
}
// load circuit from JSON netlist (see schematic.js)
Circuit.prototype.load_netlist=function(netlist){
// set up mapping for all ground connections
for(vari=netlist.length-1;i>=0;--i){
varcomponent=netlist[i];
vartype=component[0];
if(type=='g'){
varconnections=component[3];
this.node_map[connections[0]]=this.gnd_node();
}
}
// process each component in the JSON netlist (see schematic.js for format)
varfound_ground=false;
for(vari=netlist.length-1;i>=0;--i){
varcomponent=netlist[i];
vartype=component[0];
// ignore wires, ground connections, scope probes and view info