Package groundTruthModule.datastructure

Examples of groundTruthModule.datastructure.ExchangeIllicitCargoPlan


    List<TerroristPlan> listOfPlans = new ArrayList<TerroristPlan>();
    for (ShipEntity ship : db.getShips()) {
      if (ship.hasTerroristPlan()) {
        if (!listOfPlans.contains(ship.getTerroristPlan())) {
          if (ship.getTerroristPlan().getTerroristPlanType() == TerroristPlanType.ExchangeIllicitCargo) {
            ExchangeIllicitCargoPlan plan = (ExchangeIllicitCargoPlan)ship.getTerroristPlan();
           
            System.out.println("Exchange Illicit Cargo Plan: ");
           
            System.out.println("\tShip "
                + db.getShips().indexOf(plan.getMainShip())
                + " is the main ship of type "
                + plan.getMainShip().getShipType()
                + (plan.getMainShip().isHijacked() ? " and was hijacked " : " and has a terrorist crew member."));
           
            if (!plan.getMainShip().isHijacked()) {
              for (PersonEntity person : plan.getMainShip().getCrew()) {
                if (person.isTerrorist()) {
                  System.out.println("\t\tPerson " + db.getPeople().indexOf(person)
                      + " is a terrorist crew member.");
                }
              }
            }
           
            System.out.println("\tShip "
                + db.getShips().indexOf(plan.getSecondaryShip())
                + " is the secondary ship of type "
                + plan.getSecondaryShip().getShipType()
                + (plan.getSecondaryShip().isHijacked() ? " and was hijacked " : " and has a terrorist crew member."));
           
            if (!plan.getSecondaryShip().isHijacked()) {
              for (PersonEntity person : plan.getSecondaryShip().getCrew()) {
                if (person.isTerrorist()) {
                  System.out.println("\t\tPerson " + db.getPeople().indexOf(person)
                      + " is a terrorist crew member.");
                }
              }
            }
           
          } else if (ship.getTerroristPlan().getTerroristPlanType() == TerroristPlanType.BombingPort) {
            BombingPortPlan plan = (BombingPortPlan)ship.getTerroristPlan();
           
            System.out.println("Bombing Port Plan: ");
           
            System.out.println("\tShip "
                + db.getShips().indexOf(plan.getShip())
                + " is the suicide ship of type "
                + plan.getShip().getShipType()
                + (plan.getShip().isHijacked() ? " and was hijacked " : " and has a terrorist crew member."));
           
            if (!plan.getShip().isHijacked()) {
              for (PersonEntity person : plan.getShip().getCrew()) {
                if (person.isTerrorist()) {
                  System.out.println("\t\tPerson " + db.getPeople().indexOf(person)
                      + " is a terrorist crew member.");
                }
              }
View Full Code Here


      for (int i = 0; i < nTerroristPlans; i++) {
        // We need to decide what is the type of terrorist plan
        // Let's assume exchange illicit cargo is twice more likely than
        // bombing a port
        if (Math.random() <= 2 / 3f) {
          generateExchangeIllicitCargoPlan(new ExchangeIllicitCargoPlan());
        } else {
          generateBombingPortPlan(new BombingPortPlan());
        }

      }
View Full Code Here

TOP

Related Classes of groundTruthModule.datastructure.ExchangeIllicitCargoPlan

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.