-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsidebar.py
More file actions
executable file
·50 lines (41 loc) · 1.05 KB
/
sidebar.py
File metadata and controls
executable file
·50 lines (41 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import streamlit as st
from cutting_edge import cutedge
from geometric import geo
from ideas_geo import ideasgeo
from line_search import linesearch
from penalty import penalty
from plineal import plineal
from ram_ac import ramac
from simplex import simplex
from welcome import welcome
options = [
"Decidiendo...",
"Solución geométrica para problemas de programación lineal",
"Método Simplex",
"Planos cortantes",
"Ramificación y acotación",
"Ideas geométricas de demostración de teoremas",
"Métodos numéricos para la optimización no lineal",
"Búsqueda en línea",
"Penalización",
]
router = [
welcome,
geo,
simplex,
cutedge,
ramac,
ideasgeo,
plineal,
linesearch,
penalty,
]
def callback():
if "current" in st.session_state:
del st.session_state[st.session_state.current]
def sidebar():
with st.sidebar:
st.header("Qué desea computar?")
opt = st.radio("", options, on_change=callback)
idx = options.index(opt)
return router[idx]