private void projectionTest(int n)
  {
    planner= new Planner();

    Variable scale= new Variable("scale", 10);
    Variable offset= new Variable("offset", 1000);
    Variable src= null, dst= null;

    ArrayList<Variable> dests= new ArrayList<Variable>();

    for (int i= 0; i < n; ++i) {
      src= new Variable("src" + Integer.toString(i), i);
      dst= new Variable("dst" + Integer.toString(i), i);
      dests.add(dst);
      new StayConstraint(src, Strength.normal);
      new ScaleConstraint(src, scale, offset, dst, Strength.required);
    }

    change(src, 17);
    if (dst.value != 1170) error("Projection test 1 failed!");

    change(dst, 1050);
    if (src.value != 5) error("Projection test 2 failed!");

    change(scale, 5);
    for (int i= 0; i < n - 1; ++i) {
      if ((dests.get(i)).value != i * 5 + 1000)
	error("Projection test 3 failed!");
    }

    change(offset, 2000);
    for (int i= 0; i < n - 1; ++i) {
      if ((dests.get(i)).value != i * 5 + 2000)
	error("Projection test 4 failed!");
    }
  }