org.metacsp.meta.simplePlanner.PlanningOperator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of meta-csp-framework Show documentation
Show all versions of meta-csp-framework Show documentation
A Java API for Meta-CSP based reasoning
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;
}
}