MathCAD




Example 8. As the author sold the programs - 3


The algorithm of optimization with help of Solver Excel may call lazy: user forms the table of calculation and says: I want that you do so that... the criterion function took maximum (minimum, fixed) values but at that all limitations were realized. For it this is enough to press the button Observe. Solver Excel gave us old result 16 big and 2 little drums. But I did not want to give it in.

There is good rule: one has to check the solution of the problem up as others methods as the software. Besides we can forget about KISS-principle of programming. It has no connection with kisses although good attitude to the solving problem and to the computer in it we can find. KISS is the abbreviation of English phrase: Keep It Simple, Stupid! It calls to solve the problem put by simplest method and to use the highly algorithms and methods only when the simple way does not suit because of duration of the calculation or because of irrational use others their resource man and/or computer[8].

The simplest way of solving the problem put by is to sort out all versions and to stop in optimum one. Fortunately there are only 1088 versions: we could not take more than 63 little drums with paint or more than 16 big ones [9]

for our 14 million roubles. The excess can be called Computers and Workers and Peasants method of the solution. In addition it can give the total-lot confidence in that the solution is right and that the obtained solution is uniqueness. Even it can show that there are a few such solutions. Such situation does not meet seldom in the integer linear programming problems.

So the excess. Following the rule described above new method of the problems solution is necessary to combine with the new software of its realization. Of course it can be done in Excel by forming the table of all solutions and/or writing the program of the excess in programming language Visual Basic for Applications (VBA), build in Excel. But Olgas computer had Mathcad too. It quite successfully solves different problems (including economic ones) with out real programming look-up (BASIC, C, Pascal and others.). I had been working at the book for that moment. Reader holds it now in his hands. The example with paint only decorates this book (it is casual pun).