Vehicle Routing Problem

Develop architecture for route construction, which allows philosophy of insertion and, more importantly, deletion of customer in route. Develop the structure of heuristic in such way, so the algorithm find satisfactory solution in acceptable time period.

Рубрика Программирование, компьютеры и кибернетика
Вид дипломная работа
Язык английский
Дата добавления 28.08.2016
Размер файла 812,6 K

Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже

Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.

return BIG_NUMBER

overCapacityPenalty = penaltyOverCapacity(route1,route2,route3,route4)

return costDelta + delayPenalty + overCapacityPenalty

After finding the best insertion and the cost of this insertion with penalty, the program decides whether the insertion should be performed. If the cost with penalty is negative, the insertion is performed. If the cost with penalty is positive, the decision depends on probability, the higher the value of the cost with penalty, the lower the probability to perform the insertion. if the cost is greater than some specified limit, the insertion isn't performed. If insertion is performed, the tabu step is considered successful.

Finally, to obtain feasible solution, the program needs special procedures to leave infeasible neighborhood. First procedure helps over-capacitated routes to come back under the vehicle capacity. For every over-capacitated route, the procedure tries to take one customer from it and insert to another route, however, this procedure tries to insert in every possible position in every other route, unlike in the tabu step procedure. If there are over-capacitated routes left, but deletion from those routes and insertion in other routes is impossible, then new route or routes are created to place “excessive” customers. After the procedure of repairing over-capacitated routes, the program needs to decrease the number of delays. The procedure takes routes in order, and if in the route there is a customer with delay, it tries to delete the customer and insert it in another route without an increase in delays. The procedure stops when the number of delays is under the limit or there is no such insertion possible anymore.

However, experiments showed that tabu step algorithm was not so efficient in descent to the satisfactory solution, sometimes the algorithm gets stuck in wide local minimum neighborhoods. Moreover, it is hard for the program to decrease the number of delays. To overcome such neighborhoods and delays problem, the algorithm of re-timing was created. The idea of this procedure is to create places inside routes, to insert customers. The procedures takes every route and does the following

- For every place between two Route Points, the algorithm tries to create additional space.

- The additional place is created by shifting to the latest possible time all the Route Points at the right of the current place, and shifting to the earliest possible time all the Route Points at the left of the current place.

- Then, after constructing such re-timed routes at every possible place, the best routes are chosen by the least number of delays, if new number of delays is too big, the re-timing is considered unsuccessful.

- All the routes are replaced by their re-timed versions.

Every thousand successes, the algorithm stops doing tabu steps. First, it repairs over-capacitated routes. Then, the program performs re-timing procedures. After re-timing, the algorithm tries to decrease the number of delays. Finally, the times of all routes are finalized. If after all these procedures the number of delays is under the limit, the program checks if the solution is better than the best current known solution.

Whole tabu search algorithm in code is in Application 3.

Results

The test results of the algorithm showed successful descent to satisfactory results. As a test example, real data from one day was taken. Results on old architecture greedy algorithm give the cue of empirical bound, such that, if the solution is lower than this bound, it can be considered good. For Day 1 this bound is 1200 thousands. After 45 minutes of work, the algorithm found solutions with costs 1135 and 1147 thousands. During the work of algorithm there were noticed some features:

- The algorithm rapidly descended at the start, which tells about the poor quality of the start greedy route construction solution.

- The successes of tabu steps happens rarely if the algorithm is in some local minimum and happens more often when the cost of the solution is visibly decreases.

- The algorithm decreases the number of routes by itself, which shows that it actually tries to improve the solution (every route has fixed cost and because of it in many cases many short routes is worse than a few long routes).

The architecture allows to change the structure of routes and the whole VRP problem. That means this algorithm can be applied to different real-life VRP problems, or it can conform to the new requirements for the current SDTTRPTW with soft time windows and split deliveries.

Bibliography

1. Toth P., Vigo D. (2002). The Vehicle Routing Problem. Philadelphia, PA: Society for Industrial and Applied Mathematics.

