GeneralAnchor id1 id1
closeHyperWorks():Anchor id2 id2
closeLibrary(libraryPath):Anchor id3 id3
connectToHyWorks(host=socket.gethostname(), register=getpass.getuser(), timeout=120000, indexid=1None):Anchor id4 id4
disableHyWorksApiExceptions():Anchor id4id5id4 id5
enableHyWorksApiExceptions():Anchor id5id6id5 id6
getPropertygetCurrentDesign(key):Anchor id6id7id6 id7
getProperties():Anchor id7id8id7 id8
setPropertygetProperty(key, value, save=False):Anchor id8id9id8 id9
openLibrary(libraryPath, visible=True):Anchor id10 id10
startHyperWorks(stdout=None, stderr=NonesetProperty(key, value, save=False):Anchor id9id11id9 id11
startAndConnectHypersim(host=socket.gethostname(), register=getpass.getuser(), stdout=None, stderr=None:Anchor id10id12id10 id12
startHyperWorks(stdout=None, timeoutstderr=2500None):Anchor id13 id13
DesignAnchor id11id14id11 id14
closeDesign(designPath):Anchor id12id15id12 id15
disconnectDesign(designPath):Anchor id13id16id13 id16
displayConnectionsfindMinimalStepSize():Anchor id14id17id14 id17 Anchor id15 id15 getDesignPrefs():Anchor id16 id16 importEDD(eddFilePath, doConnections):Anchor id17 id17 newDesign(designFilePath=Nonetimeout, overrunsThreshold: int, nCores=100, startingTimeStep=1e-6, jump=1e-6):
openDesigngetAllComponentDescriptions(designPath):Anchor id18 id18
recheckPortsgetAllComponentParameters(compName):Anchor id19 id19
saveDesigngetAllComponentSensors(compName):Anchor id20 id20
saveDesignAsgetAllDevicesNames(fileName):Anchor id21 id21
updateEDDgetDesignPrefs(eddFilePath, doConnections):Anchor id22 id22 Anchor id23 id23
activateObservablesimportPSCAD(deviceName, observablesfilePath, onlyDll, removeNotConnectedBuses=False):Anchor id24 id24
addControlSignalimportPSSE(signalNamefilePath, points, hitCheck replaceMachines=False, subcircuitgroupMachinesWithControls=NoneTrue):Anchor id25 id25
addBus1phimportPowerFactory(signalNamefilePath, points, hitCheck = False, subcircuit=Nonemode=0):Anchor id26 id26
addBus3ph(signalName, points, hitCheck = False, subcircuit=newDesign(designFilePath=None):Anchor id27 id27
addDevice(libName, blocName, coordX=0, coordY=0, page=1, subcircuit=None, name=NoneopenDesign(designPath):Anchor id28 id28
addPinsToDevice(name, cardinalPoint, function, pins, redraw=FalserecheckPorts():Anchor id29 id29
connectBundleToBundle(blocA, signalListA, blocB, signalListBsaveDesign():Anchor id30 id30
connectDevices(blocA, pinA, blocB, pinB, isThreePhaseAndPowerFlexible, signalName=NonesaveDesignAs(fileName):Anchor id31 id31
connectDeviceToControlSignalupdateEDD(deviceName, pinName, signalName)eddFilePath, doConnections):Anchor id32 id32
connectDeviceToBus1ph(deviceName, pinName, signalName):Anchor id33 id33
connectDeviceToBus3phactivateObservables(deviceName, pinName, signalNameobservables):Anchor id34 id34
connectPinToBundleaddBus1ph(blocAsignalName, pinApoints, blocB, signalBhitCheck=False, subcircuit=None):Anchor id35 id35
createSubCircuitaddBus3ph(namesignalName, type=Nonepoints, coordXhitCheck=0False, coordY=0, page=1subcircuit=None):Anchor id36 id36
disconnectPinaddControlSignal(deviceNamesignalName, pinNamepoints, removeAllConnections hitCheck=False, subcircuit=None):Anchor id37 id37
displayComponent(componentName=””addDevice(libName, blocName, coordX=0, coordY=0, page=1, subcircuit=None, name=None):Anchor id38 id38
flipHorizontallyDevice(deviceName, keepConnections=TrueaddPinsToDevice(name, cardinalPoint, function, pins, redraw=False):Anchor id39 id39
flipVerticallyDevice(deviceName, keepConnections=TrueconnectBundleToBundle(blocA, signalListA, blocB, signalListB):Anchor id40 id40
getAllDevicesNamesconnectDeviceToBus1ph(deviceName, pinName, signalName):Anchor id41 id41
getCoordinatesconnectDeviceToBus3ph(deviceName, pinName = None, signalName):Anchor id42 id42
getComponentParameterconnectDeviceToControlSignal(compNamedeviceName, pinName, compParamsignalName):Anchor id43 id43
getDeviceBundleChildPins(deviceName, pinNameconnectDevices(blocA, pinA, blocB, pinB, isThreePhaseAndPowerFlexible, signalName=None):Anchor id44 id44
getDeviceBundlePins(deviceNameconnectPinToBundle(blocA, pinA, blocB, signalListB):Anchor id45 id45
importUCM(defFilePathcreateSubCircuit(name, subType, coordX=0, coordY=0, page=1):Anchor id46 id46
includeDevicedisconnectPin(deviceName, pinName, includeremoveAllConnections=False):Anchor id47 id47
removeDevice(deviceName)displayComponent(componentName, printAttributes=True, printSignals=True, printConnectors=True:Anchor id48 id48
renameDevicedisplayConnections(oldDeviceName, newDeviceNamecomponentName):Anchor id49 id49
renameSignalflipHorizontallyDevice(oldNamedeviceName, newName, visiblekeepConnections=True):Anchor id50 id50
rotateLeftDeviceflipVerticallyDevice(deviceName, keepConnections=True):Anchor id51 id51
rotateRightDevicegetComponentParameter(deviceNamecompName, keepConnections=TruecompParam):Anchor id52 id52
setComponentParametergetCoordinates(compName, compParam, valuedeviceName, pinName=None):Anchor id53 id53
setDeviceFillColorgetDeviceBundleChildPins(namedeviceName, colorHexRGBpinName):Anchor id54 id54
setDeviceLineColorgetDeviceBundlePins(name, colorHexRGBdeviceName):Anchor id55 id55
setSignalLineColorgetDevicePinTypes(name, colorHexRGBdeviceName: str, pinNames: list):Anchor id56 id56
HyWorksApiGRPC.setSignalLineWidth(name, widthimportUCM(defFilePath):Anchor id57 id57
setDevicesNameVisibilityincludeDevice(deviceListdeviceName, isVisibleinclude):Anchor id58 id58
setPinPhaseNumberremoveDevice(deviceName, pinName, value):Anchor id59 id59
updateUCMrenameDevice(deviceNameoldDeviceName, newDeviceName):Anchor id60 id60 Anchor id61 id61
editSensorrotateLeftDevice(blocNamedeviceName, sensorName, IOType=None, IONumber=None, base=None, unit=None)keepConnections=True):Anchor id62 id62
getSensorInforotateRightDevice(blocName, sensorName, keydeviceName, keepConnections=True):Anchor id63 id63
loadSensors (filePathsetComponentParameter(compName, compParam, value):Anchor id64 id64
selectAllSensors(blocNamesetComponentParameters(compNames, compParams, values):Anchor id65 id65
setSensorDataLoggersetDeviceFillColor(blocName, sensorName, record, groupName, triggername, colorHexRGB):Anchor id66 id66
setSensorDataPointsetDeviceLineColor(blocName, sensorName, exchangerTag, dataPointName, dataPointIdxname, colorHexRGB):Anchor id67 id67
selectSensorsetDevicesNameVisibility(blocName, sensorName, selected=TruedeviceList, isVisible):Anchor id68 id68 Anchor id69 id69
analyzesetSignalLineColor(signalName, colorHexRGB):Anchor id70 id70
buildTopologysetSignalLineWidth(signalName, width):Anchor id71 id71
clearCodeDir():anchorsetSubcircuitScripts(compName, initialValues, rules, variablesToTransmit, evaluateOnly=False):Anchor id72 id72
genCodeunbindUCMFromLibrary(deviceName):Anchor id73 id73
getPreference(prefNameupdateUCM(deviceName, ucmPath=None):Anchor id74 id74
mapTask():Anchor id75 id75
setPreference(prefName, valueeditSensor(blocName, sensorName, IOType=None, IONumber=None, base=None, unit=None):Anchor id76 id76
setTarget(hostname, mode=NonegetLastSensorValues(sensorNames):Anchor id77 id77
startLoadFlowgetSensorInfo(blocName, sensorName, key):Anchor id78 id78
getLoadFlowReport()getSensorsValues(sensorNames: List[str], timeLength, timeStart=0, acquisitionRate=Non:Anchor id79 id79 Anchor id80 id80
getMonitoringAllValuesselectAllSensors(blocName):Anchor id81 id81
getMonitoringValue(monitorNameselectSensor(blocName, sensorName, selected=True):Anchor id82 id82
getLastSensorValues(sensorNamessetSensorDataLogger(blocName, sensorName, record, groupName, trigger):Anchor id83 id83
getSimulationTime(setSensorDataPoint(blocName, sensorName, exchangerTag, dataPointName, dataPointIdx):Anchor id84 id84
loadSnapshot():Anchor id85 id85
resetMonitoringanalyze(cpuList):Anchor id86 id86
resetPerfIndicbuildTopology(cpuList):Anchor id87 id87
resetTimingclearCodeDir(cpuList):Anchor id88 id88
simtrig genCode(sync):Anchor id89 id89
startMonitoringgetLoadFlowReport() :Anchor id90 id90
startSimgetPreference(prefName):Anchor id91 id91
stopMonitoringmapTask():Anchor id92 id92
stopSimsetPreference(prefName, value):Anchor id93 id93
takeSnapshotsetTarget(hostname, mode=None):Anchor id94 id94 Anchor id95 id95
addTargetToManager(targetHostName):Anchor id96 id96
diagnosticTargetgetMonitoringAllValues(targetHostName):Anchor id97 id97
getAllTargetsNamegetMonitoringValue(monitorName):Anchor id98 id98
getCurrentVersionOnTarget(targetHostNamegetPreparationTimings(modelPath: str = None) :Anchor id99 id99
getInstalledVersionOnTarget(targetHostNamegetSimulationCoreTimings(modelPath: str = None) :Anchor id100 id100
installHypersimOnTargetgetSimulationTime(targetHostName):Anchor id101 id101
isTargetReady(targetHostNamegetSimulationTimings(modelPath: str = None) :Anchor id102 id102
removeTargetFromManagerloadSnapshot(targetHostName):Anchor id103 id103
switchVersionOnTargetresetMonitoring(targetHostName, switchToVersioncpuList):Anchor id104 id104
General
...
resetPerfIndic(cpuList):Anchor id105 id105 Anchor
...
Close HyperWorks
Examples:
HyWorksApi.closeHyperWorks()
...
...
resetTiming(cpuList):id106 id106
simtrig(sync):Anchor id107 id107
startMonitoring():Anchor id108 id108
startSim():Anchor id109 id109 Anchor
...
Connect HyJavaApi to HYPERSIM
Parameters: |
|
Returns: | error value |
Return type: | int |
Raises: | AssertionError – raises exception on error |
...
disableHyWorksApiExceptions():
...
Disable HyWorksApi from returning ScopeView exceptions through Python
...
stopMonitoring():id110 id110
stopSim():Anchor id111 id111
takeSnapshot():Anchor id112 id112
TargetAnchor id113 id113
addTargetToManager(targetHostName):Anchor id114 id114
diagnosticTarget(targetHostName):Anchor id115 id115
getAllTargetsName():Anchor id116 id116 Anchor
...
Enable HyWorksApi to return HYPERSIM exceptions through Python
...
getCurrentVersionOnTarget(targetHostName):id117 id117
getInstalledVersionOnTarget(targetHostName):Anchor id118 id118 Anchor
...
Get HYPERSIM property
Parameters: | key (str) – property key |
Returns: | HYPERSIM property |
Return type: | str |
Raises: | AssertionError – raises exception on error |
Examples:
HyWorksApi.getProperty(“hyworks.hysim.extraTimeout”)
...
installHypersimOnTarget(targetHostName):id119 id119
isTargetReady(targetHostName):Anchor id120 id120
removeTargetFromManager(targetHostName):Anchor id121 id121
switchVersionOnTarget(targetHostName, switchToVersion):Anchor id122 id122
General
closeHyperWorks():
Anchor HyWorksApiGRPC.getPropertiescloseHyperWorks HyWorksApiGRPC.getPropertiescloseHyperWorks HyWorksApiGRPC.
getProperties
closeHyperWorks
()Get current HYPERSIM general properties
Returns: HYPERSIM general properties
Return type: str
...
Close HyperWorks
Examples:
HyWorksApi.closeHyperWorks()
closeLibrary(libraryPath):
Anchor HyWorksApiGRPC.setPropertycloseLibrary HyWorksApiGRPC.setPropertycloseLibrary HyWorksApiGRPC.
setProperty
(key, value, save=False) Set HYPERSIM general propertycloseLibrary
(libraryPath)close a CLF library located at the specified ‘libraryPath’.
Parameters: key libraryPath (str) –
property keyvalue (str) – property value
save (bool) – save preferences for the next session
Returns: error valueThe path to the CLF library to be closed.
Returns: True if the library was successfully closed; False otherwise.
Return type: bool
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.setProperty(“hyworks.hysim.extraTimeout”, “1200000”)
HyWorksApi.setProperty(“hyworks.hysim.extraTimeout”, “1800000”, True)
...
connectToHyWorks(host=socket.gethostname(), register=getpass.getuser(), timeout=120000, id=None):
Anchor HyWorksApiGRPC.startHyperWorksconnectToHyWorks HyWorksApiGRPC.startHyperWorksconnectToHyWorks HyWorksApiGRPC.
startHyperWorks
connectToHyWorks
(stdout=None, stderr=None)Start HYPERSIM
Parameters: stdout – standard output
stderr – standard error
Examples:
HyWorksApi.startHyperWorks()
startAndConnectHypersim(host=socket.gethostname(), register=getpass.getuser(), stdout=None, stderr=None, timeout=2500):
- host=socket.gethostname(), register=getpass.getuser(), timeout=120000, id=None)
Connect HyJavaApi to HYPERSIM
Parameters: host (str) – computer name
register (str) – user name
stdout – standard output
stderr – standard error
timeout timeout (int) – timeout for function
id (int) – timeout for functionHyworks index to register to
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
HyWorksApiGRPC.
startAndConnectHypersim
(host=socket.gethostname(), register=getpass.getuser(), stdout=None, stderr=None, timeout=2500)Open and connect Design
...
disableHyWorksApiExceptions(
...
):
Anchor HyWorksApiGRPC.closeDesigndisableHyWorksApiExceptions HyWorksApiGRPC.closeDesigndisableHyWorksApiExceptions HyWorksApiGRPC.
closeDesign
disableHyWorksApiExceptions
(designPath)Close design
Parameters: designPath (str) – path to the HYPERSIM model (.ecf)
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
Disable HyWorksApi from returning ScopeView exceptions through Python
enableHyWorksApiExceptions():
...
Anchor HyWorksApiGRPC.enableHyWorksApiExceptions HyWorksApiGRPC.enableHyWorksApiExceptions HyWorksApiGRPC.
enableHyWorksApiExceptions
()Enable HyWorksApi to return HYPERSIM exceptions through Python
...
getCurrentDesign():
Anchor HyWorksApiGRPC.disconnectDesigngetCurrentDesign HyWorksApiGRPC.disconnectDesigngetCurrentDesign HyWorksApiGRPC.
disconnectDesign
getCurrentDesign
(designPath)
...
...
getProperties():
Anchor HyWorksApiGRPC.getProperties HyWorksApiGRPC.getProperties HyWorksApiGRPC.
getProperties
()Get current HYPERSIM general properties
Returns: error valueHYPERSIM general properties
Return type: int
Raises: AssertionError – raises exception on error
...
str
getProperty(key):
Anchor HyWorksApiGRPC.displayConnectionsgetProperty HyWorksApiGRPC.displayConnectionsgetProperty HyWorksApiGRPC.
displayConnections
getProperty
(key)Print specified component interconnections to STDOUTGet HYPERSIM property
Parameters: componentName key (str) – component nameproperty key
Returns: error valueHYPERSIM property
Return type: str
Raises: AssertionError – raises exception on error
...
Examples:
HyWorksApi.getProperty(“hyworks.hysim.extraTimeout”)
openLibrary(libraryPath, visible=True):
Anchor HyWorksApiGRPC.getDesignPrefsopenLibrary HyWorksApiGRPC.getDesignPrefsopenLibrary HyWorksApiGRPC.
getDesignPrefs
().
openLibrary
(libraryPath, visible=True)opens a CLF library located at the specified ‘libraryPath’.
Parameters: libraryPath (str) – The path to the CLF library to be opened.
visible (bool) – (Optional) A boolean indicating whether the library should be opened in a visible state (default is True).
Returns: True if the library was successfully opened; False otherwise.
Return type: strbool
Get current model preferences
...
setProperty(
...
key, value, save=False):
Anchor HyWorksApiGRPC.importEDDsetProperty HyWorksApiGRPC.importEDDsetProperty HyWorksApiGRPC.
importEDD
setProperty
(eddFilePath, doConnections) Import EDD to current HYPERSIM model- key, value, save=False)
Set HYPERSIM general property
Parameters: eddFilePath key (str) – path to EDD (.edd)doConnections property key
value (str) – property value
save (bool) – connect imported devicessave preferences for the next session
Returns: error value
Return type: intbool
Raises: AssertionError – raises exception on error
newDesign(designFilePath=None):
...
Create new HYPERSIM model
Parameters: | designFilePath (str) – path to the HYPERSIM model (.ecf) |
Returns: | error value |
Return type: | int |
Raises: | AssertionError – raises exception on error |
...
Examples:
HyWorksApi.setProperty(“hyworks.hysim.extraTimeout”, “1200000”)
HyWorksApi.setProperty(“hyworks.hysim.extraTimeout”, “1800000”, True)
startAndConnectHypersim(host=socket.gethostname(), register=getpass.getuser(), stdout=None, stderr=None:
startHyperWorks(stdout=None, stderr=None):
...
Anchor HyWorksApiGRPC.startHyperWorks HyWorksApiGRPC.startHyperWorks HyWorksApiGRPC.
startHyperWorks
(stdout=None, stderr=None)Start HYPERSIM
Parameters: stdout – standard output
stderr – standard error
Examples:
HyWorksApi.startHyperWorks()
...
Design
closeDesign(designPath):
Anchor HyWorksApiGRPC.openDesigncloseDesign HyWorksApiGRPC.openDesigncloseDesign HyWorksApiGRPC.
openDesign
closeDesign
(designPath)Open HYPERSIM modelClose design
Parameters: designPath (str) – path to the HYPERSIM model (.ecf)
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
disconnectDesign(designPath):
Anchor HyWorksApiGRPC.recheckPortsdisconnectDesign HyWorksApiGRPC.recheckPortsdisconnectDesign HyWorksApiGRPC.
recheckPorts
disconnectDesign
()Check connections by page connectors Recommended after build circuits involving page connectors via API
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
HyWorksApiGRPC.
saveDesign
()Save current HYPERSIM model
saveDesign():
- designPath)
Disconnect HyWorksApi from the HYPERSIM model
Parameters: designPath (str) – path to the HYPERSIM model (.ecf)
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
findMinimalStepSize(timeout, overrunsThreshold: int, nCores=100, startingTimeStep=1e-6, jump=1e-6):
Anchor HyWorksApiGRPC.saveDesignAsfindMinimalStepSize HyWorksApiGRPC.saveDesignAs HyWorksApiGRPC.
saveDesignAs
(fileName)Save current HYPERSIM model
Parameters: fileName (str) – desired model path
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
findMinimalStepSize HyWorksApiGRPC.
findMinimalStepSize
(timeout, overrunsThreshold: int, nCores=100, startingTimeStep=1e-6, jump=1e-6)Calculate the smallest possible time step without overrun(s). It requires prior enable of Dashboards. This API function attempts to start and stop a simulation without triggering the overrun limit. If the simulation stops before the timeout value, the simulation time step is incremented by the jump value. The minimal step time is when the simulation does not time out during the attempt.
Parameters: timeout (float) – Maximum simulation iteration time given in second
overrunsThreshold (int) – Maximum accepted number of overruns for an iteration
nCores (int) – Number of requested processors (Default: 100)
startingTimeStep (float) – Lowest time step starting value given in second (Default: 1 usec)
jump – Time step jump increment for the next run (Default: 1 usec)
jump – float
Returns: The minimal step size value in second or None on failure
Return type: int
Raises: AssertionError – raises exception on error
getAllComponentDescriptions():
...
Anchor HyWorksApiGRPC.getAllComponentDescriptions HyWorksApiGRPC.getAllComponentDescriptions HyWorksApiGRPC.
getAllComponentDescriptions
()
...
getAllComponentParameters(compName):
...
Anchor HyWorksApiGRPC.getAllComponentParameters HyWorksApiGRPC.getAllComponentParameters HyWorksApiGRPC.
getAllComponentParameters
(compName)
...
getAllComponentSensors(compName):
...
Anchor HyWorksApiGRPC.getAllComponentSensors HyWorksApiGRPC.getAllComponentSensors HyWorksApiGRPC.
getAllComponentSensors
(compName)
...
getAllDevicesNames():
...
Anchor HyWorksApiGRPC.getAllDevicesNames HyWorksApiGRPC.getAllDevicesNames HyWorksApiGRPC.
getAllDevicesNames
()Gets the list of all devices names
Returns: the list of all visible devices
Return type: list
Raises: AssertionError – raises exception on error
Info This call requires an analyze call before to function properly
...
getDesignPrefs():
...
Anchor HyWorksApiGRPC.getDesignPrefs HyWorksApiGRPC.getDesignPrefs HyWorksApiGRPC.
getDesignPrefs
()Get current model preferences
Returns: model preferences
Return type: str
...
importEDD(eddFilePath, doConnections):
...
Anchor HyWorksApiGRPC.importEDD HyWorksApiGRPC.importEDD HyWorksApiGRPC.
importEDD
(eddFilePath, doConnections)Import EDD to current HYPERSIM model
Parameters: eddFilePath (str) – path to EDD (.edd)
doConnections (bool) – connect imported devices
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
importPSCAD(filePath, onlyDll, removeNotConnectedBuses=False):
...
Anchor HyWorksApiGRPC.importPSCAD HyWorksApiGRPC.importPSCAD HyWorksApiGRPC.
importPSCAD
(filePath, onlyDll, removeNotConnectedBuses=False)
...
importPSSE(filePath, replaceMachines=False, groupMachinesWithControls=True):
...
Anchor HyWorksApiGRPC.importPSSE HyWorksApiGRPC.importPSSE HyWorksApiGRPC.
importPSSE
(filePath, replaceMachines=False, groupMachinesWithControls=True)
...
importPowerFactory(filePath, mode=0):
...
Anchor HyWorksApiGRPC.importPowerFactory HyWorksApiGRPC.importPowerFactory HyWorksApiGRPC.
importPowerFactory
(filePath, mode=0)Import PowerFactory
Parameters: filePath (str) – path to PowerFactory file (.xml)
mode (int) – select switch import mode (Default: 0): 0 (All switches are removed), 1 (All switches are added), 2 (Only switches with events are added)
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
newDesign(designFilePath=None):
...
Anchor HyWorksApiGRPC.newDesign HyWorksApiGRPC.newDesign HyWorksApiGRPC.
newDesign
(designFilePath=None)Create new HYPERSIM model
Parameters: designFilePath (str) – path to the HYPERSIM model (.ecf)
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
openDesign(designPath):
...
Anchor HyWorksApiGRPC.openDesign HyWorksApiGRPC.openDesign HyWorksApiGRPC.
openDesign
(designPath)Open HYPERSIM model
Parameters: designPath (str) – path to HYPERSIM model (.ecf)
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
recheckPorts():
...
Anchor HyWorksApiGRPC.recheckPorts HyWorksApiGRPC.recheckPorts HyWorksApiGRPC.
recheckPorts
()Check connections by page connectors Recommended after build circuits involving page connectors via API
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
saveDesign():
...
Anchor HyWorksApiGRPC.saveDesign HyWorksApiGRPC.saveDesign HyWorksApiGRPC.
saveDesign
()Save current HYPERSIM model
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
saveDesignAs(fileName):
...
Anchor HyWorksApiGRPC.saveDesignAs HyWorksApiGRPC.saveDesignAs HyWorksApiGRPC.
saveDesignAs
(fileName)Save current HYPERSIM model
Parameters: fileName (str) – desired model path
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
updateEDD(eddFilePath, doConnections):
...
Anchor HyWorksApiGRPC.updateEDD HyWorksApiGRPC.updateEDD HyWorksApiGRPC.
updateEDD
(eddFilePath, doConnections)Update EDD
Parameters: eddFilePath (str) – path to EDD (.edd)
doConnections (bool) – connect imported devices
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
Device
activateObservables(deviceName, observables):
...
Anchor HyWorksApiGRPC.activateObservables HyWorksApiGRPC.activateObservables HyWorksApiGRPC.
activateObservables
(deviceName, observables)Activate a list of observable pins on the device
Parameters: deviceName (str) – name of the first device
observables (list[str]) – list of observable names. If list is empty, all observables are removed. Note that it does not append, but is the final list of observables
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.activateObservables(‘Imeas1’, [‘a’, ‘b’])
HyWorksApi.activateObservables(‘Imeas1’, [])
...
addBus1ph(signalName, points, hitCheck=False, subcircuit=None):
...
Anchor HyWorksApiGRPC.addBus1ph HyWorksApiGRPC.addBus1ph HyWorksApiGRPC.
addBus1ph
(signalName, points, hitCheck=False, subcircuit=None)Add a 1 phase bus to HYPERSIM model.
Parameters: signalName (str) – signal name
points (list[list[int]]) – list of points as X-Y coordinates
hitCheck (bool) – true to check for connections to other signals at both ends of the line
subcircuit (str) – subcircuit path
Returns: unique signal name
Return type: str
Examples:
HyWorksApi.addBus1ph(‘myBus’, [[-700, 0], [700, 0]])
Info until connected to a power pin, a 1 phase bus is considered a control signal
...
addBus3ph(signalName, points, hitCheck=False, subcircuit=None):
...
Anchor HyWorksApiGRPC.addBus3ph HyWorksApiGRPC.addBus3ph HyWorksApiGRPC.
addBus3ph
(signalName, points, hitCheck=False, subcircuit=None)Add a 3 phase bus to HYPERSIM model
Parameters: signalName (str) – signal name
points (list[list[int]]) – list of points as X-Y coordinates
hitCheck (bool) – true to check for connections to other signals at both ends of the line.
subcircuit (str) – subcircuit path
Returns: unique signal name
Return type: str
Examples:
HyWorksApi.addBus3ph(‘myBus’, [[-700, 0], [700, 0]])
...
addControlSignal(signalName, points, hitCheck=False, subcircuit=None):
Anchor HyWorksApiGRPC.updateEDDaddControlSignal HyWorksApiGRPC.updateEDDaddControlSignal HyWorksApiGRPC.
updateEDD
(eddFilePath, doConnections) Update EDDaddControlSignal
(signalName, points, hitCheck=False, subcircuit=None)Add a control signal to HYPERSIM model
Parameters: error value eddFilePath signalName (str) – path to EDD (.edd)
doConnections (bool) – connect imported devices
Returns: ) – signal name
points (list[list[int]]) – list of points as X-Y coordinates
hitCheck (bool) – true to check for connections to other signals at both ends of the line.
subcircuit (str) – subcircuit path
Returns: unique signal name
Return type: intstr
Raises: AssertionError – raises exception on error
Device
...
Examples:
HyWorksApi.addControlSignal(‘signal1’, [[-700, 0], [700, 0], [700, 700])
addDevice(libName, blocName, coordX=0, coordY=0, page=1, subcircuit=None, name=None):
Anchor HyWorksApiGRPC.activateObservablesaddDevice HyWorksApiGRPC.activateObservablesaddDevice HyWorksApiGRPC.
activateObservables
(deviceName, observables) Activate a list of observable pins on the deviceaddDevice
(libName, blocName, coordX=0, coordY=0, page=1, subcircuit=None, name=None)Add device to HYPERSIM model
Parameters: Raises: AssertionError – raises exception on error deviceName libName (str) – name of the first device
observables (list[str]) – list of observable names. If list is empty, all observables are removed. Note that it does not append, but is the final list of observables
Returns: error value
Return type: int
device library name
blocName (str) – device name
coordX (int) – X coordinate
coordY (int) – Y coordinate
page (int) – page number
subcircuit (str) – subcircuit path
name (str) – Name to assign to the device. If non, a default name will be assigned
Returns: unique device name, reusable in the other APIs
Return type: str
Examples:
HyWorksApi.activateObservables(‘Imeas1’, [‘a’, ‘b’]addDevice(‘Network RLC.clf’, ‘R grounded’, 700, 700)
HyWorksApi.activateObservables(‘Imeas1’, [])
...
addDevice(‘Network RLC.clf’, ‘R grounded’, 700, 700, 1, “MySubCircuit”, “Resistor1”)
Info The library name must include the .clf for this to work.
addPinsToDevice(name, cardinalPoint, function, pins, redraw=False):
Anchor HyWorksApiGRPC.addControlSignaladdPinsToDevice HyWorksApiGRPC.addControlSignaladdPinsToDevice HyWorksApiGRPC.
addControlSignal
(signalName, points, hitCheck=False, subcircuit=None) Add a control signal to HYPERSIM modeladdPinsToDevice
(name, cardinalPoint, function, pins, redraw=False)Add pins, bundles, or pins inside bundles on a device
Parameters: Return type: str signalName name (str) – signal name
points (list[list[int]]) – list of points as X-Y coordinates
hitCheck (bool) – true to check for connections to other signals at both ends of the line.
subcircuit (str) – subcircuit path
Returns: unique signal name
device name
cardinalPoint (str) – Location on the symbol of the device
function (str) – The function of the listed pins. Input, Output or Power
pins (list[str]) – List of pins
redraw (bool) – if True, the symbol will be redrawn with a default representation
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.addControlSignaladdPinsToDevice(‘signal1’, [[-700, 0], [700, 0], [700, 700])
addBus1ph(signalName, points, hitCheck = False, subcircuit=None):
...
Add a 1 phase bus to HYPERSIM model.
Parameters: |
|
Returns: | unique signal name |
Return type: | str |
Examples:
HyWorksApi.addBus1ph(‘myBus’, [[-700, 0], [700, 0]])
Info |
---|
until connected to a power pin, a 1 phase bus is considered a control signal |
...
‘SubCircuit1’, ‘N’, ‘I’, [‘in1’], True)
HyWorksApi.addPinsToDevice(‘SubCircuit7’, ‘S’, ‘P’, [‘pow1’], True)
HyWorksApi.addPinsToDevice(‘SubCircuit1’, ‘W’, ‘O’, [‘Bundle1[o1]’, ‘Bundle1[o2]’, ‘Bundle1[o3]’], True)
And to make a sub circuit port connect with the sub circuit pins :
HyWorksApi.addPinsToDevice(‘SubCircuit1/SubCircuitPort’, ‘W’, ‘I’, [‘PORT[o1]’, ‘PORT[o2]’, ‘PORT[o3]’)
connectBundleToBundle(blocA, signalListA, blocB, signalListB):
Anchor HyWorksApiGRPC.addBus3phconnectBundleToBundle HyWorksApiGRPC.addBus3phconnectBundleToBundle HyWorksApiGRPC.
addBus3ph
connectBundleToBundle
(signalNameblocA, points signalListA, hitCheck=False, subcircuit=None) Add a 3 phase bus to HYPERSIM model- blocB, signalListB)
Connect two bundle pins together
Parameters: unique signal name signalName blocA (str) – signal name of the first device
points signalListA (list[list[int]str]) – list of points as X-Y coordinates
hitCheck (bool) – true to check for connections to other signals at both ends of the line.
subcircuit (str) – subcircuit path
Returns: first bundle signals. ex: [‘a’,’b’,’c’]
blocB (str) – name of the first pin
signalListB (list[str]) – list of second bundle signals. ex: [‘a’,’b’,’c’]
Returns: error value
Return type: strint
Examples:
HyWorksApi.addBus3ph(‘myBus’, [[-700, 0], [700, 0]])
...
Raises: AssertionError – raises exception on error
connectDeviceToBus1ph(deviceName, pinName, signalName):
Anchor HyWorksApiGRPC.addDeviceconnectDeviceToBus1ph HyWorksApiGRPC.addDeviceconnectDeviceToBus1ph HyWorksApiGRPC.
addDevice
connectDeviceToBus1ph
(libNamedeviceName, blocName, coordX=0, coordY=0, page=1, subcircuit=None, name=None) Add device to HYPERSIM model- pinName, signalName)
Connects a device onto 1 phase bus
Parameters: libName (str) – device library name
blocName deviceName (str) – device name
coordX (int) – X coordinate
coordY (int) – Y coordinate
page (int) – page number
subcircuit name
pinName (str) – subcircuit pathname device pin name
signalName (str) – Name to assign to the device. If non, a default name will be assignedsignal name
Returns: unique device name, reusable in the other APIserror value
Return type:str bool
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.addDevice(‘Network RLC.clf’, ‘R grounded’, 700, 700)
HyWorksApi.addDevice(‘Network RLC.clf’, ‘R grounded’, 700, 700, 1, “MySubCircuit”, “Resistor1”)
Info The library name must include the .clf for this to work.
...
connectDeviceToBus1ph(‘R1’, ‘net_1’, ‘myBus’)
HyWorksApi.connectDeviceToBus1ph(‘SubCC1/SubSubCC1/R3’, ‘net_1’, ‘myBus’)
connectDeviceToBus3ph(deviceName, pinName, signalName):
Anchor HyWorksApiGRPC.addPinsToDeviceconnectDeviceToBus3ph HyWorksApiGRPC.addPinsToDeviceconnectDeviceToBus3ph HyWorksApiGRPC.
addPinsToDevice
connectDeviceToBus3ph
(namedeviceName, cardinalPoint, function, pins, redraw=False) Add pins, bundles, or pins inside bundles on a device- pinName, signalName)
Connects a device onto 3 phase bus
Parameters: name deviceName (str) – device name
cardinalPoint pinName (str) – Location on the symbol of the device
function (str) – The function of the listed pins. Input, Output or Power
pins (list[str]) – List of pins
redraw (bool) – if True, the symbol will be redrawn with a default representationdevice pin name
signalName (str) – signal name
Returns: error value
Return type: intbool
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.connectDeviceToBus3ph(‘R1’, ‘net_1’, ‘myBus’)
HyWorksApi.addPinsToDevice(‘SubCircuit1’, ‘N’, ‘I’, [‘in1’], True)
HyWorksApi.addPinsToDevice(‘SubCircuit7’, ‘S’, ‘P’, [‘pow1’], True)
HyWorksApi.addPinsToDevice(‘SubCircuit1’, ‘W’, ‘O’, [‘Bundle1[o1]’, ‘Bundle1[o2]’, ‘Bundle1[o3]’], True)
And to make a sub circuit port connect with the sub circuit pins :
HyWorksApi.addPinsToDevice(‘SubCircuit1/SubCircuitPort’, ‘W’, ‘I’, [‘PORT[o1]’, ‘PORT[o2]’, ‘PORT[o3]’)
...
connectDeviceToBus3ph(‘SubCC1/SubSubCC1/R3’, ‘net_1’, ‘myBus’)
connectDeviceToControlSignal(deviceName, pinName, signalName):
...
Anchor HyWorksApiGRPC.connectDeviceToControlSignal HyWorksApiGRPC.connectDeviceToControlSignal HyWorksApiGRPC.
connectDeviceToControlSignal
(deviceName, pinName, signalName)Connects a device onto a control signal
Parameters: deviceName (str) – device name
pinName (str) – device pin name
signalName (str) – signal name
Returns: error value
Return type: bool
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.connectDeviceToControlSignal(‘Const1’, ‘y’, ‘s1’)
...
connectDevices(blocA, pinA, blocB, pinB, isThreePhaseAndPowerFlexible, signalName=None):
Anchor HyWorksApiGRPC.connectBundleToBundleconnectDevices HyWorksApiGRPC.connectBundleToBundleconnectDevices HyWorksApiGRPC.
connectBundleToBundle
connectDevices
(blocA, signalListA pinA, blocB, signalListB, pinB, isThreePhaseAndPowerFlexible, signalName=None)Connect two bundle device pins together
Parameters: blocA (str) – name of the first device
signalListA pinA (list[str]) – list name of first bundle signals. ex: [‘a’,’b’,’c’]the first pin
blocB (str) – name of the first pinsecond device
signalListB pinB (list[str]) – list name of second bundle signals. ex: [‘a’,’b’,’c’]the second pin
isThreePhaseAndPowerFlexible (bool) – make the connection 3 phase, for components which can be both 1 phase or 3 phases
signalName (str) – new signal name on the connection
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.connectDevices(‘Max1’, ‘y’, ‘mySubCircuit’, ‘a1’, False)
HyWorksApi.connectDevices(‘mySubCircuit/B1’, ‘a1’, ‘mySubCircuit/Gain1’, ‘u’, False)
...
connectPinToBundle(blocA, pinA, blocB,
...
signalListB):
Anchor HyWorksApiGRPC.connectDevicesconnectPinToBundle HyWorksApiGRPC.connectDevicesconnectPinToBundle HyWorksApiGRPC.
connectDevices
connectPinToBundle
(blocA, pinA, blocB, pinB, isThreePhaseAndPowerFlexible, signalName=None signalListB)Connect two device pinsa pin to a bundle’s signal
Parameters: blocA (str) – name of the first device
pinA (str) – name of the first pin
blocB (str) – name of the second device
pinB (str) – name of the second pin
isThreePhaseAndPowerFlexible blocB (boolstr) – make the connection 3 phase, for components which can be both 1 phase or 3 phasessignalName name of the second device
signalListB (str) – new bundle signal name on the connection
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.connectDevices(‘Max1’, ‘y’, ‘mySubCircuit’, ‘a1’, False)
HyWorksApi.connectDevices(‘mySubCircuit/B1’, ‘a1’, ‘mySubCircuit/Gain1’, ‘u’, False)
...
createSubCircuit(name, subType, coordX=0, coordY=0, page=1):
Anchor HyWorksApiGRPC.connectDeviceToControlSignalcreateSubCircuit HyWorksApiGRPC.connectDeviceToControlSignalcreateSubCircuit HyWorksApiGRPC.
connectDeviceToControlSignal
(deviceName, pinName, signalName) Connects a device onto a control signalcreateSubCircuit
(name, subType, coordX=0, coordY=0, page=1)Create a subcircuit with the specified ‘name’ and ‘subType’ at the given coordinates on the specified page.
Parameters: deviceName name (str) – device subcircuit definition namepinName
subType (str) – device pin namesignalName (str) – signal namesubcircuit type name. This name will show when redrawing the device
coordX (int) – X coordinate
coordY (int) – Y coordinate
page (int) – page number
Returns: error valueunique device name
Return type: boolstr
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.connectDeviceToControlSignal(‘Const1’, ‘y’, ‘s1’)
...
Examples:
HyWorksApi.createSubCircuit(‘Subcircuit1’, 700, 700, 1)
HyWorksApi.createSubCircuit(‘Subcircuit1’, ‘THD’, 700, 700,1)
HyWorksApi.createSubCircuit(‘DEV1/Subsubcircuit1’)
disconnectPin(deviceName, pinName,
...
removeAllConnections=False):
Anchor HyWorksApiGRPC.connectDeviceToBus1phdisconnectPin HyWorksApiGRPC.connectDeviceToBus1phdisconnectPin HyWorksApiGRPC.
connectDeviceToBus1ph
disconnectPin
(deviceName, pinName, signalName removeAllConnections=False)Connects a device onto 1 phase busDisconnects the signal from a pin
Parameters: deviceName (str) – device name
pinName (str) – device pin namepinNamesignalName
removeAllConnections (str) – signal namebool) – if True, also disconnects the pins of the connected devices, effectively removing completely the line connection of the design
Returns: error value
Return type: bool
Raises:AssertionError – raises exception on error
Examples:
HyWorksApi.connectDeviceToBus1phdisconnectPin(‘R1’, ‘net_1’, ‘myBus’‘Cons1’, ‘y’)
HyWorksApi.connectDeviceToBus1ph(‘SubCC1/SubSubCC1/R3’disconnectPin(‘RC1’, ‘net_1’, ‘myBus’True)
...
displayComponent(componentName, printAttributes=True, printSignals=True, printConnectors=True:
displayConnections(componentName):
Anchor HyWorksApiGRPC.connectDeviceToBus3phdisplayConnections HyWorksApiGRPC.connectDeviceToBus3phdisplayConnections HyWorksApiGRPC.
connectDeviceToBus3ph
(deviceName, pinName, signalName) Connects a device onto 3 phase busdisplayConnections
(componentName)Print specified component interconnections to STDOUT
Parameters: deviceName componentName (str) –
device name signalName (str) – signalpinName (str) – device pin name
component name
Returns: error value
Return type: bool
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.connectDeviceToBus3ph(‘R1’, ‘net_1’, ‘myBus’)
HyWorksApi.connectDeviceToBus3ph(‘SubCC1/SubSubCC1/R3’, ‘net_1’, ‘myBus’)
...
str
Raises: AssertionError – raises exception on error
flipHorizontallyDevice(deviceName, keepConnections=True):
Anchor HyWorksApiGRPC.connectPinToBundleflipHorizontallyDevice HyWorksApiGRPC.connectPinToBundleflipHorizontallyDevice HyWorksApiGRPC.
connectPinToBundle
flipHorizontallyDevice
(blocA, pinA, blocB, signalBdeviceName, keepConnections=True)Connect a pin to a bundle’s signalFlips a device horizontally
Parameters: blocA deviceName (str) – device name of the first devicepinA
keepConnections (strbool) – pin name
blocB (str) – name of the second device
signalListB (str) – bundle signal nametrue if pin connections should be kept
Returns: error value
Return type: intbool
Raises: AssertionError – raises exception on error
...
raises exception on error
Examples:
HyWorksApi.flipHorizontallyDevice(‘R1’)
flipVerticallyDevice(deviceName, keepConnections=True):
name (str) – subcircuit definition name
subType (str) – subcircuit type name. This name will show when redrawing the device
coordX (int) – X coordinate
coordY (int) – Y coordinate
page (int) – page number
Anchor HyWorksApiGRPC.createSubCircuitflipVerticallyDevice HyWorksApiGRPC.createSubCircuitflipVerticallyDevice HyWorksApiGRPC.
createSubCircuit
flipVerticallyDevice
(namedeviceName, type=None, coordX=0, coordY=0, page=1)- keepConnections=True)
Flips a device vertically
Parameters: deviceName (str) – device name
keepConnections (bool) – true if pin connections should be kept
Returns: error value
Return type: strbool
Examples:
HyWorksApi.createSubCircuit(‘Subcircuit1’, 700, 700, 1)
HyWorksApi.createSubCircuit(‘Subcircuit1’, ‘THD’, 700, 700,1)
HyWorksApi.createSubCircuit(‘DEV1/Subsubcircuit1’)
Create a subcircuit with the specified ‘name’ and ‘subType’ at the given coordinates on the specified page.
...
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.flipVerticallyDevice(‘R1’)
getComponentParameter(compName, compParam):
Anchor HyWorksApiGRPC.disconnectPingetComponentParameter HyWorksApiGRPC.disconnectPingetComponentParameter HyWorksApiGRPC.
disconnectPin
getComponentParameter
(deviceName, pinName, removeAllConnections=False) Disconnects the signal from a pin- compName, compParam)
Retrieve component parameter value
Parameters: deviceName compName (str) – device component name
pinName compParam (str) – pinName
removeAllConnections (bool) – if True, also disconnects the pins of the connected devices, effectively removing completely the line connection of the design
Returns: error value
Return type: bool
Examples:
HyWorksApi.disconnectPin(‘Cons1’, ‘y’)
HyWorksApi.disconnectPin(‘RC1’, ‘net_1’, True)
...
component parameter
Returns: a list of 2 str, the first one being the value and the second one being the unit
Return type: list[str]
Raises: AssertionError – raises exception on error
getCoordinates(deviceName, pinName=None):
Anchor HyWorksApiGRPC.displayComponentgetCoordinates HyWorksApiGRPC.displayComponentgetCoordinates HyWorksApiGRPC.
displayComponent
getCoordinates
(componentName='') Print component information to STDOUT, including tunable parameter values, default values, parameter types and connectors.- deviceName, pinName=None)
Retrieve the X-Y coordinates of a device or its pin
Parameters: error value componentName deviceName (str) – component device nameprintSignals
pinName (bool) – print signals (optional)
printConnectors (bool) – print connectors (optional)
printAttributes (bool) – print attributes (optional)
printDefinition (bool) – print definition (optional)
Returns: str) – pin name, can be non if only the position of the device is required
Returns: Returns a list of 2 int, representing the (X, Y) coordinates
Return type: strlist[int]
Raises: AssertionError – raises exception on error
...
Examples:
HyWorksApi.getCoordinates(‘R1’)
HyWorksApi.getCoordinates(‘MTL’, ‘baseVolt’)
getDeviceBundleChildPins(deviceName,
...
pinName):
Anchor HyWorksApiGRPC.flipHorizontallyDevicegetDeviceBundleChildPins HyWorksApiGRPC.flipHorizontallyDevicegetDeviceBundleChildPins HyWorksApiGRPC.
flipHorizontallyDevice
getDeviceBundleChildPins
(deviceName, keepConnections=True pinName)Flips Retrieve the list of all children pin names in a bundle pin of a device horizontally
Parameters: deviceName (str) – device name
keepConnections pinName (boolstr) – true if pin connections should be keptbundle pin name
Returns: error valuethe list of the sub-pin names
Return type: boollist[str]
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.flipHorizontallyDevice(‘R1’getDeviceBundleChildPins(‘AC1A_1’, ‘In’)
...
getDeviceBundlePins(deviceName
...
):
Anchor HyWorksApiGRPC.flipVerticallyDevicegetDeviceBundlePins HyWorksApiGRPC.flipVerticallyDevicegetDeviceBundlePins HyWorksApiGRPC.
flipVerticallyDevice
getDeviceBundlePins
(deviceName, keepConnections=True)Flips Retrieve the list of all pin names of type bundle on a device vertically
Parameters: deviceName (str) – device name
keepConnections (bool) – true if pin connections should be keptReturns: error valuelist of pins of type bundle on a device
Return type: boollist[str]
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.flipVerticallyDevicegetDeviceBundlePins(‘R1’‘AC1A_1’)
...
getDevicePinTypes(deviceName: str, pinNames: list):
Anchor HyWorksApiGRPC.getAllDevicesNamesgetDevicePinTypes HyWorksApiGRPC.getDevicePinTypes HyWorksApiGRPC.
getAllDevicesNamesHyWorksApiGRPC.
getAllDevicesNames
() Gets the list of all devices getDevicePinTypes
(deviceName: str, pinNames: list)Retrieve the type (function) of certain pins on a device
Parameters: deviceName (list<str>) – device name
pinNames – pin names
Returns: the list of all visible deviceslist of types in the same order of pins requested. I = Input, O = Output, P = Power, S = Bundle
Return type: list[str]
Raises: AssertionError – raises exception on error
Info This call requires an analyze call before to function properly
...
Examples:
HyWorksApi.getDevicePinTypes(‘POW1’, [‘A’, ‘P’, ‘net_1’])
importUCM(defFilePath):
Anchor HyWorksApiGRPC.getCoordinatesimportUCM HyWorksApiGRPC.getCoordinatesimportUCM HyWorksApiGRPC.
getCoordinates
(deviceName, pinName=None) Retrieve the X-Y coordinates of a device or its pinimportUCM
(defFilePath)Import UCM to current HYPERSIM model
Parameters: deviceName defFilePath (str) –
device namepinName (str) – pin name, can be non if only the position of the device is required
Returns: Returns a list of 2 int, representing the (X, Y) coordinatespath to UCM (… py: function: : )
Returns: error value
Return type: list[int]
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.getCoordinates(‘R1’)
HyWorksApi.getCoordinates(‘MTL’, ‘baseVolt’)
...
includeDevice(deviceName, include):
Anchor HyWorksApiGRPC.getComponentParameterincludeDevice HyWorksApiGRPC.getComponentParameterincludeDevice HyWorksApiGRPC.
getComponentParameter
includeDevice
(compNamedeviceName, compParam)- include)
Include or exclude a device in HYPERSIM model
Parameters: compName deviceName (str) – component device namecompParam
include (strbool) – component parametertrue if device should be included, false if excluded
Returns: a list of 2 str, the first one being the value and the second one being the uniterror value
Return type: list[str]bool
Raises: AssertionError – raises exception on error
Retrieve component parameter value
...
removeDevice(deviceName
...
):
Anchor HyWorksApiGRPC.getDeviceBundleChildPinsremoveDevice HyWorksApiGRPC.getDeviceBundleChildPinsremoveDevice HyWorksApiGRPC.
getDeviceBundleChildPins
removeDevice
(deviceName, pinName)Retrieve the list of all children pin names in a bundle pin of a deviceRemove device from model
Parameters: deviceName (str) – device
namepinName (str) – bundle pinname
Returns: the list of the sub-pin nameserror value
Return type: list[str]int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.getDeviceBundleChildPins(‘AC1A_1’, ‘In’)
...
renameDevice(oldDeviceName, newDeviceName):
Anchor HyWorksApiGRPC.getDeviceBundlePinsrenameDevice HyWorksApiGRPC.getDeviceBundlePinsrenameDevice HyWorksApiGRPC.
getDeviceBundlePins
renameDevice
(deviceNameoldDeviceName, newDeviceName)Retrieve the list of all pin names of type bundle on Rename a device inside the model
Parameters:deviceName oldDeviceName (str) – old device name
newDeviceName (str) – new device name
Returns: error value
Return type: list[str]int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.renameDevice(‘DEV1’, ‘SubCircuit1’)
HyWorksApi.getDeviceBundlePins(‘AC1A_1’renameDevice(‘SubCircuit1/Gain1’, ‘SubCircuit1/factor’)
...
renameSignal(oldName, newName, visible=True):
Anchor HyWorksApiGRPC.importUCMrenameSignal HyWorksApiGRPC.importUCMrenameSignal HyWorksApiGRPC.
importUCM
(defFilePath) Import UCM to current HYPERSIM .
renameSignal
(oldName, newName, visible=True)Rename all signals sharing a name inside the model
Parameters:defFilePath oldName (str) – old signal name
newName (str) –
new signal name
visible (bool) – if name should be visible on the design
Returns: error value
Return type: intbool
Raises: AssertionError – raises exception on error
...
rotateLeftDevice(deviceName,
...
keepConnections=True):
Anchor HyWorksApiGRPC.includeDevicerotateLeftDevice HyWorksApiGRPC.includeDevicerotateLeftDevice HyWorksApiGRPC.
includeDevice
rotateLeftDevice
(deviceName, include keepConnections=True)Include or exclude Rotates a device in HYPERSIM modelto the left
Parameters: deviceName (str) – device name
include keepConnections (bool) – true if device pin connections should be included, false if excludedkept
Returns: error value
Return type: bool
Raises: AssertionError – raises exception on error
...
on error
Examples:
HyWorksApi.rotateLeftDevice(‘R1’)
rotateRightDevice(deviceName, keepConnections=True):
Anchor HyWorksApiGRPC.removeDevicerotateRightDevice HyWorksApiGRPC.removeDevicerotateRightDevice HyWorksApiGRPC.
removeDevice
rotateRightDevice
(deviceName, keepConnections=True)Remove device from modelRotates a device to the right
Parameters: deviceName (str) – device name
keepConnections (bool) – true if pin connections should be kept
Returns: error value
Return type: intbool
Raises: AssertionError – raises exception on error
...
Examples:
HyWorksApi.rotateRightDevice(‘R1’)
setComponentParameter(compName, compParam, value):
Anchor HyWorksApiGRPC.renameDevicesetComponentParameter HyWorksApiGRPC.renameDevicesetComponentParameter HyWorksApiGRPC.
renameDevice
setComponentParameter
(oldDeviceNamecompName, compParam, newDeviceName value)Rename a device inside the modelSet a component parameter to a certain value
Parameters: oldDeviceName compName (str) – old device namenewDeviceName component name
compParam (str) – component parameter
value (str) – new device namecomponent value
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.renameDevice(‘DEV1’, ‘SubCircuit1’)
HyWorksApi.renameDevice(‘SubCircuit1/Gain1’, ‘SubCircuit1/factor’)
...
setComponentParameters(compNames, compParams, values):
Anchor HyWorksApiGRPC.renameSignalsetComponentParameters HyWorksApiGRPC.renameSignalsetComponentParameters HyWorksApiGRPC.
renameSignal
setComponentParameters
(oldNamecompNames, newName compParams, visible=True) Rename all signals sharing a name inside the model- values)
Set multiple component parameters to specified values
Parameters: oldName compNames (list of str) – old signal namenewName (list of component names
compParams (list of str) – new signal namevisible (bool) – if name should be visible on the designlist of component parameters
values (list of str) – list of component values
Returns: error value
Return type: boolint
Raises: AssertionError – raises exception on error
...
setDeviceFillColor(
...
name,
...
colorHexRGB):
Anchor HyWorksApiGRPC.rotateLeftDevicesetDeviceFillColor HyWorksApiGRPC.rotateLeftDevicesetDeviceFillColor HyWorksApiGRPC.
rotateLeftDevice
setDeviceFillColor
(deviceNamename, keepConnections=True colorHexRGB)Rotates Set the fill color of the 2D shapes on a device to the leftsymbol
Parameters: deviceName name (str) – device namekeepConnections
colorHexRGB (boolstr) – true if pin connections should be keptRGB color in hex values
Returns: error value
Return type: boolint
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.rotateLeftDevicesetDeviceFillColor(‘R1’‘Tr2’, ‘ff0000’)
...
setDeviceLineColor(
...
name,
...
colorHexRGB):
Anchor HyWorksApiGRPC.rotateRightDevicesetDeviceLineColor HyWorksApiGRPC.rotateRightDevicesetDeviceLineColor HyWorksApiGRPC.
rotateRightDevice
setDeviceLineColor
(deviceNamename, keepConnections=True colorHexRGB)Rotates Set the color of the line segments on a device to the rightsymbol
Parameters: deviceName name (str) – device namekeepConnections
colorHexRGB (boolstr) – true if pin connections should be keptRGB color in hex values
Returns: error value
Return type: boolint
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.rotateRightDevicesetDeviceLineColor(‘R1’‘Tr2’, ‘ff0000’)
...
setDevicesNameVisibility(
...
deviceList,
...
isVisible):
Anchor HyWorksApiGRPC.setComponentParametersetDevicesNameVisibility HyWorksApiGRPC.setComponentParametersetDevicesNameVisibility HyWorksApiGRPC.
setComponentParameter
setDevicesNameVisibility
(compNamedeviceList, compParam, value) Set a component parameter to a certain value- isVisible)
Hide/Show devices name in the model.
Parameters: compName deviceList (list[str]) – component list of devices name
compParam isVisible (str) – component parametervalue (str) – component valuevisibility
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
raises exception on error
Examples:
HyWorksApi.setDevicesNameVisibility([‘F18/CB4’, ‘F19/CB4’, ‘Dec1’, ‘Dec2’, ‘F1’], False)
setPinPhaseNumber(deviceName, pinName, value):
Anchor HyWorksApiGRPC.setDeviceFillColorsetPinPhaseNumber HyWorksApiGRPC.setDeviceFillColorsetPinPhaseNumber HyWorksApiGRPC.
setDeviceFillColor
setPinPhaseNumber
(namedeviceName, pinName, colorHexRGB value)Set the fill color of the 2D shapes on a device symbolForces a power flexible pin to take a specific amount of phase. Normally, power flexible pins will use the same amount of phases for each power pin of the device. This call allows to disconnect this behaviour.
Parameters: name deviceName (str) – device name
colorHexRGB pinName (str) – RGB color in hex values) – pin name
value (int) – 1 or 3
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.setDeviceFillColor(‘Tr2’, ‘ff0000’)
...
setSignalLineColor(signalName, colorHexRGB):
Anchor HyWorksApiGRPC.setDeviceLineColorsetSignalLineColor HyWorksApiGRPC.setDeviceLineColorsetSignalLineColor HyWorksApiGRPC.
setDeviceLineColor
setSignalLineColor
(namesignalName, colorHexRGB)Set the line color of the line segments on a device symbola signal
Parameters: name signalName (str) – device name
colorHexRGB (str) – RGB color in hex values
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.setDeviceLineColorsetSignalLineColor(‘Tr2’‘WED7’, ‘ff0000’)
...
setSignalLineWidth(
...
signalName,
...
width):
Anchor HyWorksApiGRPC.setSignalLineColorsetSignalLineWidth HyWorksApiGRPC.setSignalLineColorsetSignalLineWidth HyWorksApiGRPC.
setSignalLineColor
setSignalLineWidth
(namesignalName, colorHexRGB width)Set the line color width of a signal
Parameters: signalName (str) – device namecolorHexRGB
width (strint) – RGB color in hex valueswidth
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.setSignalLineColorsetSignalLineWidth(‘WED7’, ‘ff0000’4)
...
setSubcircuitScripts(compName, initialValues, rules, variablesToTransmit, evaluateOnly=False):
Anchor HyWorksApiGRPC.setSignalLineWidthsetSubcircuitScripts HyWorksApiGRPC.setSignalLineWidthsetSubcircuitScripts HyWorksApiGRPC.
setSignalLineWidth
(name, width)Set the line width of a signal
Parameters: signalName (str) – device name
width (int) – width
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.setSignalLineWidth(‘WED7’, 4)
...
setSubcircuitScripts
(compName, initialValues, rules, variablesToTransmit, evaluateOnly=False)
unbindUCMFromLibrary(deviceName):
...
Anchor HyWorksApiGRPC.unbindUCMFromLibrary HyWorksApiGRPC.unbindUCMFromLibrary HyWorksApiGRPC.
unbindUCMFromLibrary
(deviceName)
...
updateUCM(deviceName, ucmPath=None):
Anchor HyWorksApiGRPC.setDevicesNameVisibilityupdateUCM HyWorksApiGRPC.setDevicesNameVisibilityupdateUCM HyWorksApiGRPC.
setDevicesNameVisibility
updateUCM
(deviceListdeviceName, isVisible ucmPath=None)Hide/Show devices name in the model.Update UCM
Parameters: deviceList deviceName (
list[str
]) –
list of devices nameisVisible (str) – visibilityUCM name
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.setDevicesNameVisibility([‘F18/CB4’, ‘F19/CB4’, ‘Dec1’, ‘Dec2’, ‘F1’], False)
...
Sensor
editSensor(blocName, sensorName, IOType=None, IONumber=None, base=None, unit=None):
Anchor HyWorksApiGRPC.setPinPhaseNumbereditSensor HyWorksApiGRPC.setPinPhaseNumbereditSensor HyWorksApiGRPC.
setPinPhaseNumber
(deviceName, pinName, value) Forces a power flexible pin to take a specific amount of phase. Normally, power flexible pins will use the same amount of phases for each power pin of the device. This call allows to disconnect this behaviour.editSensor
(blocName, sensorName, IOType=None, IONumber=None, base=None, unit=None)Edit device sensor
Update UCM
Parameters: deviceName blocName (str) – device name
pinName sensorName (str) – pin sensor namevalue
IOType (intstr) – 1 or 3
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
HyWorksApiGRPC.
updateUCM
(deviceName)updateUCM(deviceName):
Parameters: deviceName (str) – UCM name IO Type. ex: AD, DA, DI or DO
IONumber (int) – IO number
base (float) – base value
unit (str) – unit value
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Sensor
editSensor(blocName, sensorName, IOType=None, IONumber=None, base=None, unit=None):
Edit device sensor
Parameters: blocName (str) – device name
sensorName (str) – sensor name
IOType (str) – IO Type. ex: AD, DA, DI or DO
IONumber (int) – IO number
base (float) – base value
unit (str) – unit value
Returns: error value
Return type: inton error
Examples:
HyWorksApi.editSensor(‘R1’, ‘Ia’, 1.0, ‘pu’, ‘DA’, 1001)
HyWorksApi.editSensor(‘R1’, ‘Ia’, base = 1.0, unit = ‘pu’)
HyWorksApi.editSensor(‘R1’, ‘Ia’, IOType = ‘DA’, IONumber = 1001)
HyWorksApiGRPC.
editSensor
(blocName, sensorName, IOType=None, IONumber=None, base=None, unit=None)getLastSensorValues(sensorNames):
...
Anchor HyWorksApiGRPC.getLastSensorValues HyWorksApiGRPC.getLastSensorValues HyWorksApiGRPC.
getLastSensorValues
(sensorNames)Gets the last current value of a list of sensors while simulation is running
Parameters: sensorNames (list[str]) – list of sensor names as string
Returns: values in the same order as the sensor names
Return type: list[float]
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.editSensor(‘R1’, ‘Ia’, 1.0, ‘pu’, ‘DA’, 1001)
HyWorksApi.editSensor(‘R1’, ‘Ia’, base = 1.0, unit = ‘pu’)
HyWorksApi.editSensor(‘R1’, ‘Ia’, IOType = ‘DA’, IONumber = 1001getLastSensorValues([‘Const1.y’, ‘Subcircuit1/Gain1.u’, “/Subcircuit1/R15.Ia”])
getSensorInfo(blocName, sensorName, key):
Anchor HyWorksApiGRPC.getSensorInfo HyWorksApiGRPC.getSensorInfo HyWorksApiGRPC.
getSensorInfo
(blocName, sensorName, key)Get value for the specified key on the specified sensor
Parameters: blocName (str) – device name
sensorName (str) – sensor name
key (str) – key in sensor inf.
- Supported keys:
‘selected’
‘userName’
‘userUnit’
‘iotype’
‘ionum’
‘iofactor’
‘base’
‘dataLoggerRecord’
‘dataLoggerGroup’
‘dataLoggerTrigger’
‘exchangerTag’
‘dataPointName’
‘dataPointIndex’
Returns: value of the specified key
Return type: str
...
getSensorsValues(sensorNames: List[str], timeLength, timeStart=0, acquisitionRate=Non:
loadSensors(filePath):
Anchor HyWorksApiGRPC.loadSensors HyWorksApiGRPC.loadSensors HyWorksApiGRPC.
loadSensors
(filePath)Load sensor file to current model
Parameters: filePath (str) – path to sensor file (.sig, .csv)
Returns: error value
Return type: bool
Raises: AssertionError – raises exception on error
selectAllSensors(blocName):
Anchor HyWorksApiGRPC.selectAllSensors HyWorksApiGRPC.selectAllSensors HyWorksApiGRPC.
selectAllSensors
HyWorksApiGRPC.
selectAllSensors
(blocName) Select all sensors for device- (blocName)
Select all sensors for device
Parameters: blocName (str) – device name
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
selectSensor(blocName, sensorName, selected=True):
...
Anchor HyWorksApiGRPC.selectSensor HyWorksApiGRPC.selectSensor HyWorksApiGRPC.
selectSensor
(blocName, sensorName, selected=True)Select device sensor
Parameters: blocName (str) – device name
sensorName (str) – sensor name
selected (bool) – selected
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
setSensorDataLogger(blocName, sensorName, record, groupName, trigger):
Anchor HyWorksApiGRPC.setSensorDataLogger HyWorksApiGRPC.setSensorDataLogger HyWorksApiGRPC.
setSensorDataLogger
(blocName, sensorName, record, groupName, trigger)Set sensor parameter through datapoints
Parameters: blocName (str) – device name
sensorName (str) – sensor name
record (bool) – record signal
groupName (str) – signal group name
trigger (bool) – set signal as trigger for the group
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.setSensorDataLogger(‘sine1’, ‘y’, True, ‘SIGNAL_GROUP_1’, False)
HyWorksApi.setSensorDataLogger(‘sine2’, ‘y’, True, ‘SIGNAL_GROUP_2’, True)
HyWorksApi.setSensorDataLogger(‘sine3’, ‘y’, False, ‘SIGNAL_GROUP_3’, False)
setSensorDataPoint(blocName, sensorName, exchangerTag, dataPointName, dataPointIdx):
Anchor HyWorksApiGRPC.setSensorDataPoint HyWorksApiGRPC.setSensorDataPoint HyWorksApiGRPC.
setSensorDataPoint
(blocName, sensorName, exchangerTag, dataPointName, dataPointIdx)Set sensor parameter through datapoints
Parameters: blocName (str) – device name
sensorName (str) – sensor name
exchangerTag (str) – exchanger tag
dataPointName (str) – data point name
dataPointIdx (str) – data point index
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.setSensorDataPoint(‘Const_Amplitude’, ‘y’, ‘Signal Generator’, ‘Sine Waves/Sine Wave 1/Amplitude’, ‘0’)
HyWorksApi.setSensorDataPoint(‘Const_Frequency’, ‘y’, ‘Signal Generator’, ‘Sine Waves/Sine Wave 1/Frequency’, ‘0’)HyWorksApi.setSensorDataPoint(‘Gain’, ‘u’, ‘Signal Generator’, ‘Sine Waves/Sine Wave 1/Output’, ‘0’)
selectSensor(blocName, sensorName, selected=True):
Select device sensor
Parameters: blocName (str) – device name
sensorName (str) – sensor name
selected (bool) – selected
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error/Frequency’, ‘0’)
HyWorksApi.setSensorDataPoint(‘Gain’, ‘u’, ‘Signal Generator’, ‘Sine Waves/Sine Wave 1/Output’, ‘0’)
HyWorksApiGRPC.
selectSensor
(blocName, sensorName, selected=True)Settings
analyze():
Anchor HyWorksApiGRPC.analyze HyWorksApiGRPC.analyze HyWorksApiGRPC.
analyze
()Analyse
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
buildTopology():
Anchor HyWorksApiGRPC.buildTopology HyWorksApiGRPC.buildTopology HyWorksApiGRPC.
buildTopology
()Build topology
Returns: error value
Return type: int
clearCodeDir():
Anchor HyWorksApiGRPC.clearCodeDir HyWorksApiGRPC.clearCodeDir HyWorksApiGRPC.
clearCodeDir
()Clear code directory
Returns: error value
Return type: int
genCode():
Anchor HyWorksApiGRPC.genCode HyWorksApiGRPC.genCode HyWorksApiGRPC.
genCode
()Generate code
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
...
getLoadFlowReport() :
...
Anchor HyWorksApiGRPC.getLoadFlowReport HyWorksApiGRPC.genCodegetLoadFlowReport HyWorksApiGRPC.
genCode
getLoadFlowReport
()Generate codeGet the load-flow report (BETA: this feature is subject to improvements in the upcoming versions)
Returns: error valueHYPERSIM load-flow report
Return type: int
Raises: AssertionError – raises exception on errorLoadflowReport
getPreference(prefName):
Anchor HyWorksApiGRPC.getPreference HyWorksApiGRPC.getPreference HyWorksApiGRPC.
getPreference
(prefName)Retrieve a model preference
Parameters: prefName (str) – preference name
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
mapTask():
Anchor HyWorksApiGRPC.mapTask HyWorksApiGRPC.mapTask HyWorksApiGRPC.
mapTask
()Map tasks
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
setPreference(prefName, value):
Anchor HyWorksApiGRPC.setPreference HyWorksApiGRPC.setPreference HyWorksApiGRPC.
setPreference
(prefName, value)Set a model preference to a specific value
Parameters: prefName (str) – preference name
value (str) – preference value
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
setTarget(hostname, mode=None):
Anchor HyWorksApiGRPC.setTarget HyWorksApiGRPC.setTarget HyWorksApiGRPC.
setTarget
(hostname, mode=None)Set simulation target
Parameters: hostname (str) – target IP
mode (str) – simulation mode. Options: - Offline (RTA): nrt_optimized - Offline (PMI) : nrt_mpi - Real-time : rt
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
startLoadFlow():
Anchor HyWorksApiGRPC.startLoadFlow HyWorksApiGRPC.startLoadFlow HyWorksApiGRPC.
startLoadFlow
()Load flow
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
getLoadFlowReport():
Get the load-flow report (BETA: this feature is subject to improvements in the upcoming versions)
Returns: HYPERSIM load-flow report
Return type: LoadflowReport
Raises: AssertionError – raises exception on error
HyWorksApiGRPC.
getLoadFlowReport
()Simulation
getMonitoringAllValues():
Anchor HyWorksApiGRPC.getMonitoringAllValues HyWorksApiGRPC.getMonitoringAllValues HyWorksApiGRPC.
getMonitoringAllValues
()Get the current value of all monitors during simulation
Returns: a dictionary where the key is the monitor name, and the value is the current value
Return type: dict[str, str]
Raises: AssertionError – raises exception on error
getMonitoringValue(monitorName):
Anchor HyWorksApiGRPC.getMonitoringValue HyWorksApiGRPC.getMonitoringValue HyWorksApiGRPC.
getMonitoringValue
(monitorName)Get the current value of a monitor during simulation
Parameters: monitorName
)- Get the current value of a monitor during simulation
(str) – Name of the monitor
Returns: value
Return type: str
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.getMonitoringValue(‘MyMonitor1’)
...
getPreparationTimings(modelPath: str = None) :
Anchor HyWorksApiGRPC.getPreparationTimings HyWorksApiGRPC.getPreparationTimings HyWorksApiGRPC.
getPreparationTimings
(modelPath: str = None)Get the timings of the preparation phase of the current or provided model The preparation phase includes the topology build, analysis, load flow, task mapping, code generation, simulation start and simulation stop
Parameters: monitorName modelPath (str) – Name of the monitorpath to the model file (Default: Currently opened model)
Returns: valueAn object containing the performance information
Return type: strSimulationPreparationTimingsInfo
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.getMonitoringValue(‘MyMonitor1’)
...
getSimulationCoreTimings(modelPath: str = None) :
Anchor HyWorksApiGRPC.getLastSensorValuesgetSimulationCoreTimings HyWorksApiGRPC.getLastSensorValuesgetSimulationCoreTimings HyWorksApiGRPC.
getLastSensorValues
(sensorNames) Gets the last current value of a list of sensors while simulation is runninggetSimulationCoreTimings
(modelPath: str = None)Get the core timings of of the current or provided model This function gives the timings of the steps that occur during the simulation for each core
Parameters: sensorNames modelPath (list[str]) – list of sensor names as string) – path to the model file (Default: Currently opened model)
Returns: values in the same order as the sensor namesA list of objects containing the core timings
Return type: list[float]
Raises: AssertionError – raises exception on error
Examples:
HyWorksApi.getLastSensorValues([‘Const1.y’, ‘Subcircuit1/Gain1.u’, “/Subcircuit1/R15.Ia”])SimulationCoreTimingsInfo]
...
getSimulationTime():
Anchor HyWorksApiGRPC.getSimulationTime HyWorksApiGRPC.getSimulationTime HyWorksApiGRPC.
getSimulationTime
()Get the current simulation time, in the unit of the Point-On-Wave
Returns: value
Return type: float
Raises: AssertionError – raises exception on error
...
getSimulationTimings(modelPath: str = None) :
...
Anchor HyWorksApiGRPC.getSimulationTimings HyWorksApiGRPC.getSimulationTimings HyWorksApiGRPC.
getSimulationTimings
(modelPath: str = None)Get the simulation timings of of the current or provided model This function gives the timings of the steps that occur during the start of the simulation and the every subsequent iteration of the simulation
Parameters: modelPath (str) – path to the model file (Default: Currently opened model)
Returns: An object containing the simulation timings
Return type: SimulationTimings
loadSnapshot():
Anchor HyWorksApiGRPC.loadSnapshot HyWorksApiGRPC.loadSnapshot HyWorksApiGRPC.
loadSnapshot
()Loads a snapshot in the simulation
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
resetMonitoring(cpuList):
Anchor HyWorksApiGRPC.resetMonitoring HyWorksApiGRPC.resetMonitoring HyWorksApiGRPC.
resetMonitoring
(cpuList)Reset performance indicators and timings for simulation
Parameters: cpuList (list[int]) – list of cpu cores to reset. ex: [1, 2, 3, 4] Returns error value
Return type: int
Raises: AssertionError – raises exception on error
resetPerfIndic(cpuList):
Anchor HyWorksApiGRPC.resetPerfIndic HyWorksApiGRPC.resetPerfIndic HyWorksApiGRPC.
resetPerfIndic
(cpuList)Reset performance indicators for simulation
Parameters: cpuList (list[int]) – list of cpu cores to reset. ex: [1, 2, 3, 4] Returns error value
Raises: AssertionError – raises exception on error
resetTiming(cpuList):
Anchor HyWorksApiGRPC.resetTiming HyWorksApiGRPC.resetTiming HyWorksApiGRPC.
resetTiming
(cpuList)Reset performance timing for simulation
Parameters: cpuList (list[int]) – list of cpu cores to reset. ex: [1, 2, 3, 4] Returns error value
Return type: int
Raises: AssertionError – raises exception on error
simtrig(sync):
Anchor HyWorksApiGRPC.simtrig HyWorksApiGRPC.simtrig HyWorksApiGRPC.
simtrig
(sync)Trig the programmable devices in the simulation
Parameters: sync (bool) – synchronize with POW
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
startMonitoring():
Anchor HyWorksApiGRPC.startMonitoring HyWorksApiGRPC.startMonitoring HyWorksApiGRPC.
startMonitoring
()Start monitoring
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
startSim():
Anchor HyWorksApiGRPC.startSim HyWorksApiGRPC.startSim HyWorksApiGRPC.
startSim
()Start simulation
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
stopMonitoring():
Anchor HyWorksApiGRPC.stopMonitoring HyWorksApiGRPC.stopMonitoring HyWorksApiGRPC.
stopMonitoring
()Stop monitoring
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
stopSim():
Anchor HyWorksApiGRPC.stopSim HyWorksApiGRPC.stopSim HyWorksApiGRPC.
stopSim
()Stop simulation
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
takeSnapshot():
Anchor HyWorksApiGRPC.takeSnapshot HyWorksApiGRPC.takeSnapshot HyWorksApiGRPC.
takeSnapshot
()Takes a snapshot of the simulation
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
Target
addTargetToManager(targetHostName):
Anchor HyWorksApiGRPC.addTargetToManager HyWorksApiGRPC.addTargetToManager HyWorksApiGRPC.
addTargetToManager
(targetHostName)Add target to HYPERSIM target manager
Parameters: targetHostName (str) – target IP
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
diagnosticTarget(targetHostName):
Anchor HyWorksApiGRPC.diagnosticTarget HyWorksApiGRPC.diagnosticTarget HyWorksApiGRPC.
diagnosticTarget
(targetHostName)Prints a diagnostic report of the target configuration.
Parameters: targetHostName (str) – target IP
Returns: diagnostic report on the target
Return type: str
getAllTargetsName():
Anchor HyWorksApiGRPC.getAllTargetsName HyWorksApiGRPC.getAllTargetsName HyWorksApiGRPC.
getAllTargetsName
()Get all known targets by HYPERSIM target manager
Returns: list of all known targets
Return type: str
getCurrentVersionOnTarget(targetHostName):
Anchor HyWorksApiGRPC.getCurrentVersionOnTarget HyWorksApiGRPC.getCurrentVersionOnTarget HyWorksApiGRPC.
getCurrentVersionOnTarget
(targetHostName)Get current HYPERSIM version on target
Parameters: targetHostName (str) – target IP
Returns: HYPERSIM version
Return type: str
getInstalledVersionOnTarget(targetHostName):
Anchor HyWorksApiGRPC.getInstalledVersionOnTarget HyWorksApiGRPC.getInstalledVersionOnTarget HyWorksApiGRPC.
getInstalledVersionOnTarget
(targetHostName)Get all HYPERSIM versions installed on target
Parameters: targetHostName (str) – target IP
Returns: list of all HYPERSIM versions
Return type: str
installHypersimOnTarget(targetHostName):
Anchor HyWorksApiGRPC.installHypersimOnTarget HyWorksApiGRPC.installHypersimOnTarget HyWorksApiGRPC.
installHypersimOnTarget
(targetHostName)Install HYPERSIM version on target
Parameters: targetHostName (str) – target IP
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
isTargetReady(targetHostName):
Anchor HyWorksApiGRPC.isTargetReady HyWorksApiGRPC.isTargetReady HyWorksApiGRPC.
isTargetReady
(targetHostName)Determine if target is ready for simulation
Parameters: targetHostName (str) – target IP
Returns: ready status
Return type: bool
removeTargetFromManager(targetHostName):
Anchor HyWorksApiGRPC.removeTargetFromManager HyWorksApiGRPC.removeTargetFromManager HyWorksApiGRPC.
removeTargetFromManager
(targetHostName)Remove target from HYPERSIM target manager
Parameters: targetHostName (str) – target IP
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error
switchVersionOnTarget(targetHostName, switchToVersion):
Anchor HyWorksApiGRPC.switchVersionOnTarget HyWorksApiGRPC.switchVersionOnTarget HyWorksApiGRPC.
switchVersionOnTarget
(targetHostName, switchToVersion)Switch HYPERSIM versions on target
Parameters: targetHostName (str) – target IP
switchToVersion (str) – HYPERSIM version to switch to
Returns: error value
Return type: int
Raises: AssertionError – raises exception on error