-
Notifications
You must be signed in to change notification settings - Fork 157
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
Bug with GLPK and restrict_positions_for_opposing_team #206
Comments
Can you post the contents of the solution file? |
Sure, here it is -- the offending element is on line 259 in this file. The actual error is: I've included the entire code block below, but here's just the particular lines, numbers included:
Click to expand the entire code block
|
So it looks like the error comes from having the binary variable begin with a number. I recreated the example and saved the .lp file. I then changed the first binary variable to 'aaa' and the error was thrown on the next line of the solver file. You can test this out by editing the .lp file for your specific variables (the GLPK_CMD has a parameter for keepFiles=True which will save the .lp file to your working directory. The solution for the library could be as simple as including a prefix 'b_' to the UUID with the changes below, although I must confess I don't know much about uuid4 or why it was chosen to create the variable name, but I think this should work:
to
As an aside, are you using GLPK_CMD for performance reasons? I'd start by filtering the player pool with players that project for at least X fantasy points, which will speed up the default solver. |
Hey, thanks for digging into this! I figured it would end up something like that -- never trust a number to do a letter's job. And yes, it was for performance reasons, but I actually just switched over to using CPLEX_PY as my solver, and that has been successful so far. I've got a fork here where I can test the change to the |
There is seemingly a bug with the restrict_positions_for_opposing_team method when using GLPK as a solver.
The following code works fine with the default CBC solver.
But when I change the solver to GLPK_CMD from the PuLP package, and try to run the same code, I get the error:
(note, ~ have been used to replace the path to my local user temp folder)
Any thoughts on why? Or do we think this is just an GLPK problem that can't be solved on the PYDFS end?
The text was updated successfully, but these errors were encountered: