Simplex alghorithm written in C# for one of my subjects in uni
How to use it? Launch an a Simplex.exe in Debug, console application will pop up. It will ask you to input input .txt file with boring math data, write a name/path or simply drag and drop and after spacebar write some random name for output file Press enter and boom, magic, you got your answer...
Structure of the input file:
π1 π2 π3 ... ππ
//empty line
π11 π12 π13 ... π1π
π21 π22 π23 ... π2π
...
ππ1 ππ2 ππ3 ... πππ
//empty line
π1 π2 π3 ... ππ
*** Values should be tab-separated; lines should be separated by a system-specific line separator.
Structure of the output file:
a. If the input file structure is incorrect (e.g., dimensions do not match), the output file should contain one line:
ERROR: incorrect input data b. If the specified problem is not stated in the standard form (e.g., has negative π values), the output file should contain one line:
ERROR: incorrect problem statement c. If the input data is correct, the output file should contain a sequence of Simplex tableaus, separated by the empty line. Rows and columns of each Simplex tableau should be named (use x1, x2, ..., xn for original input variable and s1, s2, ..., sm for slack variable names). Values should be tab-separated; lines should be separated by a system-specific line separator.
d. If the LP problem is unbounded, the last line of the output file should contain: NO SOLUTION: unbounded problem e. If the LP problem has a unique solution, the last lines of the output file should be:
SOLUTION FOUND: unique solution Objective: π§ (optimal value) π₯1 π₯2 π₯3 ... π₯π π 1 π 2 π 3 ... π π
where the last line contains the optimal basic solution.
f. If the LP problem has multiple solutions, the last lines of the output file should be:
SOLUTION FOUND: multiple solutions Objective: π§ (optimal value) π₯1 π₯2 π₯3 ... π₯π π 1 π 2 π 3 ... π π
where the last line contains any of the optimal basic solutions.
Decimal calculations are allowed; output values will be rounded to 3 decimal symbols