Index: profile/pom.xml
===================================================================
--- profile/pom.xml	(revision 7)
+++ profile/pom.xml	(revision 9)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>profile</artifactId>
-	<version>1.0.0</version>
+	<version>1.1.0</version>
 	<packaging>jar</packaging>
 
@@ -16,5 +16,5 @@
 		<basedir>.</basedir>
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
-		<jackson-2-version>2.9.6</jackson-2-version>
+		<jackson-2-version>2.9.10</jackson-2-version>
 	</properties>
 
@@ -31,10 +31,10 @@
 			<groupId>geniusweb</groupId>
 			<artifactId>issuevalue</artifactId>
-			<version>1.0.0</version>
+			<version>1.1.0</version>
 		</dependency>
 		<dependency>
 			<groupId>geniusweb</groupId>
 			<artifactId>references</artifactId>
-			<version>1.0.0</version>
+			<version>1.1.0</version>
 		</dependency>
 
Index: profile/src/main/java/geniusweb/profile/Profile.java
===================================================================
--- profile/src/main/java/geniusweb/profile/Profile.java	(revision 7)
+++ profile/src/main/java/geniusweb/profile/Profile.java	(revision 9)
@@ -7,4 +7,5 @@
 import geniusweb.issuevalue.Domain;
 import geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace;
+import geniusweb.profile.utilityspace.SumOfGroupsUtilitySpace;
 
 /**
@@ -17,5 +18,6 @@
 @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT)
 @JsonSubTypes({ @JsonSubTypes.Type(value = LinearAdditiveUtilitySpace.class),
-		@JsonSubTypes.Type(value = DefaultPartialOrdering.class) })
+		@JsonSubTypes.Type(value = DefaultPartialOrdering.class),
+		@JsonSubTypes.Type(value = SumOfGroupsUtilitySpace.class) })
 public interface Profile {
 
@@ -33,8 +35,9 @@
 	/**
 	 * 
-	 * @return a (hypothetical) bid that is the best alternative to a non-agreement.
-	 *         Only bids that are {@link #isPreferredOrEqual(Bid, Bid)} should be
-	 *         accepted. If a negotiation does not reach an agreement, the party can
-	 *         get this offer somewhere else. This replaces the older notion of a
+	 * @return a (hypothetical) bid that is the best alternative to a
+	 *         non-agreement. Only bids that are
+	 *         {@link #isPreferredOrEqual(Bid, Bid)} should be accepted. If a
+	 *         negotiation does not reach an agreement, the party can get this
+	 *         offer somewhere else. This replaces the older notion of a
 	 *         "reservation value" and is more general. If null, there is no
 	 *         reservation bid and any agreement is better than no agreement.
Index: profile/src/main/java/geniusweb/profile/utilityspace/DiscreteValueSetUtilities.java
===================================================================
--- profile/src/main/java/geniusweb/profile/utilityspace/DiscreteValueSetUtilities.java	(revision 7)
+++ profile/src/main/java/geniusweb/profile/utilityspace/DiscreteValueSetUtilities.java	(revision 9)
@@ -8,4 +8,5 @@
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
+import com.fasterxml.jackson.annotation.JsonTypeName;
 
 import geniusweb.issuevalue.DiscreteValue;
@@ -13,6 +14,4 @@
 import geniusweb.issuevalue.Value;
 import geniusweb.issuevalue.ValueSet;
-
-import com.fasterxml.jackson.annotation.JsonTypeName;
 
 /**
@@ -37,19 +36,23 @@
 	 * create new object based on the given mapping from values to utilities.
 	 * 
-	 * @param valueUtils map with key {@link DiscreteValue}s and value a Double in
-	 *                   the range [0,1].
+	 * @param valueUtils map with key {@link DiscreteValue}s and value a Double
+	 *                   in the range [0,1].
 	 * @throws NullPointerException     if one of the args is null
 	 * @throws IllegalArgumentException if values are not in range [0,1].
 	 */
