Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math Representation of Objective and Constraint Functions #19

Closed
akruel01 opened this issue Jan 26, 2023 · 1 comment
Closed

Math Representation of Objective and Constraint Functions #19

akruel01 opened this issue Jan 26, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@akruel01
Copy link
Contributor

! Not entirely necessary this is just for Demos !
Can use sympy.latex(S("lambda function")) for most of the lambdas we represent.

Turns:

Optimize(objective   =lambda x: abs(old_beta-x), # minimize difference
             constraints =[{'type':"ineq",'function':lambda x: x >= 0}, #  low bound
                           {'type':"ineq",'function':lambda x: x <= 1}, # high bound
                           {"type":"ineq","function":lambda x: 0.05 - GETRISK(x)}] )

Into:

$$\begin{array}{rl}\texttt{minimize}& \beta \\
\texttt{such that} & P(Hospitalizations(t)_{do(\beta)} < 3000) < p \\
 & 0 \leq \beta \leq 1 \end{array}$$
@SamWitty SamWitty added the enhancement New feature or request label Mar 2, 2023
@anirban-chaudhuri
Copy link
Contributor

It is not clear to me where we want to use this. We might be able to use this to provide intermediate feedback to the user on whether they have formulated the desired optimization problem.

@anirban-chaudhuri anirban-chaudhuri added the wontfix This will not be worked on label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants