Mercurial > pokemon-types
comparison org/lpsolve.org @ 21:f88b7d2c25d9
lol.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 17 Sep 2013 17:42:51 -0400 |
parents | 47fa6dc56e30 |
children | 8992278bf399 |
comparison
equal
deleted
inserted
replaced
20:47fa6dc56e30 | 21:f88b7d2c25d9 |
---|---|
123 +wheat +barley <= 75; | 123 +wheat +barley <= 75; |
124 #+end_src | 124 #+end_src |
125 | 125 |
126 Running the =lp_solve= program on =farmer.lp= yields the following output. | 126 Running the =lp_solve= program on =farmer.lp= yields the following output. |
127 | 127 |
128 lol | |
129 | |
128 #+begin_src sh :exports both :results scalar | 130 #+begin_src sh :exports both :results scalar |
129 lp_solve ~/proj/pokemon-types/lp/farmer.lp | 131 lp_solve ~/proj/pokemon-types/lp/farmer.lp |
130 #+end_src | 132 #+end_src |
131 | 133 |
132 #+results: | 134 #+results: |
175 #+name: body | 177 #+name: body |
176 #+begin_src clojure :results verbatim :exports both | 178 #+begin_src clojure :results verbatim :exports both |
177 (import 'lpsolve.LpSolve) | 179 (import 'lpsolve.LpSolve) |
178 #+end_src | 180 #+end_src |
179 | 181 |
180 #+results: body | 182 #+results: |
181 : lpsolve.LpSolve | 183 : lpsolve.LpSolve |
182 | 184 |
183 should run with no problems. | 185 should run with no problems. |
184 | 186 |
185 ** Making a DSL to talk with LpSolve | 187 ** Making a DSL to talk with LpSolve |
400 #+end_src | 402 #+end_src |
401 | 403 |
402 #+results: | 404 #+results: |
403 : {"barley" 53.12499999999999, "wheat" 21.875} | 405 : {"barley" 53.12499999999999, "wheat" 21.875} |
404 | 406 |
407 | |
405 And it works as expected! | 408 And it works as expected! |
406 | 409 |
407 *** The Farmer Example in Clojure, Pass 2 | 410 *** The Farmer Example in Clojure, Pass 2 |
408 We don't have to worry about memory management anymore, and the farmer | 411 We don't have to worry about memory management anymore, and the farmer |
409 example is about half as long as the example from the =LpSolve= | 412 example is about half as long as the example from the =LpSolve= |