Newer
Older
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# imports
import random
from topupheat.pipes.single import StandardisedPipeDatabase
from topupheat.common.fluids import FluidDatabase # , Fluid
from examples_signal import examples as examples_signal
# ******************************************************************************
# ******************************************************************************
# test with: !python -m pytest -s --cov --cov-report term-missing
def test_suite():
test_examples_signal = True
# test_examples_signal = False
# test_examples_converter = True
# test_examples_dynsys = True
# test_examples_esipp_network = True
# test_examples_esipp_problem = True
# test_examples_esipp = True
# test_examples_gis = True
# test_examples_signal = True
# **************************************************************************
solver = "scip"
# scip_exec_path = '/usr/bin/scip'
# solver_options = {'executable': scip_exec_path}
solver_options = {}
# solver = 'cplex'
# # cplex_exec_path = '/home/pmlpm/Software/CPLEX/cplex/bin/x86-64_linux/cplex'
# cplex_exec_path = '/home/pmlpm/CPLEX/cplex/bin/x86-64_linux/cplex'
# #solver_options = {}
# solver_options = {'executable':cplex_exec_path}
list_solvers = [
"fake_solver",
"cbc",
"glpk",
"scip",
#'cplex'
]
list_solver_options = [
None, # fake
None, # cbc
{"tee": False}, # glpk
None, # scip
# cplex
# {'executable': cplex_exec_path},
]
# **************************************************************************
seed_number = random.randint(1, int(1e5))
# seed_number = 13501
print("Seed number: " + str(seed_number))
# **************************************************************************
# load pipe data
singlepipedata_files = [
"tests/data/isoplus_singlepipes_s1.csv",
]
singlepipedb = StandardisedPipeDatabase(source=singlepipedata_files)
# twin pipe data files
twinpipedata_files = [
"tests/data/isoplus_twinpipes_s1.csv",
]
twinpipedb = StandardisedPipeDatabase(source=twinpipedata_files)
# **************************************************************************
# load fluid data
# get water properties' database
waterdata_file = "tests/data/incropera2006_saturated_water.csv"
water_db = FluidDatabase(fluid="fluid", phase="l", source=waterdata_file)
# # get oil properties' database
# oildata_file = '/some_folder/incropera2006_engine_oil.csv'
# oil_db = FluidDatabase(fluid='oil',
# phase='l',
# source=oildata_file)
# # get air properties' database
# airdata_file = '/some_folder/incropera2006_air_1atm.csv'
# air_db = FluidDatabase(fluid='air',
# phase='g',
# source=airdata_file)
# load osm/osmnx data
# **************************************************************************
# signal
if test_examples_signal:
print("'signal': testing about to start...")
examples_signal()
print("'signal': testing: testing complete.")
# **************************************************************************
# **************************************************************************
# ******************************************************************************
# ******************************************************************************