Skip to content

Name2number conversion related APIs

Changgang Li edited this page Feb 8, 2021 · 1 revision

bus_name2number

Format: bus_name2number(name, vbase=0.0)
Description: Converter bus name to bus number.
Args:

(1) name: bus name.

Rets:

(1) Bus number. 0 if bus does not exist.

Tips:

If two or more buses have the same bus name, only the first bus is returned.

Example: N/A

bus_number2name

Format: bus_number2name(bus)
Description: Converter bus number to bus name.
Args:

(1) bus: bus number.

Rets:

(1) String of bus name. Empty string if bus does not exist.

Example: N/A