convexengineering / gplibrary

Useful subsystem models
MIT License
10 stars 11 forks source link

Npv #43

Closed mjburton11 closed 8 years ago

mjburton11 commented 8 years ago

Ready for review. @whoburg, I would like to know the following:

1) How is the overall content? Are there any big gaps that I'm not addressing? Do you also want a general example for N periods? 2) Is there a specific latex format you would like me to use? 3) Do you want me to try and make a gpkit model?

bqpd commented 8 years ago

Does the program as written drive all t_i to 0?

mjburton11 commented 8 years ago

Nope. Here's a sample output. Let me know what you think.

Cost
----
 4.166e-08 [1/USD] 

Free Variables
--------------
NPV : 2.4e+07                           [USD]  net present value
 PV : 8.002e+06                         [USD]  present value    
  C : [ 1.04e+07  1.51e+07  4.28e+07 ]  [USD]  cash flow        
  t : [ 2.59      6.37      17.1     ]  [year] time             

Constants
---------
C_r : 4e+06  [USD/year] cash flow rate
  r : 0.1    [1/year]   interest rate 

Sensitivities
-------------
  r : 1  interest rate 
C_r : -1 cash flow rate
bqpd commented 8 years ago

Interesting. Okay. Should that be N*PV in the first constraint, and would you expect this to converge as N is increased?

bqpd commented 8 years ago

This is a nifty program to look at for following pressures!

whoburg commented 8 years ago

@mjburton11, looking good. added a few comments.

This would be a good use case for the markdown parsing.

Would also be good to produce some plots showing how the integrated cash flow over each period adds up to the npv.

bqpd commented 8 years ago

@mjburton11, let's meet up sometime and try doing this in markdown!

mjburton11 commented 8 years ago

@bqpd sounds great!

whoburg commented 8 years ago

I see the new md file -- should the old tex and python files get removed now?