Skip to content

Instantly share code, notes, and snippets.

View jd-lara's full-sized avatar
🔨

Jose Daniel Lara jd-lara

🔨
  • National Renewable Energy Laboratory
  • Denver, Colorado
  • 06:51 (UTC -06:00)
View GitHub Profile
using PowerSystems
using PowerSystemCaseBuilder
using PowerSimulations
using PowerNetworkMatrices
using HydroPowerSimulations
using StorageSystemsSimulations
const PSY = PowerSystems
const PSI = PowerSimulations
const PSB = PowerSystemCaseBuilder
using Xpress
@jd-lara
jd-lara / market_sim.jl
Last active November 23, 2020 18:22
Run UC - ED simulation with RH and lmp exports
using PowerSystems
const PSY = PowerSystems
using PowerSystems: UtilsData
using PowerSimulations
const PSI = PowerSimulations
using Dates
using TimeSeries
using Random
using Cbc
using GLPK
We can't make this file beautiful and searchable because it's too large.
0,0.00E+00,1.60E+00,-7.70E+00,-1.70E+00,-8.56E+00,-3.62E-11,-1.71E-10,2.28E-10,5.89E-10,2.21E-10,1.06E+00,1.04E+00,1.01E+00,1.06E+00,1.08E+00
0.005,0.00E+00,1.60E+00,-7.70E+00,-1.70E+00,-8.56E+00,-5.07E-11,-2.39E-10,3.19E-10,8.25E-10,3.09E-10,1.06E+00,1.04E+00,1.01E+00,1.06E+00,1.08E+00
0.01,0.00E+00,1.60E+00,-7.70E+00,-1.70E+00,-8.56E+00,-6.51E-11,-3.08E-10,4.10E-10,1.06E-09,3.98E-10,1.06E+00,1.04E+00,1.01E+00,1.06E+00,1.08E+00
0.015,0.00E+00,1.60E+00,-7.70E+00,-1.70E+00,-8.56E+00,-7.96E-11,-3.76E-10,5.01E-10,1.30E-09,4.86E-10,1.06E+00,1.04E+00,1.01E+00,1.06E+00,1.08E+00
0.02,0.00E+00,1.60E+00,-7.70E+00,-1.70E+00,-8.56E+00,-9.41E-11,-4.44E-10,5.92E-10,1.53E-09,5.74E-10,1.06E+00,1.04E+00,1.01E+00,1.06E+00,1.08E+00
0.025,0.00E+00,1.60E+00,-7.70E+00,-1.70E+00,-8.56E+00,-1.09E-10,-5.13E-10,6.84E-10,1.77E-09,6.63E-10,1.06E+00,1.04E+00,1.01E+00,1.06E+00,1.08E+00
0.03,0.00E+00,1.60E+00,-7.70E+00,-1.70E+00,-8.56E+00,-1.23E-10,-5.81E-10,7.75E-10,2.00E-09,7.51E-10,1.06E+00,1.04E+00,1.01E+00,1.06E+00,1.08E+00
0.035,0.0
@jd-lara
jd-lara / stackoverflow.log
Created May 9, 2020 22:45
Error Stackoverflow GG.jl
Internal error: encountered unexpected error in runtime:
StackOverflowError()
intersect at /Users/julia/buildbot/worker/package_macos64/build/src/subtype.c:0
intersect_invariant at /Users/julia/buildbot/worker/package_macos64/build/src/subtype.c:2742
intersect at /Users/julia/buildbot/worker/package_macos64/build/src/subtype.c:3002
intersect_tuple at /Users/julia/buildbot/worker/package_macos64/build/src/subtype.c:2642 [inlined]
intersect at /Users/julia/buildbot/worker/package_macos64/build/src/subtype.c:2958
intersect_unionall_ at /Users/julia/buildbot/worker/package_macos64/build/src/subtype.c:2491
intersect_unionall at /Users/julia/buildbot/worker/package_macos64/build/src/subtype.c:2539
intersect at /Users/julia/buildbot/worker/package_macos64/build/src/subtype.c:0
using JuMP
using Ipopt
m = Model(Ipopt.Optimizer);
# Indexes
I = 1:2
J = 1:2
#Variables
@variable(m, x[i in I] >= 0)
# Parameters
##########Function Defs###################
function obtain_raw_data(base_dir::String, sha::String)
data_path = joinpath(base_dir,"raw_input_data")
ispath(data_path) && rm(data_path, recursive = true)
mkpath(data_path)
if Sys.iswindows()
POWERSYSTEMSTESTDATA_URL = "https://github.com/GridMod/RTS-GMLC/archive/$(sha).zip"
else
POWERSYSTEMSTESTDATA_URL = "https://github.com/GridMod/RTS-GMLC/archive/$(sha).tar.gz"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
using JuMP
using Gurobi
using Random
Gurobi_optimizer = with_optimizer(Gurobi.Optimizer)
# Generate Data
data_ub = rand(100) .+ 1
data_lb = rand(100) .- 1
;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jd-lara
jd-lara / bridges_diff.jl
Last active May 18, 2019 17:41
Ipopt_bridges
using JuMP
using Ipopt
using Random
ipopt_optimizer = with_optimizer(Ipopt.Optimizer, print_level = 5)
lb_noise = rand(10);
ub_noise = rand(10);
lb = -2 .- lb_noise
ub = 2 .+ ub_noise