JOE FIGHT!
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
from src.Functions_Energy_Model import *
|
from src.Functions_Energy_Model import *
|
||||||
from src.Functions_General import *
|
from src.Functions_General import *
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import signal
|
||||||
|
import time
|
||||||
|
|
||||||
location_ita = 'Biella' # location in Italian
|
location_ita = 'Biella' # location in Italian
|
||||||
capacity = 100 # kWp
|
capacity = 100 # kWp
|
||||||
@@ -9,13 +11,14 @@ azimuth = 0 # degrees
|
|||||||
num_years = 1 # number of years to simulate
|
num_years = 1 # number of years to simulate
|
||||||
derating_factor_percent = 1 # derating factor that reduce the efficiency of the modules in percentage [%]
|
derating_factor_percent = 1 # derating factor that reduce the efficiency of the modules in percentage [%]
|
||||||
|
|
||||||
|
# IGNORE THIS
|
||||||
config = yaml.safe_load(open("config.yml", 'r'))
|
config = yaml.safe_load(open("config.yml", 'r'))
|
||||||
path_export = str(config['filename_output_csv_gen_pv']) # path to save the results
|
path_export = str(config['filename_output_csv_gen_pv']) # path to save the results
|
||||||
joe = config['joe_fight']
|
isJoe = config['joe_fight']
|
||||||
|
if(isJoe == True):
|
||||||
if(joe == True):
|
if shutil.which('ffplay') is not None:
|
||||||
if shutil.which('wmplayer') is not None:
|
joe = subprocess.Popen(['ffplay', 'assets/joefight.mp4'])
|
||||||
proc = subprocess.Popen(['ffplay', 'assets/joefight.mp4'])
|
time.sleep(25) # deve arrivare il drop
|
||||||
else:
|
else:
|
||||||
print("ffplay non installato, no joe fight.")
|
print("ffplay non installato, no joe fight.")
|
||||||
|
|
||||||
@@ -45,4 +48,7 @@ result_ac_energies_to_csv_df = suppress_printing(simulate_unstacked_productivity
|
|||||||
|
|
||||||
# ESPORTAZIONE RISULTATI IN CSV
|
# ESPORTAZIONE RISULTATI IN CSV
|
||||||
result_ac_energies_to_csv_df.to_csv(path_export, encoding='utf-8')
|
result_ac_energies_to_csv_df.to_csv(path_export, encoding='utf-8')
|
||||||
os.startfile(path_export)
|
os.startfile(path_export)
|
||||||
|
|
||||||
|
joe.terminate()
|
||||||
|
joe.kill()
|
||||||
10
Program1.py
10
Program1.py
@@ -2,6 +2,16 @@ from src.Functions_General import *
|
|||||||
from src.Functions_Energy_Model import *
|
from src.Functions_Energy_Model import *
|
||||||
from src.Functions_Financial_Model import *
|
from src.Functions_Financial_Model import *
|
||||||
from src.Functions_Load_Emulator_and_DSM import *
|
from src.Functions_Load_Emulator_and_DSM import *
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
config = yaml.safe_load(open("config.yml", 'r'))
|
||||||
|
joe = config['joe_fight']
|
||||||
|
if(joe == True):
|
||||||
|
if shutil.which('ffplay') is not None:
|
||||||
|
proc = subprocess.Popen(['ffplay', 'assets/joefight.mp4'])
|
||||||
|
else:
|
||||||
|
print("ffplay non installato, no joe fight.")
|
||||||
|
|
||||||
|
|
||||||
generate_calendar()
|
generate_calendar()
|
||||||
kill_excel_processes()
|
kill_excel_processes()
|
||||||
|
|||||||
Reference in New Issue
Block a user