MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _checkModelDefs

Function _checkModelDefs

SLiCAP/SLiCAPyacc.py:720–739  ·  view source on GitHub ↗

Checks if the parameters given with a model statement (.model line) correspond with those of the model definition. :param circuitObject: Circuit object to be checked. :type circuitObject: SLiCAP circuit object :return: None :rtype: NoneType

(circuitObject)

Source from the content-addressed store, hash-verified

718 print("Error: unknown referenced element: " + referencedElement)
719
720def _checkModelDefs(circuitObject):
721 """
722 Checks if the parameters given with a model statement (.model line)
723 correspond with those of the model definition.
724
725 :param circuitObject: Circuit object to be checked.
726
727 :type circuitObject: SLiCAP circuit object
728
729 :return: None
730 :rtype: NoneType
731 """
732 for modelName in circuitObject.modelDefs.keys():
733 baseModel = circuitObject.modelDefs[modelName].type
734 modelParams = _MODELS[baseModel].params.keys()
735 referredParams = circuitObject.modelDefs[modelName].params.keys()
736 for parName in referredParams:
737 if parName not in modelParams:
738 print("Error: unknown model parameter: " + parName)
739 circuitObject.errors += 1
740
741def _checkElementModel(circuitObject):
742 """

Callers 1

_checkReferencesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected