Methods for Solving Discrete Optimization Problems

The article specifies a group of discrete optimization problems, such as location problems and tour problems, from the aspect of individual approaches (exact, heuristic, and metaheuristic) and seeks to explain all the approaches on specific problems.


INTRODUCTION
In transportation and logistics systems (network problems) we distinguish two basic types of combinatorial problems.The first group consists of problems whose solution is a welldefined set of items, such as the spatial distribution of facilities (service centres), terminals, warehouses, etc.
The solution to the second group of combinatorial problems is defined as a sequence of visited nodes, or a sequence of customers served.A typical instance of the second group of problems is a VRP (vehicle routing problem).A travelling salesman is the simplest example of vehicle routing.

Exact approach
This approach allows an optimal solution to be found, if one exists, unless one can prove that there is no admissible solution to the problem.A great price is paid for precisionespecially in computation time -where an extensive problem is concerned.Moreover, it is difficult to estimate the time required for computation purely from the size of the problem.The approach can, for example, prove that it is not possible to construct a Hamiltonian circle.

Simple heuristics
This is used to find a good and admissible solution to a problem, or improve existing solutions.The heuristic approach, though, does not guarantee that an optimal solution will be found.Nevertheless, heuristics are very useful for practitioners who need to solve in real time problems of great sizes in order for their solutions to be used quickly (in real time).
 Primal heuristic A primal heuristic works from an admissible solution to a problem, and tries to improve the solution through permitted operations that transform the current solution to another admissible solution with a lower objective function value.The new solution then becomes the current solution for the next step in the improvement process.The primal heuristic ends once no further improvement can be achieved by way of the permitted operations.
 Dual heuristic A dual heuristic works from an inadmissible solution and seeks to reduce the degree of inadmissibility by using permitted operations.Individual steps of the algorithm are performed with a view to minimising growth in the objective function value.The process continues until an admissible solution is found or until it is no longer possible to reduce the inadmissibility of the solution by means of permitted operations.
Primal and dual heuristics can be combined (e.g., a primal heuristic provides the initial admissible solution for a dual heuristic).

Metaheuristics
This removes certain shortcomings of simple heuristics in that it does not become trapped in a local optimum.It jumps in the set of all admissible solutions and, at one moment, it explores several places in the set of admissible solutions (producing a sequential series of solutions), the objective function jumps; its gradient does not decrease, as in the case of simple heuristics.It is able to escape from a local optimum and find the global optimum.
Approaches -methods for creating a sequence of solutions  approach based on exploring surroundings -Simulated Annealing, Tabu Search  approach based on the evolutionary process -Genetic Algorithms, Ant Colony We will look at individual approaches to solutions to specific problems.

P-median problem (maximum distance problem)
We have a given set of customers and some facilities (service centres).The customer is satisfied if its distance from any facility is less than or equal to the constant MAX D .This formulation of the problem corresponds to the real problem of decision-making, such as in the case of the placement of alarm sirens, public (municipal) loudspeakers, or location of healthcare centres.The optimality criterion is to cover all customers through a minimum number of localised facilities, depots, etc.A classic instance is for a set of customers J j  and a set of facilities I i  , where we define the sets: these are sets of possible locations of facilities from which it is possible to satisfy the need of a j-th customer.
The problem can easily be transformed into the known problem of covering the vertices of a graph (customers) using the minimum number of subsets from the given system of subsets.Note: a vertex is covered when its distance from a facility is MAX D


