Linear Program FormatStructureThe linear program file consists of optional objective function, constraints, and variable declarations. VariablesVariables are case sensitive and can have letters [A-Z],[a-z], numbers and underscore '_'. A variable must start with an underscore or a letter. Constant NumbersConstant can be integers or real numbers. Real numbers must be of form 123.45 . ExpressionsAllowed operators are +, -, *, /. Also parentheses ( ) can be used Expressions must be a linear combination of variables. For example (2*x + 3*y)/3 + (2*4 + 5)*z is legal, but x*(y+2) is not. Objective functionObjective function is of the form "maximize <expression>;" or "minimize <expression>;" ConstraintsA constraint is of the form "<expression> <operator> <expression>;", where operator can be one of <=, >=, =. DeclarationsA declaration of the form "int <var1>,<var>;" states that variable should be an unsigned integer. A declaration of the form "signed int <var1>,<var>;" states that variable should be an integer. Example fileminimize x + 2*y + 3*(z + 2*w); x + 2 >= y; y <= z*3+w; w = x+z; int x,y; signed int w; [TCS main] [Contact Info] [Personnel] [Research] [Publications] [Software] [Studies] [News Archive] [Links] Latest update: 25 March 2006. |