Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
f5ae646
Import to marimo
Nov 1, 2023
7e3cfd1
Update Go ui component implementation
dchassin Nov 2, 2023
cafeac6
Create mapbox_example.py
dchassin Nov 9, 2023
96bcfbf
Gridlabd data viewer
Nov 10, 2023
cd6ad3b
Update gridlabd_map.py
Nov 10, 2023
a99938c
GridLAB-D model viewer working
dchassin Nov 10, 2023
5110cd7
Create optimize_placement.py
Jul 12, 2024
b4a3cec
Add UI
Jul 30, 2024
b374c5e
Update README.md
Jul 30, 2024
fc2f99c
WIP
Jul 30, 2024
fd57059
Update README.md
Jul 30, 2024
74b10cb
Add files via upload
Jul 30, 2024
030205d
Update Task 6 WIP
Jul 31, 2024
0a7cb01
Merge branch 'develop_ui' of https://github.com/slacgismo/ascript int…
Jul 31, 2024
415d690
Add cities to UI
Aug 9, 2024
e97c6bc
Added SCE ICA data
Aug 9, 2024
9207d08
Add SCE ICA GeoJson data
Aug 9, 2024
b8e6c62
Add UI elements based on NREL and EIA databases
Aug 13, 2024
b116a61
Add state-level utilities data for CA
Aug 13, 2024
e16da38
Update scenario.py
Aug 13, 2024
feac2a7
Add load data access library
Aug 14, 2024
042cf6c
Update loads.py
Aug 14, 2024
c96d859
Update loads.py
Aug 14, 2024
0776cc3
Update loads.py
Aug 14, 2024
4c3979d
Add state data
Aug 14, 2024
92b3b56
Add load forecast
Aug 14, 2024
b827f97
Update loads.py
Aug 14, 2024
d630bc5
Update scenario.py
Aug 14, 2024
7a1021e
Create import_model.py
Aug 14, 2024
b3c1c07
Create placement.py
Aug 14, 2024
c7c9af1
Create show_map.py
Aug 14, 2024
069c306
Create 123.glm
Aug 14, 2024
c88fd10
Add SCE circuit map
Aug 14, 2024
e1b650f
Create SCE.glm
Aug 14, 2024
f19e0b0
Update scenario.py
Aug 14, 2024
90732f5
Add weather and scenario save/load
Aug 15, 2024
332667f
Update scenario.py
Aug 16, 2024
faa4bfe
Update README.md
Aug 16, 2024
fd6e15b
Update scenario.py
Aug 16, 2024
730410f
Add EV load integration
Aug 16, 2024
8a7d82c
Update scenario.py
Aug 16, 2024
d2ee1c3
Merge pull request #2 from slacgismo/develop_ui
Aug 16, 2024
dde3d06
Fix Task6/scenario.py
dchassin Sep 24, 2024
a856edc
Merge pull request #4 from slacgismo/develop_ui
dchassin Sep 24, 2024
a789885
Update loads.py
dchassin Sep 24, 2024
0db1c21
Merge branch 'develop' of https://github.com/slacgismo/ascript into d…
dchassin Sep 24, 2024
cd58f4d
Update scenario.py
dchassin Sep 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ venv/
ENV/
env.bak/
venv.bak/
*-venv/

# Spyder project settings
.spyderproject
Expand Down Expand Up @@ -150,3 +151,5 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.DS_Store
/Task6/Data
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
# ascript
Advanced Smart Charting Infrastructure Planning Tool
# ASCRIPT - Advanced Smart Charting Infrastructure Planning Tool

To setup, do the following:

~~~
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install pip --upgrade -r requirements.txt
mkdir .venv/src
cd .venv/src
git clone https://github.com/slacgismo/speech --depth 1
python3 -m pip install speech
cd -
~~~

To run the scenario UI, do the following:

~~~
cd Task6
marimo run scenario.py
~~~
54 changes: 54 additions & 0 deletions Task2/optimize_placement.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import marimo

__generated_with = "0.6.16"
app = marimo.App()


@app.cell
def __(mo, np):
S = [1.0,0,0,0.1] # node supply capacity (MW)
D = [0,0.1,0.2,0.1] # node demand (MW)
R = [0.5,0.6,0.7] # line resistances (Ohm)
G = [[0,1],[1,2],[1,3]] # graph of network

M = len(G) # number of lines
N = len(S) # number of nodes

mo.stop(len(R)!=M,"incorrect number of line resistances")
mo.stop(len(D)!=N,"incorrect number of demands")
mo.stop(min(min(G))!=0 or max(max(G))!=N-1,"graph contains invalid nodes")

A = np.zeros((N,N)) # admittance matrix
for n,tf in enumerate(G):
A[tf[0],tf[1]] = A[tf[1],tf[0]] = 1/R[n]
return A, D, G, M, N, R, S, n, tf


@app.cell
def __(A):
A
return


@app.cell
def __(A, M, N, cp):
f = cp.Variable(M) # line flows
v = cp.Variable(N) # node voltages

objective = cp.Minimize(v*A*v)
constraints = [
f == A*v
]
return constraints, f, objective, v


@app.cell
def __():
import marimo as mo
import cvxpy as cp
import numpy as np
return cp, mo, np


if __name__ == "__main__":
app.run()
Loading