. Individual subsets contain customers whose distance from the given facility does not exceed MAX D .
Instance of a specific problem: Given facts: D MAX , location of customers, set of candidates for the placement of facilities.We are looking for the minimum number of facilities that will cover the customers' requirements.
We compile the sets . The sets are expressed in a table where the rows are customers and the columns are facilities.The j-th row of the table corresponds to the j-th set j N , a one in the i-th row indicates that the facility i S belongs to the set.
Table 1: N j Initial admissible solution to the problem.
Formulation of the LP general problem: We denote the elements of the table as a matrix (2) Then we can formulate the model of the coverage problem: to minimize: Under the conditions: We fill the model with data from the example: minimise the function: (5) Under the conditions: We will examine the entire set of solutions, and then choose the one which is admissible and has the smallest objective function value.
An admissible solution to the problem ( 5) -( 10) is each triplet consisting of ones and zeros that satisfies the inequalities ( 6) -( 10).It is obvious that the vector meets all the conditions and therefore belongs to the set of admissible solutions.Conversely, the triplets (0,1,1) and (1,1,0) fail to meet the conditions ( 6) and ( 10), and are therefore inadmissible solutions.
The number of admissible solutions to the illustrative example ( 5) -( 10) is small and contains only two solutions, so it is easy to determine the optimal solution that minimizes the function (5).The first solution gives us a criterion value equal to 3, the second solution then gives us the value 2. Therefore, the second solution, with an objective function value equal to 2, is the optimal solution to our problem.
While this example is simple and easily solvable, we should not be misled into believing that for every problem it is easy to determine the admissibility of the solution and optimality.Quite the contrary, most real problems must be described by hundreds or thousands of variables and conditions, and the number of admissible solutions exceeds the number 10 12 .In such circumstances the use of the brute-force method, i.e., an examination of all admissible solutions, is unrealistic and unmanageable in a reasonable space of time necessary for practical use.
The above points lead us to the use of various computer-oriented methods, allowing the calculation of the solution to be completed within a reasonable time.
2.2 Solving a P-median problem through a simple heuristic

P-median problem (maximum distance problem)
To illustrate a heuristic method we will use the example of a heuristic approach to solving the maximum distance problem already formulated above.
The solution to the maximum distance problem is determined by the set of located facilities.A solution is considered admissible if each customer has at least one facility available within the distance D MAX .The default admissible solution can be obtained by placing a facility in all possible locations (the set of candidates for the depot, facility).Each solution can be represented by a list of located facilities.If we were to denote n number of facilities in the list, the following algorithm can describe the primal heuristic.STEP 0: We put k = 1.STEP 1: Examine, check each facility from the list of facilities currently valid.If removing a facility does not disturb admissibility, then remove that facility from the list.STEP 2: If k < n, put k = k + 1 and go to STEP 1., else end the calculation 3. STEP 3: End.
If we were to apply this heuristic to our example with the default list   3 2 1 , , S S S of facilities, n = 3, k = 1, we can easily determine that the facility S 1 cannot be removed because the customer v 1 cannot be satisfied by either facility S 2 or S 3 .The facility S 2 is examined and we find that its removal does not violate the solution's admissibility (all customers have least one facility available at a distance of ).The new solution is expressed by the set   3 1 , S S , k = 2, k < n.By examining the facilities S 1 and S 3 we find that neither S 1 nor S 3 can be removed due to the requirement of v 5 .The algorithm ends with the resulting solution   3 1 , S S .Even though in our simple demonstration example the heuristic enabled us to find the optimal solution, in general this does not hold true, since, particularly in the case of complex and extensive problems, heuristics do not guarantee optimal solutions.A primal heuristic, based on an admissible solution, can end the search process far from the optimum.Each primary heuristic merely ensures that one admissible solution is replaced by another, better solution.Fitness function:   partial elimination of shipments in opposite directions  pick-up (delivery) for a given point is not always performed by the same hub, the choice of the two hubs depends on the specific relation i, j

Solving the P-hub median problem through metaheuristics by using genetic algorithms
Fitness function: Find the optimal distribution of hubs on the network, where the number of a network's vertices is n = 4, the number of located hubs is k = 2, =0.6,C is the matrix of costs for unit shipments and B is the matrix of the quantities transported between individual vertices.This is a simple location, where the objects served are firmly assigned to one of the hubs.Options of encoding the problem's solution -chromosome 1) n parts each having 2 segments:  is the given node a hub? (1-yes, 0-no)  is the node assigned to its nearest hub? (0-yes, 1-no) for example: (00100110) -hubs at vertices 2, 4; 1 st in the attraction zone of the nearest hub, 4 th in the attraction zone of the farthest hub.(the specific network must be known) 2) n-component vector divided into 2 parts  hubs -the length k, directly written numbers of hubs  assignment of other vertices to hubs for example: (2421) -hubs at the vertices 2, 4; vertex 1 assigned to the 2 nd hub in the order listed (i.e. to hub 4); vertex 3 assigned to the 1 st hub in the order listed (i.e. to hub 2).
Initial population -8 randomly selected individuals.Selection -selection of individuals for reproduction using weighted roulette.
 the problem of genetic algorithms is that they work with a utility maximisation function, therefore we convert the utility fci is according to the equation

