Current location - Training Enrollment Network - Mathematics courses - How to solve math problems with lingo?
How to solve math problems with lingo?
1, title: findminz = 2 * x1+3 * x2+x3; s . t .[x 1+4 * x2+2 * x3 & gt; =8 ; 3 * x 1+2 * x2 & gt; =6 ; xj & gt= 0,j= 1,2,3,].

2. Open Lingo software and enter the following programming state.

3. Then enter the objective function: Minz = 2 * x 1+3 * x2+x3, as shown in the following figure:

Then run it to see if you typed it correctly. If there is no "Error", continue to enter the following divisor conditions. As shown in the figure below, your input is correct. You can keep playing.

5. Enter the divisor equation and run it again. If it is the same as the picture below, the input is correct. If the display is different, it means that you entered it incorrectly. Here you can see that the number after the objectivevalue is 7, so the optimal solution is 7.

6. The last divisor of X is not entered above, so after I add the following figure, you will find that the result is consistent, that is to say, in Lingo software, the custom range of the introduced variable is greater than 0. If there are other divisor conditions, you need to write them separately.