-	public DiscreteValueSetUtilities(Map<DiscreteValue, BigDecimal> valueUtils) {
+	public DiscreteValueSetUtilities(
+			Map<DiscreteValue, BigDecimal> valueUtils) {
 		if (valueUtils == null) {
 			throw new NullPointerException("valueUtils==null");
 		}
 		if (valueUtils.keySet().contains(null)) {
-			throw new NullPointerException("one of the keys in valueUtils is null");
+			throw new NullPointerException(
+					"one of the keys in valueUtils is null");
 		}
 		if (valueUtils.values().stream()
-				.anyMatch(v -> v == null || v.compareTo(BigDecimal.ZERO) < 0 || v.compareTo(BigDecimal.ONE) > 0)) {
-			throw new IllegalArgumentException("Weights in valueUtils must all be in [0,1]");
+				.anyMatch(v -> v == null || v.compareTo(BigDecimal.ZERO) < 0
+						|| v.compareTo(BigDecimal.ONE) > 0)) {
+			throw new IllegalArgumentException(
+					"Weights in valueUtils must all be in [0,1]");
 		}
 		this.valueUtilities.putAll(valueUtils);
@@ -68,9 +71,12 @@
 	public String isFitting(ValueSet valueset) {
 		if (!(valueset instanceof DiscreteValueSet)) {
-			return "The utilities are for a discrete valueset but the given values are " + valueset;
+			return "The utilities are for a discrete valueset but the given values are "
+					+ valueset;
 		}
 		DiscreteValueSet discvalueset = (DiscreteValueSet) valueset;
-		if (!valueUtilities.keySet().equals(new HashSet<>(discvalueset.getValues())))
-			return "The values in the set " + valueset + " do not match the values mapped to utilities "
+		if (!valueUtilities.keySet()
+				.equals(new HashSet<>(discvalueset.getValues())))
+			return "The values in the set " + valueset
+					+ " do not match the values mapped to utilities "
 					+ valueUtilities.keySet();
 		return null;
@@ -79,5 +85,5 @@
 	@Override
 	public String toString() {
-		return "ValueSetUtilities" + valueUtilities;
+		return "DiscreteValueSetUtilities" + valueUtilities;
 	}
 
@@ -86,5 +92,6 @@
 		final int prime = 31;
 		int result = 1;
-		result = prime * result + ((valueUtilities == null) ? 0 : valueUtilities.hashCode());
+		result = prime * result
+				+ ((valueUtilities == null) ? 0 : valueUtilities.hashCode());
 		return result;
 	}
Index: profile/src/main/java/geniusweb/profile/utilityspace/NumberValueSetUtilities.java
===================================================================
--- profile/src/main/java/geniusweb/profile/utilityspace/NumberValueSetUtilities.java	(revision 7)
+++ profile/src/main/java/geniusweb/profile/utilityspace/NumberValueSetUtilities.java	(revision 9)
@@ -139,5 +139,5 @@
 	@Override
 	public String toString() {
-		return "NumberValUtility(" + lowValue + "->" + lowUtility + ","
+		return "NumberValueSetUtilities(" + lowValue + "->" + lowUtility + ","
 				+ highValue + "->" + highUtility + ")";
 	}
Index: profile/src/main/java/geniusweb/profile/utilityspace/PartsUtilities.java
===================================================================
--- profile/src/main/java/geniusweb/profile/utilityspace/PartsUtilities.java	(revision 9)
+++ profile/src/main/java/geniusweb/profile/utilityspace/PartsUtilities.java	(revision 9)
@@ -0,0 +1,244 @@
+package geniusweb.profile.utilityspace;
+
+import java.math.BigDecimal;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+import geniusweb.issuevalue.Value;
+import geniusweb.issuevalue.ValueSet;
+
+/**
+ * Contains utilities of a ProductOfValue of a {@link SumOfGroupsUtilitySpace}.
+ * So this is similar to a DiscreteValueSetUtilities but instead of issues this
+ * contains an (ordered) list of issues. This object serializes to something
+ * like <code> 
+ * {"partsutils":
+ * {"issues":["issue1","issue2"],
+ * "utilslist":[{"values":["low","low"],"util":0.3},{"values":["high","high"],"util":0.9}]}}
+ </code> The issues field contains a list of N issues in the domain, The
+ * utilslist contains a list of dictionaries, with "values" containing a list of
+ * N issue values, in the same order as the issues list and with "util"
+ * containng the utility value of that set of values.
+ * <p>
+ */
+@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE)
+@JsonTypeName("partsutils")
+public class PartsUtilities implements ValueSetUtilities {
+	private final List<String> issues;
+	// the real but not-serializable values (because Map can only have String
+	// keys in jackson)
+	private transient final Map<ProductOfValue, BigDecimal> utilities = new HashMap<>();
+	// copy only for serializing
+	private final List<PartUtil> utilslist = new LinkedList<>();
+
+	/**
+	 * 
+	 * @param issues
+	 * @param utils  with keys: list of values and value: utility value for that
+	 *               list of values. All list-of-values missing from the map are
+	 *               assumed to have utility 0. This includes partial bids where
+	 *               list-of-values contain null objects.
+	 */
+	public PartsUtilities(List<String> issues,
+			Map<ProductOfValue, BigDecimal> utils) {
+		if (issues == null || utils == null) {
+			throw new IllegalArgumentException(
+					"issues and utils must be not null");
+		}
+
+		this.issues = issues;
+		this.utilities.putAll(utils);
+
+		checkUtilities();
+		for (ProductOfValue pval : utils.keySet()) {
+			utilslist.add(new PartUtil(pval.getValues(), utils.get(pval)));
+		}
+	}
+
+	@JsonCreator
+	public PartsUtilities(@JsonProperty("issues") List<String> issues,
+			@JsonProperty("utilslist") List<PartUtil> utilslist) {
+		this(issues, list2map(utilslist));
+	}
+
+	/**
+	 * 
+	 * @param pval the {@link ProductOfValue} value
+	 * @return the utility of the value, in the same order as
+	 *         {@link #getIssues()}. Returns 0 if there is no utility set for
+	 *         the given combination of values. Notice, partial bids will
+	 *         usually have utility 0.
+	 * 
+	 */
+	@Override
+	public BigDecimal getUtility(Value pval) {
+		BigDecimal val = utilities.get(pval);
+		if (val == null)
+			return BigDecimal.ZERO;
+		return val;
+	}
+
+	@Override
+	public String isFitting(ValueSet valueset) {
+		return null; // what can we tests here?
+	}
+
+	/**
+	 * @return the issues that are contained here.
+	 */
+	public List<String> getIssues() {
+		return issues;
+	}
+
+	/**
+	 * 
+	 * @return map with all available values and their utilities. The map and
+	 *         its contents should all be immutable.
+	 */
+	public Map<ProductOfValue, BigDecimal> getUtilities() {
+		return Collections.unmodifiableMap(utilities);
+	}
+
+	/**
+	 * 
+	 * @param other another {@link PartsUtilities} map. The issues in the other
+	 *              map must be different from {@link #issues}.
+	 * @return new PartsUtils, with the powermap of all combinations of one
+	 *         element from this and one from the other map, and with the
+	 *         utilities computed as the sum of thisvalue + othervalue.
+	 */
+	public PartsUtilities add(PartsUtilities other) {
+		for (String issue : issues) {
+			if (other.issues.contains(issue)) {
+				throw new IllegalArgumentException(
+						"Issue " + issue + " exists already");
+			}
+		}
+
+		List<String> combinedissues = new LinkedList<String>(issues);
+		combinedissues.addAll(other.issues);
+
+		Map<ProductOfValue, BigDecimal> combinedvalues = new HashMap<>();
+		for (ProductOfValue productOfValue : this.utilities.keySet()) {
+			for (ProductOfValue otherProductOfValue : other.utilities
+					.keySet()) {
+				BigDecimal combinedutil = getUtility(productOfValue)
+						.add(other.getUtility(otherProductOfValue));
+				combinedvalues.put(productOfValue.merge(otherProductOfValue),
+						combinedutil);
+			}
+		}
+		return new PartsUtilities(combinedissues, combinedvalues);
+
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((issues == null) ? 0 : issues.hashCode());
+		result = prime * result
+				+ ((utilities == null) ? 0 : utilities.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		PartsUtilities other = (PartsUtilities) obj;
+		if (issues == null) {
+			if (other.issues != null)
+				return false;
+		} else if (!issues.equals(other.issues))
+			return false;
+		if (utilities == null) {
+			if (other.utilities != null)
+				return false;
+		} else if (!utilities.equals(other.utilities))
+			return false;
+		return true;
+	}
+
+	@Override
+	public String toString() {
+		return "PartsUtilities[" + issues + "," + utilities + "]";
+	}
+
+	private void checkUtilities() {
+		if (utilities.values().stream()
+				.anyMatch(v -> v == null || v.compareTo(BigDecimal.ZERO) < 0
+						|| v.compareTo(BigDecimal.ONE) > 0)) {
+			throw new IllegalArgumentException(
+					"part weights must all be in [0,1]");
+		}
+	}
+
+	private static Map<ProductOfValue, BigDecimal> list2map(
+			List<PartUtil> list) {
+		Map<ProductOfValue, BigDecimal> map = new HashMap<>();
+		for (PartUtil partutil : list) {
+			map.put(new ProductOfValue(partutil.getValues()),
+					partutil.getUtil());
+		}
+		return map;
+	}
+
+	/**
+	 * 
+	 * @return the max utility of all values contained here.
+	 */
+	public BigDecimal getMaxUtility() {
+		BigDecimal maxutil = BigDecimal.ZERO;
+		for (ProductOfValue vakye : utilities.keySet()) {
+			if (utilities.get(vakye).compareTo(maxutil) > 0) {
+				maxutil = utilities.get(vakye);
+			}
+
+		}
+		return maxutil;
+	}
+
+}
+
+/**
+ * contains list of values, and the utility for this combi of values. The values
+ * make only sense with a corresponding list of issues, but that is managed in
+ * (see {@link PartsUtilities}.
+ * <p>
+ * immutable.
+ */
+@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE)
+class PartUtil {
+	private final List<Value> values;
+
+	private final BigDecimal util;
+
+	@JsonCreator
+	public PartUtil(@JsonProperty("values") List<Value> values,
+			@JsonProperty("util") BigDecimal util) {
+		this.values = values;
+		this.util = util;
+	}
+
+	public List<Value> getValues() {
+		return values;
+	}
+
+	public BigDecimal getUtil() {
+		return util;
+	}
+}
Index: profile/src/main/java/geniusweb/profile/utilityspace/ProductOfValue.java
===================================================================
--- profile/src/main/java/geniusweb/profile/utilityspace/ProductOfValue.java	(revision 9)
+++ profile/src/main/java/geniusweb/profile/utilityspace/ProductOfValue.java	(revision 9)
@@ -0,0 +1,75 @@
+package geniusweb.profile.utilityspace;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import geniusweb.issuevalue.Value;
+
+/**
+ * A {@link Value} that is the product of some existing values
+ */
+@JsonDeserialize(using = JsonDeserializer.None.class)
+public class ProductOfValue implements Value {
+	private final List<Value> values = new ArrayList<Value>();
+
+	/**
+	 * @param values the values to make a product of
+	 */
+	@JsonCreator
+	public ProductOfValue(List<Value> newvals) {
+		values.addAll(newvals);
+	}
+
+	@JsonValue
+	public List<Value> getValues() {
+		return values;
+	}
+
+	@Override
+	public String toString() {
+		return values.toString();
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((values == null) ? 0 : values.hashCode());
+		return result;
+	}
+
+	/**
+	 * 
+	 * @param other a {@link ProductOfValue} with more issues to be merged into
+	 *              this.
+	 * @return new ProductOfValue that contains this and other values.
+	 */
+	public ProductOfValue merge(ProductOfValue other) {
+		List<Value> newvalues = new ArrayList<Value>(values);
+		newvalues.addAll(other.getValues());
+		return new ProductOfValue(newvalues);
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		ProductOfValue other = (ProductOfValue) obj;
+		if (values == null) {
+			if (other.values != null)
+				return false;
+		} else if (!values.equals(other.values))
+			return false;
+		return true;
+	}
+
+}
Index: profile/src/main/java/geniusweb/profile/utilityspace/SumOfGroupsUtilitySpace.java
===================================================================
--- profile/src/main/java/geniusweb/profile/utilityspace/SumOfGroupsUtilitySpace.java	(revision 9)
+++ profile/src/main/java/geniusweb/profile/utilityspace/SumOfGroupsUtilitySpace.java	(revision 9)
@@ -0,0 +1,279 @@
+package geniusweb.profile.utilityspace;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import geniusweb.issuevalue.Bid;
+import geniusweb.issuevalue.Domain;
+import geniusweb.issuevalue.NumberValueSet;
+import geniusweb.issuevalue.Value;
+import geniusweb.profile.DefaultProfile;
+
+/**
+ * This is a utility space that defines the utility of bids as a sum of the
+ * utilities of a number of subsets, or groups, of the issue values.
+ * <p>
+ * A group defines the utility of a non-empty subset of the issues in the
+ * domain. The parts are non-overlapping. Missing issue values have utility 0.
+ * <p>
+ * This space enables handling {@link UtilitySpace}s that are not simply linear
+ * additive, but with interacting issue values. For example, if you would like
+ * to have a car with good speakers but only if there is also a good hifi set,
+ * you can make a part that has {@link PartsUtilities} like
+ * <code> { { speakers:yes, hifi:yes }:1, {speakers, no: hifh:yes}:0.2, ...} </code>
+ * <p>
+ * NOTICE this space is completely discrete. There is no equivalent of the
+ * {@link NumberValueSet} here.
+ */
+@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE)
+public class SumOfGroupsUtilitySpace extends DefaultProfile
+		implements UtilitySpace {
+	/**
+	 * the key is the part name, the value is the valuesetutilities for this
+	 * issue. Should be immutable so do not return direct access to this field.
+	 */
+	private final HashMap<String, PartsUtilities> partUtilities = new HashMap<>();
+
+	/**
+	 * @param domain  the {@link Domain} in which this profile is defined.
+	 * @param name    the name of this profile. Must be simple name (a-Z, 0-9)
+	 * @param utils   a map with key: part names (String) and value: the
+	 *                {@link PartsUtilities} for that part. There MUST NOT be a
+	 *                null part name. All values MUST NOT be null. The
+	 *                PartsUtilities must match the
+	 * @param weights the weight of each part, for the computation of the
+	 *                weighted sum. The parts must be the same as those in the
+	 *                utils map. All weights MUST NOT be null. The weights MUST
+	 *                sum to 1.
+	 * @param resBid  the reservation bid. Only bids that are
+	 *                {@link #isPreferredOrEqual(Bid, Bid)} should be accepted.
+	 *                Can be null, meaning that there is no reservation bid and
+	 *                any agreement is better than no agreement.
+	 * @throws NullPointerException     if values are incorrectly null.
+	 * @throws IllegalArgumentException if preconditions not met.
+	 */
+	@JsonCreator
+	public SumOfGroupsUtilitySpace(@JsonProperty("domain") Domain domain,
+			@JsonProperty("name") String name,
+			@JsonProperty("partUtilities") HashMap<String, PartsUtilities> partutils,
+			// @JsonProperty("partWeights") Map<String, BigDecimal> weights,
+			@JsonProperty("reservationBid") Bid resBid) {
+		super(name, domain, resBid);
+		this.partUtilities.putAll(partutils);
+
+		String err = checkParts();
+		if (err != null) {
+			throw new IllegalArgumentException(err);
+		}
+	}
+
+	/**
+	 * Copy settings in las. This will have the exact same utilities as the las
+	 * but this then gives you the power to change it into a non-linear space by
+	 * grouping.
+	 * 
+	 * @param las the {@link LinearAdditiveUtilitySpace} to be converted/copied.
+	 * 
+	 */
+	public SumOfGroupsUtilitySpace(LinearAdditiveUtilitySpace las) {
+		this(las.getDomain(), las.getName(), las2parts(las),
+				las.getReservationBid());
+	}
+
+	@Override
+	public BigDecimal getUtility(Bid bid) {
+		return partUtilities.keySet().stream()
+				.map(partname -> util(partname, bid))
+				.reduce(BigDecimal.ZERO, BigDecimal::add);
+	}
+
+	@Override
+	public String toString() {
+		return "PartialAdditive[" + partUtilities + "," + getReservationBid()
+				+ "]";
+	}
+
+	/**
+	 * 
+	 * @param partnames   the partnames to remove from this. There must be at
+	 *                    least 2 parts
+	 * @param newpartname the name of the new part that contains all partnames,
+	 *                    grouped into 1 "issue". This name must not be an issue
+	 *                    in this.
+	 * @return new {@link SumOfGroupsUtilitySpace} that takes all partnames out
+	 *         of this, and makes a newaprtname that contains these.
+	 */
+	public SumOfGroupsUtilitySpace group(List<String> partnames,
+			String newpartname) {
+		final Set<String> allpartnames = partUtilities.keySet();
+
+		if (partnames.size() < 2) {
+			throw new IllegalArgumentException(
+					"Group must contain at least 2 parts");
+		}
+		if (allpartnames.contains(newpartname)) {
+			throw new IllegalArgumentException(
+					"newpartname " + newpartname + " is already in use");
+		}
+		for (String name : partnames) {
+			if (!allpartnames.contains(name)) {
+				throw new IllegalArgumentException("Unknown part name " + name);
+			}
+		}
+
+		HashMap<String, PartsUtilities> newutils = new HashMap<String, PartsUtilities>();
+
+		PartsUtilities newpartutils = null;
+
+		for (String name : partUtilities.keySet()) {
+			if (partnames.contains(name)) {
+				if (newpartutils == null) {
+					newpartutils = partUtilities.get(name);
+				} else {
+					newpartutils = newpartutils.add(partUtilities.get(name));
+				}
+			} else {
+				newutils.put(name, partUtilities.get(name));
+			}
+		}
+		newutils.put(newpartname, newpartutils);
+
+		return new SumOfGroupsUtilitySpace(getDomain(), getName(), newutils,
+				getReservationBid());
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = super.hashCode();
+		result = prime * result
+				+ ((partUtilities == null) ? 0 : partUtilities.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (!super.equals(obj))
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		SumOfGroupsUtilitySpace other = (SumOfGroupsUtilitySpace) obj;
+		if (partUtilities == null) {
+			if (other.partUtilities != null)
+				return false;
+		} else if (!partUtilities.equals(other.partUtilities))
+			return false;
+		return true;
+	}
+
+	/***************************** private funcs ***************************/
+	/**
+	 * 
+	 * @param partname the name of the part to get the utility of
+	 * @param bid      the bid
+	 * @return weighted util of just the part: utilities[part].getUtility(part
+	 *         of bid)
+	 */
+	private BigDecimal util(String partname, Bid bid) {
+		PartsUtilities partutils = partUtilities.get(partname);
+		ProductOfValue value = collectValues(bid, partutils);
+		return partutils.getUtility(value);
+	}
+
+	/**
+	 * 
+	 * @param bid       a full bid
+	 * @param partutils the part utils for which a list of values from the bid
+	 *                  is needed
+	 * @return a list of values from the given bid, ordered as indicated in
+	 *         partutils
+	 */
+	private ProductOfValue collectValues(Bid bid, PartsUtilities partutils) {
+		List<Value> values = new LinkedList<>();
+		for (String issue : partutils.getIssues()) {
+			values.add(bid.getValue(issue));
+		}
+		return new ProductOfValue(values);
+	}
+
+	/**
+	 * 
+	 * @param las a {@link LinearAdditiveUtilitySpace}
+	 * @return a Map with partname-PartsUtilities. The partnames are identical
+	 *         to the issues in the given las.
+	 */
+	private static HashMap<String, PartsUtilities> las2parts(
+			LinearAdditiveUtilitySpace las) {
+
+		HashMap<String, PartsUtilities> map = new HashMap<>();
+		for (String issue : las.getUtilities().keySet()) {
+			ValueSetUtilities valset = las.getUtilities().get(issue);
+			Map<ProductOfValue, BigDecimal> utilslist = new HashMap<>();
+			BigDecimal weight = las.getWeight(issue);
+			for (Value val : las.getDomain().getValues(issue)) {
+				BigDecimal util = valset.getUtility(val).multiply(weight);
+				if (BigDecimal.ZERO.compareTo(util) != 0) {
+					utilslist.put(new ProductOfValue(Arrays.asList(val)), util);
+				}
+			}
+			map.put(issue, new PartsUtilities(Arrays.asList(issue), utilslist));
+		}
+		return map;
+	}
+
+	/**
+	 * 
+	 * @return error string, or null if no error (all parts seem fine)
+	 */
+	private String checkParts() {
+
+		Set<String> collectedIssues = new HashSet<>();
+		for (String partname : partUtilities.keySet()) {
+			PartsUtilities part = partUtilities.get(partname);
+			if (part == null) {
+				return "partUtilities " + partname + " contains null value";
+			}
+			List<String> issues = part.getIssues();
+			HashSet<String> intersection = new HashSet<String>(collectedIssues);
+			intersection.retainAll(issues);
+			if (!intersection.isEmpty()) {
+				return "issues " + intersection + " occur multiple times";
+			}
+			collectedIssues.addAll(issues);
+		}
+
+		if (!collectedIssues.equals(getDomain().getIssues())) {
+			return "parts must cover the domain issues "
+					+ getDomain().getIssues() + " but cover " + collectedIssues;
+		}
+		if (getMaxUtility().compareTo(BigDecimal.ONE) > 0) {
+			return "Max utility of the space exceedds 1";
+		}
+		return null;
+
+	}
+
+	/**
+	 * 
+	 * @return the max possible utility in this utility space.
+	 */
+	private BigDecimal getMaxUtility() {
+		return partUtilities.values().stream()
+				.map(partutils -> partutils.getMaxUtility())
+				.reduce(BigDecimal.ZERO, BigDecimal::add);
+	}
+
+}
Index: profile/src/test/java/geniusweb/profile/utilityspace/DiscreteValueSetUtilitiesTest.java
===================================================================
--- profile/src/test/java/geniusweb/profile/utilityspace/DiscreteValueSetUtilitiesTest.java	(revision 7)
+++ profile/src/test/java/geniusweb/profile/utilityspace/DiscreteValueSetUtilitiesTest.java	(revision 9)
@@ -3,4 +3,5 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
@@ -81,8 +82,8 @@
 	@Override
 	public List<String> getGeneralTestStrings() {
-		return Arrays.asList("ValueSetUtilities\\{\"a\"=0.14\\}",
-				"ValueSetUtilities\\{\"b\"=0.37\\}",
-				"ValueSetUtilities\\{\"a\"=0.37\\}",
-				"ValueSetUtilities\\{\"a\"=0.14, \"b\"=0.37\\}");
+		return Arrays.asList("DiscreteValueSetUtilities\\{\"a\"=0.14\\}",
+				"DiscreteValueSetUtilities\\{\"b\"=0.37\\}",
+				"DiscreteValueSetUtilities\\{\"a\"=0.37\\}",
+				"DiscreteValueSetUtilities\\{\"a\"=0.14, \"b\"=0.37\\}");
 	}
 
@@ -200,3 +201,17 @@
 
 	}
