The simplex method is used to solve the following linear programming problems maxz = 2x1 + 3x2-5x3 S.T {X1 + x2 + X3 = 7,2x1-5x2 + x3 ≥ 10, x1, X2, x3 ≥ 0}

The simplex method is used to solve the following linear programming problems maxz = 2x1 + 3x2-5x3 S.T {X1 + x2 + X3 = 7,2x1-5x2 + x3 ≥ 10, x1, X2, x3 ≥ 0}


The original problem introduces artificial variable x4, residual variable X5 and artificial variable X6
Maxz=2x1+3x2-5x3 -Mx4-Mx6
x1+x2+x3+x4=7,
2x1-5x2+x3-x5+x6=10
, x1, X2, X3, x4, X5, X6 ≥ 0 are solved by artificial variable method



Lingo solves the minimum target min 2 * 200 / (1.5 * sin (x1)) + 760 / (1.5 * sin (x2))
Constraint 2 * (1.5 * cos (x1) + 1.47) * (200 / (1.5 * sin (x1))) + (1.5 * cos (x2) + 2.11) * (760 / (1.5 * sin (x2))) = 1000;
pi/2


If PI represents π, add pi = 3.1415926; because there is no constant min representing π in lingo: 2 * 200 / (1.5 * @ sin (x1)) + 760 / (1.5 * @ sin (x2)); 2 * (1.5 * @ cos (x1) + 1.47) * (200 / (1.5 * @ sin (x1)) + (1.5 * @ cos (x2) + 2.11) * (760 / (1.5 * @ sin (x2))) = 1000; PI / 2



Lingo's problem is to limit the eight variables x1, X2, X3, x4, X5, X6, X7, X8 to at most four, and take 10. If not, take any other number that is not 10
My idea is to set 0-1 variables Y1, Y2, Y3, Y4, Y5, y6, Y7, Y8. Each Yi corresponds to Xi, Y1 + Y2 + Y3 + Y4 + Y5 + y6 + Y7 + Y8


x=@if (y#eq#10,1,0);



What is JavaScript runtime JavaScript
Compiling coffeescript to JavaScript requires a JavaScript runtime and the awareness of a runtime will give you an execjs error


It can be translated into JS running environment or JS running platform