Skip to content

tuantran0910/Linear-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linear Programming

Introduction

This practical final project is part of the Linear Programming course in the field of Data Science at VNUHCM - University of Science.

Usage

Installation

To install the correct version of Python (version 3.8 or higher) for this project, you can visit the following link to download and install.

Clone the project to your local machine:

git clone https://github.com/TuanTran0910/Linear-Programming.git
cd Linear-Programming

To install the necessary libraries, you can use the following command:

pip install -r requirements.txt

This project use the library streamlit for user interface. To provide the input data for your project, please follow the instructions provided at How to provide input data

To start the project:

python -m streamlit run src/main.py

How to provide input data

First, enter the number of variables and the number of constraints for the linear programming problem. Please make sure to enter each value on a new line.

3
3

Enter the objective function according to the following formula: min/max c1x1 c2x2 ... cnxn.

Please note that when entering the coefficients accompanying the variables in the objective function, separated by a blank space. Use the following convention:

  • For positive coefficients, enter the integer value directly.
  • For negative coefficients, enter the integer value with a "-" sign.
min x1 3x2 2x3

Next, enter each constraint of the linear programming problem on separate lines. Enter the coefficients accompanying the variables in the objective function, following the convention where positive coefficients are entered directly as integers and negative coefficients are entered with a "-" sign.

For example, if you have the constraint "2x1 - 3x2 + 4x3 <= 5", you would enter the coefficients as follows:

2x1 -3x2 4x3 <= 5

Next, enter the constraint signs for the linear programming problem. Enter the condition for each variable on separate lines, and do not enter anything for variables that are unrestricted.

For each variable, enter one of the following conditions on separate lines:

  • "<=" for less than or equal to
  • ">=" for greater than or equal to
  • "=" for equality
x1 >= 0
x2 <= 0

Finally, click on the "Solve" button to perform the linear programming problem solving.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages