new_task.setVerb(new Verb(verb));
new_task.setVerb(Verb.get(verb));
    protected Task createSubTask(Task parent,				 String verb, 				 Location from_loc,				 Location to_loc,				 Date earliest_start,				 Date latest_end)    {	// Set up a new task	NewTask new_task = theLDMF.newTask();	// Set up parent relationship of subtask	new_task.setParentTask(parent);	// Set up Direct object  for task from parent	new_task.setDirectObject(parent.getDirectObject());	// Set up prepositions for task	Vector prepositions = new Vector();	// Set up the FROM and TO Prepositional Phrases	NewPrepositionalPhrase npp = theLDMF.newPrepositionalPhrase();	npp.setPreposition(Constants.Preposition.FROM);	npp.setIndirectObject(from_loc);	prepositions.add(npp);	npp = theLDMF.newPrepositionalPhrase();	npp.setPreposition(Constants.Preposition.TO);	npp.setIndirectObject(to_loc);	prepositions.add(npp);	// Copy all prepositions that aren't FROM and TO from the parent task	for(Enumeration preps = parent.getPrepositionalPhrases();	    preps.hasMoreElements();) 	    {		PrepositionalPhrase pp = (PrepositionalPhrase)preps.nextElement();		if ((!pp.getPreposition().equals(Constants.Preposition.TO)) &&		    (!pp.getPreposition().equals(Constants.Preposition.FROM))) {		    prepositions.add(pp);		}	    }	new_task.setPrepositionalPhrases(prepositions.elements());		// Set the verb as given	new_task.setVerb(new Verb(verb));	// Set the plan for the task	new_task.setPlan(parent.getPlan());	// Establish preferences for task	Vector preferences = new Vector();	// Set up START_TIME preference	ScoringFunction start_scorefcn = 	    ScoringFunction.createNearOrAbove	    (AspectValue.newAspectValue(AspectType.START_TIME, 			     (double)earliest_start.getTime()), 	     0.0d);	Preference start_pref = theLDMF.newPreference(AspectType.START_TIME, start_scorefcn);	preferences.addElement(start_pref);		// Set up preference for END_TIME	ScoringFunction end_scorefcn = 	    ScoringFunction.createStrictlyBetweenWithBestValues	    (AspectValue.newAspectValue(AspectType.END_TIME, 			     (double)(latest_end.getTime() - (0l*ONE_DAY))),	     AspectValue.newAspectValue(AspectType.END_TIME,			     (double)(latest_end.getTime() + (2l*ONE_DAY))),	     AspectValue.newAspectValue(AspectType.END_TIME, 			     (double)(latest_end.getTime() + (7l*ONE_DAY))));	Preference end_pref = theLDMF.newPreference(AspectType.END_TIME, end_scorefcn);	preferences.addElement(end_pref);		// Copy all preferences that aren't START_TIME and END_TIME	for(Enumeration prefs = parent.getPreferences();prefs.hasMoreElements();) 	    {		Preference pref = (Preference)prefs.nextElement();		if ((pref.getAspectType() != AspectType.START_TIME) &&		    (pref.getAspectType() != AspectType.END_TIME)) {		    preferences.addElement(pref);		}	    }	new_task.setPreferences(preferences.elements());	return new_task;    }