-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExaModels #58
Conversation
* Added ExaModels.jl example * Update project files * added examodels to testing * [hotfix] "ma27" option removed * "typo fix README" --------- Co-authored-by: Oscar Dowson <[email protected]>
examodels.jl
Outdated
va_sol = ExaModels.solution(result, va) | ||
va_dict = Dict("va_$(i)" => va_sol[busdict[i]] for (i,b) in enumerate(data.bus)) | ||
|
||
vm_sol = ExaModels.solution(result, vm) | ||
vm_dict = Dict("vm_$(i)" => vm_sol[busdict[i]] for (i,b) in enumerate(data.bus)) | ||
|
||
pg_sol = ExaModels.solution(result, pg) | ||
pg_dict = Dict("pg_$(i)" => pg_sol[gendict[i]] for (i,b) in enumerate(data.gen)) | ||
|
||
qg_sol = ExaModels.solution(result, qg) | ||
qg_dict = Dict("qg_$(i)" => qg_sol[gendict[i]] for (i,b) in enumerate(data.gen)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing this part with
va_sol = ExaModels.solution(result, va)
va_dict = Dict("va_$(i)" => va_sol[b.i] for (i,b) in enumerate(data.bus))
vm_sol = ExaModels.solution(result, vm)
vm_dict = Dict("vm_$(i)" => vm_sol[b.i] for (i,b) in enumerate(data.bus))
pg_sol = ExaModels.solution(result, pg)
pg_dict = Dict("pg_$(i)" => pg_sol[b.i] for (i,b) in enumerate(data.gen))
qg_sol = ExaModels.solution(result, qg)
qg_dict = Dict("qg_$(i)" => qg_sol[b.i] for (i,b) in enumerate(data.gen))
seems to resolve the issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed it seems to work on my side. I will apply the fix and text again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the CI log, the validation test is going to fail. So the indexing bug was worked around but the solution is no longer in the correct format.
Detailed results below. Once the solution encoding issue is resolved, I say we are good to merge. Objective Value Correctness Check
Runtime Check
|
Sure thing. When the modeling layer is this fast the tests also go really fast. 😄 |
Thank you very much for the contribution! |
Results of initial testing, there appears to be a subtle indexing bug in how the modeling layer solution data is turned into the dicts that are use for the standard solution format. It happens on more than 50% of the pglib cases here are two examples,
pglib_opf_case179_goc.m
->KeyError: key 1 not found
pglib_opf_case200_activ.m
->KeyError: key 16 not found
@sshin23, can you see if you can reproduce and propose a fix with a PR into this branch?