This is a simple generator for Sensor Placement Problem (SPP) instances.
The SSP has the MIQP formulation

   min \sum_{i = 1}^n a_i x_i^2 + c_i y_i

       \sum_{i = 1}^n x_i = 1

       0 <= x_i <= y_i    i = 1, ..., n

Accordingly, the format of the instances is

n
c_1
...
c_n
a_1
...
a_n

The generator is based on the polynomial reduction to the PARTITION problem
which shows that SPP is NP-hard. That is, a PARTITION instance is generated
where the weights are random numbers uniformly drawn in the range [0, maxval).
These are taken as the fixed costs c_i, while the quadratic costs weights2[i]
are taken as

	a_i = ( \sum_{i = 1}^n  c_i )^2 / ( 4 * c_i )

Usage of the generator is

generatore <testname>

where <testname>.prm is a file containing the following three numbers:

number of items (n)
maxval (i.e., maximum fixed cost)
seed of the random number generator

This generator has been developed by Enrico Grande. It is free software,
and as such it can be freely modified and redistributed, provided that notice
of the original authorship is retained. The author is not responsible and
liable for any damage or loss however caused from or attributable to this
software: no gain, no pain.