2. Chao, I. M. (2002). A tabu search method for the truck and trailer routing problem. Computers & Operations Research 29(1), p. 33-51.

3. Scheuerer, S. (2006). A tabu search heuristic for the truck and trailer routing problem. Computers & Operations Research 33, p. 894-909.

4. Batsyn M., Ponomarenko A. (2014). Heuristic for a Real-life Truck and Trailer Routing Problem. The 2nd International Conference on Information Technology and Quantitative Management, ITQM 2014, Procedia Computer Science 31, p. 778-792.

5. Semet, F., Taillard, E. (1993). Solving real-life vehicle routing problems e?ciently using tabu search. Annals of Operations Research 41, p. 469-488.

6. Drexl, M. (2011). Branch-and-Price and Heuristic Column Generation for the Generalized Truck-and-Trailer Routing Problem. Journal of Quantitative Methods for Economics and Business Administration 12(1), p. 5-38.

7. Glover F., Laguna M. (1999). Tabu search. In Handbook of Combinatorial Optimization (pp. 2093-2229). Springer US.

Application 1. Procedure of choosing an insertion case

boolean insertCustomer (Customer customer, ListIterator<Action> iter, int unloadTime, int totalCargo, int place)

{

boolean success = false;

if (route.get(place).getType() == RoutePointType.DEPOT && route.get(place + 1).getType() == RoutePointType.DEPOT)

{

if (vrp.isTruckStore(vehicle,customer))

{

if (totalCargo < vehicle.getTruckCapacity())

{

vehicle.removeTrailer();

success = simpleParkingUnloadInsertion(customer,iter,unloadTime,totalCargo);

if (success)

{

route.add(place + 1, new UnloadRoutePoint());

currentInsertionPlace = place + 1;

}

return success;

}

else

{

success = leaveTrailerWithoutUnloadInsertion(customer,iter,unloadTime,totalCargo);

if (success)

{

route.add(place + 1, new LeaveTrailerWithoutUnloadPoint());

route.add(place + 2, new UnloadRoutePoint());

route.add(place + 3, new TakeTrailerPoint());

currentInsertionPlace = place + 2;

}

return success;

}

}

else

{

success = simpleParkingUnloadInsertion(customer,iter,unloadTime,totalCargo);

if (success)

{

route.add(place + 1, new UnloadRoutePoint());

currentInsertionPlace = place + 1;

}

return success;

}

}

if (isTruckPoint(place))

{

if (vehicle.getTrailerCapacity() == 0)

{

success = simpleParkingUnloadInsertion(customer,iter,unloadTime,totalCargo);

if (success)

{

route.add(place + 1, new UnloadRoutePoint());

currentInsertionPlace = place + 1;

}

return success;

}

else

{

int i = place;

while (route.get(i).getType() != RoutePointType.LEAVE_TRAILER_WITHOUT_UNLOAD && route.get(i).getType() != RoutePointType.LEAVE_TRAILER)

i--;

int totalTruckRouteCargo = 0;

while (route.get(i).getType() != RoutePointType.TAKE_TRAILER)

{

totalTruckRouteCargo += route.get(i).getLoad();

i++;

}

if (totalCargo < vehicle.getTruckCapacity() - totalTruckRouteCargo)

{

success = simpleParkingUnloadInsertion(customer,iter,unloadTime,totalCargo);

if (success)

{

route.add(place + 1, new UnloadRoutePoint());

currentInsertionPlace = place + 1;

}

return success;

}

else

{

return false;

}

}

}

if (isTrailerPoint(route.get(place).getType(),route.get(place + 1).getType()))

{

if (vrp.isTruckStore(vehicle,customer))

{

float decision = (float) config.generator.nextDouble();

if (!isPossibleToLeaveTrailer(route.get(place).getType()))

decision = 0;

if (decision < 0.5)

{

success = leaveTrailerWithoutUnloadInsertion(customer, iter, unloadTime, totalCargo);

if (success)

{

route.add(place + 1, new LeaveTrailerWithoutUnloadPoint());

route.add(place + 2, new UnloadRoutePoint());

route.add(place + 3, new TakeTrailerPoint());

currentInsertionPlace = place + 2;

}

return success;

}

else

{

if (totalCargo > vehicle.getTrailerCapacity())

return false;

RoutePoint unloadPoint = route.elementAt(place);

LeaveTrailerWithUnloadPoint leaveTrailerPoint = new LeaveTrailerWithUnloadPoint();

leaveTrailerPoint.setLoad(unloadPoint.getHotLoad(),unloadPoint.getFreezeLoad());

Customer leaveTrailerCustomer = route.elementAt(place).getCustomer();

success = leaveTrailerInsertion(leaveTrailerCustomer, customer, iter, unloadTime, totalCargo);

if (success)

{

route.remove(place);

route.add(place, leaveTrailerPoint);

route.add(place + 1, new UnloadRoutePoint());

route.add(place + 2, new TakeTrailerPoint());

currentInsertionPlace = place + 1;

}

return success;

}

}

else

{

success = simpleParkingUnloadInsertion(customer,iter,unloadTime,totalCargo);

if (success)

{

route.add(place + 1, new UnloadRoutePoint());

currentInsertionPlace = place + 1;

}

return success;

}

}

success = simpleParkingUnloadInsertion(customer,iter,unloadTime,totalCargo);

if (success)

{

route.add(place + 1, new UnloadRoutePoint());

currentInsertionPlace = place + 1;

}

return success;

}

Application 2. The procedure of deletion of chosen customer.

Customer deleteCustomer(int place) throws VRPException

{

if(route.elementAt(place).getType() == RoutePointType.LEAVE_TRAILER_WITHOUT_UNLOAD ||

route.elementAt(place).getType() == RoutePointType.TAKE_TRAILER)

return null;

Customer customer = route.elementAt(place).getCustomer();

int hot = route.elementAt(place).getHotLoad();

int freeze = route.elementAt(place).getFreezeLoad();

customer.setRemainingDemand(hot,freeze);

totalDelivery -= hot + freeze;

boolean isLeaveTrailerPoint = false;

boolean isLeaveTrailerWithoutUnloadPoint = false;

if(route.elementAt(place).getType() == RoutePointType.LEAVE_TRAILER)

isLeaveTrailerPoint = true;

int leaveTrailerWithoutUnloadCount = place - 1;

while(leaveTrailerWithoutUnloadCount > 0)

{

if (route.elementAt(leaveTrailerWithoutUnloadCount).getType() == RoutePointType.LEAVE_TRAILER_WITHOUT_UNLOAD

&& route.elementAt(leaveTrailerWithoutUnloadCount).getCustomer().getId() == customer.getId())

{

isLeaveTrailerWithoutUnloadPoint = true;

break;

}

leaveTrailerWithoutUnloadCount--;

}

if (isLeaveTrailerPoint)

{

int leaveTrailerPlace = place;

int takeTrailerPlace = place;

while(route.elementAt(takeTrailerPlace).getType() != RoutePointType.TAKE_TRAILER)

{

takeTrailerPlace++;

}

ListIterator<Action> iter = deleteRoutePoint(leaveTrailerPlace);

route.remove(leaveTrailerPlace);

takeTrailerPlace--;

int timeAfterDeletedPoint = iter.previous().finishAt();

iter.next();

Customer newLeaveTrailerCustomer = route.elementAt(leaveTrailerPlace).getCustomer();

boolean needToCreateTakeTrailer = true;

if (vrp.isTruckStore(vehicle,newLeaveTrailerCustomer))

{

insertLeaveTrailerWithoutUnload(timeAfterDeletedPoint,newLeaveTrailerCustomer,iter);

route.add(leaveTrailerPlace, new LeaveTrailerWithoutUnloadPoint());

takeTrailerPlace++;

}

else

{

if (route.elementAt(leaveTrailerPlace + 1).getType() != RoutePointType.TAKE_TRAILER)

{ newLeaveTrailerCustomer.setRemainingDemand(route.elementAt(leaveTrailerPlace).getHotLoad(), route.elementAt(leaveTrailerPlace).getFreezeLoad());

int lengthNewCustomerOldUnload = route.elementAt(leaveTrailerPlace).getLength();

int timeToUnload = route.elementAt(leaveTrailerPlace).getUnloadTime();

for (int j = 0; j < lengthNewCustomerOldUnload; j++) {

iter.next();

iter.remove();

}

Customer afterLeaveTrailerCustomer = route.elementAt(leaveTrailerPlace + 1).getCustomer();

int startTime = vrp.depotStartTime;

if (leaveTrailerPlace == 1) {

Travel firstTravel = new Travel(vrp.customers.elementAt(0), vrp.depotStartTime, customer, vrp);

actions.set(0, firstTravel);

startTime = firstTravel.finishAt();

iter = actions.listIterator(1);

}

else

{

int travelActionIndex = iter.previousIndex();

Action beforeInsertionTravel = iter.previous();

Travel travelFromPrev = new Travel(beforeInsertionTravel.getCustomer(), beforeInsertionTravel.startAt(), customer, vrp);

actions.set(travelActionIndex, travelFromPrev);

startTime = travelFromPrev.finishAt();

iter.next();

}

insertLeaveTrailerWithUnload(startTime, newLeaveTrailerCustomer, iter, afterLeaveTrailerCustomer, timeToUnload, false);

route.remove(leaveTrailerPlace);

route.add(leaveTrailerPlace, new LeaveTrailerWithUnloadPoint());//TODO:

correctDemands(newLeaveTrailerCustomer, newLeaveTrailerCustomer.getTotalRemainingDemand(), leaveTrailerPlace);

}

else

{

needToCreateTakeTrailer = false;

}

}

deleteRoutePoint(takeTrailerPlace);

route.remove(takeTrailerPlace);

if(needToCreateTakeTrailer)

{

int actionIndex = 0;

for (int i = 0; i < takeTrailerPlace; i++) {

actionIndex += route.elementAt(i).getLength();

}

iter = actions.listIterator(actionIndex);

Action lastTravel = iter.next();

Customer lastTruckRouteCustomer = lastTravel.getCustomer();

int timeToStartTravel = lastTravel.startAt();

iter.remove();

Travel travelFromLastToTakeTrailer = new Travel(lastTruckRouteCustomer, timeToStartTravel, newLeaveTrailerCustomer, vrp);

iter.add(travelFromLastToTakeTrailer);

insertTakeTrailerPoint(travelFromLastToTakeTrailer.finishAt(), newLeaveTrailerCustomer, iter);

route.add(takeTrailerPlace, new TakeTrailerPoint());

}

setActionsForRoute();

boolean success = finalizeTimes();

if(!success)

return null;

}

else if(isLeaveTrailerWithoutUnloadPoint)

{

int leaveTrailerWithoutUnloadPlace = leaveTrailerWithoutUnloadCount;

int takeTrailerPlace = leaveTrailerWithoutUnloadCount;

boolean trailerPointsInsideTruckRoute = true;

while(route.elementAt(takeTrailerPlace).getType() != RoutePointType.TAKE_TRAILER)

{

if(vrp.isTruckStore(vehicle,route.elementAt(takeTrailerPlace).getCustomer()) &&

route.elementAt(takeTrailerPlace).getType() == RoutePointType.TRAILER_UNLOAD && takeTrailerPlace != place)

trailerPointsInsideTruckRoute = false;

takeTrailerPlace++;

}

if(trailerPointsInsideTruckRoute)

{

deleteRoutePoint(takeTrailerPlace);

route.remove(takeTrailerPlace);

deleteRoutePoint(place);

route.remove(place);

deleteRoutePoint(leaveTrailerWithoutUnloadPlace);

route.remove(leaveTrailerWithoutUnloadPlace);

}

else

{

deleteRoutePoint(takeTrailerPlace);

route.remove(takeTrailerPlace);

deleteRoutePoint(place);

route.remove(place);

takeTrailerPlace--;

ListIterator<Action> iter = deleteRoutePoint(leaveTrailerWithoutUnloadPlace);

route.remove(leaveTrailerWithoutUnloadPlace);

takeTrailerPlace--;

Customer newLeavePlace = route.elementAt(leaveTrailerWithoutUnloadPlace).getCustomer();

int timeToUnload = route.elementAt(leaveTrailerWithoutUnloadPlace).getUnloadTime();

if (vrp.isTruckStore(vehicle,newLeavePlace))

{

int actionIndex = 0;

for(int i = 0; i < leaveTrailerWithoutUnloadPlace; i++)

{

actionIndex += route.elementAt(i).getLength();

}

insertLeaveTrailerWithoutUnload(actions.get(actionIndex).finishAt(),newLeavePlace,iter);

route.add(leaveTrailerWithoutUnloadPlace,new LeaveTrailerWithoutUnloadPoint());

takeTrailerPlace++;

actionIndex = 0;

for (int i = 0; i < takeTrailerPlace; i++)

{

actionIndex += route.elementAt(i).getLength();

}

iter = actions.listIterator(actionIndex);

Action lastTravel = iter.next();

Customer lastTruckRouteCustomer = lastTravel.getCustomer();

int timeToStartTravel = lastTravel.startAt();

iter.remove();

Travel travelFromLastToTakeTrailer = new Travel(lastTruckRouteCustomer,timeToStartTravel,newLeavePlace,vrp);

iter.add(travelFromLastToTakeTrailer);

insertTakeTrailerPoint(travelFromLastToTakeTrailer.finishAt(),newLeavePlace,iter);

route.add(takeTrailerPlace, new TakeTrailerPoint());

}

else

{

Customer leaveTrailerCustomer = route.elementAt(leaveTrailerWithoutUnloadPlace).getCustomer();

leaveTrailerCustomer.setRemainingDemand(route.elementAt(leaveTrailerWithoutUnloadPlace).getHotLoad(),route.elementAt(leaveTrailerWithoutUnloadPlace).getFreezeLoad());

Customer firstTruckRouteCustomer = route.elementAt(leaveTrailerWithoutUnloadPlace + 1).getCustomer();

iter = deleteRoutePoint(leaveTrailerWithoutUnloadPlace);

route.remove(leaveTrailerWithoutUnloadPlace);

int actionIndex = 0;

for (int i = 0; i < leaveTrailerWithoutUnloadPlace; i++)

{

actionIndex += route.elementAt(i).getLength();

}

int startTime = vrp.depotStartTime;

if (leaveTrailerWithoutUnloadPlace == 1)

{

Travel firstTravel = new Travel(vrp.customers.elementAt(0),vrp.depotStartTime,customer,vrp);

actions.set(0, firstTravel);

startTime = firstTravel.finishAt();

iter = actions.listIterator(1);

}

else

{

iter.previous();

int travelActionIndex = iter.nextIndex();

Action beforeInsertionTravel = iter.next();

Travel travelFromPrev = new Travel(beforeInsertionTravel.getCustomer(), beforeInsertionTravel.startAt(), leaveTrailerCustomer, vrp);

actions.set(travelActionIndex, travelFromPrev);

startTime = travelFromPrev.finishAt();

iter = actions.listIterator(actionIndex + 1);

}

insertLeaveTrailerWithUnload(startTime,newLeavePlace,iter,

firstTruckRouteCustomer,timeToUnload,false);

route.add(leaveTrailerWithoutUnloadPlace,new LeaveTrailerWithUnloadPoint());

correctDemands(newLeavePlace,newLeavePlace.getTotalRemainingDemand(),leaveTrailerWithoutUnloadPlace);

actionIndex = 0;

for (int i = 0; i < takeTrailerPlace; i++)

{

actionIndex += route.elementAt(i).getLength();

}

iter = actions.listIterator(actionIndex);

Action beforeTakeTravel = iter.next();

Customer lastTruckRouteCustomer = beforeTakeTravel.getCustomer();

int timeToStartTravel = beforeTakeTravel.startAt();

Travel newTravelBeforeTakeTrailer = new Travel(lastTruckRouteCustomer, timeToStartTravel, leaveTrailerCustomer, vrp);

iter.remove();

iter.add(newTravelBeforeTakeTrailer);

insertTakeTrailerPoint(actions.get(takeTrailerPlace).finishAt(),newLeavePlace,iter);

route.add(takeTrailerPlace, new TakeTrailerPoint());

}

}

setActionsForRoute();

boolean success = finalizeTimes();

if (!success)

{

throw new LocalSearchException("After deletion the route is infeasible");

}

}

else

{

deleteRoutePoint(place);

route.remove(place);

if(route.elementAt(place - 1).getType() == RoutePointType.LEAVE_TRAILER

&& route.elementAt(place).getType() == RoutePointType.TAKE_TRAILER)

{

Customer leaveTrailerCustomer = route.elementAt(place - 1).getCustomer();

leaveTrailerCustomer.setRemainingDemand(route.elementAt(place - 1).getHotLoad(),route.elementAt(place - 1).getFreezeLoad());

int timeToUnload = route.elementAt(place - 1).getUnloadTime();

deleteRoutePoint(place - 1);

route.remove(place - 1);

ListIterator<Action> iterInsert = deleteRoutePoint(place - 1);

route.remove(place - 1);

Customer prev = vrp.customers.elementAt(0);

if (place - 2 != 0)

prev = route.elementAt(place - 2).getCustomer();

Customer next = route.elementAt(place - 1).getCustomer();

int indexTravel = iterInsert.previousIndex();

Travel newTravel = new Travel(prev, actions.get(indexTravel).startAt(), leaveTrailerCustomer, vrp);

actions.set(indexTravel, newTravel);

insertUnloadPoint(newTravel.finishAt(),leaveTrailerCustomer,iterInsert,next,timeToUnload,false);

route.add(place - 1,new UnloadRoutePoint());

correctDemands(leaveTrailerCustomer,leaveTrailerCustomer.getTotalRemainingDemand(),place - 1);

}

ListIterator<Action> iter = actions.listIterator();

for (int i = 1; i < route.size(); i++)

{

route.elementAt(i).setActions(iter);

}

setActionsForRoute();

boolean success = finalizeTimes();

if (!success)

{

throw new LocalSearchException("After deletion the route is infeasible");

}

}

return customer;

}

