/** * Create a new variable and bind it using the given object condition and value source. * @param condition The object condition. * @param name The variable name. * @param valuesource The value source. * @return The new variable. */ public Variable generateVariableBinding(ConstrainableCondition condition, String name, OAVObjectType type, Object valuesource) { Variable tmpvar = new Variable(name, type, false, true); variables.put(name, tmpvar); BoundConstraint bc = new BoundConstraint(valuesource, tmpvar); boundconstraints.put(tmpvar, bc); condition.addConstraint(bc); bcons.put(tmpvar, condition); return tmpvar; }
/** * Create a new variable and bind it using the given object condition and value source. * @param condition The object condition. * @param name The variable name. * @param valuesource The value source. * @return The new variable. */ public Variable generateVariableBinding(ConstrainableCondition condition, String name, OAVObjectType type, Object valuesource) { Variable tmpvar = new Variable(name, type, false, true); variables.put(name, tmpvar); BoundConstraint bc = new BoundConstraint(valuesource, tmpvar); boundconstraints.put(tmpvar, bc); condition.addConstraint(bc); bcons.put(tmpvar, condition); return tmpvar; }
for(int j=0; j<cons.size(); j++) target.addConstraint((IConstraint)cons.get(j));
for(int j=0; j<cons.size(); j++) target.addConstraint((IConstraint)cons.get(j));
context.getCurrentCondition().addConstraint(new LiteralConstraint(valuesource, ((LiteralExpression)right).getValue(), op)); context.getCurrentCondition().addConstraint(new BoundConstraint(valuesource, ((VariableExpression)right).getVariable(), op));
new BoundConstraint(null, belvar)}); rcapcon.addConstraint(new BoundConstraint(OAVBDIRuntimeModel.capability_has_beliefs, belvar, IOperator.CONTAINS)); new BoundConstraint(null, belvar)}); rcapcon.addConstraint(new BoundConstraint(OAVBDIRuntimeModel.capability_has_beliefsets, belvar, IOperator.CONTAINS));
context.getCurrentCondition().addConstraint(new LiteralConstraint(valuesource, ((LiteralExpression)right).getValue(), op)); context.getCurrentCondition().addConstraint(new BoundConstraint(valuesource, ((VariableExpression)right).getVariable(), op));