Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need implementation help #111

Open
TomBoudniatski opened this issue Aug 3, 2023 · 1 comment
Open

Need implementation help #111

TomBoudniatski opened this issue Aug 3, 2023 · 1 comment
Labels

Comments

@TomBoudniatski
Copy link

TomBoudniatski commented Aug 3, 2023

Hey, I'm trying to figure out how to work with GA for the first time, I read the documentations and played around with some
examples but none of them gave me similar example for what I was originally looking for.

I'm trying to implement a GA solution for a problem where I have a few random parking spaces groups, each space is represented by a simple 2D rectangle, so basically it's a few random groups of adjacent rectangles.

My goal is to place Lighting Fixtures which represented by a point (the center of the lighting fixture), each fixture has an effective
lighting radius, mandatory minimum distance from any other fixture, the goal is to solve this using minimum fixtures.

here you can see the parking spaces (black), the fixtures(red), distance from the edge (orange), distance between fixtures(green)
Visual

I was hoping someone more experienced could point me to the right example code from which I can learn and draw conclusions
about how to right my own algorithm.

Thanks!

@TomBoudniatski TomBoudniatski changed the title Need help to Need help Aug 3, 2023
@TomBoudniatski TomBoudniatski changed the title Need help Need implementation help Aug 3, 2023
@TomBoud
Copy link

TomBoud commented Aug 5, 2023

In order to solve this problem I decided to scale it down first, I'm trying to make sure the Lighting Fixtures are able to "find" the
individual parking spaces and illuminate as much area as possible for each parking space.

I was able to generate random parking spaces using the Blazor App TSP solution example:
image

Here is what I came up so far, hope this can give some more context.
ParkingGA.zip

I'm looking for a way to create the Evaluation functions, I guess it should be the overlapping area of the rectangle
(parking space) and the circle (Lighting Fixture) which has an effective lighting radius on the parking space.

I'm also not sure I did the ParkingChromosome.cs correctly, any suggestions ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants