Open Croftc opened 6 years ago
Did you ever get this working I'm having the same issue? The (Array{Int64,0})[] was a big fix
This was also given : DimensionMismatch("mismatch in dimension 1 (expected 1 got 360)")
make sure you have the teams/opponents laid out correctly. for example: team A with opp team B, & team B with opp team A; NOT, team A with opp team B, & team B with opp team C
hope that helps.
On Fri, Oct 19, 2018 at 11:01 AM jcameronmetz notifications@github.com wrote:
This was also given : DimensionMismatch("mismatch in dimension 1 (expected 1 got 360)")
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dscotthunter/Fantasy-Hockey-IP-Code/issues/5#issuecomment-431413092, or mute the thread https://github.com/notifications/unsubscribe-auth/AWGsJX36RtaqwCUCQGcyoUbHo3RKZrZjks5umfdmgaJpZM4SrKrm .
Any luck on this? I'm running into the same error and I verified teams and opponents matching up.
Yep- I'll respond this weekend at some point
On Fri, Dec 14, 2018 at 5:28 PM Shane Rand notifications@github.com wrote:
Any luck on this? I'm running into the same error and I verified teams and opponents matching up.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dscotthunter/Fantasy-Hockey-IP-Code/issues/5#issuecomment-447497934, or mute the thread https://github.com/notifications/unsubscribe-auth/AqIaQwNCFuWF3FsPFOHslB_ZeLh9ElMxks5u5CYVgaJpZM4SrKrm .
@jcameronmetz Can you let me know how you fixed this?
@constraint needs to be changed
@variable needs changed
Those are the things that helped work for me.
@defVar(m, skaters_lineup[i=1:num_skaters], Bin) -> change this to @variable
# Variable for goalie in lineup.
@defVar(m, goalies_lineup[i=1:num_goalies], Bin)
# One goalie constraint
@addConstraint(m, sum{goalies_lineup[i], i=1:num_goalies} == 1) change this to @constraint
@jcameronmetz Hmm, unfortunately I already had those fixes in my code. Still experiencing the issue. I believe since the model is not being solved, its throwing the error on the next lineup creation.
The example data works perfectly, leading me to believe I've set up my data wrong? If you could send over your last data file that worked (both skaters.csv and goalies.csv) that would be appreciated.
Still working on this....
I've found that its the 'at least one full line' and 'defenseman on powerplay one' constraints that are the problem. Currently trying to decipher those constraints...
Yeah - making your lines correct isnkey - try running a report against your lines to make sure you have complete lines
On Tue, Dec 18, 2018 at 10:31 AM Shane Rand notifications@github.com wrote:
Still working on this....
I've found that its the 'at least one full line' and 'defenseman on powerplay one' constraints that are the problem. Currently trying to decipher those constraints...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dscotthunter/Fantasy-Hockey-IP-Code/issues/5#issuecomment-448260640, or mute the thread https://github.com/notifications/unsubscribe-auth/AqIaQz9IN_3mQg3Aqz01kXaNetvybmxzks5u6QpMgaJpZM4SrKrm .
Finally figured it out.
These lines are using double quotes around the line numbers for comparison. I removed the quotes and compared as a number and everything worked swimmingly.
@shane-rand Hey, could you please send over the full code that you used to get it running? I am having trouble updating it and keep running into a LoadError: UndefVarError: i not defined error. Would you be able to help me with this. Thank you and I appreciate your time!
@awiden91 also hitting the "I not defined" issue; did you ever solve it?
I am successfully able to run all provided formulations on the provided test data, but running on actual data, formulations 3 and 4 don't work - specifically the defensemen stacking constraint. The error I receive states:
glp_intopt: optimal basis to initial LP relaxation not provided WARNING: Not solved to optimality, status: Infeasible WARNING: Infeasibility ray (Farkas proof) not available ERROR: LoadError: DimensionMismatch("mismatch in dimension 1 (expected 1 got 217)")