PopulationEuclideanBox¶
-
class
svvamp.PopulationEuclideanBox(V, C, box_dimensions, shift=None)[source]¶ Population with ‘Euclidean box’ model.
Parameters: - V – Integer. Number of voters.
- C – Integer. Number of candidates.
- box_dimensions – 1d array of numbers. The length of the Euclidean box along each axis.
- shift – 1d array of numbers, same dimension as
box_dimensions. Shift for the mean position of the candidates.
Returns: A
Populationobject.Let us note
n_dimthe number of elements insigma. For each voter and each candidate, a position is independently and uniformly drawn in a rectangular box of dimensionsbox_dimensions[0],... ,box_dimensions[n_dim - 1]. Ifshiftis used, the distribution of positions for candidates is displaced by this vector.Let
d[v, c]denote the Euclidean distance between votervand candidatec. Thenpreferences_ut[v, c] = A - d[v, c], whereAis such that the average utility is 0 over the whole population.If
ndim = 1, the population is single-peaked.