https://github.com/yorgosbas/linear-program-parser
A Python script to check and parse a Linear Programming Problem
https://github.com/yorgosbas/linear-program-parser
linear-programming parser python
Last synced: 12 months ago
JSON representation
A Python script to check and parse a Linear Programming Problem
- Host: GitHub
- URL: https://github.com/yorgosbas/linear-program-parser
- Owner: YorgosBas
- License: mit
- Created: 2020-04-19T08:27:32.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-28T13:05:44.000Z (about 6 years ago)
- Last Synced: 2025-07-02T07:02:37.972Z (12 months ago)
- Topics: linear-programming, parser, python
- Language: Python
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Linear Program Parser
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
```
## How to run
1. Download Parser.py
2. Write the file name in the code (Example: "Parser_example.txt")
3. Script will generate "parsed_file.txt" containing the matrices of the linear program
## How it works
1. Removes special characters and spaces
2. Checks if linear program is specified correctly and nothing necessary is missing
3. Parses data into matrices