code: public boolean changeHorizon(long val)
  	{
  		this.removeConstraint(horizonConstraint);
  		SimpleDistanceConstraint sdc = new SimpleDistanceConstraint();
  		sdc.setFrom(this.getVariable(0));
  		sdc.setTo(this.getVariable(1));
  		sdc.setMinimum(val);
  		sdc.setMaximum(val);
  		if (this.addConstraint(sdc)) {
  			this.H = val;
  			horizonConstraint = sdc;
  			return true;
  		}
  		return false;
  	}
docs: Set a new horizon for this network.
  @param val The new horizon.
  @return {@code True} If the operation succeeded, {@code False} otherwise.