Skip to content

Instantly share code, notes, and snippets.

View kshitizkhanal7's full-sized avatar

Kshitiz Khanal kshitizkhanal7

  • UNC Chapel Hill
  • Chapel Hill, North Carolina
View GitHub Profile
@kshitizkhanal7
kshitizkhanal7 / ps_optimization_cpuvsgpu.py
Created December 29, 2024 17:27
Benchmarking power system optimization: CPU (using PyPSA) and GPU (using custom solution)
#pip install pypsa cupy-cuda12x clarabel cvxpy
import numpy as np
import cupy as cp
import cvxpy as cvx
import pandas as pd
import time
import pypsa
import matplotlib.pyplot as plt
from tqdm.notebook import tqdm