+
+	@Test
+	public void testDeserializeAsDiscrete()
+			throws JsonParseException, JsonMappingException, IOException {
+		// Check that DiscreteValueSetUtilities properly deserializes
+		// discreteutils.
+		String utilstring = "{\"discreteutils\": {\"valueUtilities\": {\"Party Tent\": 0.52,\"Your Dorm\": 0.23,\"Party Room\": 0.99,\"Ballroom\": 0.77}}}";
+		DiscreteValueSetUtilities valueutils = jackson.readValue(utilstring,
+				DiscreteValueSetUtilities.class);
+		assertTrue(new BigDecimal("0.23").compareTo(
+				valueutils.getUtility(new DiscreteValue("Your Dorm"))) == 0);
+
+	}
+
 }
Index: profile/src/test/java/geniusweb/profile/utilityspace/LinearAdditiveTest.java
===================================================================
--- profile/src/test/java/geniusweb/profile/utilityspace/LinearAdditiveTest.java	(revision 7)
+++ profile/src/test/java/geniusweb/profile/utilityspace/LinearAdditiveTest.java	(revision 9)
@@ -20,5 +20,4 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.exc.InvalidDefinitionException;
 
 import geniusweb.issuevalue.Bid;
@@ -145,8 +144,8 @@
 	public List<String> getGeneralTestStrings() {
 		return Arrays.asList(
-				"LinearAdditive\\[\\{issue2=ValueSetUtilities\\{\"issue2value2\"=0.8, \"issue2value1\"=0.6\\}, issue1=ValueSetUtilities\\{\"issue1value1\"=0.3, \"issue1value2\"=0.2\\}\\},\\{issue2=0.6, issue1=0.4\\},Bid\\{issue2=\"issue2value1\", issue1=\"issue1value2\"\\}\\]",
-				"LinearAdditive\\[\\{issue2=ValueSetUtilities\\{\"issue2value2\"=0.8, \"issue2value1\"=0.6\\}, issue1=ValueSetUtilities\\{\"issue1value1\"=0.3, \"issue1value2\"=0.2\\}\\},\\{issue2=0.7, issue1=0.3\\},Bid\\{issue2=\"issue2value1\", issue1=\"issue1value2\"\\}\\]",
-				"LinearAdditive\\[\\{issue2=ValueSetUtilities\\{\"issue2value2\"=0.2, \"issue2value1\"=0.3\\}, issue1=ValueSetUtilities\\{\"issue1value1\"=0.6, \"issue1value2\"=0.8\\}\\},\\{issue2=0.6, issue1=0.4\\},Bid\\{issue2=\"issue2value1\", issue1=\"issue1value2\"\\}\\]",
-				"LinearAdditive\\[\\{issue2=ValueSetUtilities\\{\"issue2value2\"=0.2, \"issue2value1\"=0.3\\}, issue1=ValueSetUtilities\\{\"issue1value1\"=0.6, \"issue1value2\"=0.8\\}\\},\\{issue2=0.6, issue1=0.4\\},Bid\\{issue2=\"issue2value1\", issue1=\"issue1value1\"\\}\\]");
+				"LinearAdditive\\[\\{issue2=DiscreteValueSetUtilities\\{\"issue2value2\"=0.8, \"issue2value1\"=0.6\\}, issue1=DiscreteValueSetUtilities\\{\"issue1value1\"=0.3, \"issue1value2\"=0.2\\}\\},\\{issue2=0.6, issue1=0.4\\},Bid\\{issue2=\"issue2value1\", issue1=\"issue1value2\"\\}\\]",
+				"LinearAdditive\\[\\{issue2=DiscreteValueSetUtilities\\{\"issue2value2\"=0.8, \"issue2value1\"=0.6\\}, issue1=DiscreteValueSetUtilities\\{\"issue1value1\"=0.3, \"issue1value2\"=0.2\\}\\},\\{issue2=0.7, issue1=0.3\\},Bid\\{issue2=\"issue2value1\", issue1=\"issue1value2\"\\}\\]",
+				"LinearAdditive\\[\\{issue2=DiscreteValueSetUtilities\\{\"issue2value2\"=0.2, \"issue2value1\"=0.3\\}, issue1=DiscreteValueSetUtilities\\{\"issue1value1\"=0.6, \"issue1value2\"=0.8\\}\\},\\{issue2=0.6, issue1=0.4\\},Bid\\{issue2=\"issue2value1\", issue1=\"issue1value2\"\\}\\]",
+				"LinearAdditive\\[\\{issue2=DiscreteValueSetUtilities\\{\"issue2value2\"=0.2, \"issue2value1\"=0.3\\}, issue1=DiscreteValueSetUtilities\\{\"issue1value1\"=0.6, \"issue1value2\"=0.8\\}\\},\\{issue2=0.6, issue1=0.4\\},Bid\\{issue2=\"issue2value1\", issue1=\"issue1value1\"\\}\\]");
 	}
 
