Skip to content

Commit

Permalink
added prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
AidenSwayne committed Nov 26, 2023
1 parent 0bd6432 commit 2b5c5e3
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Prototype.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import cvxpy as cp
import numpy as np
#goals: add a parameter that places the columns away from other columns and away from building edges.
#way to encode the floor shapes: use a numpy boolean grid.
#steps: optimization phase 1 will be determinimng number of columns needed and carbon offset quantities
#optimization phase 2 will be placing the columns in the building.

inputs=["# of floors", ["dimensions of floor n"]]
floor_count=inputs[0]
dimensions=inputs[1]
columns_per_floor=[1,2,3]
columns_pos=[]
cp.Variable(3, integer=True)
constraints=[]
for i in range(floor_count):
columns_pos.append([])
for j in columns_per_floor[i]:
x = cp.Variable(1,integer=True)
y = cp.Variable(1,integer=True)
columns_pos[i].append((x,y))
#constraints to verify that the column connects to both the current floor and the floor it's supporting.
constraints.append(dimensions[i][y][x]==1)
constraints.append(dimensions[i+1][y][x]==1)

0 comments on commit 2b5c5e3

Please sign in to comment.