Index: /pom.xml
===================================================================
--- /pom.xml	(revision 25)
+++ /pom.xml	(revision 26)
@@ -7,5 +7,5 @@
 	<artifactId>runserver</artifactId>
 	<packaging>war</packaging>
-	<version>1.5.8</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.9</version> <!-- must equal ${geniusweb.version} -->
 	<name>runserver Maven Webapp</name>
 	<url>http://maven.apache.org</url>
@@ -20,5 +20,5 @@
 		<jackson-2-version>2.9.10</jackson-2-version>
 		<tomcat.version>8.0.53</tomcat.version>
-		<geniusweb.version>1.5.8</geniusweb.version>
+		<geniusweb.version>1.5.9</geniusweb.version>
 	</properties>
 
@@ -39,5 +39,4 @@
 			</snapshots>
 		</repository>
-
 	</repositories>
 
@@ -45,8 +44,14 @@
 	<pluginRepositories>
 		<pluginRepository>
-			<id>jcenter</id>
-			<url>https://jcenter.bintray.com</url>
+			<id>central</id>
+			<url>https://repo1.maven.org/</url>
+		</pluginRepository>
+		<pluginRepository>
+			<id>jfrog-plugins-release</id>
+			<name>plugins-release</name>
+			<url>https://oss.jfrog.org/artifactory/plugins-release</url>
 		</pluginRepository>
 	</pluginRepositories>
+
 
 
@@ -79,5 +84,5 @@
 			<groupId>tudelft.utilities</groupId>
 			<artifactId>repository</artifactId>
-			<version>1.1.1</version>
+			<version>1.1.2</version>
 		</dependency>
 
@@ -85,5 +90,5 @@
 			<groupId>tudelft.utilities</groupId>
 			<artifactId>listener</artifactId>
-			<version>1.1.0</version>
+			<version>1.1.1</version>
 		</dependency>
 
Index: /src/main/webapp/newsession.xhtml
===================================================================
--- /src/main/webapp/newsession.xhtml	(revision 25)
+++ /src/main/webapp/newsession.xhtml	(revision 26)
@@ -17,4 +17,5 @@
 		<option value="MOPAC">MOPAC (Multiple Offers Partial
 			Consensus)</option>
+		<option value="MOPAC2">MOPAC2 (MOPAC but with values for each vote)</option>
 		<option value="AMOP">AMOP (Alternating Multiple Offers
 			Protocol)</option>
@@ -29,4 +30,10 @@
 		</select>
 	</div>
+	<div id="votingevaluator2">
+		<br /> Voting Evaluator: <select id="selectedevaluator2">
+			<option value="LargestAgreementWithValue">Largest Agreement with Values</option>
+		</select>
+	</div>
+
 	
 	<br /> Deadline:
@@ -40,5 +47,5 @@
 	<br /> Domain/Profile Server:
 	<input type="url" name="url" id="profilesserverurl"
-		value="localhost:8080/profilesserver-1.5.8"
+		value="localhost:8080/profilesserver-1.5.9"
 		pattern=".*:[0-9]+/profilesserver.*" size="30"
 		onchange="connectDomain()"> </input>
@@ -54,5 +61,5 @@
 		<br /> <b>Participants</b> <br /> Parties Server: <input type="url"
 			name="url" id="partiesserverurl"
-			value="localhost:8080/partiesserver-1.5.8"
+			value="localhost:8080/partiesserver-1.5.9"
 			pattern=".*:[0-9]+/partiesserver.*" size="30"
 			onchange="connectParties()"> </input> <br /> <br /> <b>Party
@@ -204,4 +211,7 @@
     	document.getElementById("votingevaluator").style.display=(evaluatorvisible ? 'block': 'none');
 		
+    	var evaluator2visible=getSelectedProtocol() == "MOPAC2";
+    	document.getElementById("votingevaluator2").style.display=(evaluator2visible ? 'block': 'none');
+
     }   
         
@@ -294,13 +304,13 @@
 	 refresh table: copy all parties elements in there.
 	 Typically parties is something like
