-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
CPLEX LP file processing error - missing right-hand side #695
Comments
Not sure if it's the problem, but maybe try reducing the number of decimals
in the objective function coefficients (ie rounding the coefficients).
Some solvers do not like that level of excessive precision.
…On Wed, Oct 4, 2023, 23:38 Sean ***@***.***> wrote:
Hi there. I am testing out different open-source LP solvers for
performance on my LP problem. While I had recently been using PULP_CBC_CMD,
which works great, I wanted to try GLPK_CMD to see if it would be able to
solve my problem faster. The problem worked fine on CBC_CMD, but when I
converted it to use GLPK_CMD, I get the following error:
GLPSOL: GLPK LP/MIP Solver, v4.65
Parameter(s) specified in the command line:
--cpxlp C:\Users\seans\AppData\Local\Temp\2b75533b0b2549d8bd764df6469f0582-pulp.lp
-o C:\Users\seans\AppData\Local\Temp\2b75533b0b2549d8bd764df6469f0582-pulp.sol
Reading problem data from 'C:\Users\seans\AppData\Local\Temp\2b75533b0b2549d8bd764df6469f0582-pulp.lp'...
C:\Users\seans\AppData\Local\Temp\2b75533b0b2549d8bd764df6469f0582-pulp.lp:31: missing right-hand side
CPLEX LP file processing error
Inspecting the file located at
C:\Users\seans\AppData\Local\Temp\2b75533b0b2549d8bd764df6469f0582-pulp.lp
results in this line, the first of my constraints:
Subject To
CPT_==_1: x_29976335 + x_29976336 + x_29976337 + x_29976338 + x_29976339 \\ This is line 31
+ x_29976340 + x_29976341 + x_29976345 + x_29976346 + x_29976347 + x_29976348
+ x_29976349 + x_29976350 + x_29976351 + x_29976352 + x_29976353 + x_29976354
+ x_29976355 + x_29976356 + x_29976358 + x_29976359 + x_29976360 + x_29976362
+ x_29976366 + x_29976368 + x_29976370 + x_29976376 = 1
My initial thought is that variables aren't allowed to be wrapped
multi-line, thus it is not able to recognize the RHS (=1) aspect of this
constraint. But how then would it ever solve LP problems of more than a
couple of variables, they would need to wrap at some point correct?
Here is the full LP file for reference:
\* NFL *\
Maximize
Objective: 15.0354118829 x_29976287 + 21.0085117866 x_29976288
+ 24.9039729873 x_29976289 - 5.88901452909 x_29976290
+ 29.0691553519 x_29976291 + 29.2720184099 x_29976292
+ 3.38709922561 x_29976293 + 12.2579799849 x_29976297
+ 16.2223477314 x_29976298 + 6.03322231274 x_29976299
+ 7.19159251439 x_29976300 + 6.60664264982 x_29976301
+ 4.24229173526 x_29976302 + 5.29262676846 x_29976303
+ 18.5122885953 x_29976304 + 10.8843909552 x_29976305
+ 11.1076336564 x_29976306 + 9.71068740763 x_29976307
+ 12.7112675944 x_29976308 + 1.95992743877 x_29976310
+ 0.406843635752 x_29976311 + 5.22988885172 x_29976312
+ 9.73831659658 x_29976314 + 0.228371448581 x_29976318
+ 8.01186968197 x_29976320 + 0.170371160631 x_29976322
- 0.976262299713 x_29976328 + 21.7396559934 x_29976335
+ 21.3469336844 x_29976336 + 38.9465667174 x_29976337
+ 34.7035353631 x_29976338 + 9.11548722379 x_29976339
+ 24.4963356426 x_29976340 + 35.6241268384 x_29976341
+ 16.0900335987 x_29976345 - 20.6130304356 x_29976346
+ 5.33812820918 x_29976347 + 19.4727458456 x_29976348
+ 5.89842501907 x_29976349 + 15.7544310246 x_29976350
+ 16.2464755304 x_29976351 + 12.8908741707 x_29976352
+ 0.648037277739 x_29976353 + 9.863615606 x_29976354
+ 8.71964226264 x_29976355 + 18.4232734184 x_29976356
+ 8.27228313662 x_29976358 - 1.14725087955 x_29976359
+ 14.3650338388 x_29976360 - 2.58777465309 x_29976362
+ 11.728982048 x_29976366 - 1.02337251051 x_29976368
+ 2.42066797916 x_29976370 + 2.65343393561 x_29976376
Subject To
CPT_==_1: x_29976335 + x_29976336 + x_29976337 + x_29976338 + x_29976339
+ x_29976340 + x_29976341 + x_29976345 + x_29976346 + x_29976347 + x_29976348
+ x_29976349 + x_29976350 + x_29976351 + x_29976352 + x_29976353 + x_29976354
+ x_29976355 + x_29976356 + x_29976358 + x_29976359 + x_29976360 + x_29976362
+ x_29976366 + x_29976368 + x_29976370 + x_29976376 = 1
FLEX_==_5: x_29976287 + x_29976288 + x_29976289 + x_29976290 + x_29976291
+ x_29976292 + x_29976293 + x_29976297 + x_29976298 + x_29976299 + x_29976300
+ x_29976301 + x_29976302 + x_29976303 + x_29976304 + x_29976305 + x_29976306
+ x_29976307 + x_29976308 + x_29976310 + x_29976311 + x_29976312 + x_29976314
+ x_29976318 + x_29976320 + x_29976322 + x_29976328 = 5
Max_5_players_from_one_team_NYG: x_29976289 + x_29976292 + x_29976293
+ x_29976297 + x_29976298 + x_29976300 + x_29976303 + x_29976304 + x_29976307
+ x_29976308 + x_29976310 + x_29976311 + x_29976322 + x_29976328 + x_29976337
+ x_29976340 + x_29976341 + x_29976345 + x_29976346 + x_29976348 + x_29976351
+ x_29976352 + x_29976355 + x_29976356 + x_29976358 + x_29976359 + x_29976370
+ x_29976376 <= 5
Max_5_players_from_one_team_SEA: x_29976287 + x_29976288 + x_29976290
+ x_29976291 + x_29976299 + x_29976301 + x_29976302 + x_29976305 + x_29976306
+ x_29976312 + x_29976314 + x_29976318 + x_29976320 + x_29976335 + x_29976336
+ x_29976338 + x_29976339 + x_29976347 + x_29976349 + x_29976350 + x_29976353
+ x_29976354 + x_29976360 + x_29976362 + x_29976366 + x_29976368 <= 5
Max_Salary: 10800 x_29976287 + 10000 x_29976288 + 9600 x_29976289
+ 8800 x_29976290 + 8000 x_29976291 + 7000 x_29976292 + 6400 x_29976293
+ 5800 x_29976297 + 5200 x_29976298 + 5000 x_29976299 + 4800 x_29976300
+ 4600 x_29976301 + 4400 x_29976302 + 4200 x_29976303 + 4000 x_29976304
+ 3600 x_29976305 + 3400 x_29976306 + 3000 x_29976307 + 2800 x_29976308
+ 2000 x_29976310 + 1400 x_29976311 + 800 x_29976312 + 400 x_29976314
+ 200 x_29976318 + 200 x_29976320 + 200 x_29976322 + 200 x_29976328
+ 16200 x_29976335 + 15000 x_29976336 + 14400 x_29976337 + 13200 x_29976338
+ 12000 x_29976339 + 10500 x_29976340 + 9600 x_29976341 + 8700 x_29976345
+ 7800 x_29976346 + 7500 x_29976347 + 7200 x_29976348 + 6900 x_29976349
+ 6600 x_29976350 + 6300 x_29976351 + 6000 x_29976352 + 5400 x_29976353
+ 5100 x_29976354 + 4500 x_29976355 + 4200 x_29976356 + 3000 x_29976358
+ 2100 x_29976359 + 1200 x_29976360 + 600 x_29976362 + 300 x_29976366
+ 300 x_29976368 + 300 x_29976370 + 300 x_29976376 <= 50000
Min_Salary: 10800 x_29976287 + 10000 x_29976288 + 9600 x_29976289
+ 8800 x_29976290 + 8000 x_29976291 + 7000 x_29976292 + 6400 x_29976293
+ 5800 x_29976297 + 5200 x_29976298 + 5000 x_29976299 + 4800 x_29976300
+ 4600 x_29976301 + 4400 x_29976302 + 4200 x_29976303 + 4000 x_29976304
+ 3600 x_29976305 + 3400 x_29976306 + 3000 x_29976307 + 2800 x_29976308
+ 2000 x_29976310 + 1400 x_29976311 + 800 x_29976312 + 400 x_29976314
+ 200 x_29976318 + 200 x_29976320 + 200 x_29976322 + 200 x_29976328
+ 16200 x_29976335 + 15000 x_29976336 + 14400 x_29976337 + 13200 x_29976338
+ 12000 x_29976339 + 10500 x_29976340 + 9600 x_29976341 + 8700 x_29976345
+ 7800 x_29976346 + 7500 x_29976347 + 7200 x_29976348 + 6900 x_29976349
+ 6600 x_29976350 + 6300 x_29976351 + 6000 x_29976352 + 5400 x_29976353
+ 5100 x_29976354 + 4500 x_29976355 + 4200 x_29976356 + 3000 x_29976358
+ 2100 x_29976359 + 1200 x_29976360 + 600 x_29976362 + 300 x_29976366
+ 300 x_29976368 + 300 x_29976370 + 300 x_29976376 >= 44000
No_player_in_both_CPT_and_FLEX__("wan'dale_robinson",_'FLEX',_'NYG'),_("wan'dale_robinson",_'CPT',_'NYG')_:
x_29976307 + x_29976355 <= 1
No_player_in_both_CPT_and_FLEX__('colby_parkinson',_'FLEX',_'SEA'),_('colby_parkinson',_'CPT',_'SEA')_:
x_29976312 + x_29976360 <= 1
No_player_in_both_CPT_and_FLEX__('daniel_bellinger',_'FLEX',_'NYG'),_('daniel_bellinger',_'CPT',_'NYG')_:
x_29976328 + x_29976376 <= 1
No_player_in_both_CPT_and_FLEX__('daniel_jones',_'FLEX',_'NYG'),_('daniel_jones',_'CPT',_'NYG')_:
x_29976289 + x_29976337 <= 1
No_player_in_both_CPT_and_FLEX__('darius_slayton',_'FLEX',_'NYG'),_('darius_slayton',_'CPT',_'NYG')_:
x_29976298 + x_29976346 <= 1
No_player_in_both_CPT_and_FLEX__('darren_waller',_'FLEX',_'NYG'),_('darren_waller',_'CPT',_'NYG')_:
x_29976292 + x_29976340 <= 1
No_player_in_both_CPT_and_FLEX__('deejay_dallas',_'FLEX',_'SEA'),_('deejay_dallas',_'CPT',_'SEA')_:
x_29976318 + x_29976366 <= 1
No_player_in_both_CPT_and_FLEX__('dk_metcalf',_'FLEX',_'SEA'),_('dk_metcalf',_'CPT',_'SEA')_:
x_29976290 + x_29976338 <= 1
No_player_in_both_CPT_and_FLEX__('eric_gray',_'FLEX',_'NYG'),_('eric_gray',_'CPT',_'NYG')_:
x_29976311 + x_29976359 <= 1
No_player_in_both_CPT_and_FLEX__('gary_brightwell',_'FLEX',_'NYG'),_('gary_brightwell',_'CPT',_'NYG')_:
x_29976300 + x_29976348 <= 1
No_player_in_both_CPT_and_FLEX__('geno_smith',_'FLEX',_'SEA'),_('geno_smith',_'CPT',_'SEA')_:
x_29976288 + x_29976336 <= 1
No_player_in_both_CPT_and_FLEX__('giants',_'FLEX',_'NYG'),_('giants',_'CPT',_'NYG')_:
x_29976304 + x_29976352 <= 1
No_player_in_both_CPT_and_FLEX__('graham_gano',_'FLEX',_'NYG'),_('graham_gano',_'CPT',_'NYG')_:
x_29976303 + x_29976351 <= 1
No_player_in_both_CPT_and_FLEX__('isaiah_hodgins',_'FLEX',_'NYG'),_('isaiah_hodgins',_'CPT',_'NYG')_:
x_29976297 + x_29976345 <= 1
No_player_in_both_CPT_and_FLEX__('jake_bobo',_'FLEX',_'SEA'),_('jake_bobo',_'CPT',_'SEA')_:
x_29976320 + x_29976368 <= 1
No_player_in_both_CPT_and_FLEX__('jalin_hyatt',_'FLEX',_'NYG'),_('jalin_hyatt',_'CPT',_'NYG')_:
x_29976310 + x_29976358 <= 1
No_player_in_both_CPT_and_FLEX__('jason_myers',_'FLEX',_'SEA'),_('jason_myers',_'CPT',_'SEA')_:
x_29976301 + x_29976349 <= 1
No_player_in_both_CPT_and_FLEX__('jaxon_smith#njigba',_'FLEX',_'SEA'),_('jaxon_smith#njigba',_'CPT',_'SEA')_:
x_29976299 + x_29976347 <= 1
No_player_in_both_CPT_and_FLEX__('kenneth_walker_iii',_'FLEX',_'SEA'),_('kenneth_walker_iii',_'CPT',_'SEA')_:
x_29976287 + x_29976335 <= 1
No_player_in_both_CPT_and_FLEX__('matt_breida',_'FLEX',_'NYG'),_('matt_breida',_'CPT',_'NYG')_:
x_29976293 + x_29976341 <= 1
No_player_in_both_CPT_and_FLEX__('noah_fant',_'FLEX',_'SEA'),_('noah_fant',_'CPT',_'SEA')_:
x_29976305 + x_29976353 <= 1
No_player_in_both_CPT_and_FLEX__('parris_campbell',_'FLEX',_'NYG'),_('parris_campbell',_'CPT',_'NYG')_:
x_29976308 + x_29976356 <= 1
No_player_in_both_CPT_and_FLEX__('seahawks',_'FLEX',_'SEA'),_('seahawks',_'CPT',_'SEA')_:
x_29976302 + x_29976350 <= 1
No_player_in_both_CPT_and_FLEX__('sterling_shepard',_'FLEX',_'NYG'),_('sterling_shepard',_'CPT',_'NYG')_:
x_29976322 + x_29976370 <= 1
No_player_in_both_CPT_and_FLEX__('tyler_lockett',_'FLEX',_'SEA'),_('tyler_lockett',_'CPT',_'SEA')_:
x_29976291 + x_29976339 <= 1
No_player_in_both_CPT_and_FLEX__('will_dissly',_'FLEX',_'SEA'),_('will_dissly',_'CPT',_'SEA')_:
x_29976314 + x_29976362 <= 1
No_player_in_both_CPT_and_FLEX__('zach_charbonnet',_'FLEX',_'SEA'),_('zach_charbonnet',_'CPT',_'SEA')_:
x_29976306 + x_29976354 <= 1
Binaries
x_29976287
x_29976288
x_29976289
x_29976290
x_29976291
x_29976292
x_29976293
x_29976297
x_29976298
x_29976299
x_29976300
x_29976301
x_29976302
x_29976303
x_29976304
x_29976305
x_29976306
x_29976307
x_29976308
x_29976310
x_29976311
x_29976312
x_29976314
x_29976318
x_29976320
x_29976322
x_29976328
x_29976335
x_29976336
x_29976337
x_29976338
x_29976339
x_29976340
x_29976341
x_29976345
x_29976346
x_29976347
x_29976348
x_29976349
x_29976350
x_29976351
x_29976352
x_29976353
x_29976354
x_29976355
x_29976356
x_29976358
x_29976359
x_29976360
x_29976362
x_29976366
x_29976368
x_29976370
x_29976376
End
—
Reply to this email directly, view it on GitHub
<#695>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJUZ47BBHZX6JYQRFAQBHDX5XJODAVCNFSM6AAAAAA5TISLESVHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZDOMBRHEYTANY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there. I am testing out different open-source LP solvers for performance on my LP problem. While I had recently been using
PULP_CBC_CMD
, which works great, I wanted to tryGLPK_CMD
to see if it would be able to solve my problem faster. The problem worked fine onCBC_CMD
, but when I converted it to useGLPK_CMD
, I get the following error:Inspecting the file located at
C:\Users\seans\AppData\Local\Temp\2b75533b0b2549d8bd764df6469f0582-pulp.lp
results in this line, the first of my constraints:My initial thought is that variables aren't allowed to be wrapped multi-line, thus it is not able to recognize the RHS (=1) aspect of this constraint. But how then would it ever solve LP problems of more than a couple of variables, they would need to wrap at some point correct?
Here is the full LP file for reference:
The text was updated successfully, but these errors were encountered: