-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
28 lines (21 loc) · 876 Bytes
/
main.py
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
import numpy as np
import pandas as pd
import time
import pandapower.networks as pn
import matplotlib.pyplot as plt
from scipy.spatial import ConvexHull
from GAPSPLIT import _generate_sample, GS
from LHS import _generate_sample_RS, RS
#Load network (Change 'net' also '_path' to reflect the network of interest)
net = pn.case14();
baseMVA = 100
net.sn_mva = baseMVA
#define number of samples to generate
n = 10;
if __name__ == "__main__":
#Generate OCs using split-based sampling (all samples, feasible samples, reactive samples)
als, fs, rs = GS(net, _path = 'data/case14.xlsx',
n=n, secondary_frac=0.5, start_time=time.time(),report_interval=0.1)
#Generate OCs using LHS sampling (feasible rs, proposed rs)
rs, proposed = RS(net, _path = 'data/case14.xlsx',
n=n, start_time=time.time(), report_interval=0.1)