Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion repair_schedule/other_repair_schedule_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ def fn_prioritize_systems( systems, repair_type, damage, tmp_repair_complete_day
if any(sys_filter): # Only if this system is present
sys_affects_reoccupancy[:,syst] = np.any(affects_reoccupancy[:,sys_filter], axis = 1); # any damage that potentially affects function in this system
sys_affects_function[:,syst] = np.any(affects_function[:,sys_filter], axis = 1); # any damage that potentially affects function in this system
if tmp_repair_complete_day != []: # Only if temp repair data is passed in
# check if the list (array) is non-empty
if list(tmp_repair_complete_day): # Only if temp repair data is passed in
all_sys_tmp_repaired = np.all(np.logical_or(tmp_repair_complete_day[:,sys_filter] < np.inf, np.isnan(tmp_repair_complete_day[:,sys_filter])), axis=1) # is every single damaged component resolved by temp repairs
tmp_repair_quick = np.nanmax(tmp_repair_complete_day[:,sys_filter], axis=1) < impeding_factors['time_sys'][:,syst] # Are the temp repairs for this system resolved before impeding factors are complete
sys_tmp_repaired[:,syst] = np.logical_and(all_sys_tmp_repaired, tmp_repair_quick) # damage is quickly resolved by temp repair
Expand Down