New functions in lp_glpk.cc. Sample file: lp_sample.cc.
authorathos
Thu, 07 Apr 2005 09:42:31 +0000
changeset 13149269c76551cf
parent 1313 96b74270c3a1
child 1315 c91ae3600eea
New functions in lp_glpk.cc. Sample file: lp_sample.cc.
src/lemon/lp_glpk.cc
src/work/athos/lp/Makefile
src/work/athos/makefile
     1.1 --- a/src/lemon/lp_glpk.cc	Thu Apr 07 06:38:56 2005 +0000
     1.2 +++ b/src/lemon/lp_glpk.cc	Thu Apr 07 09:42:31 2005 +0000
     1.3 @@ -257,7 +257,7 @@
     1.4    
     1.5    LpGlpk::Value LpGlpk::_getPrimalValue()
     1.6    {
     1.7 -    return 0;
     1.8 +    return lpx_get_obj_val(lp);
     1.9    }
    1.10    
    1.11   
    1.12 @@ -290,10 +290,12 @@
    1.13  
    1.14    void LpGlpk::_setMax()
    1.15    {
    1.16 -  }
    1.17 +      lpx_set_obj_dir(lp, LPX_MAX);
    1.18 +   }
    1.19    void LpGlpk::_setMin()
    1.20    {
    1.21 -  }
    1.22 +      lpx_set_obj_dir(lp, LPX_MIN);
    1.23 +   }
    1.24  
    1.25   
    1.26  } //END OF NAMESPACE LEMON
     2.1 --- a/src/work/athos/lp/Makefile	Thu Apr 07 06:38:56 2005 +0000
     2.2 +++ b/src/work/athos/lp/Makefile	Thu Apr 07 09:42:31 2005 +0000
     2.3 @@ -1,17 +1,20 @@
     2.4  CXXFLAGS = -Wall -ggdb --no-inline -I../../..
     2.5  
     2.6 -all: lp_test
     2.7 +all: lp_sample
     2.8  
     2.9  clean:
    2.10  	rm lp_test *.o
    2.11  
    2.12 -lp_base.o: lp_base.cc lp_base.h lin_expr.h
    2.13 +lp_base.o: ../../../lemon/lp_base.cc ../../../lemon/lp_base.h lin_expr.h
    2.14 +
    2.15  lp_solver_skeleton.o: lp_solver_skeleton.cc lp_solver_skeleton.h lp_base.h \
    2.16  		lin_expr.h
    2.17 -lp_glpk.o: lp_glpk.cc lp_glpk.h lp_base.h \
    2.18 -		lin_expr.h
    2.19 -lp_test.o: lp_test.cc lp_base.h lin_expr.h lp_solver_skeleton.h lp_base.h \
    2.20 -		lin_expr.h
    2.21  
    2.22 -lp_test: lp_test.o lp_base.o lp_solver_skeleton.o lp_glpk.o
    2.23 -	$(CXX) -o $@ $^ -lglpk
    2.24 \ No newline at end of file
    2.25 +lp_glpk.o: ../../../lemon/lp_glpk.cc ../../../lemon/lp_glpk.h ../../../lemon/lp_base.h lin_expr.h
    2.26 +
    2.27 +
    2.28 +lp_sample.o: lp_sample.cc 
    2.29 +
    2.30 +lp_sample: lp_sample.o lp_base.o lp_glpk.o 
    2.31 +	$(CXX) -o $@ $^ -lglpk
    2.32 +
     3.1 --- a/src/work/athos/makefile	Thu Apr 07 06:38:56 2005 +0000
     3.2 +++ b/src/work/athos/makefile	Thu Apr 07 09:42:31 2005 +0000
     3.3 @@ -1,4 +1,4 @@
     3.4 -BINARIES = bfs_test min_cost_flow
     3.5 +BINARIES = lp_sample
     3.6  INCLUDEDIRS= -I../.. -I.. -I../{athos,klao,marci,jacint,alpar,johanna,akos} 
     3.7  include ../makefile
     3.8