Hacker News new | past | comments | ask | show | jobs | submit login

Maximize[...], Minimize[...], LinearProgramming[...] thats it... But Mathematica costs money.

Example:

Minimize[{x + 2 y, -5 x + y == 7 && x + y >= 26 && x >= 3 && y >= 4}, {x, y}] LinearProgramming[{1, 2}, {{-5, 1}, {1, 1}}, {{7, 0}, {26, 1}}, {{3, Infinity}, {4, Infinity}}]




The vast majority of the code I wrote is setting up the problem (which has 15 vars and 27 constraints), not solving it. I.e., those list comprehensions are a way of writing 9 constraints on a single line.

To demonstrate mathematica is easier, you need to demonstrate that it's similarly easy to translate the problem from a verbal specification to an LP problem. Solving LP is the easy part.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: