Examples of VehicleType


Examples of com.flansmod.common.driveables.VehicleType

    }

    public void render(EntityVehicle vehicle, double d, double d1, double d2, float f, float f1)
    {
      bindEntityTexture(vehicle);
      VehicleType type = vehicle.getVehicleType();
        GL11.glPushMatrix();
        {
          GL11.glTranslatef((float)d, (float)d1, (float)d2);
          float dYaw = (vehicle.axes.getYaw() - vehicle.prevRotationYaw);
          for(; dYaw > 180F; dYaw -= 360F) {}
View Full Code Here

Examples of it.polito.appeal.traci.VehicleType

    conn.nextSimStep();

    //assertTrue(conn.getVehicleRepository().getIDs().size() > 0);
    final String id = "A_NEW_VEHICLE";
    Route route = conn.getRouteRepository().getByID("0");
    VehicleType vType = conn.getVehicleTypeRepository().getByID("KRAUSS_DEFAULT");
   
    AddVehicleQuery avq = conn.queryAddVehicle();
    avq.setVehicleData(id, vType, route, 0, 0, 0);
    avq.run();
   
View Full Code Here

Examples of jsprit.core.problem.vehicle.VehicleType

    private StateManager stateManager;

    @Before
    public void doBefore(){
        Vehicle vehicle = mock(Vehicle.class);
        VehicleType type = mock(VehicleType.class);
        when(type.getCapacityDimensions()).thenReturn(Capacity.Builder.newInstance().addDimension(0,20).build());
        when(vehicle.getType()).thenReturn(type);

        VehicleRoutingProblem.Builder serviceProblemBuilder = VehicleRoutingProblem.Builder.newInstance();
        Service s1 = Service.Builder.newInstance("s").addSizeDimension(0,10).setLocationId("loc").build();
        Service s2 = Service.Builder.newInstance("s2").addSizeDimension(0,5).setLocationId("loc").build();
View Full Code Here

Examples of jsprit.core.problem.vehicle.VehicleType

    private VehicleRoutingProblem vrp;

    @Before
    public void doBefore(){
        VehicleType type = VehicleTypeImpl.Builder.newInstance("t").build();
        vehicle = VehicleImpl.Builder.newInstance("v").addSkill("skill1").addSkill("skill2").addSkill("skill3").addSkill("skill4").setStartLocationId("start").setType(type).build();
        vehicle2 = VehicleImpl.Builder.newInstance("v").addSkill("skill4").addSkill("skill5").setStartLocationId("start").setType(type).build();

        Service service = Service.Builder.newInstance("s").setLocationId("loc").addRequiredSkill("skill1").build();
        Service service2 = Service.Builder.newInstance("s2").setLocationId("loc").addRequiredSkill("skill1").addRequiredSkill("skill2").addRequiredSkill("skill3").build();
View Full Code Here

Examples of jsprit.core.problem.vehicle.VehicleType


    public static void main(String[] args) {


        VehicleType type = VehicleTypeImpl.Builder.newInstance("type").addCapacityDimension(BANANAS_DIMENSION_INDEX,10)
                .addCapacityDimension(APPLES_DIMENSION_INDEX, 20).build();
        VehicleImpl vehicle = VehicleImpl.Builder.newInstance("vehicle").setStartLocationCoordinate(Coordinate.newInstance(0, 0))
                .setType(type).build();

        Shipment bananas = Shipment.Builder.newInstance("bananas_1").addSizeDimension(BANANAS_DIMENSION_INDEX,1)
View Full Code Here

Examples of jsprit.core.problem.vehicle.VehicleType

    /*
     * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2
     */
    VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 2);
    vehicleTypeBuilder.setCostPerDistance(1.0);
    VehicleType vehicleType = vehicleTypeBuilder.build();
   
    /*
     * define two vehicles and their locations.
     *
     * this example employs two vehicles. one that has to return to its start-location (vehicle1) and one that has a different
View Full Code Here

Examples of jsprit.core.problem.vehicle.VehicleType

    /*
     * get a vehicle type-builder and build a type with the typeId "vehicleType" and one capacity dimension, i.e. weight, and capacity dimension value of 2
     */
    final int WEIGHT_INDEX = 0;
    VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(WEIGHT_INDEX, 2);
    VehicleType vehicleType = vehicleTypeBuilder.build();
   
    /*
     * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType"
     */
    Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle");
View Full Code Here

Examples of jsprit.core.problem.vehicle.VehicleType

    vrpBuilder.addJob(Service.Builder.newInstance("20").addSizeDimension(0, 22).setCoord(Coordinate.newInstance(66, 14)).build());
   
   
    //add vehicle - finite fleet
    //2xtype1
    VehicleType type1 = VehicleTypeImpl.Builder.newInstance("type_1").addCapacityDimension(0, 120).setCostPerDistance(1.0).build();
    VehicleImpl vehicle1_1 = VehicleImpl.Builder.newInstance("1_1").setStartLocationCoordinate(Coordinate.newInstance(40, 40)).setType(type1).build();
    vrpBuilder.addVehicle(vehicle1_1);
    VehicleImpl vehicle1_2 = VehicleImpl.Builder.newInstance("1_2").setStartLocationCoordinate(Coordinate.newInstance(40, 40)).setType(type1).build();
    vrpBuilder.addVehicle(vehicle1_2);
    //1xtype2
    VehicleType type2 = VehicleTypeImpl.Builder.newInstance("type_2").addCapacityDimension(0, 160).setCostPerDistance(1.1).build();
    VehicleImpl vehicle2_1 = VehicleImpl.Builder.newInstance("2_1").setStartLocationCoordinate(Coordinate.newInstance(40, 40)).setType(type2).build();
    vrpBuilder.addVehicle(vehicle2_1);
    //1xtype3
    VehicleType type3 = VehicleTypeImpl.Builder.newInstance("type_3").addCapacityDimension(0, 300).setCostPerDistance(1.3).build();
    VehicleImpl vehicle3_1 = VehicleImpl.Builder.newInstance("3_1").setStartLocationCoordinate(Coordinate.newInstance(40, 40)).setType(type3).build();
    vrpBuilder.addVehicle(vehicle3_1);
   
    //add penaltyVehicles to allow invalid solutions temporarily
//    vrpBuilder.addPenaltyVehicles(5, 1000);
View Full Code Here

Examples of jsprit.core.problem.vehicle.VehicleType

     * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2
     */
    VehicleTypeImpl.Builder wheelChairTypeBuilder = VehicleTypeImpl.Builder.newInstance("wheelChairBusType")
        .addCapacityDimension(WHEELCHAIRSPACE_INDEX, 2) //can transport two people with wheelchair
        .addCapacityDimension(PASSENGERSEATS_INDEX, 4); //and 4 without
    VehicleType vehicleType_wheelchair = wheelChairTypeBuilder.build();
   
    VehicleTypeImpl.Builder soleyPassengerTypeBuilder = VehicleTypeImpl.Builder.newInstance("passengerBusType")
        .addCapacityDimension(PASSENGERSEATS_INDEX, 6); //and 4 without
    VehicleType vehicleType_solelypassenger = soleyPassengerTypeBuilder.build();
   
    /*
     * define two vehicles and their locations.
     *
     * this example employs two vehicles. one that has to return to its start-location (vehicle1) and one that has a different
View Full Code Here

Examples of jsprit.core.problem.vehicle.VehicleType

    Coordinate second = Coordinate.newInstance(33, -33);
   
    int depotCounter = 1;
    for(Coordinate depotCoord : Arrays.asList(firstDepotCoord,second)){
      for(int i=0;i<nuOfVehicles;i++){
        VehicleType vehicleType = VehicleTypeImpl.Builder.newInstance(depotCounter + "_type")
                        .addCapacityDimension(0, capacity).setFixedCost(100.).setCostPerDistance(1.0).build();
        String vehicleId = depotCounter + "_" + (i+1) + "_vehicle";
        VehicleImpl.Builder vehicleBuilder = VehicleImpl.Builder.newInstance(vehicleId);
        vehicleBuilder.setStartLocationCoordinate(depotCoord);
        vehicleBuilder.setType(vehicleType);
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.