-	 [{"uri":"http:130.161.180.1:8080/partiesserver/run/randomparty-1.5.8",
+	 [{"uri":"http:130.161.180.1:8080/partiesserver/run/randomparty-1.5.9",
 		 "capabilities":{"protocols":["SAOP"]},
 		 "description":"places random bids until it can accept an offer with utility >0.6",
-		 "id":"randomparty-1.5.8",
+		 "id":"randomparty-1.5.9",
 		 "partyClass":"geniusweb.exampleparties.randomparty.RandomParty"},
 		 		 ...]
 	 */
 	function updateParties(parties) {
-		 updatePartiesCombobox(parties, document.getElementById("partyselection"),['SAOP','AMOP','SHAOP','MOPAC']);
+		 updatePartiesCombobox(parties, document.getElementById("partyselection"),['SAOP','AMOP','SHAOP','MOPAC', 'MOPAC2']);
 		 updatePartiesCombobox(parties, document.getElementById("cobpartyselection"),['COB']);
 	}
@@ -561,4 +571,6 @@
 		case "MOPAC":
 			return makeMopacRequest();			
+		case "MOPAC2":
+			return makeMopac2Request();			
 		} 
 	}
@@ -581,4 +593,15 @@
 		extended['votingevaluator'] = { [evaluator]: {} };
 		return JSON.stringify({"MOPACSettings": extended });
+	}
+
+	/**
+	* @ereturn MOPAC2 request. Almost standard but extra 'votingEvaluator'.
+	*/
+	function makeMopac2Request() {
+		var extended = standardHeader();
+		var combo = document.getElementById("selectedevaluator2");
+		var evaluator = combo.options[combo.selectedIndex].value;
+		extended['votingevaluator'] = { [evaluator]: {} };
+		return JSON.stringify({"MOPAC2Settings": extended });
 	}
 	
@@ -596,5 +619,9 @@
 			deadline["deadlinerounds"] = {"rounds": value, "durationms":10000};
 		}
-		return  { "participants": partyprofiles, "deadline":deadline }
+		var parties=[];
+		for (let i=0; i< partyprofiles.length; i++) {
+			parties.push( {"TeamInfo":{"parties": [ partyprofiles[i] ] }} );
+		}
+		return  { "participants": parties, "deadline":deadline }
 	}
 	
@@ -617,9 +644,6 @@
 		var parties=[];
 		for (let i=0; i< partyprofiles.length; i++) {
-			var group={};
-			group['shaop'] = partyprofiles[i];
-			group['cob'] = cobpartyprofiles[i];
-			
-			parties.push(group);
+			var team=[ partyprofiles[i] , cobpartyprofiles[i]  ];
+			parties.push( {"TeamInfo":{"parties":  team }} );
 		}
 		return JSON.stringify({"SHAOPSettings": { "participants": parties, "deadline":deadline }});
@@ -632,6 +656,6 @@
 	function init() {
 		selectProtocol();
-		document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.5.8"
-		document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.5.8"
+		document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.5.9"
+		document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.5.9"
 		connectDomain();
 		connectParties();
Index: /src/main/webapp/newtournament.xhtml
===================================================================
--- /src/main/webapp/newtournament.xhtml	(revision 25)
+++ /src/main/webapp/newtournament.xhtml	(revision 26)
@@ -37,4 +37,5 @@
 			<option value="SAOP">SAOP</option>
 			<option value="MOPAC">MOPAC</option>
+			<option value="MOPAC2">MOPAC2</option>
 			<option value="AMOP">AMOP</option>
 			<option value="SHAOP">SHAOP</option>
@@ -51,5 +52,10 @@
 		</div>
 
-
+		<div id="votingevaluator2">
+			<br /> Voting Evaluator: <select id="selectedevaluator2">
+				<option value="LargestAgreementWithValue">Largest Agreement with Value</option>
+			</select>
+		</div>
+		
 		<br /> Deadline: <input type="number" id="deadlinevalue"
 			name="deadline" min="1" max="10000" value="10" /> <select
@@ -204,4 +210,7 @@
         	
         	document.getElementById("votingevaluator").style.display=(protocol=="MOPAC" ? 'block': 'none');
+        	
+        	document.getElementById("votingevaluator2").style.display=(protocol=="MOPAC2" ? 'block': 'none');
+
     }
     
