Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -198,6 +198,11 @@ with tab2:
|
|
198 |
Max_Rank = fd_Max_Rank
|
199 |
Max_Upside = fd_Max_Upside
|
200 |
contest_var1 = st.selectbox("What contest type are you optimizing for?", ('Cash', 'Small Field GPP', 'Large Field GPP', 'Round Robin'), key='contest_var1')
|
|
|
|
|
|
|
|
|
|
|
201 |
if contest_var1 == 'Small Field GPP':
|
202 |
st.info('The Pivot optimal uses backend functions to create a stack and lock in certain pieces, if you want control over QB pairing use the Manual model instead.')
|
203 |
opto_var1 = st.selectbox("Pivot optimal or Manual?", ('Pivot Optimal', 'Manual'), key='opto_var1')
|
@@ -585,6 +590,8 @@ with tab2:
|
|
585 |
elif contest_var1 != 'Cash':
|
586 |
obj_points = {idx: (flex_file['Median'][idx]) for idx in flex_file.index}
|
587 |
total_score += sum([player_vars[idx]*obj_points[idx] for idx in flex_file.index])
|
|
|
|
|
588 |
|
589 |
|
590 |
total_score.solve()
|
|
|
198 |
Max_Rank = fd_Max_Rank
|
199 |
Max_Upside = fd_Max_Upside
|
200 |
contest_var1 = st.selectbox("What contest type are you optimizing for?", ('Cash', 'Small Field GPP', 'Large Field GPP', 'Round Robin'), key='contest_var1')
|
201 |
+
trim_choice1 = st.selectbox("Allow overowned lineups?", options = ['Yes', 'No'])
|
202 |
+
if trim_choice1 == 'Yes':
|
203 |
+
trim_var1 = 0
|
204 |
+
elif trim_choice1 == 'No':
|
205 |
+
trim_var1 = 1
|
206 |
if contest_var1 == 'Small Field GPP':
|
207 |
st.info('The Pivot optimal uses backend functions to create a stack and lock in certain pieces, if you want control over QB pairing use the Manual model instead.')
|
208 |
opto_var1 = st.selectbox("Pivot optimal or Manual?", ('Pivot Optimal', 'Manual'), key='opto_var1')
|
|
|
590 |
elif contest_var1 != 'Cash':
|
591 |
obj_points = {idx: (flex_file['Median'][idx]) for idx in flex_file.index}
|
592 |
total_score += sum([player_vars[idx]*obj_points[idx] for idx in flex_file.index])
|
593 |
+
if trim_var1 == 1:
|
594 |
+
total_score += pulp.lpSum([player_vars[idx]*obj_own_max[idx] for idx in flex_file.index]) <= max_own - .001
|
595 |
|
596 |
|
597 |
total_score.solve()
|