Skip to content

Commit

Permalink
Fixing EPS error
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias157 committed Oct 18, 2024
1 parent 20d0c4b commit 41fb238
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Modules/aggregate_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ def aggregate_parameter(db: gams.GamsDatabase,
.fillna(fillna)
)

# Writing eps if fillna == EPS
if fillna == 'EPS':
idx = df.query('Value <= 1e-9').index
df = df.astype('object')
df.loc[idx, 'Value'] = 'EPS'


# Make IncFile
prefix = "TABLE %s(%s) '%s'\n"%(symbol, ", ".join(symbol_columns[:-1]), db[symbol].text)
suffix = '\n;'
Expand Down

0 comments on commit 41fb238

Please sign in to comment.