Closed sabinala closed 1 month ago
@anirban-chaudhuri
If we have this feature, along with multiple Optimize constraints/qoi/success criteria, might we be able to solve Scenario 2 Q1 problem of theta >= 2 * epsilon
?
That is, edit the model to include a new observable f = theta - 2 * epsilon
and choose f
as a second constraint (with risk_bound = 0.0
) in Optimize?
Something like:
qoi = [lambda y: obs_max_qoi(samples, contexts = ["TotalInfected"]), lambda y: obs_max_qoi(samples, context = ["f"])]
where the two observables were added to the model AMR using MIRA:
model_sidarthe.observables["TotalInfected"] = mira.metamodel.template_model.Observable(
name = "TotalInfected",
expression = sympy.Symbol("Infected") + sympy.Symbol("Diagnosed") + sympy.Symbol("Ailing") + sympy.Symbol("Recognized") + sympy.Symbol("Threatened")
)
model_sidarthe.observables["f"] = mira.metamodel.template_model.Observable(
name = "f",
expression = sympy.Symbol("theta") - 2* sympy.Symbol("epsilon")
)
Is this addressed now with https://github.com/ciemss/pyciemss/pull/602?
This should be it!
Seems that this is already addressed.
Currently, optimize can only use state variables in the QoI, but we should be able to use observables as well.