=============================================================== Description of the LP-format as accepted by LP_SOLVE and LP2MPS =============================================================== NOTE: DO NOT MAKE VARIABLE NAMES LONGER THAN 8 CHARACTERS! The default input syntax is a set of algebraic expressions and "int" declarations in the following order: + * where: - is a linear combination of vari- ables, ending with a semicolon, optionally preceded by "max: " or "min: " to indicate whether you want it to be minimized or maximized. The case is not important, "Max:" or "MAX:" will work as well. Maximization is the default. - is an optional constraint name followed by a colon plus a linear combination of variables and con- stants, followed by a relational operator, followed again by a linear combination of variables and con- stants, ending with a semicolon. The relational operator can be any of the following: "<" "<=" "=" ">" ">=". There is no semantic difference between "<" and "<=" nor between ">" and ">=" (even for integer variables!). - is of the form: "int" + ";" Commas are allowed between variables. - note that a constant term in the objective function is not allowed and that constant factors in front of variables need to be separated either by a space or a multiplication asterisk from the variable. So, the simplest linear problem consists of an objective function and 1 constraint. Comments may be included inside the file in C-style format, see example below. The simple problem: x1 >= 1 x2 >= 1 x1 + x2 >= 2 minimize x1 + x2 (= maximize -(x1 + x2)), with x1 integer can be written as follows: /* this is a small demo problem */ -x1 + -x2; /* or min: x1 + x2; */ x1 > 1; x2 > 1; x1 + 2 x2 > 3; int x1; The correct result for (x1, x2) is of course (1, 1).