Here you are Iain,

it's a very one day testing code :-)

thnaks very much
Fabrizio

On Saturday, April 25, 2015 at 8:41:56 PM UTC+2, Fabrizio wrote:
>
> Hi, very newby in Julia/JuMP, my problem is
>
> i have a set of power gen and attached nodes in a grid in this format
>
> PowerGen_ID Node
> 1                   1
> 2                   2
> 3                   1
> 4                   2
>
> i would like to construct a set "T_GENERATING_BUS" for each node that 
> contains the Power Gen attached to it
> i.e. 
> T_GENERATING_BUS[1]={1,3};
> T_GENERATING_BUS[2]={2,4};
>
> i tried something  like:
>
> T_GENERATING_BUS = Set[]
>
> for k in BUS
>     for j=1:gmax
>         if BUS_T[j] == k
>         T_GENERATING_BUS[k] = union(T_GENERATING_BUS[k],j)
>         end
>     end
> end
>
> but got an error bound
> ERROR: BoundsError()
>  in getindex at array.jl:246 (repeats 2 times)
> while loading E:\CodiciSorgente\ProgrammiJulia\UCOTS.jl, in expression 
> starting on line 101
>
> the problem is that i don't know how to increase the dim of 
> T_GENERATING_BUS
>
> Any hints?
>
> Thanks
>
> Fabrizio
>
>

Attachment: UCOTS.jl
Description: Binary data

Reply via email to