Skip to content

Simplex Method, Fibonacci Search / 单纯形法,斐波那契搜索

License

Notifications You must be signed in to change notification settings

shy913/Operations-Research-and-Optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Operations Research & Optimization

By shy

This is my homework of Operations Research & Optimization, so it may not be updated.

Simplex Method & Simplex Table

Contains a solver to linear programming problem using simplex method while showing the simplex table. Also it can tell the nature of the solution.

How to use:

  1. Transform the LP problem to standard form:

Maximize $c^T x$

Subject to {A x = b, x >= 0

Make sure that an identity matrix must contain in A!

  1. Now we have A, b, c.
  2. import shypy
  3. Let Solution = maximize(c, A, b)
  4. Solution().show()

Note that bugs may exsist!

Existing bugs:

  1. In some cases, especially when there're multiple solutions, the number of basic variables may be more than $m$.

Fibonacci Search & Bisection Search

How to use:

fib_search(f, a, b, n): param f: The function to be evaluated. param a: Left node of the interval param b: Right node of the interval param n: Total number of evaluation return: Final Interval example: python def func(x): return x ** 2 - 6 * x + 2 fib_search(func, 0, 10, 34)

About

Simplex Method, Fibonacci Search / 单纯形法,斐波那契搜索

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages