public boolean isTrue(State state, String[] params) {
		
		ObjectInstance space = state.getObject(params[1]);
		// Since no subgoal for this ingredient is applicable to the switch action, ignore it!
		if (this.subgoal == null) {
			return false;
		}
		String subgoalClassName = this.subgoal.getGoal().getClassName();
		if (subgoalClassName.equals(AffordanceCreator.SPACEON_PF)) {
			// If the subgoal hasn't been fulfilled by some binding on the state
			if (!this.subgoal.goalCompleted(state)) {
				return true;
			}
		}
		
		if (!SpaceFactory.getOnOff(space)) {
			// topLevelIngredient's .getRecipeHeated return whether, at some point in the recipe, an
			// ingredient has to be heated. If so, then the next checkSwitchHeating determines if the
			// ingredient(s) that had to be heated has already been heated. The same applies for baking.
			if (SpaceFactory.isHeating(space) && this.topLevelIngredient.getRecipeHeated()) {
				return this.checkSwitchHeating(state);
			} else if (SpaceFactory.isBaking(space) && this.topLevelIngredient.getRecipeBaked()) {
				return this.checkSwitchBaking(state);
			}
		}
		return false;
	}