Skip to content

Instantly share code, notes, and snippets.

Carleton Coffrin ccoffrin

View GitHub Profile
View gist:cf17514db200b3e4f597aec3af4380d1
# 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
Export MathOptInterface Status Enums
View gist:e181667c272930ca177a2d9eed3517d2
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))
View gist:a350fd9f11760c8a1ff476068af8dbef
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.
You can’t perform that action at this time.