An experimental LPSolverWrapper class which uses glpk. For a short
demo, max flow problems are solved with it. This demo does not
demonstrates, but the main aims of this class are row and column
generation capabilities, i.e. to be a core for easily
implementable branch-and-cut a column generetion algorithms.
1 #INCLUDEDIRS ?= -I.. -I. -I./{marci,jacint,alpar,klao,akos}
2 GLPKROOT = /usr/local/glpk-4.4
3 INCLUDEDIRS ?= -I../../{marci,alpar,klao,akos,athos} -I. -I../../.. -I../.. -I.. -I$(GLPKROOT)/include
4 #INCLUDEDIRS ?= -I../.. -I../.. -I../../{marci,jacint,alpar,klao,akos} -I/usr/local/glpk-4.4/include
5 CXXFLAGS = -g -O2 -W -Wall $(INCLUDEDIRS) -ansi -pedantic
6 LDFLAGS = -L$(GLPKROOT)/lib -lglpk
8 BINARIES = max_flow_by_lp sample sample2 sample11 sample15
12 # Hat, ez elismerem, hogy nagyon ronda, de mukodik minden altalam
13 # ismert rendszeren :-) (Misi)
17 CXX := $(shell type -p g++-3.3 || type -p g++-3.2 || type -p g++-3.0 || type -p g++-3 || echo g++)
30 # Minden binarishoz egy sor, felsorolva, hogy mely object file-okbol
32 # Kiveve ha siman file.cc -> file esetrol van szo, amikor is nem kell
35 #proba: proba.o seged.o
41 # -$(CXX) $(CXXFLAGS) -M $(BINARIES:=.cc) > .depend
45 #moert nem megy az eredeti /usr/bin/ld-vel?
48 # $(CXX) -o $@ $< $(LDFLAGS)
51 # $(CXX) $(CXXFLAGS) -c $<
54 $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS)
56 sample11prof: sample11prof.o
57 $(CXX) -pg -o sample11prof sample11prof.o -L$(GLPKROOT)/lib -lglpk
58 sample11prof.o: sample11.cc
59 $(CXX) -pg $(CXXFLAGS) -c -o sample11prof.o sample11.cc
62 # $(CXX) $(CXXFLAGS) -c -o sample.o sample.cc
65 # $(CXX) -o sample2 sample2.o -L/usr/local/glpk-4.4/lib -lglpk
66 # sample2.o: sample2.cc
67 # $(CXX) $(CXXFLAGS) -c -o sample2.o sample2.cc
71 $(RM) *.o $(BINARIES) .depend
73 .PHONY: all clean dep depend