- Before you inout your problem, you should normalized it as a matrix
- Use CMake to build project
- Input your matrix and get the solution
The linear problem is:
And then, you should make inequality sign to be a equal sign, which means you need to add slack variables to every rows.
- An example to normalization
that is
after add slack variables $x_4, x_5, x_6$ that is
and then, the matrix is
and the object function is
but the RHS col must be all positive numbers, meaning that we need multiply -1 to some rows.
- Install CMake
- Use
cd LinProg
to enter the directory - Use
mkdir cbuild
to create a subdirectory andcd cbild
to enter the subdirectory - Use
cmake ..
to configure project - Use
cmake --build .
to build project - Use
./linprog
to initiate project
After ./linprog
to initiate project, then input the matrix (only numbers) and the obj, then get the solution.