Examples of Strategy


Examples of aQute.bnd.service.RepositoryPlugin.Strategy

    if (attrs == null)
      attrs = new HashMap<String, String>(2);
    attrs.put("package", packageName);
    attrs.put("mode", mode.name());

    Strategy useStrategy = findStrategy(attrs, strategyx, range);

    List<RepositoryPlugin> plugins = getPlugins(RepositoryPlugin.class);
    for (RepositoryPlugin plugin : plugins) {
      try {
        File result = plugin.get(null, range, useStrategy, attrs);
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.Strategy

        + ";version=" + range + " Not found in " + plugins, null);
  }

  private Strategy findStrategy(Map<String, String> attrs, Strategy defaultStrategy,
      String versionRange) {
    Strategy useStrategy = defaultStrategy;
    String overrideStrategy = attrs.get("strategy");
    if (overrideStrategy != null) {
      if ("highest".equalsIgnoreCase(overrideStrategy))
        useStrategy = Strategy.HIGHEST;
      else if ("lowest".equalsIgnoreCase(overrideStrategy))
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.Strategy

    if ("snapshot".equals(range)) {
      return getBundleFromProject(bsn, attrs);
    }

    Strategy useStrategy = strategy;

    if ("latest".equals(range)) {
      Container c = getBundleFromProject(bsn, attrs);
      if (c != null)
        return c;
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.Strategy

      throw new IllegalArgumentException(
          "Too few arguments for repo, syntax=: ${repo ';'<bsn> [ ; <version> [; ('HIGHEST'|'LOWEST')]}");

    String bsns = args[1];
    String version = null;
    Strategy strategy = Strategy.HIGHEST;

    if (args.length > 2) {
      version = args[2];
      if (args.length == 4) {
        if (args[3].equalsIgnoreCase("HIGHEST"))
View Full Code Here

Examples of com.aonaware.services.webservices.Strategy

   */
  @Test(dataProvider="InputData")
  public void test(Object[][] dictionaryAndStrategy, String word)
  {
    Dictionary dictionary = (Dictionary)dictionaryAndStrategy[0][0];
    Strategy strategy = (Strategy)dictionaryAndStrategy[0][1];
   
    ArrayOfDictionaryWord array = dictServiceSoap.matchInDict(dictionary.getId(), word, strategy.getId());
    Assert.assertTrue(checkWordExistenceInTheDictionaryUsingSpecStrategy(dictionary, strategy, word, array),
              "The word " + word + " doesn't exists in " + dictionary.getName() +
              " dictionary. Search was performed using "+ strategy.getDescription() + " strategy.");
  }
View Full Code Here

Examples of com.google.gwt.junit.JUnitShell.Strategy

  /**
   * GWT-unfriendly, forcing us to use a translatable class.
   */
  @Override
  public Strategy getStrategy() {
    final Strategy impl = super.getStrategy();
    return new Strategy() {
      @Override
      public String getSyntheticModuleExtension() {
        return impl.getSyntheticModuleExtension();
      }

      @Override
      public void processModule(ModuleDef module) {
        impl.processModule(module);
        try {
          JUnitBridge.compileForWebMode(module);
        } catch (UnableToCompleteException e) {
          throw new RuntimeException("Failed to manually compile test module",
              e);
View Full Code Here

Examples of com.poker.analyst.strategy.Strategy

    "src/com/poker/test/buffer.r";
 
 
  public static void main(String[] args) throws Exception {
    PokerControl pControl = new PokerControl();
    Strategy strategy = new SSSStrategy1("");
    DataForStrategy dfs = new DataForStrategy();
   
    PlayWindow playWnd = PlayWindowFactory.getPlayWindow();
    playWnd = FillPlayWindow.fillPlayWindow(playWnd, bPathPF);
  //  ViewBoard.viewBoard(playWnd, playWnd.getCurrentRound(), null);
    dfs.setCurrentBoard(playWnd.getCurrentBoard());
    dfs.setCurrentRound(playWnd.getCurrentRound());
    /* not realized yet
      dfs.setPlayerMoney(playWnd.getPlayerMoney());
    */
    //  0 - hero place
    dfs.setPlayerMoney(dfs.getCurrentBoard().getPlayers().get(0).getStack());
    dfs.setTotalBank(pControl.getAllRoundTotal(playWnd));
           
  //  System.out.println("Preflop board: "+ playWnd.getPreflopBoard());
    ViewBoard.viewBoard(playWnd, Rounds.PREFLOP, pControl);
   
    AnalystResult aResult = strategy.getReaction(dfs);
    System.out.println(aResult);
   
    System.out.println("//////////////////==========================================");
       playWnd = FillPlayWindow.fillPlayWindow(playWnd, bPathF);
       System.out.println("Preflop board2: " + playWnd.getPreflopBoard());
       System.out.println("flop    board : " + playWnd.getFlopBoard());      
      
       List<Player> player = playWnd.getFlopBoard().getPlayers();
       for(int i = 0; i<10;i++)
         if (i != 0 && i!= 8){
           player.get(i).setPlayerState(PlayerState.PRS_FOLD);
           player.get(i).setReaction(UIReaction.UIR_ACTION_FOLD);
         }
          
//     ViewBoard.viewBoard(playWnd, Rounds.PREFLOP, null);      
      ViewBoard.viewBoard(playWnd, playWnd.getCurrentRound(), null);     
   
    dfs.setCurrentBoard(playWnd.getCurrentBoard());
    dfs.setCurrentRound(playWnd.getCurrentRound());
    dfs.setPlayerMoney(dfs.getCurrentBoard().getPlayers().get(0).getStack());
    dfs.setTotalBank(pControl.getAllRoundTotal(playWnd));
    dfs.setPrevBoard(playWnd.getPreflopBoard());
   
    aResult = strategy.getReaction(dfs);
    System.out.println(aResult);
   
   
  }
View Full Code Here

Examples of com.poker.analyst.strategy.Strategy

   
    if (playWnd == null) {
      return null;
    }
    DataForStrategy dfs = new DataForStrategy();
    Strategy strategy = pdata.getProgramSettings().getStrategySSS();
   
    if (playWnd.getCurrentEvent() == EventType.ET_NEED_WAIT_BB) {
      return new AnalystResult(UIReaction.UIR_BB_WAIT_FOR, null);     
    }else
    if(playWnd.getCurrentEvent() == EventType.ET_SYSTEM_MESSAGE){
      return new AnalystResult(UIReaction.UIR_ACCEPT_SYSTEM_WINDOW, null);
    }
    else
    if(playWnd.getCurrentEvent() == EventType.ET_SYSTEM_MESSAGE_2){
      return new AnalystResult(UIReaction.UIR_ACCEPT_SYSTEM_WINDOW_2, null);
    }
    if (playWnd.getCurrentEvent() == EventType.ET_SET_BB) {
      dfs.setCurrentRound(playWnd.getCurrentRound());
      dfs.setCurrentBoard(playWnd.getPreflopBoard());
     
      if (strategy.maySitToTable(dfs))           
        return new AnalystResult(UIReaction.UIR_BB_SET, null);
      else 
        return new AnalystResult(UIReaction.UIR_CLOSE_WINDOW, "");
    }else {
     
     
      switch(playWnd.getCurrentRound()){
        case FLOP :
          dfs.setPrevBoard(playWnd.getPreflopBoard());
            break;
          case TURN :
            dfs.setPrevBoard(playWnd.getFlopBoard());
            break;
          case RIVER :
            dfs.setPrevBoard(playWnd.getTurnBoard());
            break;
          default:
            dfs.setPrevBoard(null);
      }
   

      //ViewBoard.viewBoard(playWnd, playWnd.getCurrentRound(), pControl);
      dfs.setCurrentBoard(playWnd.getCurrentBoard());
      dfs.setCurrentRound(playWnd.getCurrentRound());
      /* not realized yet
          dfs.setPlayerMoney(playWnd.getPlayerMoney());
       */
      //  0 - hero place
      dfs.setPlayerMoney(dfs.getCurrentBoard().getPlayers().get(0).getStack());
      dfs.setTotalBank(pControl.getAllRoundTotal(playWnd));

      AnalystResult aResult = strategy.getReaction(dfs);
      //System.out.println(aResult);         

      return aResult;
    }
  }
View Full Code Here

Examples of cu.repsystestbed.data.Strategy

       * @attribute feedbackMean NUMERIC
       * @attribute feedbackStdDev NUMERIC
       */
     
      //TODO do checks to make sure feedbackMean and feedbackStdDev are in [0,1].
      Strategy s = new Strategy(strategyInstance[0].intValue(),
          strategyInstance[1].intValue(), strategyInstance[2], strategyInstance[3]);
     
      strategies.add(s);
    }
   
    //parse and create groups
    source = new DataSource(grpFileName);
    instances = source.getDataSet();
    enu = instances.enumerateInstances();
    while(enu.hasMoreElements())
    {
      Instance temp = (Instance)enu.nextElement();
      logger.info("Parsing " + temp);
      if(temp.numValues()!=2) throw new Exception("Group line does not have 2 elements. This is illegal.");
      Double[] groupInstance = new Double[2];
      for(int i=0;i<temp.numValues();i++)
      {
        //number of values == 2
        groupInstance[i] = temp.value(i);   
        if(groupInstance[i]==null) throw new Exception("A parameter in group line is null.");
      }
      /*
       * @relation group
       * @attribute groupdId NUMERIC
       * @attribute numberAgents NUMERIC
       */
      Group g = new Group(groupInstance[0].intValue(), groupInstance[1].intValue());
      groups.add(g);
    }
   
    //parse and create group-strategy assignments
    source = new DataSource(strGrpFileName);
    instances = source.getDataSet();
    enu = instances.enumerateInstances();
    while(enu.hasMoreElements())
    {
      Instance temp = (Instance)enu.nextElement();
      logger.info("Parsing " + temp);
      if(temp.numValues()!=3) throw new Exception("Group-Strategy assignment line does not have 3 elements. This is illegal.");
      Double[] strGrpInstance = new Double[3];
      for(int i=0;i<temp.numValues();i++)
      {
        //number of values == 3
        strGrpInstance[i] = temp.value(i);
        if(strGrpInstance[i]==null) throw new Exception("A parameter in group-strategy line is null.");
      }
      /*
       * @attribute groupId NUMERIC
       * @attribute targetGroupId NUMERIC
       * @attribute strategyId NUMERIC
       */
      System.out.println("g1: " + strGrpInstance[0].intValue());
      System.out.println("g2: " + strGrpInstance[1].intValue());
      Group g1 = getGroup(strGrpInstance[0].intValue(), groups);
      if(g1==null) throw new Exception("Group not found in the parsed groups.");
      Group g2 = getGroup(strGrpInstance[1].intValue(), groups);
      if(g2==null) throw new Exception("Group not found in the parsed groups.");
      Strategy s = getStrategy(strGrpInstance[2].intValue(), strategies);
      if(s==null) throw new Exception("Strategy not found in the parsed strategies.");
      g1.assignTargetGpStrategy(g2, s);
    }
   
    //we have all the groups and the strategies associated with them. Now generate the feedbacks
View Full Code Here

Examples of gov.nist.microanalysis.EPQLibrary.Strategy

        // Create simulation
        String name = extractor.getName();
        MonteCarloSS mcss = extractor.getMonteCarloSS();
        Map<String, Detector> detectors = extractor.getDetectors();
        Set<Limit> limits = extractor.getLimits();
        Strategy strategy = extractor.getStrategy();

        // Setup detectors
        report(0.0, "Setup detectors");
        setupDetectors(mcss, detectors.values(), strategy);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.