Mathematical Optimization

Mathematical Optimization = finding the best solution base on a given ojective function

Objective function = maximize or minimize

 

https://ampl.com/resources/the-ampl-book/chapter-downloads/

https://media.readthedocs.org/pdf/scipbook/latest/scipbook.pdf

 

Linear optimization (a1x1+a2x2+…+anxn) : most basic

– Integeroptimization: more complicate (NP-class)
Ex. find maximum number of chicken and rabbit, while theare are 5 heads and 16 feet.

Non-linear optimization : difficult to solve

-Quadric optimization (x^2+xy) polinomial up to 2 : able to solve by using SCIP (especially if convex function)

 

To solve

1. define mathematical fomular

  • variables :
    • x1
    • x2
  • objective function :
    • maximize 25×1+30×2
  • contraints :
    • 0<=x1<=6000
    • 0<=x2<=4000
    • x1/200+x2/140<=40

2. write  AMPL code from mathematical formular

var XB;
var XC;
maximize Profit: 25 * XB + 30 * XC;
subject to Time: (1/200) * XB + (1/140) * XC <= 40;
subject to B_limit: 0 <= XB <= 6000;
subject to C_limit: 0 <= XC <= 4000;