1 Installation ============== Required software ----------------- The tools are a mix of C++ code, Python and Perl. You need a C++ compiler that supports the C++11 standard, such as gcc 4.8.0 or later. You also need at least Python 2.6, and Perl 5.12. 1.1 How to build ---------------- Download the source tarball parlia_voting-1.00.tar.gz and type tar xvf parlia_voting-1.00.tar.gz cd parlia_voting-1.00/ ./configure make This will build all the binaries. 1.2 For developers only ----------------------- To make a new distribution, check out the source repository and type ./autogen.sh ./configure make dist This will create a new tarball ready for distribution. 2 Usage ======= * We use the Strict Orders - Complete List format (http://www.preflib.org/format.php#soc) of PrefLib as the format of an input profile, e.g: 3 1,A 2,B 3,C 4,4,3 2,1,2,3 1,2,3,1 1,1,3,2 The first row denotes the number m of alternatives. The next m rows describes the identifier and the name of each alternative. The (m+2)th row denotes the actual number n of voters. For the remaining rows: The first entry of each row denotes the number of voters with the same preference order which follows right after. For instance, the above profile has three alternatives: 1,2,3, and two voters with preference order 1>2>3, one voter with preference order 2>3>1, and one voter with preference order 1>3>2. * Examples of running the binary for the statistic case 2.1 ./parlia_voting_statistic -m -a -preflib < ex_profile.dat ------------------------------------------------------------ Description of (part of) the output: ================================START========================================== n (sum of all weights): 4 2 1 1 2: 1 2 3 1: 2 3 1 1: 1 3 2 ************************************ A: 1 2 3 Found an amendment manipulation with 0 votes for cand 1 Found an amendment manipulation with 2 votes for cand 2 with vote 2 3 1 Found an amendment manipulation with 2 votes for cand 3 with vote 3 1 2 ************************************ ************************************ A: 2 1 3 Found an amendment manipulation with 0 votes for cand 1 Found an amendment manipulation with 3 votes for cand 2 with vote 2 3 1 Found an amendment manipulation with 2 votes for cand 3 with vote 3 1 2 ************************************ ************************************ A: 3 2 1 Found an amendment manipulation with 0 votes for cand 1 Found an amendment manipulation with 3 votes for cand 2 with vote 2 1 3 Found an amendment manipulation with 3 votes for cand 3 with vote 3 1 2 ************************************ ************************************ A: 2 3 1 Found an amendment manipulation with 0 votes for cand 1 Found an amendment manipulation with 3 votes for cand 2 with vote 2 1 3 Found an amendment manipulation with 3 votes for cand 3 with vote 3 1 2 ************************************ ************************************ A: 3 1 2 Found an amendment manipulation with 0 votes for cand 1 Found an amendment manipulation with 2 votes for cand 2 with vote 2 1 3 Found an amendment manipulation with 3 votes for cand 3 with vote 3 2 1 ************************************ ************************************ A: 1 3 2 Found an amendment manipulation with 0 votes for cand 1 Found an amendment manipulation with 2 votes for cand 2 with vote 2 1 3 Found an amendment manipulation with 3 votes for cand 3 with vote 3 2 1 ************************************ ==================================END ======================================== The first few lines just print out the original profile given by stdin For each possible agenda L over alternatives 1,2,3, for each alternative i, we print out the minimum number of voters needed for alternative i to win the amendment procedure under L. 2.2 ./parlia_voting_statistic -c -a -preflib < ex_profile.dat ------------------------------------------------------------ Description of (part of) the output: ================================START========================================== n (sum of all weights): 4 2 1 1 2: 1 2 3 1: 2 3 1 1: 1 3 2 ----------- CONTROL AMENDMENT PROCEDURE ----------- Found an amendment agenda for 1 A: 3 2 1 Found NO amendment agenda for 2 Found NO amendment agenda for 3 ==================================END ======================================== The first few lines just print out the original profile given by stdin For each alternative i, we print out the agenda under which alternative i can win the amendment procedure.