Hello everyone

Still quite unexperienced, I need some checks for a model I have to solve with GAMS:

I have a distribution of surplus [positive value for a(i)] and need [negative value for a(i)] in several locations and created a route system in which each locations is connected to its 9 nearest neighbours. Since I found it more practical for the huge amount of connections and problems with the matrix, those are in the form:

d(i,j) => lK1.LK2 1; LK1.LK3 2… and so on. The goal is to distribute the surplus to locations with need so the there is no location left with a value bigger 0, so each location is either even or in need. Of course the simulated cost should be minimized.

Any help is really appreciated

I know I could seperate the locations like the standard transportation problem, but I fear that possible routes over several other locations are not possible with that and it is a condition that each location is only connected to its neighbours and not the whole set.

Like: Seattle=>New York=>Chicago=>Topeka would not be possible if Seattle is only connected to New York and Chicago.

Mainproject - Kopie1.gms (95.8 KB)