Skip to content

Navigation Menu

Sign in
Sign up

cp_sat based solver - #1

Open
jezgillen wants to merge 6 commits into
ekohilas:main from
jezgillen:solver
Open

cp_sat based solver #1
jezgillen wants to merge 6 commits into
ekohilas:main from
jezgillen:solver

Conversation

@jezgillen

@jezgillen jezgillen commented Aug 1, 2025

Copy link
Copy Markdown

This takes around 30 minutes to run on my laptop. Press ctrl-c after a few minutes to see a sub-optimal solution.
It simultaneously optimizes the paths from each port to each city, and the total number of paths used. The individual path lengths are weighted to be 1000x more important.

One remaining problem is that the objective counts each edge as one path, and minimizes the total number of used edges. However, I think we should be minimizing the total number of used nodes (which correspond to tiles). Currently it's counting a three-way junction as contributing length 3, rather than 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /