|
Bus Admittance Matrix 1
implement bus admittance matrix using matlab, java and python
|
Functions | |
| get_input (choice, n) | |
| calculate_admittance_matrix (y) | |
| print_admittance_matrix (Ybus) | |
Variables | |
| n = int(input()) | |
| Ybus = np.array([[0+0j for i in range(n)] for j in range(n)]) | |
| y = np.zeros((n,n),dtype=complex) | |
| choice = int(input()) | |
| Ybus_Python.calculate_admittance_matrix | ( | y | ) |
Forms admittance matrix using the admittance value matrix y
Args:
y(np.array): Line Admittance Matrix
Returns:
Ybus(np.array) : Bus Admittance Matrix
| Ybus_Python.get_input | ( | choice, | |
| n | |||
| ) |
Gets the input from the user based on the choice of impedance or
admittance , calculates admittance values and returns them
Args:
choice(int) : the choice of the user(1 for impedance and 2 for admittance)
n(int) : Total no.of buses in the system
Returns:
y(np.array) : Line Admittance matrix
| Ybus_Python.print_admittance_matrix | ( | Ybus | ) |
Prints the bus admittance matrix to the console.
Args:
Ybus (np.array): Bus admittance matrix.
| Ybus_Python.choice = int(input()) |
| Ybus_Python.n = int(input()) |