Im trying to make the facility location problem algorithm where i have to connect a supplying point to a supplied point , so i got hundreds of supplied points binded to many supplying points so i got something like this
,So i got a possible solution , but dont know how to graph more than one supply point grid im trying to use the next code as example:
using Gadfly
xc = [0,1,0,-1,0,4,0,-2,0,-2]
yc = [0,3,0,-2,0,1,0,2,0,-2]
Gadfly.plot(x=xc, y=yc, Geom.path, Geom.point)
Im also using this code ,with vectors as geometry, but can not graph more than a single supply point and its supplied points which is binded:
using Gadfly
# coordinate system and scales are necessary for Geom.vector
coord = Coord.cartesian(xmin=-5, xmax=5, ymin=-5, ymax=5)
xsc = Scale.x_continuous(minvalue=-5, maxvalue=5)
ysc = Scale.y_continuous(minvalue=-5, maxvalue=5)
# prepare the points you want to show
xend = [1,-1,4,-2,-2]
yend = [3,-2,1,2,-2]
# create the supplying center (1,2)
x = fill(1,length(xend))
y = fill(2,length(yend))
# plot everything
Gadfly.plot(x=x,y=y,xend=xend,yend=yend,xsc,ysc,Geom.vector,coord)
So in attempt to graph more than one supply point i get a error, I could make using layers , but dont think proper to make it for hundreds of layers by each supply point.Regards