GIGAParviz commited on
Commit
9b0eb43
·
verified ·
1 Parent(s): aa05635

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -73,7 +73,6 @@ def run():
73
  project_main.PROJECT_YEARS = project_years
74
 
75
  project_main.OPTIMIZATION_SPACE['capacity_kta'] = (capacity_min, capacity_max)
76
- # FIX: هم‌خوانی با main.py (technology پرهزینه، sourcing صریح)
77
  project_main.OPTIMIZATION_SPACE['technology'] = ["Engro_Pakistan", "Shin_Etsu_2004"] if technology not in ["Engro_Pakistan", "Shin_Etsu_2004"] else [technology]
78
  project_main.OPTIMIZATION_SPACE['sourcing_strategy'] = ['Integrated_Production'] # FIX: صریح
79
  project_main.OPTIMIZATION_SPACE['export_market_mix'] = (0.6, 0.8)
@@ -90,8 +89,9 @@ def run():
90
  results = project_main.run_optimizations_without_ml()
91
  df_results = pd.DataFrame(results).sort_values(by="irr", ascending=False).reset_index(drop=True)
92
  df_results = df_results.round(2)
93
-
94
- RESULTS_CSV = Path.cwd() / "results_flask.csv" # FIX: ذخیره در دایرکتوری فعلی
 
95
  df_results.to_csv(RESULTS_CSV, index=False, encoding='utf-8-sig')
96
 
97
  try:
 
73
  project_main.PROJECT_YEARS = project_years
74
 
75
  project_main.OPTIMIZATION_SPACE['capacity_kta'] = (capacity_min, capacity_max)
 
76
  project_main.OPTIMIZATION_SPACE['technology'] = ["Engro_Pakistan", "Shin_Etsu_2004"] if technology not in ["Engro_Pakistan", "Shin_Etsu_2004"] else [technology]
77
  project_main.OPTIMIZATION_SPACE['sourcing_strategy'] = ['Integrated_Production'] # FIX: صریح
78
  project_main.OPTIMIZATION_SPACE['export_market_mix'] = (0.6, 0.8)
 
89
  results = project_main.run_optimizations_without_ml()
90
  df_results = pd.DataFrame(results).sort_values(by="irr", ascending=False).reset_index(drop=True)
91
  df_results = df_results.round(2)
92
+
93
+ RESULTS_CSV = os.path.join("/tmp", "results_flask.csv")
94
+ # RESULTS_CSV = Path.cwd() / "results_flask.csv"
95
  df_results.to_csv(RESULTS_CSV, index=False, encoding='utf-8-sig')
96
 
97
  try: