# PowerModelsADA.jl

**URL:** <https://discourse.julialang.org/t/powermodelsada-jl/104290>\
**Category:** Optimization (Mathematical)\
**Tags:** jump, power-flow\
**Created:** [September 26, 2023, 10:19pm UTC](https://discourse.julialang.org/t/powermodelsada-jl/104290 "2023-09-26T22:19:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![priod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/priod/32/53099_2.png) [@priod](https://discourse.julialang.org/u/priod)\
**Post date:** [September 26, 2023, 10:19pm UTC](https://discourse.julialang.org/t/powermodelsada-jl/104290/1 "2023-09-26T22:19:54Z")

</div>

Hi,

I am trying to run the [PowerModelsADA.jl](https://github.com/mkhraijah/PowerModelsADA.jl) (Power Models Alternating Distributed Algorithms) and using the Alternating Direction Method of Multipliers (ADMM) technique. I am following the example code and facing the following problem; the code snipped is attached.

````julia
> using JuMP
> using Ipopt
> using PowerModels
> using PowerModelsADA
> case_path = "C:/Users/Dell/Desktop/ADMM/case14.m"
> parition_file_path = "C:/Users/Dell/Desktop/ADMM/case14_2areas.csv"
> data = parse_file(case_path)
> assign_area!(data, parition_file_path)

> ## Settings and optimizer initiation
> max_iteration = 1000
> tol = 1e-2
> optimizer = optimizer_with_attributes(Ipopt.Optimizer, "print_level"=>0)
> model_type = ACPPowerModel
> 
> ## Distributed algorithm
> ## ADMM with fully distributed structure
> data_area = (data, model_type, optimizer, tol=tol, max_iteration=max_iteration, print_level = 1, alpha=1000, save_data=["solution", "mismatch"], multiprocessors=false)
> error_admm = compare_solution(data, data_area, model_type, optimizer)
> ```
"
Error:TaskFailed Exception error: invalid base 10 digit 'q' in ''qf''.

Please help me to rectify the problem and possible reason for the error.
````

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [September 26, 2023, 10:23pm UTC](https://discourse.julialang.org/t/powermodelsada-jl/104290/2 "2023-09-26T22:23:11Z")

</div>

Hi @priod!  
Since we don’t have access to the external files, we cannot run your code so it is harder to help you. This is particularly relevant because it sounds like an error in the CSV cells. Can you provide the files, or at least include a full stack trace?

---

<div class="post-metadata">

**Author:** ![priod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/priod/32/53099_2.png) [@priod](https://discourse.julialang.org/u/priod)\
**Post date:** [September 27, 2023, 12:20am UTC](https://discourse.julialang.org/t/powermodelsada-jl/104290/3 "2023-09-27T00:20:42Z")

</div>

I have gathered the files from here;[https://github.com/mkhraijah/PowerModelsADA.jl/tree/main/test/data](https://github.com/mkhraijah/PowerModelsADA.jl/tree/main/test/data)

---

<div class="post-metadata">

**Author:** ![mkhraijah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkhraijah/32/53191_2.png) [@mkhraijah](https://discourse.julialang.org/u/mkhraijah)\
**Post date:** [September 27, 2023, 12:30am UTC](https://discourse.julialang.org/t/powermodelsada-jl/104290/4 "2023-09-27T00:30:32Z")

</div>

Hi @priod,  
This error appears after the last InfrastructureModels update. InfrastructureModels is the base package for the PowerModels and PowerModelsADA, and there was a change in the aurgments’ type of one of the functions. We will fix this issue in the next update. In the meantime, you can downgrade InfrastructureModels from v0.7.8 to v0.7.7 to fix this error. This can be done as follows:

```julia
]add InfrastructureModels@0.7.7

```

---

<div class="post-metadata">

**Author:** ![priod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/priod/32/53099_2.png) [@priod](https://discourse.julialang.org/u/priod)\
**Post date:** [September 27, 2023, 12:37am UTC](https://discourse.julialang.org/t/powermodelsada-jl/104290/5 "2023-09-27T00:37:12Z")

</div>

Thanks, it worked.
