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

Support for open source solver? #10

Open
xKHUNx opened this issue Dec 1, 2020 · 1 comment
Open

Support for open source solver? #10

xKHUNx opened this issue Dec 1, 2020 · 1 comment

Comments

@xKHUNx
Copy link

xKHUNx commented Dec 1, 2020

I would really love to try out this program, but installing Gurobi is a roadblock to me. Is it possible to implement this with open source solver such as GLPK or lpsolve? I don't really mind the running speed since it's a one time thing anyway.

I've tried to modify the code to work with GLPK but apparently it wasn't that straight forward:

Line 44 in transit-map/index.js

const gurobiPromise = spawn('glpsol', ['--lp', problemPath, '--write', solutionPath], {cwd})

I got this error:

GLPSOL: GLPK LP/MIP Solver, v4.65
Parameter(s) specified in the command line:
 --lp C:\...\transit-map-13672efP1odLg00j8\problem.lp
 --write C:\...\transit-map-13672efP1odLg00j8\solution.sol
Reading problem data from 'C:\...\transit-map-13672efP1odLg00j8\problem.lp'...
C:\...\transit-map-13672efP1odLg00j8\problem.lp:2: character '[' not recognized

So it seems like the .lp file format is different from Gurobi's.

Would like to hear from you.

@budul100
Copy link

First, @juliuste: Thank you for this great project! I have searched for such a solution for a while.

@xKHUNx: I have forked your project to implement a solution based on the CBC solver. Some changes were necessary for the LP generator to cover the squared edge lengths. And I have adjusted the solution parser to cover the resulting solver file.

You'll only need to load a current version of CBC.exe from the zip file and place it into the script folder.

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

No branches or pull requests

2 participants