Application 3. Tabu search procedure.

void simpleTabuSearch()

{

int numberOfSuccessfulSteps = 0;

numberOfSteps = 0;

System.out.println("TotalCost: " + countCost(routes) + ", total delays: " + countDelays(routes) + ", number of faulty capacities routes = " + faultyCapacityRoutesId.size() +

", number of routes = " + routes.size());

setViolations(5,5,20000);

boolean success = true;

int numberOfUnsuccessfulSteps = 0;

while(success)

{

int numberOfRoutes = routes.size();

boolean tabuStepSuccess = tabuStep();

numberOfSteps++;

if(tabuStepSuccess)

{

//System.out.println("" + numberOfSteps + ". " + countCargo(routes));

numberOfUnsuccessfulSteps = 0;

numberOfSuccessfulSteps++;

routes.sort(FREE_CAPACITY_ORDER);

if(numberOfSuccessfulSteps % 100 == 0)

{

System.out.println("TotalCost: " + countCost(routes) + ", total delays: " + countDelays(routes) + ", number of faulty capacities routes = " + faultyCapacityRoutesId.size() +

", number of routes = " + routes.size() + ", tolerances: " + delayOverLimit + "," + faultyRoutesLimit + "," + costTolerance + ", cargo: " + countCargo(routes));

}

if (numberOfSuccessfulSteps % 1000 == 0)

{

routes.sort(ID_ORDER);

optimizeRoutes(routes);

repairFaultCapacityRoutes(routes);

setCargoRepairMode(true);

int iteration = 4000;

while (faultyCapacityRoutesId.size() > 0 && iteration > 0)

{

tabuStep();

iteration--;

}

setCargoRepairMode(false);

finalizeRoutes(routes);

repairDelayLimit(routes);

for (int numRoutes = 0; numRoutes < routes.size(); numRoutes++)

{

if (routes.elementAt(numRoutes).getLength() == 2)

{

int index = routes.elementAt(numRoutes).getVehicle().getIndex();

vrp.setVehicle(index, config.vehicles.elementAt(index));

routes.remove(numRoutes);

}

}

/*setViolations(0,0,0);

int limitToStopImproving = 0;

while (limitToStopImproving < 10000)

{

boolean improved = tabuStep();

if (improved)

{

limitToStopImproving = 0;

System.out.println(countCost(routes));

}

limitToStopImproving++;

}

setViolations(5,5,20000);*/

int newDelays = countDelays(routes);

double newCost = countCost(routes);

System.out.println("TotalCost: " + newCost + ", total delays: " + newDelays + ", number of faulty capacities routes = " + faultyCapacityRoutesId.size() +

", number of routes = " + routes.size() + ", tolerances: " + delayOverLimit + "," + faultyRoutesLimit + "," + costTolerance);

if (newDelays <= delayLimit && faultyCapacityRoutesId.size() <= 0 && newCost < bestCost)

{

bestCost = newCost;

Solution currentSol = new Solution(routes);

System.out.println("Recording cargo is: " + countCargo(routes));

Path path = Paths.get("output.csv");

try

{

Files.deleteIfExists(path);

Files.write(path,"".getBytes(), StandardOpenOption.CREATE_NEW);

}

catch (IOException e) {}

currentSol.output(path);

}

currentNumOfDelays = newDelays;

}

}

else

{

numberOfUnsuccessfulSteps++;

if(numberOfUnsuccessfulSteps > 100000)

{

System.out.println("The search is unable to continue. " + numberOfSteps);

return;

}

}

success = true;

}

}

