docs: public static AllenIntervalNetworkSolver createReducedCopy(AllenIntervalNetworkSolver oldSolver, AllenInterval[] intervalsInOut, int additionalCapactity) {
  		
  		//Create a new AllenIntervalNetworkSolver
  		final ReducedAllenIntervalNetworkSolver newSolver;
  		{
  			final long newO = ((APSPSolver)oldSolver.getConstraintSolvers()[0]).getO();
  			final long newH = ((APSPSolver)oldSolver.getConstraintSolvers()[0]).getH();
  			newSolver = new ReducedAllenIntervalNetworkSolver(newO, newH, intervalsInOut.length + additionalCapactity);
  		}
  		
  		//Create arrays containing input/output intervals
  		final AllenInterval[] old_intervals = intervalsInOut;
  		final AllenInterval[] new_intervals = new AllenInterval[old_intervals.length];
  		
  		for(int i = 0; i < old_intervals.length; ++i) {
  			new_intervals[i] = (AllenInterval) newSolver.createVariable();
  			new_intervals[i].setMarking(old_intervals[i].getMarking());
  		}
  		
  		APSPSolver oldApspSolver = (APSPSolver) oldSolver.getConstraintSolvers()[0];
  		APSPSolver newApspSolver = (APSPSolver) newSolver.getConstraintSolvers()[0];
  
  		//Create arrays containing input/output time points
  		final TimePoint[] old_timePoints = new TimePoint[2*old_intervals.length + 2];
  		final TimePoint[] new_timePoints = new TimePoint[2*old_intervals.length + 2];
  		
  		old_timePoints[0] = oldApspSolver.getSource();
  		old_timePoints[1] = oldApspSolver.getSink();
  		new_timePoints[0] = newApspSolver.getSource();
  		new_timePoints[1] = newApspSolver.getSink();
  		
  		for(int i = 0; i < old_intervals.length; ++i) {
  			final int baseIdx = 2+i*2;
  			old_timePoints[baseIdx + 0] = old_intervals[i].getStart();
  			old_timePoints[baseIdx + 1] = old_intervals[i].getEnd();
  			
  			new_timePoints[baseIdx + 0] = new_intervals[i].getStart();
  			new_timePoints[baseIdx + 1] = new_intervals[i].getEnd();			
  		}
  		
  		ArrayList<SimpleDistanceConstraint> toAdd = new ArrayList<SimpleDistanceConstraint>(old_timePoints.length*old_timePoints.length);
  		for(int i = 0; i < old_timePoints.length; ++i) {
  			for(int j = 0; j < i; ++j) {
  				final Bounds bounds = oldApspSolver.getDistanceBounds(old_timePoints[i], old_timePoints[j]);
  				
  				SimpleDistanceConstraint sdc = new SimpleDistanceConstraint();
  				sdc.setFrom(new_timePoints[i]);
  				sdc.setTo(new_timePoints[j]);
  				sdc.setMinimum(bounds.min);
  				sdc.setMaximum(bounds.max);
  				
  				//We need to make sure the constraint is positive, otherwise we can't add the constraint
  				sdc = sdc.normalize();
  				
  				//Add the constraint
  				toAdd.add(sdc);
  			}
  		}
  		
  		//Add all constraints to the new STP as a batch
  		if(!newApspSolver.addConstraints(toAdd.toArray(new SimpleDistanceConstraint[toAdd.size()]))) {
  			throw new Error("Failed to add SimpleDistanceConstraints to new solver");
  		}
  		
  		//Do same basic testing, the entire loop should be optimized away when assertions are disabled
  		for(int i = 0; i < old_intervals.length; ++i) {
  			assert old_intervals[i].getEST() == new_intervals[i].getEST();
  			assert old_intervals[i].getLST() == new_intervals[i].getLST();
  			assert old_intervals[i].getEET() == new_intervals[i].getEET();
  			assert old_intervals[i].getLET() == new_intervals[i].getLET();
  		}
  		
  		//Do some more testing
  		for(int i = 0; i < old_timePoints.length; ++i) {
  			for(int j = 0; j < old_timePoints.length; ++j) {
  				assert oldSolver.getAdmissibleDistanceBounds(old_timePoints[i], old_timePoints[j]).equals(
  						newSolver.getAdmissibleDistanceBounds(new_timePoints[i], new_timePoints[j]));
  			}
  		}
  		
  		//Replace the interval references in the input array 
  		System.arraycopy(new_intervals, 0, intervalsInOut, 0, new_intervals.length);
  		
  		newSolver.setCreateReducedIntervals(false);
  		
  		return newSolver;
  	}