Skip to content

Commit

Permalink
added timeout status for reopt_jl to microgridDesign output data
Browse files Browse the repository at this point in the history
  • Loading branch information
lilycatolson committed Jan 11, 2024
1 parent c323dd4 commit 2d5cd26
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion omf/models/microgridDesign.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ def work(modelDir, inputDict):

end_time = time.time()
print(f'reopt_jl solver runtime: {end_time - start_time} seconds')

outData['solverStatus' + indexString] = results['status']
outData['hitTimeout' + indexString] = True if results['status'] == "timed-out" else False
outData['solverSeconds' + indexString] = results['solver_seconds']

#resultsSubset = results['outputs']['Scenario']['Site']
outData['demandCostBAU' + indexString] = results['ElectricTariff']['lifecycle_demand_cost_after_tax_bau']#['total_demand_cost_bau_us_dollars']
Expand Down Expand Up @@ -922,7 +926,7 @@ def get_energy_produced(energy_type, degradation_type, i):
write_table(annual_values_proforma,"",excel_row,excel_col)
excel_row += len(annual_values_proforma) + 1

workbook.save(f'{modelDir}/ProForma.xlsx')
workbook.save(os.path.join(modelDir,"ProForma.xlsx"))

#helper function for generating output graphs
def makeGridLine(x,y,color,name):
Expand Down

0 comments on commit 2d5cd26

Please sign in to comment.