-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathTwoTermDevListIfc.java
More file actions
74 lines (48 loc) · 1.84 KB
/
TwoTermDevListIfc.java
File metadata and controls
74 lines (48 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package com.powerdata.openpa;
/*
* Copyright (c) 2016, PowerData Corporation, Incremental Systems Corporation
* All rights reserved.
* Licensed under the BSD-3 Clause License.
* See full license at https://powerdata.github.io/openpa/LICENSE.md
*/
public interface TwoTermDevListIfc<T extends TwoTermDev> extends TwoTermBaseList<T>, InServiceList<T>
{
void setFromBus(int ndx, Bus b) throws PAModelException;
Bus[] getFromBus() throws PAModelException;
void setFromBus(Bus[] b) throws PAModelException;
void setToBus(int ndx, Bus b) throws PAModelException;
Bus[] getToBus() throws PAModelException;
void setToBus(Bus[] b) throws PAModelException;
float getFromP(int ndx) throws PAModelException;
void setFromP(int ndx, float mw) throws PAModelException;
float[] getFromP() throws PAModelException;
void setFromP(float[] mw) throws PAModelException;
float getFromQ(int ndx) throws PAModelException;
void setFromQ(int ndx, float mvar) throws PAModelException;
float[] getFromQ() throws PAModelException;
void setFromQ(float[] mvar) throws PAModelException;
float getToP(int ndx) throws PAModelException;
void setToP(int ndx, float mw) throws PAModelException;
float[] getToP() throws PAModelException;
void setToP(float[] mw) throws PAModelException;
float getToQ(int ndx) throws PAModelException;
void setToQ(int ndx, float mvar) throws PAModelException;
float[] getToQ() throws PAModelException;
void setToQ(float[] mvar) throws PAModelException;
default int[] getFromBusIndexes() throws PAModelException
{
int n = size();
int[] rv = new int[n];
for(int i=0; i < n; ++i)
rv[i] = getFromBus(i).getIndex();
return rv;
}
default int[] getToBusIndexes() throws PAModelException
{
int n = size();
int[] rv = new int[n];
for(int i=0; i < n; ++i)
rv[i] = getToBus(i).getIndex();
return rv;
}
}