Размещено на Allbest.ru

...

Подобные документы

  • Описание программного продукта Visual Studio. Возможности, преимущества и недостатки бесплатной среды программирования Sharp Develop для проектов на платформе MS.NET. Получение информации из справочной системы .NET SDK. Запуск визуального отладчика CLR.

    реферат [393,4 K], добавлен 05.04.2017

  • Lines of communication and the properties of the fiber optic link. Selection of the type of optical cable. The choice of construction method, the route for laying fiber-optic. Calculation of the required number of channels. Digital transmission systems.

    дипломная работа [1,8 M], добавлен 09.08.2016

  • Basic assumptions and some facts. Algorithm for automatic recognition of verbal and nominal word groups. Lists of markers used by Algorithm No 1. Text sample processed by the algorithm. Examples of hand checking of the performance of the algorithm.

    курсовая работа [22,8 K], добавлен 13.01.2010

  • Lists used by Algorithm No 2. Some examples of the performance of Algorithm No 2. Invention of the program of reading, development of efficient algorithm of the program. Application of the programs to any English texts. The actual users of the algorithm.

    курсовая работа [19,3 K], добавлен 13.01.2010

  • Особенность установки VirtualBox и создания виртуальной машины. Добавление установочного образа диска и запуск машины. Определение сетевых адаптеров хоста hq-route. Установка пакета dnsmasq. Создание копии конфигурационного файла и редактирование файла.

    контрольная работа [2,3 M], добавлен 24.11.2022

  • Послідовний алгоритм компоновки. Ітераційний алгоритм розміщення елементів на платі. Створення компоненту за допомогою Library Executive, в PCAD Schematic. Автотрасувальник Quick Route. Обмеження для QuickRoute. Розміщення електричних ланцюгів.

    курсовая работа [2,9 M], добавлен 20.11.2010

  • Description of a program for building routes through sidewalks in Moscow taking into account quality of the road surface. Guidelines of working with maps. Technical requirements for the program, user interface of master. Dispay rated pedestrian areas.

    реферат [3,5 M], добавлен 22.01.2016

  • Характеристика и состав Microsoft Solution Framework. Модель команды, её характеристики. Цели качества команды проекта. Модель процессов, её содержание. Принципы управления рисками. Утверждение целей и границ, плана проекта. Модель приложений MSF.

    презентация [752,5 K], добавлен 10.05.2013

  • Понятие компонентов как определенного типа объектов, их свойства и функции. Режимы создания: Design-time и Run-time, их сравнительная характеристика, условия и возможности использования, преимущества и недостатки. Контролеры за объектами, их значение.

    презентация [1,3 M], добавлен 27.10.2013

  • Review of development of cloud computing. Service models of cloud computing. Deployment models of cloud computing. Technology of virtualization. Algorithm of "Cloudy". Safety and labor protection. Justification of the cost-effectiveness of the project.

    дипломная работа [2,3 M], добавлен 13.05.2015

  • Consideration of a systematic approach to the identification of the organization's processes for improving management efficiency. Approaches to the identification of business processes. Architecture of an Integrated Information Systems methodology.

    реферат [195,5 K], добавлен 12.02.2016

  • Розробка програми-інтерпретатора функцій командного процесора DOS: TIME, DATE, DIR, CD, MD, RD на мові Асемблера. Функціональні модулі, процедури та макроси, які використовуються в програмі. Опис алгоритму розв’язання задачі, його програмна реалізація.

    курсовая работа [42,6 K], добавлен 26.04.2016

  • Задача и особенности составления таблиц маршрутизации. Принципы процесса определения маршрута следования информации в сетях связи в TCP/IP. Процесс обмена пакетами информации путем использования протоколов Routing Information, Open Shortest Path First.

    презентация [494,8 K], добавлен 23.01.2014

  • Информационные потребности, сущность их возникновения. Базы данных и современный рынок. Характеристика программы Customer Relationship Management, управление взаимоотношениями с клиентами. Клиентская информационная база, специфика ее работы и описание.

    курсовая работа [107,9 K], добавлен 24.10.2011

  • Особенности применения матриц, функций Given..Find и Given..Minerr для решения нелинейного уравнения типа 4sin x+х=5 для заданной точности с помощью математического пакета MathCAD. Создание базы данных "Расписание автобусов" на основе программы Ms Access.

    курсовая работа [208,9 K], добавлен 16.12.2010

  • Программные средства для автоматизации строительного черчения. AutoCAD Architecture 2008 для архитектуры, строительства. Этапы создания блоков. Работа с пользовательскими штриховками. Раздел испытаний программного продукта, его экономическое обоснование.

    дипломная работа [5,2 M], добавлен 21.06.2012

  • Шина як набір проводів (ліній), що з'єднує різні компоненти комп'ютера для підведення до них живлення й обміну даними. Огляд різних типів шин, їх особливості, недоліки та переваги. Порівняльна характеристика головних відмінностей, майбутнє розвитку шин.

    доклад [117,3 K], добавлен 26.09.2009

  • Основные характеристики автоматизированной системы управления "Opera Enterprise Solution", набор модулей. Особенности универсальной компьютерной системы для автоматизации гостиниц, пансионатов и санаториев "Невский портье"; ночной аудит, меню навигации.

    отчет по практике [1,3 M], добавлен 12.04.2012

  • Кодовые названия процессоров Core 2: Conroe, Merom, Kentsfield и Penryn. Архитектура Core Micro Architecture. Краткое сравнение микроархитектур Intel Core и AMD K8. Аналитический обзор процессоров на базе ядра Conroe: тактовая частота и ценовой диапазон.

    реферат [1,4 M], добавлен 15.11.2014

  • IS management standards development. The national peculiarities of the IS management standards. The most integrated existent IS management solution. General description of the ISS model. Application of semi-Markov processes in ISS state description.

    дипломная работа [2,2 M], добавлен 28.10.2011

Работы в архивах красиво оформлены согласно требованиям ВУЗов и содержат рисунки, диаграммы, формулы и т.д.
PPT, PPTX и PDF-файлы представлены только в архивах.
Рекомендуем скачать работу.