Skip to content

Commit

Permalink
fixed depreciation pandas fc index
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophGehbauer committed Apr 6, 2024
1 parent 49691cf commit 35c44ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion afc/optModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def control_model(inputs, parameter):

inputs = inputs.copy(deep=True)
if isinstance(inputs.index[0], type(pd.to_datetime(0))):
inputs.index = inputs.index.astype(int)/1e9 # Convert datetime to UNIX
inputs.index = inputs.index.astype('int64').astype(int)/1e9 # Convert datetime to UNIX

model.fzones = Set(initialize=parameter['facade']['windows'], doc='window zones')
model.fstates = Set(initialize=parameter['facade']['states'], doc='facade states')
Expand Down
2 changes: 1 addition & 1 deletion dev/Development-Controller.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"\n",
" inputs = inputs.copy(deep=True)\n",
" if isinstance(inputs.index[0], type(pd.to_datetime(0))):\n",
" inputs.index = inputs.index.astype(int)/1e9 # Convert datetime to UNIX\n",
" inputs.index = inputs.index.astype('int64').astype(int)/1e9 # Convert datetime to UNIX\n",
"\n",
" model.fzones = Set(initialize=parameter['facade']['windows'], doc='window zones')\n",
" model.fstates = Set(initialize=parameter['facade']['states'], doc='facade states')\n",
Expand Down
4 changes: 2 additions & 2 deletions dev/Development-ControllerWrapper.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
"CO2 Emissions [kg]\t\t0.0\n",
"\n",
"Duration:\n",
" {'duration': {'radiance': 30.29151749610901, 'glare': 69.52729845046997, 'varts': 0.13071012496948242, 'optall': 0.5158815383911133, 'outputs': 0.0016393661499023438, 'all': 104.46238040924072}}\n",
" {'duration': {'radiance': 30.415552616119385, 'glare': 2.1435093879699707, 'varts': 0.13152146339416504, 'optall': 0.5150332450866699, 'outputs': 0.0015900135040283203, 'all': 37.19069528579712}}\n",
"Optimization:\n",
" {'opt-stats': {'duration': 0.2025301456451416, 'termination': 'optimal', 'objective': 20.28974844}}\n"
" {'opt-stats': {'duration': 0.20344018936157227, 'termination': 'optimal', 'objective': 20.28974844}}\n"
]
},
{
Expand Down

0 comments on commit 35c44ef

Please sign in to comment.