Let me help you with Wolfram Language programming because what you are writing is not idiomatic and because a good understanding of the fundamentals will get you a long way. Get rid of the indices, you don't need them. Use Thread to bring the x and y together. Also use it's idiomatic to use lower case starting letters for your own variables. And let's get the raw weight data out of the way.
x = {2000., 1000., 0., 1000., 0., 1000., 0.};(*X coordinates*)
y = {2000., 2000., 2000., 1000., 1000., 0., 0.};(*Y coordinates*)
coordinates = Thread[{x, y}];
w = {9.59353, 17.6205, 30.5427, 22.4938, 20.8078, 16.8908, 15.662,
10.5943};
Again, use Thread to create your (unstyled) edges
edges = Thread[
DirectedEdge[{1, 2, 2, 4, 4, 6, 3, 7}, {2, 3, 4, 5, 6, 7, 5, 5}]]
Use MapThread to style your edges. I've made up functions for color and thickness; you will want to use your own. Also lookup Rescale and MinMax. They are your friends.
(styledEdges =
MapThread[
Property[#1,
EdgeStyle -> {Hue[Rescale[#2, MinMax[w], {0, 1}]],
Thickness[Rescale[#2, MinMax[w], {0.01, 0.02}]]}] &, {edges,
w}]) // Short
Now we just write:
g = Graph[styledEdges, VertexCoordinates -> coordinates,
VertexShapeFunction -> None]
Let's make this a one-liner where I avoid creation of intermediate variables.
Module[{x, y, w,},
x = {2000., 1000., 0., 1000., 0., 1000., 0.};
y = {2000., 2000., 2000., 1000., 1000., 0., 0.};
w = {9.59353, 17.6205, 30.5427, 22.4938, 20.8078, 16.8908, 15.662,
10.5943};
Graph[MapThread[
Property[#1,
EdgeStyle -> {Hue[Rescale[#2, MinMax[w], {0, 1}]],
Thickness[Rescale[#2, MinMax[w], {0.01, 0.02}]]}] &, {Thread[
DirectedEdge[{1, 2, 2, 4, 4, 6, 3, 7}, {2, 3, 4, 5, 6, 7, 5,
5}]], w}], VertexCoordinates ->Thread[{x,y}],
VertexShapeFunction -> None]
]
And, of course, you could turn this into a function so it could handle different data and different edge decorations or whatever else you wanted.
aragonesGraph[edges_, weights_, coordinates_, decoratorFunction_,opts:OptionsPattern[Graph]] :=
Graph[MapThread[decoratorFunction, {edges, weights}],
VertexCoordinates -> coordinates, VertexShapeFunction -> None,opts]
Then you could write this:
aragonesGraph[
Thread[DirectedEdge[{1, 2, 2, 4, 4, 6, 3, 7}, {2, 3, 4, 5, 6, 7, 5,
5}]], {9.59353, 17.6205, 30.5427, 22.4938, 20.8078, 16.8908,
15.662, 10.5943},
Thread[{{2000., 1000., 0., 1000., 0., 1000., 0.}, {2000., 2000.,
2000., 1000., 1000., 0., 0.}}],
Property[#1,
EdgeStyle -> {Hue[Rescale[#2, MinMax[w], {0, 1}]],
Thickness[Rescale[#2, MinMax[w], {0.01, 0.02}]]}] &],Background->Yellow,PlotLabel->"My graph"]]
Or this
With[{edges= Thread[DirectedEdge[{1, 2, 2, 4, 4, 6, 3, 7}, {2, 3, 4, 5, 6, 7, 5,
5}]],
weights={9.59353, 17.6205, 30.5427, 22.4938, 20.8078, 16.8908,
15.662, 10.5943},
coordinates= Thread[{{2000., 1000., 0., 1000., 0., 1000., 0.}, {2000., 2000.,
2000., 1000., 1000., 0., 0.}}]},
aragonesGraph[edges,weights, coordinates,
Property[#1,
EdgeStyle -> {Hue[Rescale[#2, MinMax[w], {0.4, 0.7}]],
Thickness[Rescale[#2, MinMax[w], {0.01, 0.02}]]}] &,
EdgeShapeFunction ->
GraphElementData[{"CarvedArrow", "ArrowSize" -> .1}],
Background -> Orange, PlotLabel -> "My second graph"]
]
Anyway, this may be more than you wanted or needed to know to answer your particular time, but I thought it might prove helpful for you and others to see what you can do with a little more idiomatic code in the Wolfram Language.