Examples of Shipment


Examples of jsprit.core.problem.job.Shipment

            if(job instanceof Service) {
                Service service = (Service) job;
        addService(service);
      }
      else if(job instanceof Shipment){
        Shipment shipment = (Shipment)job;
                addShipment(shipment);
      }
            List<AbstractActivity> jobActs = jobActivityFactory.createActivities(job);
            for(AbstractActivity act : jobActs){
                act.setIndex(activityIndexCounter);
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

    }

        private void registerLocation(Job job) {
            if (job instanceof Service) tentative_coordinates.put(((Service) job).getLocationId(), ((Service) job).getCoord());
            if (job instanceof Shipment) {
                Shipment shipment = (Shipment) job;
                tentative_coordinates.put(shipment.getPickupLocationId(), shipment.getPickupCoord());
                tentative_coordinates.put(shipment.getDeliveryLocationId(), shipment.getDeliveryCoord());
            }
        }
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

    for(Relation rel : relations){
      counter++;
      String from = rel.from;
      String to = rel.to;
      int demand = rel.demand;
      Shipment s = Shipment.Builder.newInstance(counter.toString()).addSizeDimension(0, demand)
          .setPickupCoord(customers.get(from).coord).setPickupServiceTime(customers.get(from).serviceTime)
          .setPickupTimeWindow(TimeWindow.newInstance(customers.get(from).start, customers.get(from).end))
          .setDeliveryCoord(customers.get(to).coord).setDeliveryServiceTime(customers.get(to).serviceTime)
          .setDeliveryTimeWindow(TimeWindow.newInstance(customers.get(to).start, customers.get(to).end)).build();
      vrpBuilder.addJob(s);
View Full Code Here

Examples of jsprit.core.problem.job.Shipment

    @Test
    public void maxCapacityShouldNotBeExceeded(){
        VehicleType type = VehicleTypeImpl.Builder.newInstance("type").addCapacityDimension(0, 100).build();
        VehicleImpl vehicle = VehicleImpl.Builder.newInstance("veh").setStartLocationCoordinate(Coordinate.newInstance(0, 0)).setType(type).setStartLocationId("start").build();

        Shipment shipment = Shipment.Builder.newInstance("s").setPickupLocationId("pick").setDeliveryLocationId("del").setPickupCoord(Coordinate.newInstance(10, 0))
                .setDeliveryCoord(Coordinate.newInstance(0, 10)).addSizeDimension(0, 100).build();

        Shipment another_shipment = Shipment.Builder.newInstance("another_s").setPickupLocationId("pick").setDeliveryLocationId("del").setPickupCoord(Coordinate.newInstance(10, 0))
                .setDeliveryCoord(Coordinate.newInstance(0, 10)).addSizeDimension(0, 50).build();

        VehicleRoute iniRoute = VehicleRoute.Builder.newInstance(vehicle).addPickup(shipment).addDelivery(shipment).build();

        VehicleRoutingProblem vrp = VehicleRoutingProblem.Builder.newInstance().addJob(shipment).addVehicle(vehicle).addJob(another_shipment)
View Full Code Here

Examples of no.sws.invoice.shipment.Shipment

    if(invoice == null) {
      throw new IllegalArgumentException("Parameter invoice can't be null");
    }

    final Shipment shipment = invoice.getShipment();

    if(shipment == null) {
      throw new IllegalStateException("The given invoice.getShipment() returned null. Here is your invoice object:\n" + invoice);
    }

    final Element result = new Element("shipment");

    result.setText(shipment.getShipmentType().toString().toUpperCase());

    // set email/copy-addresses
    if(shipment.getShipmentType() == ShipmentType.email || shipment.getShipmentType() == ShipmentType.paper_and_email) {

      // email addresses is required
      final List<String> emailAddresses = shipment.getEmailAddresses();

      if(emailAddresses == null || emailAddresses.size() == 0) {
        throw new IllegalStateException("You must specify email addresses on shipment when shipment type is "
            + shipment.getShipmentType().toString());
      }

      // create <emailaddresses> child element and add it to the shipment element
      final Element emailAddressesElement = new Element("emailaddresses");
      result.addContent(emailAddressesElement);

      // iterate all email addresses
      for(final String currentEmailAddress : emailAddresses) {

        // create email element
        final Element emailAddressElement = new Element("email");
        emailAddressElement.setText(currentEmailAddress);

        // add element to parent element (<emailaddresses>)
        emailAddressesElement.addContent(emailAddressElement);
      }

      // copy addresses is optional
      final List<String> copyAddresses = shipment.getCopyAddresses();

      if(copyAddresses != null && copyAddresses.size() > 0) {

        // create <copyaddresses> child element and add it to the shipment element
        final Element copyAddressesElement = new Element("copyaddresses");
View Full Code Here

Examples of org.blueoxygen.postila.entity.Shipment

            model.removeRow(model.getRowCount()-1);
    }
    if(!list.isEmpty()){
            String sContact = "";
            for(Object ob : list){
                Shipment sp = (Shipment) ob;
                model.addRow(new Object[]{sp.getDocNo(),sp.getDescription(),sp.getBusinessPartner().getName()});
            }
        }
    }
View Full Code Here

Examples of pl.com.bottega.ecommerce.shipping.domain.Shipment

    private ShipmentRepository repository;

    @EventListener(asynchronous = true)
    public void handle(OrderSubmittedEvent event) {
        OrderDto orderDetails = orderFinder.find(event.getOrderId());
        Shipment shipment = factory.createShipment(orderDetails.getOrderId());
        repository.save(shipment);
    }
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.