wip sim dashboard
This commit is contained in:
		
							parent
							
								
									6c994e970c
								
							
						
					
					
						commit
						6d1199e37a
					
				| @ -34,8 +34,7 @@ def discharge_bess(bess, site_name, dt, discharge_power): | ||||
|             new_soc = unit["SoC"] - (dt * discharge_energy) / unit["capacity_kWh"] | ||||
|             new_soc = 0 if new_soc < 0 else new_soc | ||||
|         else: | ||||
|             # maintain SoC if not assigned to the site | ||||
|             new_soc = unit["SoC"] | ||||
|             continue | ||||
| 
 | ||||
|         # update SoC and current load | ||||
|         bess["units"][index]["current_load_kW"] = discharge_power | ||||
|  | ||||
| @ -84,11 +84,10 @@ def show_table(): | ||||
| 
 | ||||
| 
 | ||||
| if st.session_state.running: | ||||
|     st.subheader("BESS State of Charge (SoC) and Energy Consumption") | ||||
|     # display BESS data, SoC, Load Consumption | ||||
|     show_table() | ||||
|     time.sleep(1) | ||||
|     st.rerun() | ||||
| else: | ||||
|     show_table() | ||||
|     st.info("Simulation paused.") | ||||
|     st.info("Simulation not running") | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user