@@ -669,11 +669,7 @@ function initProblemsTable() {
669669</script>
670670"""
671671
672- const TABLE = (
673- presentation = TABLE_PRESENTATION,
674- style = TABLE_STYLE,
675- logic = TABLE_LOGIC,
676- )
672+ const TABLE = (presentation= TABLE_PRESENTATION, style= TABLE_STYLE, logic= TABLE_LOGIC)
677673
678674# -------------------------------
679675# Helpers
@@ -746,35 +742,40 @@ end
746742function collect_problem_data(problem_sym:: Symbol )
747743 ocp = ocp_model(eval(problem_sym)(OptimalControlBackend()))
748744
749- cost = has_mayer_cost(ocp) && has_lagrange_cost(ocp) ? " Bolza" :
750- has_mayer_cost(ocp) ? " Mayer" : " Lagrange"
745+ cost = if has_mayer_cost(ocp) && has_lagrange_cost(ocp)
746+ " Bolza"
747+ elseif has_mayer_cost(ocp)
748+ " Mayer"
749+ else
750+ " Lagrange"
751+ end
751752
752753 final_time = has_fixed_final_time(ocp) ? " fixed" : " free"
753754
754755 dims = (
755- x = CTModels. dim_state_constraints_box(ocp),
756- u = CTModels. dim_control_constraints_box(ocp),
757- v = CTModels. dim_variable_constraints_box(ocp),
758- c = CTModels. dim_path_constraints_nl(ocp),
759- b = CTModels. dim_boundary_constraints_nl(ocp),
756+ x= CTModels. dim_state_constraints_box(ocp),
757+ u= CTModels. dim_control_constraints_box(ocp),
758+ v= CTModels. dim_variable_constraints_box(ocp),
759+ c= CTModels. dim_path_constraints_nl(ocp),
760+ b= CTModels. dim_boundary_constraints_nl(ocp),
760761 )
761762
762763 total = sum_namedtuple(dims)
763764
764765 return (
765- Problem = string(problem_sym),
766- State = state_dimension(ocp),
767- Control = control_dimension(ocp),
768- Variable = variable_dimension(ocp),
769- Cost = cost,
770- FinalTime = final_time,
771- DimStateConstraint = dims. x,
772- DimControlConstraint = dims. u,
773- DimVariableConstraint = dims. v,
774- DimPathConstraint = dims. c,
775- DimBoundaryConstraint = dims. b,
776- TotalConstraints = total,
777- ConstraintButtonsHtml = generate_constraint_buttons_html(dims)
766+ Problem= string(problem_sym),
767+ State= state_dimension(ocp),
768+ Control= control_dimension(ocp),
769+ Variable= variable_dimension(ocp),
770+ Cost= cost,
771+ FinalTime= final_time,
772+ DimStateConstraint= dims. x,
773+ DimControlConstraint= dims. u,
774+ DimVariableConstraint= dims. v,
775+ DimPathConstraint= dims. c,
776+ DimBoundaryConstraint= dims. b,
777+ TotalConstraints= total,
778+ ConstraintButtonsHtml= generate_constraint_buttons_html(dims),
778779 )
779780end
780781
0 commit comments