Package aima.core.agent.impl.aprog.simplerule

Examples of aima.core.agent.impl.aprog.simplerule.ANDCondition


  private static Set<Rule> getRuleSet() {
    // Note: Using a LinkedHashSet so that the iteration order (i.e. implied
    // precedence) of rules can be guaranteed.
    Set<Rule> rules = new LinkedHashSet<Rule>();

    rules.add(new Rule(new ANDCondition(new EQUALCondition(
        ATTRIBUTE_STATE_LOCATION_A,
        VacuumEnvironment.LocationState.Clean), new EQUALCondition(
        ATTRIBUTE_STATE_LOCATION_B,
        VacuumEnvironment.LocationState.Clean)), NoOpAction.NO_OP));
    rules.add(new Rule(new EQUALCondition(ATTRIBUTE_CURRENT_STATE,
View Full Code Here


  private static Set<Rule> getRuleSet() {
    // Note: Using a LinkedHashSet so that the iteration order (i.e. implied
    // precedence) of rules can be guaranteed.
    Set<Rule> rules = new LinkedHashSet<Rule>();

    rules.add(new Rule(new ANDCondition(new EQUALCondition(
        ATTRIBUTE_STATE_LOCATION_A,
        VacuumEnvironment.LocationState.Clean), new EQUALCondition(
        ATTRIBUTE_STATE_LOCATION_B,
        VacuumEnvironment.LocationState.Clean)), NoOpAction.NO_OP));
    rules.add(new Rule(new EQUALCondition(ATTRIBUTE_CURRENT_STATE,
View Full Code Here

        ATTRIBUTE_CAR_IN_FRONT_IS_INDICATING, true)));
  }

  @Test
  public void testANDRule() {
    Rule r = new Rule(new ANDCondition(new EQUALCondition(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, true), new EQUALCondition(
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, true)),
        ACTION_EMERGENCY_BRAKING);

    Assert.assertEquals(ACTION_EMERGENCY_BRAKING, r.getAction());
View Full Code Here

TOP

Related Classes of aima.core.agent.impl.aprog.simplerule.ANDCondition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.