i have created a grid and placed some sensors and targets into it. how can i minimize the cost function for sensor placement using genetic Algorithm?

6 commentaires

Walter Roberson
Walter Roberson le 2 Juil 2021
First you have to identify what the cost function formula is.
Mudu
Mudu le 2 Juil 2021
Modifié(e) : Mudu le 2 Juil 2021
we have to minimize where c is the cost of sensor. how can we formulate a cost function for it?
Walter Roberson
Walter Roberson le 2 Juil 2021
How is the cost of any one sensor calculated?
Mudu
Mudu le 2 Juil 2021
Modifié(e) : Mudu le 2 Juil 2021
its a given value depending upon the range of that sensor
for example sensor range for s1=10 m and its cost is 2
for s2 range= 20m cost is 3.5
in this scenerio we have to kcover all the random targets where k is 1.
Walter Roberson
Walter Roberson le 2 Juil 2021
What is k?
Is it correct that the cost of a sensor is determined by the maximum range it has to transmit?
What are the requirements (if any) for being able to relay sensor data from nodes to an outside point?
Mudu
Mudu le 2 Juil 2021
k here the number of sensor nodes covering the target.
each sensor has a fixed range. we have two kind of sensors with different ranges, both have different costs associated to them. starting with the random positioning of target and sensor node we have to optimize the solution to minimize this cost.
there are no such requirements

Connectez-vous pour commenter.

 Réponse acceptée

Walter Roberson
Walter Roberson le 3 Juil 2021

1 vote

For any given number of sensors, N, use 2*N variables; each sensor will be represented by an X and a Y coordinate.
Use pdist2() to calculate the distance between each target and the set of sensors. Initialize a vector of length N to value 2 in each entry. Scan through the targets, and if the target is more than 10 units from the closest sensor but less than 20 units, set the entry for that sensor to value 3.5, and if the target is more than 20 units from the closest sensor, set the entry for that sensor to 100*number of sensors or other large finite value. Then total the vector, and return that as the "cost".
The ga() algorithm will be responsible for moving the coordinates.
The cost algorithm is not responsible for figuring out whether it would be possible to turn off some of the sensors and still have total coverage.
Now run with number of sensors equal to number of targets, and with number of sensors equal 1. Then proceed to do a binary search looking to lower the cost.
You should expect that you will encounter situations where different number of sensors have the same cost -- for example 7 individual s1 sensors might have total cost 14, but you might be able to cover the same area with 4 sensors that are s2. The cost equation cannot tell the difference at that level.
Generally speaking, using the least number of sensors that generates the lowest cost would be less expensive in some sense. But it is also the most fragile: if a target moves a little then it might go out of range because it might only be covered by one sensor. That can still happen with more sensors, but it becomes less probable. And the fewer the number of sensors you use, the more likely that misplacing a sensor by a little might be a problem.

Plus de réponses (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by