Reproduction -Crossing
 creation of a combination of the genetic material of 2 individuals with the hope of gaining a better individual  algorithm: 1. browse the genetic code of individuals from right to left and look for the position i at which the 1 st individual in the 1 st gene segment has 1 and the second has 0. If found, replace the entire genes of both individuals at the position 2. concurrently browse the genetic code of individuals from left to right and search for the position j, at which the 1 st individual in the 1 st gene segment has 0 and the other has 1.If you find it, replace the entire genes of both individuals at the position. both processes run until achieving i j  Probability of crossing: 75 , 0  c p , genes f3´ and f4´ proceed without crossing Reproduction -mutation  operator's purpose: to produce as yet unexplored or lost genetic material  prevents premature convergence to a local optimum  alteration of both segments with low probability  1 st segment: 2 substitutions in the generation (pm1 = 2/(8*4) = 6.3%)  2 nd segment: 1 change in the generation (pm2 = 1/16= 6.3%)  in the case of the mutation of the 1 st segment it is necessary to keep in mind the given number k, and, in the case of the 2 nd segment, the occurrence of the nonsense positions of the type (…11…)  mutation of the 1 st segment  6 th individual -substitution of the 1 st position for the 2 nd  (10001000)  (00101000)  5 th individual -substitution of the 1 st position for the 4 th  (10100000)  (00100010)  mutation of the 2 nd segment  3 rd individual -substitution at the 3 rd position  (00100010)  (00100110) The minimum of the function utility value after the first iteration is 67.6; this corresponds to the minimum of the 2 nd and 3 rd iteration and also to the result of the exact solution.
Optimal solution: hubs at vertices 3 and 4. Vertex 1 is served from hub 3, and vertex 2 from hub 4. 3 CONCLUSION Discrete optimization problems can generally be solved in different ways, ranging from exact, through simple heuristic methods, to metaheuristics.Simple heuristic methods, however, do not provide any guarantee of achieving an optimal solution, nor even an admissible solution.In general they are characterized by passing from one admissible or inadmissible solution to the next one, and by a local criterion with the help of which the resulting solution is selected from a set of possible subsequent solutions.Metaheuristics are heuristic approaches that under certain circumstances make it possible to depart from a local minimum, and, through a sequence of iterative steps, move into other parts of the set of admissible solutions where there is hope of finding a solution with a better objective function value than that of the local minimum.As with other heuristic methods, metaheuristics do not guarantee finding an optimal solution to the problem.The metaheuristic shown above using genetic algorithms does not create a sequence of solutions, but works concurrently with an entire set of solutions called a population.The work of a genetic algorithm begins with the creation of an initial population, the genes are then paired and crossed on the basis of benefit coefficients, and the newly-created individuals are mutated.Selection is made in the newly-created population, the best solution yet found is updated, and the whole process is repeated until either of the conditions for ending the optimization process is satisfied.
building depots Multiple location -objects can be assigned to attraction zones of several hubs
building depots Solution using genetic algorithm  encoding the problem's solution -chromosome  creating the initial population  selecting individuals for reproduction (selection)  reproduction -crossing, mutation => new generation  repeating iterations according to the requirements of the problem Instance of a specific problem:

Figure 4 :
Figure 4: Graphical representation of the situation.
of fitness function for the given solution avg -average fitness value fce in the generation best -the best fitness value fce in the generation worst -the worst fitness value fce in the generation  probability of the individual passing into the next generation according to the equation