@@ -271,5 +270,5 @@
 	}
 
-	@Test(expected = InvalidDefinitionException.class)
+	@Test
 	public void loadFullWithJson() throws IOException {
 		String profile = new String(
Index: profile/src/test/java/geniusweb/profile/utilityspace/NumberValueSetUtilTest.java
===================================================================
--- profile/src/test/java/geniusweb/profile/utilityspace/NumberValueSetUtilTest.java	(revision 7)
+++ profile/src/test/java/geniusweb/profile/utilityspace/NumberValueSetUtilTest.java	(revision 9)
@@ -44,7 +44,7 @@
 	@Override
 	public List<String> getGeneralTestStrings() {
-		return Arrays.asList("NumberValUtility\\(12.5->0.5,18.5->0.9\\)",
-				"NumberValUtility\\(12.5->0.6,18.5->0.9\\)",
-				"NumberValUtility\\(12.5->0.5,18.4->0.9\\)");
+		return Arrays.asList("NumberValueSetUtilities\\(12.5->0.5,18.5->0.9\\)",
+				"NumberValueSetUtilities\\(12.5->0.6,18.5->0.9\\)",
+				"NumberValueSetUtilities\\(12.5->0.5,18.4->0.9\\)");
 	}
 
Index: profile/src/test/java/geniusweb/profile/utilityspace/PartsUtilitiesTest.java
===================================================================
--- profile/src/test/java/geniusweb/profile/utilityspace/PartsUtilitiesTest.java	(revision 9)
+++ profile/src/test/java/geniusweb/profile/utilityspace/PartsUtilitiesTest.java	(revision 9)
@@ -0,0 +1,144 @@
+package geniusweb.profile.utilityspace;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import geniusweb.issuevalue.DiscreteValue;
+import geniusweb.issuevalue.Value;
+import tudelft.utilities.junit.GeneralTests;
+
+public class PartsUtilitiesTest extends GeneralTests<PartsUtilities> {
+	private static final String iss2 = "issue2";
+
+	private static final String iss1 = "issue1";
+
+	private final ObjectMapper jackson = new ObjectMapper();
+
+	private static BigDecimal N01 = new BigDecimal("0.1"),
+			N02 = new BigDecimal("0.2"), N03 = new BigDecimal("0.3"),
+			N05 = new BigDecimal("0.5"), N07 = new BigDecimal("0.7"),
+			N08 = new BigDecimal("0.8"), N09 = new BigDecimal("0.9");
+	private final static DiscreteValue low = new DiscreteValue("low");
+	private final static DiscreteValue high = new DiscreteValue("high");
+
+	private final static String jsontext = "{\"partsutils\":{\"issues\":[\"issue1\",\"issue2\"],\"utilslist\":[{\"values\":[\"low\",\"low\"],\"util\":0.3},{\"values\":[\"high\",\"high\"],\"util\":0.9}]}}";
+
+	private PartsUtilities parts1, parts1a, parts2, parts3;
+
+	@Before
+	public void before() {
+		List<PartUtil> vals = new LinkedList<>();
+		vals.add(new PartUtil(Arrays.asList(low, low), N03));
+		vals.add(new PartUtil(Arrays.asList(high, high), N09));
+		List<PartUtil> vals1 = new LinkedList<>();
+		vals1.add(new PartUtil(Arrays.asList(low, low), N09));
+		List<String> issues = Arrays.asList(iss1, iss2);
+		parts1 = new PartsUtilities(issues, vals);
+		parts1a = new PartsUtilities(issues, vals);
+		parts2 = new PartsUtilities(Arrays.asList(iss1), vals);
+		parts3 = new PartsUtilities(issues, vals1);
+	}
+
+	@Override
+	public List<List<PartsUtilities>> getGeneralTestData() {
+		return Arrays.asList(Arrays.asList(parts1, parts1a),
+				Arrays.asList(parts2), Arrays.asList(parts3));
+	}
+
+	@Override
+	public List<String> getGeneralTestStrings() {
+		return Arrays.asList(
+				"PartsUtilities..issue1, issue2.,\\{.\"low\", \"low\".=0.3, .\"high\", \"high\".=0.9\\}.",
+				"PartsUtilities..issue1.,\\{.\"low\", \"low\".=0.3, .\"high\", \"high\".=0.9\\}.",
+				"PartsUtilities..issue1, issue2.,\\{.\"low\", \"low\".=0.9\\}.");
+	}
+
+	@Test(expected = IllegalArgumentException.class)
+	public void testWeightsTooHigh() {
+		Map<ProductOfValue, BigDecimal> utils = new HashMap<>();
+		utils.put(new ProductOfValue(Arrays.asList(low, low)),
+				new BigDecimal("1.1"));
+		new PartsUtilities(Arrays.asList(iss1, iss2), utils);
+	}
+
+	@Test(expected = IllegalArgumentException.class)
+	public void testWeightsTooLow() {
+		Map<ProductOfValue, BigDecimal> utils = new HashMap<>();
+		utils.put(new ProductOfValue(Arrays.asList(low, low)),
+				new BigDecimal("-0.3"));
+		new PartsUtilities(Arrays.asList(iss1, iss2), utils);
+	}
+
+	@Test
+	public void testBasicSerialize()
+			throws JsonParseException, JsonMappingException, IOException {
+		System.out.println(jsontext);
+		assertEquals(jsontext, jackson.writeValueAsString(parts1));
+	}
+
+	@Test
+	public void testBasicDeserialize()
+			throws JsonParseException, JsonMappingException, IOException {
+		System.out.println(jsontext);
+		assertEquals(parts1, jackson.readValue(jsontext, PartsUtilities.class));
+	}
+
+	@Test
+	public void testGetUtility() {
+		assertEquals(N03,
+				parts1.getUtility(new ProductOfValue(Arrays.asList(low, low))));
+		assertEquals(N09, parts1
+				.getUtility(new ProductOfValue(Arrays.asList(high, high))));
+		assertEquals(BigDecimal.ZERO, parts1
+				.getUtility(new ProductOfValue(Arrays.asList(low, high))));
+	}
+
+	@Test
+	public void testGetIssues() {
+		assertEquals(Arrays.asList(iss1, iss2), parts1.getIssues());
+	}
+
+	@Test
+	public void testGetIncorrectValue() {
+		assertEquals(BigDecimal.ZERO, parts1.getUtility(low));
+	}
+
+	@Test
+	public void testGetValue() {
+		assertTrue(N03.compareTo(parts1
+				.getUtility(new ProductOfValue(Arrays.asList(low, low)))) == 0);
+	}
+
+	@Test
+	public void testMerge() {
+		Map<ProductOfValue, BigDecimal> extravals = new HashMap<>();
+		extravals.put(new ProductOfValue(Arrays.asList(low, low)),
+				N01.multiply(N05));
+		extravals.put(new ProductOfValue(Arrays.asList(high, high)),
+				N01.multiply(N07));
+		PartsUtilities extraparts = new PartsUtilities(
+				Arrays.asList("extra1", "extra2"), extravals);
+
+		PartsUtilities merged = parts1.add(extraparts);
+
+		Value pval = new ProductOfValue(Arrays.asList(low, low, high, high));
+		assertEquals(0,
+				N03.add(N01.multiply(N07)).compareTo(merged.getUtility(pval)));
+	}
+
+}
Index: profile/src/test/java/geniusweb/profile/utilityspace/ProductOfValueTest.java
===================================================================
--- profile/src/test/java/geniusweb/profile/utilityspace/ProductOfValueTest.java	(revision 9)
+++ profile/src/test/java/geniusweb/profile/utilityspace/ProductOfValueTest.java	(revision 9)
@@ -0,0 +1,78 @@
+package geniusweb.profile.utilityspace;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Test;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import geniusweb.issuevalue.DiscreteValue;
+import geniusweb.issuevalue.Value;
+import tudelft.utilities.junit.GeneralTests;
+
+public class ProductOfValueTest extends GeneralTests<ProductOfValue> {
+	private final static ObjectMapper jackson = new ObjectMapper();
+
+	private final static Value value1 = new DiscreteValue("val1");
+	private final static Value value2 = new DiscreteValue("val2");
+	private final static ProductOfValue values1 = new ProductOfValue(
+			Arrays.asList(value1, value2));
+	private final static ProductOfValue values1a = new ProductOfValue(
+			Arrays.asList(value1, value2));
+	private final static ProductOfValue values2 = new ProductOfValue(
+			Arrays.asList(value2));
+	private final static DiscreteValue low = new DiscreteValue("low");
+	private final static DiscreteValue high = new DiscreteValue("high");
+
+	private String jsontext = "[\"val1\",\"val2\"]";
+
+	@Override
+	public List<List<ProductOfValue>> getGeneralTestData() {
+		return Arrays.asList(Arrays.asList(values1, values1a),
+				Arrays.asList(values2));
+	}
+
+	@Override
+	public List<String> getGeneralTestStrings() {
+		return Arrays.asList(".*\"val1\", \"val2\".*", ".*\"val2\".*");
+	}
+
+	@Test
+	public void testSerialize()
+			throws JsonParseException, JsonMappingException, IOException {
+
+		assertEquals(jsontext, jackson.writeValueAsString(values1));
+	}
+
+	@Test
+	public void testBasicDeserialize()
+			throws JsonParseException, JsonMappingException, IOException {
+		System.out.println(jsontext);
+		assertEquals(values1,
+				jackson.readValue(jsontext, ProductOfValue.class));
+	}
+
+	@Test
+	public void testMerge() {
+		Value val1 = mock(Value.class);
+		Value val2 = mock(Value.class);
+		Value val3 = mock(Value.class);
+		Value val4 = mock(Value.class);
+
+		ProductOfValue prodOfVal1 = new ProductOfValue(
+				Arrays.asList(val1, val2));
+		ProductOfValue prodOfVal2 = new ProductOfValue(
+				Arrays.asList(val3, val4));
+
+		ProductOfValue prodVal = prodOfVal1.merge(prodOfVal2);
+		assertEquals(4, prodVal.getValues().size());
+	}
+
+}
Index: profile/src/test/java/geniusweb/profile/utilityspace/SumOfGroupsUtilitySpaceTest.java
===================================================================
--- profile/src/test/java/geniusweb/profile/utilityspace/SumOfGroupsUtilitySpaceTest.java	(revision 9)
+++ profile/src/test/java/geniusweb/profile/utilityspace/SumOfGroupsUtilitySpaceTest.java	(revision 9)
@@ -0,0 +1,308 @@
+package geniusweb.profile.utilityspace;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import geniusweb.issuevalue.Bid;
+import geniusweb.issuevalue.DiscreteValue;
+import geniusweb.issuevalue.DiscreteValueSet;
+import geniusweb.issuevalue.Domain;
+import geniusweb.issuevalue.Value;
+import geniusweb.issuevalue.ValueSet;
+import geniusweb.profile.Profile;
+import tudelft.utilities.immutablelist.AbstractImmutableList;
+import tudelft.utilities.immutablelist.ImmutableList;
+import tudelft.utilities.immutablelist.Outer;
+
+public class SumOfGroupsUtilitySpaceTest {
+	private final ObjectMapper jackson = new ObjectMapper();
+	private SumOfGroupsUtilitySpace pa1;
+	private final String iss1 = "issue1", iss2 = "issue2", iss3 = "issue3";
+	private static BigDecimal N01 = new BigDecimal("0.1"),
+			N02 = new BigDecimal("0.2"), N03 = new BigDecimal("0.3"),
+			N05 = new BigDecimal("0.5"), N07 = new BigDecimal("0.7"),
+			N08 = new BigDecimal("0.8"), N09 = new BigDecimal("0.9");
+
+	private final DiscreteValue lo = new DiscreteValue("low");
+	private final DiscreteValue hi = new DiscreteValue("high");
+	private final Bid resBid = new Bid(iss1, hi);
+
+	private Domain domain;
+	private PartsUtilities putils12, putils3;
+	private String serialized = "{\"SumOfGroupsUtilitySpace\":{\"domain\":{\"name\":\"domain\",\"issuesValues\":{\"issue3\":{\"values\":[\"low\",\"high\"]},\"issue2\":{\"values\":[\"low\",\"high\"]},\"issue1\":{\"values\":[\"low\",\"high\"]}}},\"name\":\"testspace\",\"partUtilities\":{\"1and2\":{\"partsutils\":{\"issues\":[\"issue1\",\"issue2\"],\"utilslist\":[{\"values\":[\"low\",\"low\"],\"util\":0.16},{\"values\":[\"high\",\"high\"],\"util\":0.72},{\"values\":[\"low\",\"high\"],\"util\":0.16},{\"values\":[\"high\",\"low\"],\"util\":0.16}]}},\"3\":{\"partsutils\":{\"issues\":[\"issue3\"],\"utilslist\":[{\"values\":[\"low\"],\"util\":0.16},{\"values\":[\"high\"],\"util\":0.14}]}}},\"reservationbid\":{\"issuevalues\":{\"issue1\":\"high\"}}}}";
+
+	@Before
+	public void before() {
+		Map<String, ValueSet> issues = new HashMap<>();
+		issues.put(iss1, new DiscreteValueSet(lo, hi));
+		issues.put(iss2, new DiscreteValueSet(lo, hi));
+		issues.put(iss3, new DiscreteValueSet(lo, hi));
+		domain = new Domain("domain", issues);
+
+		Map<ProductOfValue, BigDecimal> utils12 = new HashMap<>();
+		// util12 has weight N08
+		utils12.put(new ProductOfValue(Arrays.asList(lo, lo)),
+				N02.multiply(N08));
+		utils12.put(new ProductOfValue(Arrays.asList(lo, hi)),
+				N02.multiply(N08));
+		utils12.put(new ProductOfValue(Arrays.asList(hi, lo)),
+				N02.multiply(N08));
+		utils12.put(new ProductOfValue(Arrays.asList(hi, hi)),
+				N09.multiply(N08));
+		putils12 = new PartsUtilities(Arrays.asList(iss1, iss2), utils12);
+
+		// utils3 has weight N02.
+		Map<ProductOfValue, BigDecimal> utils3 = new HashMap<>();
+		utils3.put(new ProductOfValue(Arrays.asList(lo)), N08.multiply(N02));
+		utils3.put(new ProductOfValue(Arrays.asList(hi)), N07.multiply(N02));
+		putils3 = new PartsUtilities(Arrays.asList(iss3), utils3);
+
+	}
+
+	@Test(expected = IllegalArgumentException.class)
+	public void smokeTestIncompleteProfile() {
+		HashMap<String, PartsUtilities> partutils = new HashMap<>();
+		partutils.put("1and2", putils12);
+		new SumOfGroupsUtilitySpace(domain, "testspace", partutils, resBid);
+
+	}
+
+	@Test // non-normalized utils should be fine in this case
+	public void smokeTestWeightsNotNormalized() {
+		HashMap<String, PartsUtilities> partutils = new HashMap<>();
+		partutils.put("1and2", putils12);
+		partutils.put("3", putils3);
+		new SumOfGroupsUtilitySpace(domain, "testspace", partutils, resBid);
+
+	}
+
+	@Test(expected = IllegalArgumentException.class)
+	public void smokeTestExtraIssue() {
+		HashMap<String, PartsUtilities> partutils = new HashMap<>();
+		partutils.put("1and2", putils12);
+		partutils.put("3", putils3);
+		partutils.put("4", putils3);
+		new SumOfGroupsUtilitySpace(domain, "testspace", partutils, resBid);
+
+	}
+
+	@Test
+	public void smokeTest() {
+		makeBasic();
+	}
+
+	@Test
+	public void testName() {
+		SumOfGroupsUtilitySpace paus = makeBasic();
+		assertEquals("testspace", paus.getName());
+	}
+
+	@Test
+	public void testDomain() {
+		SumOfGroupsUtilitySpace paus = makeBasic();
+		assertEquals(domain, paus.getDomain());
+	}
+
+	@Test
+	public void testGetResBid() {
+		SumOfGroupsUtilitySpace paus = makeBasic();
+		assertEquals(resBid, paus.getReservationBid());
+	}
+
+	@Test
+	public void testGetUtilityEmptyBid() {
+		SumOfGroupsUtilitySpace paus = makeBasic();
+		assertTrue(BigDecimal.ZERO.compareTo(
+				paus.getUtility(new Bid(Collections.emptyMap()))) == 0);
+	}
+
+	@Test
+	public void testGetUtility() {
+		SumOfGroupsUtilitySpace paus = makeBasic();
+		Map<String, Value> map = new HashMap<>();
+		map.put(iss1, lo);
+		map.put(iss2, lo); // 1,2 combined has util 0.2
+		map.put(iss3, hi); // 3 has util 0.7
+		// weights are set to 0.8, 0.2. Gives total util 0.3
+		Bid bid = new Bid(map);
+		assertTrue(N03.compareTo(paus.getUtility(bid)) == 0);
+	}
+
+	/**
+	 * Demonstrates how to convert {@link LinearAdditiveUtilitySpace} to a
+	 * {@link SumOfGroupsUtilitySpace}
+	 * 
+	 */
+	@Test
+	public void testConvertLas() throws IOException {
+		String profile = new String(
+				Files.readAllBytes(Paths.get("src/test/resources/party1.json")),
+				StandardCharsets.UTF_8);
+		LinearAdditiveUtilitySpace las = jackson.readValue(profile,
+				LinearAdditiveUtilitySpace.class);
+		SumOfGroupsUtilitySpace pas = new SumOfGroupsUtilitySpace(las);
+		checkUtilitiesAllEqual(las, pas);
+		System.out.println("Generated partial profile:\n" + pas);
+	}
+
+	/**
+	 * Demonstrates how to convert {@link LinearAdditiveUtilitySpace} to a
+	 * {@link SumOfGroupsUtilitySpace} and group some issues
+	 * 
+	 */
+	@Test
+	public void testConvertAndGroupParty() throws IOException {
+		String profile = new String(
+				Files.readAllBytes(Paths.get("src/test/resources/party1.json")),
+				StandardCharsets.UTF_8);
+		LinearAdditiveUtilitySpace las = jackson.readValue(profile,
+				LinearAdditiveUtilitySpace.class);
+		SumOfGroupsUtilitySpace pas = new SumOfGroupsUtilitySpace(las);
+		pas = pas.group(Arrays.asList("Food", "Drinks"), "food&drinks");
+		checkUtilitiesAllEqual(las, pas);
+		System.out.println("Re-grouped party profile:\n");
+		System.out.println(jackson.writeValueAsString(pas));
+
+	}
+
+	@Test
+	public void testGroupe2e() {
+		Map<ProductOfValue, BigDecimal> utils1 = new HashMap<>();
+		utils1.put(new ProductOfValue(Arrays.asList(lo)), N02.multiply(N02));
+		utils1.put(new ProductOfValue(Arrays.asList(hi)), N03.multiply(N02));
+		Map<ProductOfValue, BigDecimal> utils2 = new HashMap<>();
+		utils2.put(new ProductOfValue(Arrays.asList(lo)), N07.multiply(N03));
+		utils2.put(new ProductOfValue(Arrays.asList(hi)), N02.multiply(N03));
+		Map<ProductOfValue, BigDecimal> utils3 = new HashMap<>();
+		utils3.put(new ProductOfValue(Arrays.asList(lo)), N05.multiply(N05));
+		utils3.put(new ProductOfValue(Arrays.asList(hi)), N08.multiply(N05));
+		HashMap<String, PartsUtilities> partutils = new HashMap<>();
+		partutils.put(iss1, new PartsUtilities(Arrays.asList(iss1), utils1));
+		partutils.put(iss2, new PartsUtilities(Arrays.asList(iss2), utils2));
+		partutils.put(iss3, new PartsUtilities(Arrays.asList(iss3), utils3));
+
+		Map<String, ValueSet> issvalues = new HashMap<>();
+		issvalues.put(iss1, new DiscreteValueSet(lo, hi));
+		issvalues.put(iss2, new DiscreteValueSet(lo, hi));
+		issvalues.put(iss3, new DiscreteValueSet(lo, hi));
+		Domain domain1 = new Domain("test", issvalues);
+
+		SumOfGroupsUtilitySpace pas = new SumOfGroupsUtilitySpace(domain1,
+				"testspace", partutils, resBid);
+
+		SumOfGroupsUtilitySpace pasgrouped12 = pas
+				.group(Arrays.asList(iss1, iss2), "iss12");
+
+		checkEqualUtilities(pas, pasgrouped12);
+
+	}
+
+	@Test
+	public void testSerialize() throws JsonProcessingException {
+		SumOfGroupsUtilitySpace paus = makeBasic();
+		ObjectMapper jackson = new ObjectMapper();
+		String string = jackson.writeValueAsString(paus);
+		System.out.println(string);
+		assertEquals(serialized, string);
+
+	}
+
+	@Test
+	public void testDeserialize() throws IOException {
+		ObjectMapper jackson = new ObjectMapper();
+		assertEquals(makeBasic(), jackson.readValue(serialized, Profile.class));
+
+	}
+
+	/************************ PRIVATE FUNCTIONS *******************/
+
+	private void checkEqualUtilities(UtilitySpace space1, UtilitySpace space2) {
+		for (Bid bid : new MyAllBidsList(space1.getDomain())) {
+			assertEquals(space1.getUtility(bid), space2.getUtility(bid));
+		}
+	}
+
+	private SumOfGroupsUtilitySpace makeBasic() {
+		HashMap<String, PartsUtilities> partutils = new HashMap<>();
+		partutils.put("1and2", putils12);
+		partutils.put("3", putils3);
+		return new SumOfGroupsUtilitySpace(domain, "testspace", partutils,
+				resBid);
+
+	}
+
+	private void checkUtilitiesAllEqual(UtilitySpace space1,
+			UtilitySpace space2) {
+		for (Bid bid : new MyAllBidsList(space1.getDomain())) {
+			assertTrue(space1.getUtility(bid)
+					.compareTo(space2.getUtility(bid)) == 0);
+		}
+	}
+
+}
+
+/**
+ * Copy of AllBidsList. We can not depend on BidSpace because that would cause a
+ * cyclic dependency.
+ */
+class MyAllBidsList extends AbstractImmutableList<Bid> {
+
+	private final List<String> issues;
+	private final Outer<? extends Value> allValuePermutations;
+
+	/**
+	 * A list containing all bids in the space. This is an ImmutableList so it
+	 * can contain all bids without pre-computing them.
+	 * 
+	 */
+	public MyAllBidsList(Domain domain) {
+		if (domain == null)
+			throw new IllegalArgumentException("domain=null");
+		issues = new ArrayList<>(domain.getIssues());
+
+		List<ImmutableList<Value>> values = issues.stream()
+				.map(issue -> domain.getValues(issue))
+				.collect(Collectors.toList());
+
+		allValuePermutations = new Outer<Value>(values);
+	}
+
+	@Override
+	public Bid get(BigInteger index) {
+		ImmutableList<? extends Value> nextValues = allValuePermutations
+				.get(index);
+
+		Map<String, Value> issueValues = new HashMap<>();
+		for (int n = 0; n < issues.size(); n++) {
+			issueValues.put(issues.get(n),
+					nextValues.get(BigInteger.valueOf(n)));
+		}
+		return new Bid(issueValues);
+	}
+
+	@Override
+	public BigInteger size() {
+		return allValuePermutations.size();
+	}
+
+}
Index: profile/src/test/resources/party1.json
===================================================================
--- profile/src/test/resources/party1.json	(revision 7)
+++ profile/src/test/resources/party1.json	(revision 9)
@@ -92,5 +92,5 @@
 				"Location": {
 					"values": [
-						"Party Tent'",
+						"Party Tent",
 						"Your Dorm",
 						"Party Room",
