Skip to content

Commit 9e94726

Browse files
authored
Create bb
1 parent 4c2da55 commit 9e94726

1 file changed

Lines changed: 153 additions & 0 deletions

File tree

bb

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
optimizer:
2+
----------
3+
For each Site constraint (usually one):
4+
call Site_Maskwa_steam_recommendation:
5+
params:
6+
site_data: for each trunk -> pad : {
7+
data (csv file / dropped unnamed column)
8+
max_constraints (well constraints)
9+
model
10+
pad_constraints: (pad constraints)
11+
}
12+
scenario_id
13+
step_size: 100
14+
steam_site_daily_inject: 1100
15+
steam_site_constraint_daily : 1100
16+
trunk_constraints: (trunk constraints)
17+
well_statuses: (well statuses)
18+
start_date
19+
end_date
20+
21+
===========================================================================================================================
22+
23+
Site_Maskwa_steam_recommendation:
24+
-----------------------------
25+
26+
params:
27+
site_data: for each trunk -> pad : {
28+
data (csv file / dropped unnamed column)
29+
max_constraints (well constraints)
30+
model
31+
pad_constraints: (pad constraints)
32+
}
33+
scenario_id
34+
step_size: 100
35+
steam_site_daily_inject: 1100
36+
steam_site_constraint_daily : 1100
37+
trunk_constraints: (trunk constraints)
38+
well_statuses: (well statuses)
39+
start_date
40+
end_date
41+
42+
variables / code:
43+
steam_site_daily_inject: 1100
44+
build the following:
45+
Pad_infill_well_list: wells per trunk
46+
pad_constraints : list of (pad, [constraints])
47+
well_constraints: list of (well, [constraints])
48+
date_ranges: for each date range add this:
49+
(
50+
end_date,
51+
start_date,
52+
min_trunk_stream ([0,0,0]),
53+
max_trunk_stream ([20000,20000]),
54+
min_pad_stream: { pad_name: 500, ... },
55+
max_pad_stream: { pad_name: 5000, ... }
56+
)
57+
for each date_range (usually one):
58+
trunk_steam_allocation: { for each trunk the bigger between two values: 1. min of each trunk, or 2. sum of min of pads}
59+
trunk_steam_max_allocation: { for each trunk the smaller between two: 1. the max for trunk, or 2. the sum of max of pads }
60+
61+
Steam_site_daily_inject_local : is the min of two values: 1. the Steam_site_daily_inject or 2. sum of all max of trunk in trunk_steam_max_allocation
62+
trunk_steam_step = 1000
63+
max_volume_total = 0
64+
recomd_steam_distribution = {dict for each trunk an empty array}
65+
prediction_output_temp = None
66+
67+
68+
check and validate the `trunk_steam_allocation`
69+
70+
results_cache = { for each trunk }
71+
initial = trunk_steam_allocation
72+
trunk_steam_allocation_sum = sum of all trunk steam allocation : trunk_steam_allocation
73+
74+
| down remark : while sum of all current trunk stream < max steam site which is steam site or sum of all trunks |
75+
while trunk_steam_allocation_sum < Steam_site_daily_inject_local or initial:
76+
print ('.... Running 365 : ', )
77+
Do Something (while_loop)
78+
update trunk_steam_allocation_sum
79+
80+
81+
-------------------------------------------------
82+
Do Somthing (while_loop):
83+
max_volume_total = 0
84+
adjust the trunk step size (1000 or lower)
85+
86+
for each trunk in trunk_steam_allocation:
87+
temp_sum_total = 0
88+
recomendation_temp = []
89+
df_Pad_data_name_date_temp = None
90+
trunk_steam_allocation_temp = trunk_steam_allocation.copy()
91+
adjust the trunk_steam_step
92+
93+
for each trunk in site_data:
94+
recomendation_local_temp = None
95+
max_volume_temp, recomd_steam_distribution_temp, df_Pad_data_name_date_local, cache, recomendation_local_temp = One_Trunk_steam_recommendation()
96+
results_cache[trunk] = cache
97+
recomd_steam_distribution[trunk] = recomd_steam_distribution_temp.copy()
98+
temp_sum_total += max_volume_temp
99+
recomendation_temp += recomendation_local_temp
100+
df_Pad_data_name_date_temp = pd.concat([df_Pad_data_name_date_temp, df_Pad_data_name_date_local])
101+
102+
103+
104+
===========================================================================================================================
105+
106+
One_Trunk_steam_recommendation
107+
-----------------------------
108+
params:
109+
pad_data: as above but only for the trunk
110+
Steam_step_size: 100
111+
Steam_site_daily_inject: 3500 (min of trunk)
112+
Steam_site_constraint_daily: 3500
113+
Steam_trunk_constraint_daily: trunk_constraints(for this trunk)
114+
recomnd_steam_array: []
115+
start_date: start_date
116+
end_date: end_date
117+
results_cache {}
118+
Pad_infill_well_list: list of wells for the trunk
119+
print_result=1 # print_result = 1 will print recommendation results as well as corresponding oil production
120+
121+
variables / code:
122+
recomd_steam_distribution = None
123+
tmp = time.time()
124+
output_prediction = None
125+
output_array = []
126+
volume = 0
127+
for row in Steam_trunk_constraint_daily (usually on constraint):
128+
Steam_pad_constraint_daily_max = 0
129+
Steam_well_constraint_daily_max = []
130+
infill_well_list = [] (list of all wells (volume columns))
131+
for pad in pad_data:
132+
add to the pad_data: {
133+
// previous
134+
data, max_constraints, model, pad_constraints
135+
// new
136+
maximum_pad_constraint: last constraint steam
137+
minimum_pad_constraint: last constraint min
138+
min_well_constraints: [ list of well min constraint ]
139+
max_well_constraints: [ list of well max constraint ]
140+
}
141+
142+
Steam_well_constraint_daily_max = concat well max for all wells
143+
Steam_well_constraint_all_well_daily_max = sum of list of pad max where pad max = bigger of either 1. pad constraint max 2. sum of well max
144+
145+
Steam_well_constraint_daily_min = [0] * number of wells
146+
max_rec = 0
147+
Total_steam_ava = Steam_site_daily_inject (start point)
148+
149+
150+
151+
152+
153+
return volume, recomnd_steam_array, output_prediction, results_cache, output_array

0 commit comments

Comments
 (0)