Skip to content

Commit

Permalink
WIP on serializing model
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-ws committed May 5, 2024
1 parent 50f06ba commit 9008af7
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 276 deletions.
100 changes: 26 additions & 74 deletions notebooks/loan_cost_primer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
}
},
"id": "6786fe13296c8574",
"outputs": [],
"execution_count": 14
"execution_count": 14,
"outputs": []
},
{
"cell_type": "code",
Expand All @@ -109,8 +109,8 @@
}
},
"id": "6fc96307ef6013fb",
"outputs": [],
"execution_count": 15
"execution_count": 15,
"outputs": []
},
{
"cell_type": "code",
Expand Down Expand Up @@ -169,8 +169,8 @@
}
},
"id": "44ece17e11ca078a",
"outputs": [],
"execution_count": 16
"execution_count": 16,
"outputs": []
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -205,8 +205,8 @@
}
},
"id": "ce1bcf1453d44d6",
"outputs": [],
"execution_count": 17
"execution_count": 17,
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -230,8 +230,8 @@
}
},
"id": "a790bdc43d4fb128",
"outputs": [],
"execution_count": 18
"execution_count": 18,
"outputs": []
},
{
"cell_type": "code",
Expand All @@ -246,16 +246,8 @@
}
},
"id": "ee945bc2df5c8f70",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Loan annualization rate: 0.0839\n"
]
}
],
"execution_count": 19
"execution_count": 19,
"outputs": []
},
{
"cell_type": "code",
Expand All @@ -279,8 +271,8 @@
}
},
"id": "675f7cf04200c8f8",
"outputs": [],
"execution_count": 20
"execution_count": 20,
"outputs": []
},
{
"cell_type": "code",
Expand All @@ -295,16 +287,8 @@
}
},
"id": "3d6354622519237e",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Loan cost: $23,403.86\n"
]
}
],
"execution_count": 21
"execution_count": 21,
"outputs": []
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -338,8 +322,8 @@
}
},
"id": "82b8f08bc0780562",
"outputs": [],
"execution_count": 22
"execution_count": 22,
"outputs": []
},
{
"cell_type": "code",
Expand All @@ -354,16 +338,8 @@
}
},
"id": "e99fb0c033558324",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Undiscounted Loan cost: $41,930.08\n"
]
}
],
"execution_count": 23
"execution_count": 23,
"outputs": []
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -402,16 +378,8 @@
}
},
"id": "63eaa2ed2074c123",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Loan cost: $67,366.98\n"
]
}
],
"execution_count": 24
"execution_count": 24,
"outputs": []
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -448,16 +416,8 @@
}
},
"id": "1cee546365df4909",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Loan cost: $92,756.89\n"
]
}
],
"execution_count": 25
"execution_count": 25,
"outputs": []
},
{
"cell_type": "code",
Expand All @@ -482,16 +442,8 @@
}
},
"id": "7a13599b5a10281",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Undiscounted Loan cost: $335,440.65\n"
]
}
],
"execution_count": 26
"execution_count": 26,
"outputs": []
}
],
"metadata": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def __init__(self, config: TemoaConfig):
self.opt = pyomo_appsi.solvers.highs.Highs()
self.std_opt = pyo.SolverFactory('appsi_highs')
elif self.config.solver_name == 'gurobi':
self.opt = pyomo_appsi.solvers.Gurobi()
self.std_opt = pyo.SolverFactory('gurobi')
# self.opt = pyomo_appsi.solvers.Gurobi()
self.opt = pyo.SolverFactory('gurobi')
# self.options = {
# # 'LogFile': './my_gurobi_log.log',
# 'LPWarmStart': 2, # pass basis
Expand Down
Loading

0 comments on commit 9008af7

Please sign in to comment.