michelleblom / margin-stv

Code base and test suite for paper 'Towards Computing the Margin of Victory for STV Elections'
GNU General Public License v3.0
0 stars 0 forks source link

Document dependencies, like CPLEX #1

Open nealmcb opened 4 years ago

nealmcb commented 4 years ago

Thanks for this important software!

When I try to build it via the Makefile, on Ubuntu 18.04, I get this:

$ make
....
g++ -Wall -pedantic -g -I. -I/opt/ibm/ILOG/CPLEX_Studio129/cplex/include -I/opt/ibm/ILOG/CPLEX_Studio129/concert/include  -m64 -fPIC -fexceptions -DNEBUG -DIL_STD -Wno-long-long -Wno-attributes -Wno-ignored-attributes -fpermissive -Wno-sign-compare -o obj/stv_distance.o -c stv_distance.cpp
In file included from stv_distance.cpp:26:0:
cplex_utils.h:19:9: fatal error: ilcplex/ilocplex.h: No such file or directory
 #include<ilcplex/ilocplex.h>
         ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:48: recipe for target 'obj/stv_distance.o' failed
make: *** [obj/stv_distance.o] Error 1

I note this in the Makefile:

CPLEX129=/opt/ibm/ILOG/CPLEX_Studio129
CPLEX129LIB=$(CPLEX129)/cplex/lib/x86-64_linux/static_pic/
CONCERT129LIB=$(CPLEX129)/concert/lib/x86-64_linux/static_pic/

and I don't have those files.

So I guess there is a dependency on CPLEX Optimizer | IBM or something like it. Does the free version work?

Are there any other dependencies or build notes? Thanks again.

michelleblom commented 4 years ago

Hi Neal,

It does use Cplex and the trial version won't work because it has a limit on the size of the problem it can solve. However, the full version is free for academic use (via the academic initiative). If you have an institutional email address of some sort you can download it. It might also work if someone else downloads it and passes it on to you. Unfortunately I've used the cplex c++ api to build the MIPs that get solved so swapping to an alternate solver would require rewriting that code.

The code also uses the boost c++ libraries which are free. I think that's it.

Cheers, Michelle.

On Sat, 3 Oct 2020, 01:50 Neal McBurnett, notifications@github.com wrote:

Thanks for this important software!

When I try to build it via the Makefile, on Ubuntu 18.04, I get this:

$ make .... g++ -Wall -pedantic -g -I. -I/opt/ibm/ILOG/CPLEX_Studio129/cplex/include -I/opt/ibm/ILOG/CPLEX_Studio129/concert/include -m64 -fPIC -fexceptions -DNEBUG -DIL_STD -Wno-long-long -Wno-attributes -Wno-ignored-attributes -fpermissive -Wno-sign-compare -o obj/stv_distance.o -c stv_distance.cpp In file included from stv_distance.cpp:26:0: cplex_utils.h:19:9: fatal error: ilcplex/ilocplex.h: No such file or directory

include<ilcplex/ilocplex.h>

     ^~~~~~~~~~~~~~~~~~~~

compilation terminated. Makefile:48: recipe for target 'obj/stv_distance.o' failed make: *** [obj/stv_distance.o] Error 1

I note this in the Makefile:

CPLEX129=/opt/ibm/ILOG/CPLEX_Studio129 CPLEX129LIB=$(CPLEX129)/cplex/lib/x86-64_linux/static_pic/ CONCERT129LIB=$(CPLEX129)/concert/lib/x86-64_linux/static_pic/

and I don't have those files.

So I guess there is a dependency on CPLEX Optimizer | IBM https://www.ibm.com/analytics/cplex-optimizer or something like it. Does the free version work?

Are there any other dependencies or build notes? Thanks again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/michelleblom/margin-stv/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGARJQHJIQEOPZVXXZ2LYBDSIXZCVANCNFSM4SB3J7RA .

nealmcb commented 4 years ago

Got it - thanks!

The current version is 12.10: ILOG CPLEX Optimization Studio via CPLEX - academic

Should that work also?

michelleblom commented 4 years ago

Hi Neal,

Yes - that version should work fine. If not let me know, there might have been some changes in the API.

Cheers, Michelle.

On Sun, 4 Oct 2020, 15:26 Neal McBurnett, notifications@github.com wrote:

Got it - thanks!

The current version is 12.10: ILOG CPLEX Optimization Studio https://www.ibm.com/academic/technology/data-science via CPLEX - academic https://community.ibm.com/community/user/datascience/blogs/xavier-nodet1/2020/07/09/cplex-free-for-students

Should that work also?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/michelleblom/margin-stv/issues/1#issuecomment-703200472, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGARJQGVOFOM4PU4VSW3ZMTSI72PZANCNFSM4SB3J7RA .

nealmcb commented 4 years ago

Indeed, version 12.10 seems to have worked well, and if I understand the output at all, perhaps a bit better than the previous runtest.sh example results.

For the record, I've put the significant diffs I see in a gist: margin-stv example output for CPLEX version 12.9 vs 12.10

Are any of the changes significant? Are they due to randomization of the runs, or slightly better algorithms, or something else?

Thanks again!

michelleblom commented 4 years ago

I don't think the differences are significant -- but you should still be getting the same answer in the end (same lower and upper bound on the margin computed). The runs aren't random, although there is a bit of nondeterminism introduced by adding time limits to MIP solves, and stopping MIP solves when the difference between the best found feasible solution and the optimal is smaller than a threshold. I think that it's this nondeterminism that's causing you to get a different log.

On Mon, Oct 5, 2020 at 4:27 AM Neal McBurnett notifications@github.com wrote:

Indeed, version 12.10 seems to have worked well, and if I understand the output at all, perhaps a bit better than the previous runtest.sh example results.

For the record, I've put the significant diffs I see in a gist: margin-stv example output for CPLEX version 12.9 vs 12.10 https://gist.github.com/nealmcb/eb78cdf44fd1496965f6dae25ea6277d

Are any of the changes significant? Are they due to randomization of the runs, or slightly better algorithms, or something else?

Thanks again!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/michelleblom/margin-stv/issues/1#issuecomment-703288006, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGARJQBNP6P4NXBS3GYJ7ITSJCV7NANCNFSM4SB3J7RA .