@@ -558,5 +567,10 @@
 			settingvalues['votingevaluator'] = { [evaluator]: {} };
 		} 
-			
+		if (protocol=="MOPAC2") {
+			var combo = document.getElementById("selectedevaluator2");
+			var evaluator = combo.options[combo.selectedIndex].value;
+			settingvalues['votingevaluator'] = { [evaluator]: {} };
+		} 
+
 		const sessionSettings = { [header]:settingvalues};
 
@@ -585,6 +599,6 @@
 	*/
 	function init() {
-		document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.5.8";
-		document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.5.8";
+		document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.5.9";
+		document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.5.9";
 
 		selectProtocol();
Index: /src/main/webapp/utilstable.xhtml
===================================================================
--- /src/main/webapp/utilstable.xhtml	(revision 25)
+++ /src/main/webapp/utilstable.xhtml	(revision 26)
@@ -212,8 +212,10 @@
 
        /**
+       Add rows for all the bids in the result. Notice that some protocols allow multiple bids to be accepted per session.
        @param table the table to add the bid results to
        @param nr the session number
-       @param results the results for this sess
-       Add rows for all the bids 
+       @param results the results for this sess. This is a dict with key: partyid (eg "party83+127_0_1_1)
+       and the value the accepted issuevalues (the bid contents). Parties that did not reach an agreement
+       are not in the list.
        */
        function fillBids(table, nr, result) {
@@ -221,13 +223,19 @@
 			var agreements = result['agreements'];
 			
-			if (Object.keys(agreements).length == 0)  {
-				fillRow(table.insertRow(-1), nr, result, {});
-				return;
-			}
-				
+			//if (Object.keys(agreements).length == 0)  {
+			//	fillRow(table.insertRow(-1), nr, result, {});
+			//	return;
+			//}
+
+			// collect all bids, plus "null" if there are parties without agreements.
 			var bids = [];
-			for (const pid in agreements)  {
-				bids=addSet(bids, agreements[pid]['issuevalues']);
-			}
+        	const participants = result['participants'];
+        	for (var pid in participants) {
+        		if (pid in agreements) {
+    				bids=addSet(bids, agreements[pid]['issuevalues']);
+        		} else {
+        			bids=addSet(bids, null)
+        		}
+        	}
 	
 			var dealnr='A'.charCodeAt(0);
@@ -245,5 +253,6 @@
         @param result a single json result from the APP results section. 
         Contains participants, agreements and error
-        @param agreedbid the bid to show in this row. If {}, no agreement was reached.
+        @param agreedbid the bid to show in this row. dict, with hte issuevalues from the bid. 
+        If null, this should show parties that did not reach an agreement.
         */
         function fillRow(row, nr, result, agreedbid) {
@@ -257,10 +266,11 @@
         		}
         		row.insertCell(-1).innerHTML=errstr;
-        		return;
-        	}
-	
-        	// a dict, keys are party ids. 
-        	row.insertCell(-1).innerHTML = JSON.stringify(agreedbid);
-        	
+        	} else {
+				if (agreedbid==null) {
+		        	row.insertCell(-1).innerHTML = "No deal";
+				} else {
+		        	row.insertCell(-1).innerHTML = JSON.stringify(agreedbid);
+	        	}
+        	}
         	// fill in the columns. If SHAOP, only the even parties 
         	// FIXME this can't be with a MAP
@@ -278,6 +288,7 @@
         		// we set bid to agreedbid only if party accepted agreedbid.
          		var bid = {};
-        		if (pid in result['agreements'] && deepEqual(agreedbid, result['agreements'][pid]['issuevalues'] ) )
-        				bid = agreedbid;
+        		if (pid in result['agreements'] && agreedbid!=null && 
+        				deepEqual(agreedbid, result['agreements'][pid]['issuevalues'] ) )
+       				bid = agreedbid;
          		addUtilityCell(row.insertCell(-1), bid, partyname, profile, penalty);
         	}
@@ -397,4 +408,8 @@
         */
        function deepEqual(object1, object2) {
+        	if (object1==null) {
+        		return object2==null;
+        	}
+        	if (object2==null) return false;
     	   const keys1 = Object.keys(object1);
     	   const keys2 = Object.keys(object2);
