A Python script to check and parse a Linear Programming Problem of type:
min/max z = c1x1 + c2x2 + … + cnxn
st a11x1 + a12x2 + … + anxn ⊗ b1,
a21x1 + a22x2 + … + a2nxn ⊗ b2,
… … … ... … … … … … ,
am1x1 + am2x2 + … + amnxn ⊗ bm
end
⊗ = {≤,=,≥}, c, x∈ℜn, b∈ℜm και A∈ℜmxn
- Download Parser.py
- Write the file name in the code (Example: "Parser_example.txt")
- Script will generate "parsed_file.txt" containing the matrices of the linear program
- Removes special characters and spaces
- Checks if linear program is specified correctly and nothing necessary is missing
- Parses data into matrices