Hello Yaron, if You have a problem where all 5000 warehouses can deliver to all 5000 customers sparsity cannot be exploited.
If each warehouse can only deliver to a subset of the customers appropriate modeling would be to create a set consisting of the valid combinations only (L in the appended example). As You are obviously handling large amounts of data consider linking to an SQL data base with Your sample data. See doc/table.txt in the source distribution http://glpk.dyndns.org/viewvc/svn/glpk/glpk/trunk/glpk-4.28/doc/tables.txt?revision=202 and the examples in examples/sql. Best regards Xypron #warehouses set W; #customers set C; #distribution lanes set L dimen 2; #demand param dem{c in C}; #capacity param cap{w in W}; #distance param dist{(w,c) in L}; #selected distribution channel var x{(w,c) in L} >= 0; minimize totalCost : sum{(w,c) in L} x[w,c] * dist[w,c]; s.t. satisfaction{c in C} : sum{(w,c) in L} x[w,c] - dem[c] = 0; s.t. capacity{w in W} : sum{(w,c) in L} x[w,c] - cap[w] <= 0; solve; display x; data; set W := w1, w2, w3; set C := c1, c2; set L := (w1, c1) (w1, c2) (w2, c1) (w3, c2); param dem := c1 20 c2 25; param cap := w1 18 w2 37 w3 10; param dist := [w1, c1] 4 [w1, c2] 7 [w2, c1] 2 [w3, c2] 1; end; -------- Original-Nachricht -------- > Datum: Thu, 19 Jun 2008 13:46:09 -0700 > Von: "Yaron Kretchmer" <[EMAIL PROTECTED]> > An: [email protected] > Betreff: [Help-glpk] Sparse matrix representation in GLPK? > Hi There > For a VLSI application, I'm trying to solve a variant of the warehouse > location problem. My problem stems from the fact that there are ~5K > "customers" and "warehouses", which translates into a 5K by 5K matrix. > This > leads me to wonder whether GLPK supports some sort of sparse matrix > representation, one which support mathprog matrix multiplcations etc. ? > > Thanks > Yaron -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
