Examples of Place


Examples of hu.u_szeged.nbo.res_alloc.model.type.Place

  private int computeC_A() {
    int C_A = 0;
    for (int i = 1; i <= shiftContainer.getShiftNum(); i++) {
      Shift s = shiftContainer.getShiftById(i);
      if (s.getParent() == null) {
        Place actualPlace = s.getBeginPlace();
        int actualTime = s.getTime().getBegin();
        int worktime = 0;
        for (int j = 0; j < s.getAssignedTasks().size(); j++) {
          Task t = s.getAssignedTasks().get(j);
          int time = t.getCompletionTime().getEnd() -
View Full Code Here

Examples of hu.u_szeged.nbo.res_alloc.model.type.Place

      if (s.getParent() == null) {
        out += "E" + s.getId() + " (" + s.getBeginPlace().getName() + "):\n";
       
        int shiftActiveTime = 0;
        int shiftActualTime = s.getTime().getBegin();
        Place shiftActualPlace = s.getBeginPlace();
        int shiftOverTime = 0;
        for (int j = 0; j < s.getAssignedTasks().size(); j++) {
          Task t = s.getAssignedTasks().get(j);

          if (shiftActualPlace.getId() != t.getPlace().getId()) {
            int traveltime = trafficProperties.getDistance(shiftActualPlace,
                t.getPlace(), shiftActualTime);
            int cost = s.getResource().getFare() * traveltime;
               
            numOfTravels++;
            totalCostOfTravels += cost;
            out += "    utazas: " + t.getPlace().getName() +
                " (ktg:" + cost + ")\n";
            shiftActualPlace = t.getPlace();
            shiftActualTime += traveltime;
            shiftActiveTime += traveltime;
          }
          shiftActiveTime += t.getCompletionTime().getEnd() - t.getCompletionTime().getBegin();
          shiftActualTime = t.getCompletionTime().getEnd();
          out += "  M" + t.getId() + "\t[" + t.getCompletionTime().getBegin()
              + "-" + t.getCompletionTime().getEnd() + "] ";
          out += "(kes ktg: " + KES(t) + ")\n";
         
          int tohome = trafficProperties.getDistance(t.getPlace(),
              s.getEndPlace(), t.getCompletionTime().getEnd());
          if (t.getCompletionTime().getEnd() + tohome > s.getTime().getEnd()) {
            int ot = t.getCompletionTime().getEnd() + tohome -
                s.getTime().getEnd();
            if (ot > shiftOverTime) {
              shiftOverTime = ot;
            }
          }
        }
        //shiftActualTime += shiftOverTime;
        if (shiftActualPlace.getId() != s.getEndPlace().getId()) {
          int traveltime = trafficProperties.getDistance(shiftActualPlace,
              s.getEndPlace(),
              shiftActualTime);
          int cost = s.getResource().getFare() * traveltime;
             
 
View Full Code Here

Examples of hu.u_szeged.nbo.res_alloc.model.type.Place

      //ignore header fields
      tokenizer.nextToken();
      tokenizer.nextToken();
     
      while (tokenizer.hasMoreTokens()) {
        Place place = new Place();
        int id = Integer.parseInt(tokenizer.nextToken());
        place.setId(id);
        String name = tokenizer.nextToken();
        place.setName(name);
       
        places.putPlace(id, place);
      }
     
      model.setPlaceContainer(places);
View Full Code Here

Examples of name.shamansir.mvp4glayout.client.ui.structure.Place

        this.reactor = reactor;
    }
   
    @Override
    public void update(State to) {
        final Place place = view.getPlace();
        if (place == null) throw new IllegalStateException("Cannot determine current place");
        view.prepareFor(to);       
        reactor.changeState(place, to);
    }
View Full Code Here

Examples of net.baguajie.domains.Place

  PlaceRepository placeRepository;

  @RequestMapping(value="/place/{id}", method=RequestMethod.GET)
  public String view(@PathVariable String id, Model model,
      HttpServletRequest request, HttpSession session){
    Place place = placeRepository.findOne(id);
    model.addAttribute("place", place);
    return "spots/place";
  }
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Place

            client.getStatistics().placeQueued(p);

            if (asynchronous) {
                return placeMappingQueue.offer(p.getId());
            } else {
                Place p2 = client.fetchPlace(p.getId());
                boolean b = placeMappingHandler.isOpen();
                if (b) {
                    placeMappingHandler.handle(p2);
                }
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Place

        }
    }

    public synchronized Place fetchPlace(String id) throws TwitterClientException {
        try {
            return new Place(twitter.getGeoDetails(id));
        } catch (TwitterException e) {
            throw new TwitterClientException(e);
        }
    }
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Place

    public Place fetchPlace(final String id) throws TwitterClientException {
        HttpGet request = new HttpGet(TwitterAPI.API_PLACES_URL + id + ".json");

        JSONObject object = requestJSONObject(request);
        try {
            return new Place(object);
        } catch (TweetParseException e) {
            throw new TwitterClientException(e);
        }
    }
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Place

                            continue;
                        }

                        try {
                            // Make an HTTP request for the place
                            Place p = client.fetchPlace(id);

                            // Handle the result
                            if (!resultHandler.isOpen()) {
                                LOGGER.fine("closing place mapping queue");
                                closed = true;
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Place

                PersistenceContext pc
                        = new PersistenceContext(c);

                PlacePersistenceHelper ph = new PlacePersistenceHelper(pc, client, false);
                for (String id : ids) {
                    Place p = new Place(id);
                    Feature f = pc.persist(p);
                    ph.submit(p, f);
                    c.commit();
                }
            } finally {
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.