convexengineering / gplibrary

Useful subsystem models
MIT License
10 stars 11 forks source link

economic order quantity model #58

Closed whoburg closed 8 years ago

whoburg commented 8 years ago

Here's a really simple posynomial model from 1913.

@bqpd, the new markdown feature seems really great! My current markdown wish list:

  1. Is default.latex living in any of our git repos? Let's decide where it belongs and get it under version control.
  2. Did we ever get your markdown makefile / shell script added to gpkit or gpkit-models?
  3. The latex output is still shoddy, largely due to https://github.com/hoburg/gpkit/issues/480, https://github.com/hoburg/gpkit/issues/560, https://github.com/hoburg/gpkit/issues/561, and https://github.com/hoburg/gpkit/issues/562.
  4. Create a simple script or framework for causing markdown models like the one in this PR to appear on our gpkit-models readthedocs (once merged to master).
  5. Re: the bullet above, it would be especially nice if the html models on readthedocs had a small link to "download PDF" (since we're making it anyway)
whoburg commented 8 years ago

eoq.pdf

whoburg commented 8 years ago

ready for review.

pgkirsch commented 8 years ago

The markdown seems pretty cool but not particularly useful if trying to compose with other models.

bqpd commented 8 years ago

@mjburton11 and I just did the NPV model in markdown. @pgkirsch, we could make it such that you could make another file (i.e. npv.py) with the following content:

from gpkit.tools import mdkmake

exec mdmake("npv.md")

that would be importable.

bqpd commented 8 years ago

Also, neat to see this file online! https://github.com/hoburg/gpkit-models/blob/eoq/manufacturing/eoq.md

bqpd commented 8 years ago

This looks great! The model seems to mostly push holding and setup costs to be about equal?

whoburg commented 8 years ago

yep, it pushes them equal just like induced drag and fixed profile drag should be equal for a plane maximizing range. It's because the two terms in the posynomial pushing on one another have equal but opposite exponents (1 vs -1). Pretty cool.

whoburg commented 8 years ago

responded to code review. ready for merging I believe. @bqpd, where should we capture the markdown wish list from the beginning of this PR? it's pretty high priority so it's easier for us to share clean, good looking models.