Sunday, November 7, 2021

Optimize

 Sat through what simulated annealing as an optimizing approach

is. Boils down to moving to next neighbor but allowing moves that

are slightly less good, at the beginning, to eventually phase this

behavior ut and - hopefully - find the true optimum. 


Moved on to linear programming. Turns out that python has an import

for that called spicy.optimize. Had to read up on np complete problems and

simplex optimization.


An np complete problem (nondeterministic polynomialtime complete) has to 

run through all the possible combinations to find the optimal one. The brute-force

approach!! There are no sure shortcuts into it. What blouse looks best with what

shorts given white sneakers?? Take everything out and try it on!!


Linear programming problems describe a linear relationship with constraints.

How long should I run each machine given tat the first costs $50 per hour

and the second $80. My constraints: machine1 requires 5 workers per hour and machine2 2;

machine1 produces 10 units per hour and machine2 12. The optimize module tells me 

machine1 1.5 hours; machine2, 6.25, See below:



Gaussian algebra solves it, but why spoil the fun??


                                                          *     *     *

I had a question from someone: why does the 90 units of production

have to be treated in the negative. Short answer, because it is an upper

bound ('limite supérieure') . I have an order for 90 chocolate cakes and I can

deliver more but not fewer. It has to be stated in this form to meet the condition...


No comments: