pystra.decision.ddo.DDO#
Use it: User guide · Worked example · Theory
- class DDO(*, study, criterion, objective=None)[source]#
Bases:
objectEvaluate a decision context with an objective and acceptability criterion.
Construct directly from the three pieces:
ddo = DDO( study=study, objective=CostBenefitModel(...), criterion=LQI.from_country(...), )
Construction is keyword-only by design:
study,objectiveandcriterionare easy to transpose positionally, which would silently misassign them.run()evaluates every alternative and caches the table;optimize()returns the best feasible alternative andeconomic_optimum()the unconstrained economic best.Methods
Return the alternative with the largest objective, ignoring feasibility.
Return evaluated alternatives satisfying the criterion.
Return the feasible alternative with the largest objective value.
Plot results from the most recent run.
Evaluate every alternative; a failed rerun clears the previous table.
Return the key decision points as a small labeled table.
- property results: DataFrame | None#
Independent table from the last completed run, or None.
- run()[source]#
Evaluate every alternative; a failed rerun clears the previous table.
- Return type:
DataFrame
- economic_optimum()[source]#
Return the alternative with the largest objective, ignoring feasibility.
- Return type:
Series
- feasible_results()[source]#
Return evaluated alternatives satisfying the criterion.
- Return type:
DataFrame
- optimize()[source]#
Return the feasible alternative with the largest objective value.
- Return type:
Series
- summary()[source]#
Return the key decision points as a small labeled table.
One row for the unconstrained economic optimum and, when the criterion admits one, a second for the best feasible alternative. Columns are the design variable,
pf,beta(when present), the objective, and the criterion’s feasibility flag. This is the table a designer reads off a study, without rebuilding it row by row.- Return type:
DataFrame