0

Having a problem getting a ilp to run. Resorted to the following small code for testing. None of them work.

min: x1 + 10 x2 + 100 x3 + 1000 x4;
x1 + x2 + x3 + x4 + x5 >= 3;
/* Variable bounds */
//bin x1 x2 x3 x4 x5; // parse error
//bin : x1 x2 x3 x4 x5; // parse error
//bin x1,x2,x3,x4,x5    // parse error
//int x1,x2,x3,x4,x5;  // runs but not as binary var!!
//bin: x1,x2,x3,x4,x5; // parse error
//bin x1,x2,x3,x4,x5; // parse error
/*bin
x1,x2,x3,x4,x5; parse error
*/
/*
binary
x1, x2, x3, x4, x5   // parse error
*/
/*
binary
x1, x2, x3, x4, x5; // parse error
*/

This is failing in lpsolve IDE 5.5.

cswor
  • 1
  • 2
  • For those of you who may encounter the same problem. The IDE relies on lpsolve55.dll. I discovered that the last install I had done used a dll dated '2005. Out of date. A newer version, dated '2016 worked. It uses the following format for declaring bin vars: bin c0,c1,c2,c3,c4,c5,c6,c7; – cswor Sep 26 '20 at 17:46

1 Answers1

0

Found my own solution but it occurs to me I may not be the only person to encounter this issue so I will answer my own.

I had "reinstalled" the lpsolve IDE. Turns out it was an old (2005) lpsolve55.dll that was used. Apparently, the handling of bin vars has been changed since then. The new dll is dated 2016 and the the bin vars are accepted in the following form:

bin x99_7;
bin  c0,c1,c2,c3,c4,c5,c6,c7;
cswor
  • 1
  • 2