12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

94 • Chapter 3: Finding Solutions> data_list:=transform[tallyinto](random_data,ranges);data_list := [Weight(−1..0, 17), Weight(0..1, 21),Weight(2..5, 2), Weight(1..2, 6), Weight(−5.. − 2, 0),Weight(−2.. − 1, 4)]> statplots[histogram](data_list);2015105–6 –4 –2 0 2 4 6The Linear Optimization PackageThe simplex package contains commands for linear optimization, usingthe simplex algorithm. Linear optimization involves finding optimal solutionsto equations under constraints.An example of a classic optimization problem is the pizza deliveryproblem. You have four pizzas to deliver, to four different places, spreadthroughout the city. You want to deliver all four using as little gas aspossible. You also must get to all four locations in under twenty minutes,so that the pizzas stay hot. If you can create mathematical equationsrepresenting the routes to the four places and the distances, you can findthe optimal solution. That is, you can determine what route you shouldtake to get to all four places in as little time and using as little gas aspossible. The constraints on this particular system are that you have todeliver all four pizzas within twenty minutes of leaving the restaurant.Here is a very small system as an example.> with(simplex);Warning, the name basis has been redefinedWarning, the protected names maximize and minimize havebeen redefined and unprotected

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!