zward / Amua

An open source modeling framework
GNU General Public License v3.0
33 stars 11 forks source link

categories? #51

Open acd0 opened 3 years ago

acd0 commented 3 years ago

Thanks for your work on amua! Is there a way to perform analysis by categories and/or set some 'costs' to NA (different than 0).

essentially, my tree ends in one of two outcomes (A or B) based on branch points and I want to minimize 'costs' to each of the As while seeing the effect of costs on all of the Bs. I can't break it into two models because each branch can become A or B.

Is there any way to either set some costs as NA rather than 0 (so I can have two cost variables - one for A and one for B such that a cost of 0 in some branches doesnt skew my results). Alternatively, is there a way to run as categories (A or B) for direct comparison?

zward commented 3 years ago

Could you add another cost outcome (a new model dimension) to track 2 kinds of costs (e.g. cost1 and cost2)? One cost would be used as the objective function, while the other would just track specified costs, so you could add 0s without impacting the results. Maybe I'm not understanding the problem correctly, but let me know if that would work.

acd0 commented 3 years ago

Thank you for the fast reply! Yes, that is exactly what i did. i created 2 costs, and each branch only had costs in one of the two categories. I found that the different probabilities of reaching each branch affected the results (as the '0s were weighted more heavily sometimes) but perhaps i am using the cost variables in this program incorrectly and need to look into this more.

zward commented 3 years ago

Not sure I understand completely, but if you want to send me a screenshot/copy of the model and explain the intended vs calculated results I can take a look: zward@hsph.harvard.edu