Skip to content

Instantly share code, notes, and snippets.

View ccoffrin's full-sized avatar

Carleton Coffrin ccoffrin

View GitHub Profile
# JuMP v0.18
using PowerModels
using Foo
using Bar
# quick test
result = run_opf("network.m", ACPPowerModel, FooSolver(...))
# compare formulations, keep solver constant
solver_1 = FooSolver(...)
@ccoffrin
ccoffrin / gist:e181667c272930ca177a2d9eed3517d2
Created May 20, 2019 15:12
Export MathOptInterface Status Enums
import MathOptInterface: TerminationStatusCode
export TerminationStatusCode
import MathOptInterface: ResultStatusCode
export ResultStatusCode
for status_code_enum in [TerminationStatusCode, ResultStatusCode]
for status_code in instances(status_code_enum)
@eval import MathOptInterface: $(Symbol(status_code))
@eval export $(Symbol(status_code))
@ccoffrin
ccoffrin / gist:a350fd9f11760c8a1ff476068af8dbef
Last active October 2, 2018 21:26
SCS Logs on Linux and OS X
Terminal outputs for running the following Julia code,
```
using ThreePhasePowerModels; using SCS; scs_solver = SCSSolver(max_iters=10000)
mp_data = ThreePhasePowerModels.parse_file("$(Pkg.dir("ThreePhasePowerModels"))/test/data/matlab/case5_i_r_a.m")
result = run_tp_opf_bf(mp_data, SDPUBFPowerModel, scs_solver)
```
Using Julia v0.6, ThreePhasePowerModels ec535c4, SCS v0.4.0. There is a notable difference in the solution on Linux and OS X.