import numpy as np

from common_func import ipss_app
from common_func import learning_rate
from common_func import train_steps
from common_func import transfer2JavaDblAry
from common_func import printArray
from common_func import print2DArray

train_points = 50

#
# load the IEEE-14Bus case
#
filename = 'c:/temp/temp/ieee14.ieee'
noBus, noBranch = ipss_app.loadCase(filename,
                                    'BusVoltLoadChangeTrainCaseBuilder')
print(filename, ' loaded,  no of Buses, Branches:', noBus, ', ', noBranch)

# define model size
size = noBus * 2
#print('size: ', size)

# define model variables
W = tf.Variable(tf.zeros([size, size]))
b = tf.Variable(tf.zeros([size]))

init = tf.initialize_all_variables()

# define model

Esempio n. 2
0
import tensorflow as tf
import numpy as np

from common_func import ipss_app
from common_func import learning_rate
from common_func import train_steps
from common_func import transfer2PyArrays

train_points = 50

#
# load the IEEE-14Bus case
#
filename = 'c:/temp/temp/ieee14.ieee'
intAry = ipss_app.loadCase(filename, 'BranchPLoadChangeTrainCaseBuilder')
noBus, noBranch = intAry
print(filename, ' loaded,  no of Buses, Branches:', noBus, ', ', noBranch)

# define model size
size = noBus * 2
#print('size: ', size)

# define model variables
W1 = tf.Variable(tf.zeros([size, noBranch]))

b1 = tf.Variable(tf.zeros([noBranch]))

init = tf.initialize_all_variables()

# define model
import numpy as np

from common_func import ipss_app
from common_func import learning_rate
from common_func import train_steps
from common_func import printArray
from common_func import print2DArray
from common_func import transfer2PyArrays

train_points = 100

#
# load the IEEE-14Bus case
#
filename = 'c:/temp/temp/ieee14.ieee'
intAry = ipss_app.loadCase(filename,
                           'BranchContingencyMaxPLoadChangeTrainCaseBuilder')
noBus, noBranch = intAry
print(filename, ' loaded,  no of Buses, Branches:', noBus, ', ', noBranch)

# define model size
size = noBus * 2
#print('size: ', size)

# define model variables
W1 = tf.Variable(tf.zeros([size, noBranch]))

b1 = tf.Variable(tf.zeros([noBranch]))

init = tf.initialize_all_variables()

# define model