wip battery swap control
This commit is contained in:
		
							parent
							
								
									04cf0cdf29
								
							
						
					
					
						commit
						ee8d0125bc
					
				| @ -91,3 +91,9 @@ def update_cycle_SoC(bess_data, bess_soc_for_cycle, timestamps): | |||||||
|             ], |             ], | ||||||
|             axis=0, |             axis=0, | ||||||
|         ) |         ) | ||||||
|  | 
 | ||||||
|  | def arrange_swap(bess_data, c): | ||||||
|  |     for unit in bess_data["units"]: | ||||||
|  |         if unit["SoC"] < c["bess"]["buffer"]:    | ||||||
|  |             # find for unassigned BESS unit with SOC at 100% | ||||||
|  |                  | ||||||
							
								
								
									
										2
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.py
									
									
									
									
									
								
							| @ -76,6 +76,8 @@ with ThreadPoolExecutor() as executor: | |||||||
|         else: |         else: | ||||||
|             is_running_in_async = False |             is_running_in_async = False | ||||||
| 
 | 
 | ||||||
|  |         # check if any BESS units are below threshold (buffer as defined in config) | ||||||
|  | 
 | ||||||
|         # discharge BESS for each site |         # discharge BESS for each site | ||||||
|         for site in c["site_info"]["sites"]: |         for site in c["site_info"]["sites"]: | ||||||
|             site_name = site["name"] |             site_name = site["name"] | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user