All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.metacsp.meta.simplePlanner.PlanningOperator Maven / Gradle / Ivy

There is a newer version: 1.3.5
Show newest version
package org.metacsp.meta.simplePlanner;

import org.metacsp.multi.allenInterval.AllenIntervalConstraint;

public class PlanningOperator extends SimpleOperator {

	private boolean[] effects;
	
	public PlanningOperator(String head, AllenIntervalConstraint[] requirementConstraints, String[] requirementActivities, boolean[] effects, int[] usages) {
		super(head, requirementConstraints, requirementActivities, usages);
		this.effects = effects;
	}
	
	public boolean isEffect(String requirement) {
		for (int i = 0; i < this.requirementActivities.length; i++) {
			if 	(this.requirementActivities[i].equals(requirement)) return effects[i];
		}
		return false;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy