I run parallel simulations of one or more simulation setups via a pool of Ngspice processes.

Construct me with a Config object cfg and, unless you want to use me for setting up a circuit with a call to newSetup, a list avList of AV objects.

Class Variable retry Set True to have me retry (once) an analysis that resulted in an Ngspice error. If it succeeds the second time, that result is what the Deferred returned from run will fire with. This is False by default because it doesn't seem to accomplish anything.
Method __init__ Multi-Runner(cfg, avList=None, N_cores=1)
Method paramNames 0 Undocumented
Method paramNames Undocumented
Method params Returns an OrderedDict with 3-tuples containing the minimum, default, and maximum values for each parameter of the specified setup ID.
Method newSetup Sets up a circuit using a supplied circuit generation function func and an analyzer with the supplied nameList and an analyzerClass with its constructor args.
Method addSetup Sets me up for a new analysis.
Method shutdown Shuts everybody down.
Method run Runs one of my analyzers for the setup specified by integer ID with the supplied list of alterableValues.
Method runAllSetups Calls run for each setup with the alterable values in the supplied list.
Method _checkValues Called by run to make sure values list is legit.
retry =
Set True to have me retry (once) an analysis that resulted in an Ngspice error. If it succeeds the second time, that result is what the Deferred returned from run will fire with. This is False by default because it doesn't seem to accomplish anything.
def __init__(self, cfg, avList=None, N_cores=1):

Multi-Runner(cfg, avList=None, N_cores=1)

@property
def paramNames 0(self):
Undocumented
@paramNames.deleter
def paramNames(self):
Undocumented
def params(self, ID):

Returns an OrderedDict with 3-tuples containing the minimum, default, and maximum values for each parameter of the specified setup ID.

def newSetup(self, func, nameList, analyzerClass, *args, **kw):

Sets up a circuit using a supplied circuit generation function func and an analyzer with the supplied nameList and an analyzerClass with its constructor args.

You can supply Ngspice and pingspice-only simulation options as keywords. The only other keyword accepted is ID, described below.

Your circuit generation function func must accept as its sole argument an instance of a circuit generation tool (commonly referenced as f). No circuitry will be produced other than what that function generates.

An arbitrary ID of 100 will be used for this setup unless you specify a different one with the ID keyword.

Calls addSetup with the new setup. Returns a Deferred that fires with the setup ID when I have added a full set of analyzers all set up for this circuit.

def addSetup(self, ID, names, aseq, netlist=None):

Sets me up for a new analysis.

The new analysis will be done under the specified integer setup ID using the supplied list of names of vectors to be retrieved after each analysis and aseq definition sequence. For an Ngspice analyzer, the netlist is also included.

The definition sequence consists of a subclass of sim.Analyzer followed by args for its constructor, or an instance of psim.Analyzer, followed by args for its setup method.

Returns a Deferred that fires when I have added full set of analyzers all set up for the new analysis.

@defer.inlineCallbacks
def shutdown(self):

Shuts everybody down.

Do not try to run anything after calling this unless you wait for the returned Deferred and then generate all new setups.

def _checkValues(self, alterableValues):

Called by run to make sure values list is legit.

@defer.inlineCallbacks
def run(self, ID, alterableValues, study=False, noRerun=False):

Runs one of my analyzers for the setup specified by integer ID with the supplied list of alterableValues.

The list contains alterable device, device parameter, and/or model parameter values in the order of my paramNames list.

Unless operations are being aborted, "returns" a Deferred that fires with a sim.Vectors object, or psim.Vectors if the specified ID is served by a Python-only simulator, populated with result vectors. To see if there are errors, call the object's error status checker.

If some analyzer (not necessarily one of mine) has initiated a class-wide abort with a call to AnalyzerBase.abortAll, the Deferred will fire with None.

If the global 'study' configuration option is set, an error will cause the analyzer to create a new netlist file in your home directory with 'alter' and 'altermod' commands included in its '.options' section. The file will have a name of the form "pingspice-setup-XX.cir" where "XX" is the integer setup ID.

If the global 'devel' configuration option is set, the analyzer will create the new netlist file after every analysis, not just a failing one, and will wait for the file to be moved or removed before proceeding. This can be useful for development purposes but is obviously impractical for regular operation.

Returns a Deferred that fires with a populated sim.Vectors object for the specified setup, or None if there was a fatal error.

ParametersstudySet True to have netlists of each setup written for study, even without an error and even if it means overwriting an existing netlist file.
noRerunOnly gets set True by a recursive repeated call, if there was an error and my retry attribute is set True.
See Alsosim.Analyzer.__call__ and sim.Analyzer.study.
def runAllSetups(self, alterableValues):

Calls run for each setup with the alterable values in the supplied list.

Returns a Deferred that fires with a list of populated sim.Vectors objects, one for each setup.

API Documentation for pingspice, generated by pydoctor at 2021-09-18 08:41:11.