A little has been done. Some important questions arised.
1.1 --- a/src/work/athos/lp/Makefile Mon Apr 11 14:26:35 2005 +0000
1.2 +++ b/src/work/athos/lp/Makefile Mon Apr 11 15:46:14 2005 +0000
1.3 @@ -1,9 +1,9 @@
1.4 -CXXFLAGS = -Wall -ggdb --no-inline -I../../.. -I..
1.5 +CXXFLAGS = -Wall -ggdb --no-inline -I../../.. -I.. -I/usr/local/cplex/cplex75/include
1.6
1.7 all: lp_sample_cplex
1.8
1.9 clean:
1.10 - rm lp_test *.o
1.11 + rm lp_test lp_sample_cplex lp_sample *.o
1.12
1.13 lp_base.o: ../../../lemon/lp_base.cc ../../../lemon/lp_base.h
1.14 $(CXX) $(CXXFLAGS) -o $@ -c $<
1.15 @@ -23,5 +23,7 @@
1.16 lp_sample: lp_sample.o lp_base.o lp_glpk.o
1.17 $(CXX) -o $@ $^ -lglpk
1.18
1.19 -lp_sample_cplex: lp_sample_cplex.o lp_base.o lp_glpk.o
1.20 - $(CXX) $(CXXFLAGS) -I/usr/local/cplex/cplex75/include -o $@ $^ -L/usr/local/cplex/cplex75/lib/i86_linux2_glibc2.2_gcc3.0/static_pic_mt -lcplex -lm -lpthread
1.21 +lp_sample_cplex: lp_sample_cplex.o lp_base.o lp_cplex.o
1.22 + $(CXX) $(CXXFLAGS) -o $@ $^ -L/usr/local/cplex/cplex75/lib/i86_linux2_glibc2.2_gcc3.0/static_pic_mt -lcplex -lm -lpthread
1.23 +
1.24 +# $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
2.1 --- a/src/work/athos/lp/lp_cplex.cc Mon Apr 11 14:26:35 2005 +0000
2.2 +++ b/src/work/athos/lp/lp_cplex.cc Mon Apr 11 15:46:14 2005 +0000
2.3 @@ -109,7 +109,26 @@
2.4 void LpCplex::_setRowUpperBound(int i, Value value)
2.5 {
2.6 //TODO Ezt kell meg megirni
2.7 - // Value lo=CPX
2.8 + //type of the problem
2.9 + char sense[1];
2.10 + status = CPXgetsense (env, lp, sense, i, i);
2.11 + Value rhs[1];
2.12 + status = CPXgetrhs (env, lp, rhs, i, i);
2.13 +
2.14 + switch (sense[0]) {
2.15 + case 'L'://<= constraint
2.16 + break;
2.17 + case 'E'://= constraint
2.18 + break;
2.19 + case 'G'://>= constraint
2.20 + break;
2.21 + case 'R'://ranged constraint
2.22 + break;
2.23 + default: ;
2.24 + //FIXME error
2.25 + }
2.26 +
2.27 + status = CPXchgcoef (env, lp, i, -2, value_rng);
2.28 }
2.29
2.30 void LpCplex::_setObjCoeff(int i, Value obj_coef)
3.1 --- a/src/work/athos/lp/lp_cplex.h Mon Apr 11 14:26:35 2005 +0000
3.2 +++ b/src/work/athos/lp/lp_cplex.h Mon Apr 11 15:46:14 2005 +0000
3.3 @@ -22,7 +22,7 @@
3.4
3.5 #include <lemon/lp_base.h>
3.6 extern "C" {
3.7 -#include "ilcplex/cplex.h"
3.8 +#include <ilcplex/cplex.h>
3.9 }
3.10
3.11 namespace lemon {