text:
using CSV
using DataFrames
using Ipopt
using JuMP

n_steps = 187 # Setting number of ODE discretisation steps

# Data
println("Reading measurement data...")
data_path = "/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/sbml2julia/examples/Shin_PLOS2019/measurementData_Shin_PLOS2019.tsv"
df = CSV.read(data_path)
insert!(df, 1, (1:length(df[:,1])), :id)

df_by_o = groupby(df, :observableId)
df_by_c = groupby(df, :simulationConditionId)

# Setting variables
t_sim = range(0, stop=maximum(df[!, :time]), length=n_steps)
t_exp = Dict()
m_exp = Dict()
t_sim_to_exp = Dict()
deduplicated_time_idx = Dict()

cond2idx = Dict()
for i_cond in 1:length(keys(df_by_c))
    cond_name = values(keys(df_by_c)[i_cond])[1]
    cond2idx[cond_name] = i_cond
end

for i_obs in 1:length(keys(df_by_o))
    obs_name = values(keys(df_by_o)[i_obs])[1]
    t_exp[obs_name] = Dict()
    m_exp[obs_name] = Dict()
    t_sim_to_exp[obs_name] = Dict()
    deduplicated_time_idx[obs_name] = Dict()
    df_by_o_c = groupby(DataFrame(df_by_o[i_obs]), :simulationConditionId)
    for i_cond in 1:length(keys(df_by_o_c))
        cond_name = values(keys(df_by_o_c)[i_cond])[1]
        cond_idx = cond2idx[cond_name]
        t_exp[obs_name][cond_idx] = df_by_o_c[i_cond][!, :time]
        m_exp[obs_name][cond_idx] = df_by_o_c[i_cond][!, :measurement]

        t = df_by_o_c[i_cond][!, :time]
        tmp = []
        for i in 1:length(t)
            idx = argmin(abs.(t[i] .- t_sim))
            append!(tmp, idx)
        end
        t_sim_to_exp[obs_name][cond_idx] = tmp

        deduplicated_time_idx[obs_name][cond_idx] = []
        idx = 0
        prev = "a"
        for t in df_by_o_c[i_cond][!, :time]
            if t != prev
                idx = idx + 1
            end
            push!(deduplicated_time_idx[obs_name][cond_idx], idx)
            prev = t
        end
    end
end

obs2conds = Dict()
for obs_dict in t_exp
    obs_name = obs_dict[1]
    obs2conds[obs_name] = []
    for cond_dict in obs_dict[2]
        cond_idx = cond_dict[1]
        push!(obs2conds[obs_name], cond_idx)
    end
    sort!(obs2conds[obs_name])
end

results = Dict()
results["objective_value"] = Dict()
results["parameters"] = Dict()
results["species"] = Dict()
results["observables"] = Dict()

j_to_cond_par = [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, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210]
cond_without_preequ = [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, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210]
cond_with_preequ = []
preequ = []

for i_start in 1:2
    species_dict = Dict()
    obs_dict = Dict()

    m = Model(with_optimizer(Ipopt.Optimizer))
    set_optimizer_attribute(m,"linear_solver","MA27")

    # Define global parameters
    println("Defining global parameters...")
    @variable(m, 0 <= mu_1 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, 0 <= mu_2 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, 0 <= mu_3 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, 0 <= mu_4 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, 0 <= mu_5 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, 0 <= mu_6 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, 0 <= mu_7 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, 0 <= mu_8 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, 0 <= mu_9 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, 0 <= mu_10 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, 0 <= mu_11 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, 0 <= mu_12 <= 10, start=0+(10-(0))*rand(Float64))
    @variable(m, -10 <= alpha_1_2 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_1 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_1_3 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_1 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_1_4 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_1 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_1_5 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_1 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_1_6 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_1 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_1_7 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_1 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_1_8 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_1 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_1_9 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_1 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_1_10 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_1 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_1_11 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_1 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_1_12 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_1 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_3 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_2 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_4 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_2 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_5 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_2 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_6 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_2 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_7 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_2 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_8 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_2 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_9 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_2 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_10 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_2 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_11 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_2 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_12 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_2 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_4 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_3 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_5 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_3 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_6 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_3 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_7 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_3 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_8 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_3 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_9 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_3 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_10 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_3 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_11 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_3 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_12 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_3 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_5 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_4 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_6 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_4 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_7 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_4 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_8 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_4 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_9 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_4 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_10 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_4 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_11 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_4 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_12 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_4 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_6 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_5 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_7 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_5 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_8 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_5 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_9 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_5 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_10 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_5 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_11 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_5 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_12 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_5 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_7 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_6 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_8 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_6 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_9 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_6 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_10 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_6 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_11 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_6 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_12 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_6 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_8 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_7 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_9 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_7 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_10 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_7 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_11 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_7 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_12 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_7 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_9 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_8 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_10 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_8 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_11 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_8 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_12 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_8 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_10 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_9 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_11 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_9 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_12 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_9 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_11 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_10 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_12 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_10 <= 10, start=-10+(10-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_12 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_11 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_1_1 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_2_2 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_3_3 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_4_4 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_5_5 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_6_6 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_7_7 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_8_8 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_9_9 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_10_10 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_11_11 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, -10 <= alpha_12_12 <= 0, start=-10+(0-(-10))*rand(Float64))
    @variable(m, sigma == 0.05, start=0.05)

    # Define condition-specific parameters
    println("Defining condition-specific parameters...")
    @variable(m, mu_a[1:210])
    @constraint(m, mu_a[1] == mu_1)
    @constraint(m, mu_a[2] == mu_2)
    @constraint(m, mu_a[3] == mu_3)
    @constraint(m, mu_a[4] == mu_4)
    @constraint(m, mu_a[5] == mu_5)
    @constraint(m, mu_a[6] == mu_6)
    @constraint(m, mu_a[7] == mu_7)
    @constraint(m, mu_a[8] == mu_8)
    @constraint(m, mu_a[9] == mu_9)
    @constraint(m, mu_a[10] == mu_10)
    @constraint(m, mu_a[11] == mu_11)
    @constraint(m, mu_a[12] == mu_12)
    @constraint(m, mu_a[13] == mu_1)
    @constraint(m, mu_a[14] == mu_1)
    @constraint(m, mu_a[15] == mu_1)
    @constraint(m, mu_a[16] == mu_1)
    @constraint(m, mu_a[17] == mu_1)
    @constraint(m, mu_a[18] == mu_1)
    @constraint(m, mu_a[19] == mu_1)
    @constraint(m, mu_a[20] == mu_1)
    @constraint(m, mu_a[21] == mu_1)
    @constraint(m, mu_a[22] == mu_1)
    @constraint(m, mu_a[23] == mu_1)
    @constraint(m, mu_a[24] == mu_1)
    @constraint(m, mu_a[25] == mu_1)
    @constraint(m, mu_a[26] == mu_1)
    @constraint(m, mu_a[27] == mu_1)
    @constraint(m, mu_a[28] == mu_1)
    @constraint(m, mu_a[29] == mu_1)
    @constraint(m, mu_a[30] == mu_1)
    @constraint(m, mu_a[31] == mu_1)
    @constraint(m, mu_a[32] == mu_1)
    @constraint(m, mu_a[33] == mu_1)
    @constraint(m, mu_a[34] == mu_1)
    @constraint(m, mu_a[35] == mu_1)
    @constraint(m, mu_a[36] == mu_1)
    @constraint(m, mu_a[37] == mu_1)
    @constraint(m, mu_a[38] == mu_1)
    @constraint(m, mu_a[39] == mu_1)
    @constraint(m, mu_a[40] == mu_1)
    @constraint(m, mu_a[41] == mu_1)
    @constraint(m, mu_a[42] == mu_1)
    @constraint(m, mu_a[43] == mu_1)
    @constraint(m, mu_a[44] == mu_1)
    @constraint(m, mu_a[45] == mu_1)
    @constraint(m, mu_a[46] == mu_2)
    @constraint(m, mu_a[47] == mu_2)
    @constraint(m, mu_a[48] == mu_2)
    @constraint(m, mu_a[49] == mu_2)
    @constraint(m, mu_a[50] == mu_2)
    @constraint(m, mu_a[51] == mu_2)
    @constraint(m, mu_a[52] == mu_2)
    @constraint(m, mu_a[53] == mu_2)
    @constraint(m, mu_a[54] == mu_2)
    @constraint(m, mu_a[55] == mu_2)
    @constraint(m, mu_a[56] == mu_2)
    @constraint(m, mu_a[57] == mu_2)
    @constraint(m, mu_a[58] == mu_2)
    @constraint(m, mu_a[59] == mu_2)
    @constraint(m, mu_a[60] == mu_2)
    @constraint(m, mu_a[61] == mu_2)
    @constraint(m, mu_a[62] == mu_2)
    @constraint(m, mu_a[63] == mu_2)
    @constraint(m, mu_a[64] == mu_2)
    @constraint(m, mu_a[65] == mu_2)
    @constraint(m, mu_a[66] == mu_2)
    @constraint(m, mu_a[67] == mu_2)
    @constraint(m, mu_a[68] == mu_2)
    @constraint(m, mu_a[69] == mu_2)
    @constraint(m, mu_a[70] == mu_2)
    @constraint(m, mu_a[71] == mu_2)
    @constraint(m, mu_a[72] == mu_2)
    @constraint(m, mu_a[73] == mu_2)
    @constraint(m, mu_a[74] == mu_2)
    @constraint(m, mu_a[75] == mu_2)
    @constraint(m, mu_a[76] == mu_3)
    @constraint(m, mu_a[77] == mu_3)
    @constraint(m, mu_a[78] == mu_3)
    @constraint(m, mu_a[79] == mu_3)
    @constraint(m, mu_a[80] == mu_3)
    @constraint(m, mu_a[81] == mu_3)
    @constraint(m, mu_a[82] == mu_3)
    @constraint(m, mu_a[83] == mu_3)
    @constraint(m, mu_a[84] == mu_3)
    @constraint(m, mu_a[85] == mu_3)
    @constraint(m, mu_a[86] == mu_3)
    @constraint(m, mu_a[87] == mu_3)
    @constraint(m, mu_a[88] == mu_3)
    @constraint(m, mu_a[89] == mu_3)
    @constraint(m, mu_a[90] == mu_3)
    @constraint(m, mu_a[91] == mu_3)
    @constraint(m, mu_a[92] == mu_3)
    @constraint(m, mu_a[93] == mu_3)
    @constraint(m, mu_a[94] == mu_3)
    @constraint(m, mu_a[95] == mu_3)
    @constraint(m, mu_a[96] == mu_3)
    @constraint(m, mu_a[97] == mu_3)
    @constraint(m, mu_a[98] == mu_3)
    @constraint(m, mu_a[99] == mu_3)
    @constraint(m, mu_a[100] == mu_3)
    @constraint(m, mu_a[101] == mu_3)
    @constraint(m, mu_a[102] == mu_3)
    @constraint(m, mu_a[103] == mu_4)
    @constraint(m, mu_a[104] == mu_4)
    @constraint(m, mu_a[105] == mu_4)
    @constraint(m, mu_a[106] == mu_4)
    @constraint(m, mu_a[107] == mu_4)
    @constraint(m, mu_a[108] == mu_4)
    @constraint(m, mu_a[109] == mu_4)
    @constraint(m, mu_a[110] == mu_4)
    @constraint(m, mu_a[111] == mu_4)
    @constraint(m, mu_a[112] == mu_4)
    @constraint(m, mu_a[113] == mu_4)
    @constraint(m, mu_a[114] == mu_4)
    @constraint(m, mu_a[115] == mu_4)
    @constraint(m, mu_a[116] == mu_4)
    @constraint(m, mu_a[117] == mu_4)
    @constraint(m, mu_a[118] == mu_4)
    @constraint(m, mu_a[119] == mu_4)
    @constraint(m, mu_a[120] == mu_4)
    @constraint(m, mu_a[121] == mu_4)
    @constraint(m, mu_a[122] == mu_4)
    @constraint(m, mu_a[123] == mu_4)
    @constraint(m, mu_a[124] == mu_4)
    @constraint(m, mu_a[125] == mu_4)
    @constraint(m, mu_a[126] == mu_4)
    @constraint(m, mu_a[127] == mu_5)
    @constraint(m, mu_a[128] == mu_5)
    @constraint(m, mu_a[129] == mu_5)
    @constraint(m, mu_a[130] == mu_5)
    @constraint(m, mu_a[131] == mu_5)
    @constraint(m, mu_a[132] == mu_5)
    @constraint(m, mu_a[133] == mu_5)
    @constraint(m, mu_a[134] == mu_5)
    @constraint(m, mu_a[135] == mu_5)
    @constraint(m, mu_a[136] == mu_5)
    @constraint(m, mu_a[137] == mu_5)
    @constraint(m, mu_a[138] == mu_5)
    @constraint(m, mu_a[139] == mu_5)
    @constraint(m, mu_a[140] == mu_5)
    @constraint(m, mu_a[141] == mu_5)
    @constraint(m, mu_a[142] == mu_5)
    @constraint(m, mu_a[143] == mu_5)
    @constraint(m, mu_a[144] == mu_5)
    @constraint(m, mu_a[145] == mu_5)
    @constraint(m, mu_a[146] == mu_5)
    @constraint(m, mu_a[147] == mu_5)
    @constraint(m, mu_a[148] == mu_6)
    @constraint(m, mu_a[149] == mu_6)
    @constraint(m, mu_a[150] == mu_6)
    @constraint(m, mu_a[151] == mu_6)
    @constraint(m, mu_a[152] == mu_6)
    @constraint(m, mu_a[153] == mu_6)
    @constraint(m, mu_a[154] == mu_6)
    @constraint(m, mu_a[155] == mu_6)
    @constraint(m, mu_a[156] == mu_6)
    @constraint(m, mu_a[157] == mu_6)
    @constraint(m, mu_a[158] == mu_6)
    @constraint(m, mu_a[159] == mu_6)
    @constraint(m, mu_a[160] == mu_6)
    @constraint(m, mu_a[161] == mu_6)
    @constraint(m, mu_a[162] == mu_6)
    @constraint(m, mu_a[163] == mu_6)
    @constraint(m, mu_a[164] == mu_6)
    @constraint(m, mu_a[165] == mu_6)
    @constraint(m, mu_a[166] == mu_7)
    @constraint(m, mu_a[167] == mu_7)
    @constraint(m, mu_a[168] == mu_7)
    @constraint(m, mu_a[169] == mu_7)
    @constraint(m, mu_a[170] == mu_7)
    @constraint(m, mu_a[171] == mu_7)
    @constraint(m, mu_a[172] == mu_7)
    @constraint(m, mu_a[173] == mu_7)
    @constraint(m, mu_a[174] == mu_7)
    @constraint(m, mu_a[175] == mu_7)
    @constraint(m, mu_a[176] == mu_7)
    @constraint(m, mu_a[177] == mu_7)
    @constraint(m, mu_a[178] == mu_7)
    @constraint(m, mu_a[179] == mu_7)
    @constraint(m, mu_a[180] == mu_7)
    @constraint(m, mu_a[181] == mu_8)
    @constraint(m, mu_a[182] == mu_8)
    @constraint(m, mu_a[183] == mu_8)
    @constraint(m, mu_a[184] == mu_8)
    @constraint(m, mu_a[185] == mu_8)
    @constraint(m, mu_a[186] == mu_8)
    @constraint(m, mu_a[187] == mu_8)
    @constraint(m, mu_a[188] == mu_8)
    @constraint(m, mu_a[189] == mu_8)
    @constraint(m, mu_a[190] == mu_8)
    @constraint(m, mu_a[191] == mu_8)
    @constraint(m, mu_a[192] == mu_8)
    @constraint(m, mu_a[193] == mu_9)
    @constraint(m, mu_a[194] == mu_9)
    @constraint(m, mu_a[195] == mu_9)
    @constraint(m, mu_a[196] == mu_9)
    @constraint(m, mu_a[197] == mu_9)
    @constraint(m, mu_a[198] == mu_9)
    @constraint(m, mu_a[199] == mu_9)
    @constraint(m, mu_a[200] == mu_9)
    @constraint(m, mu_a[201] == mu_9)
    @constraint(m, mu_a[202] == mu_10)
    @constraint(m, mu_a[203] == mu_10)
    @constraint(m, mu_a[204] == mu_10)
    @constraint(m, mu_a[205] == mu_10)
    @constraint(m, mu_a[206] == mu_10)
    @constraint(m, mu_a[207] == mu_10)
    @constraint(m, mu_a[208] == mu_11)
    @constraint(m, mu_a[209] == mu_11)
    @constraint(m, mu_a[210] == mu_11)

    @variable(m, mu_b[1:210])
    @constraint(m, mu_b[1] == 0)
    @constraint(m, mu_b[2] == 0)
    @constraint(m, mu_b[3] == 0)
    @constraint(m, mu_b[4] == 0)
    @constraint(m, mu_b[5] == 0)
    @constraint(m, mu_b[6] == 0)
    @constraint(m, mu_b[7] == 0)
    @constraint(m, mu_b[8] == 0)
    @constraint(m, mu_b[9] == 0)
    @constraint(m, mu_b[10] == 0)
    @constraint(m, mu_b[11] == 0)
    @constraint(m, mu_b[12] == 0)
    @constraint(m, mu_b[13] == mu_2)
    @constraint(m, mu_b[14] == mu_2)
    @constraint(m, mu_b[15] == mu_2)
    @constraint(m, mu_b[16] == mu_3)
    @constraint(m, mu_b[17] == mu_3)
    @constraint(m, mu_b[18] == mu_3)
    @constraint(m, mu_b[19] == mu_4)
    @constraint(m, mu_b[20] == mu_4)
    @constraint(m, mu_b[21] == mu_4)
    @constraint(m, mu_b[22] == mu_5)
    @constraint(m, mu_b[23] == mu_5)
    @constraint(m, mu_b[24] == mu_5)
    @constraint(m, mu_b[25] == mu_6)
    @constraint(m, mu_b[26] == mu_6)
    @constraint(m, mu_b[27] == mu_6)
    @constraint(m, mu_b[28] == mu_7)
    @constraint(m, mu_b[29] == mu_7)
    @constraint(m, mu_b[30] == mu_7)
    @constraint(m, mu_b[31] == mu_8)
    @constraint(m, mu_b[32] == mu_8)
    @constraint(m, mu_b[33] == mu_8)
    @constraint(m, mu_b[34] == mu_9)
    @constraint(m, mu_b[35] == mu_9)
    @constraint(m, mu_b[36] == mu_9)
    @constraint(m, mu_b[37] == mu_10)
    @constraint(m, mu_b[38] == mu_10)
    @constraint(m, mu_b[39] == mu_10)
    @constraint(m, mu_b[40] == mu_11)
    @constraint(m, mu_b[41] == mu_11)
    @constraint(m, mu_b[42] == mu_11)
    @constraint(m, mu_b[43] == mu_12)
    @constraint(m, mu_b[44] == mu_12)
    @constraint(m, mu_b[45] == mu_12)
    @constraint(m, mu_b[46] == mu_3)
    @constraint(m, mu_b[47] == mu_3)
    @constraint(m, mu_b[48] == mu_3)
    @constraint(m, mu_b[49] == mu_4)
    @constraint(m, mu_b[50] == mu_4)
    @constraint(m, mu_b[51] == mu_4)
    @constraint(m, mu_b[52] == mu_5)
    @constraint(m, mu_b[53] == mu_5)
    @constraint(m, mu_b[54] == mu_5)
    @constraint(m, mu_b[55] == mu_6)
    @constraint(m, mu_b[56] == mu_6)
    @constraint(m, mu_b[57] == mu_6)
    @constraint(m, mu_b[58] == mu_7)
    @constraint(m, mu_b[59] == mu_7)
    @constraint(m, mu_b[60] == mu_7)
    @constraint(m, mu_b[61] == mu_8)
    @constraint(m, mu_b[62] == mu_8)
    @constraint(m, mu_b[63] == mu_8)
    @constraint(m, mu_b[64] == mu_9)
    @constraint(m, mu_b[65] == mu_9)
    @constraint(m, mu_b[66] == mu_9)
    @constraint(m, mu_b[67] == mu_10)
    @constraint(m, mu_b[68] == mu_10)
    @constraint(m, mu_b[69] == mu_10)
    @constraint(m, mu_b[70] == mu_11)
    @constraint(m, mu_b[71] == mu_11)
    @constraint(m, mu_b[72] == mu_11)
    @constraint(m, mu_b[73] == mu_12)
    @constraint(m, mu_b[74] == mu_12)
    @constraint(m, mu_b[75] == mu_12)
    @constraint(m, mu_b[76] == mu_4)
    @constraint(m, mu_b[77] == mu_4)
    @constraint(m, mu_b[78] == mu_4)
    @constraint(m, mu_b[79] == mu_5)
    @constraint(m, mu_b[80] == mu_5)
    @constraint(m, mu_b[81] == mu_5)
    @constraint(m, mu_b[82] == mu_6)
    @constraint(m, mu_b[83] == mu_6)
    @constraint(m, mu_b[84] == mu_6)
    @constraint(m, mu_b[85] == mu_7)
    @constraint(m, mu_b[86] == mu_7)
    @constraint(m, mu_b[87] == mu_7)
    @constraint(m, mu_b[88] == mu_8)
    @constraint(m, mu_b[89] == mu_8)
    @constraint(m, mu_b[90] == mu_8)
    @constraint(m, mu_b[91] == mu_9)
    @constraint(m, mu_b[92] == mu_9)
    @constraint(m, mu_b[93] == mu_9)
    @constraint(m, mu_b[94] == mu_10)
    @constraint(m, mu_b[95] == mu_10)
    @constraint(m, mu_b[96] == mu_10)
    @constraint(m, mu_b[97] == mu_11)
    @constraint(m, mu_b[98] == mu_11)
    @constraint(m, mu_b[99] == mu_11)
    @constraint(m, mu_b[100] == mu_12)
    @constraint(m, mu_b[101] == mu_12)
    @constraint(m, mu_b[102] == mu_12)
    @constraint(m, mu_b[103] == mu_5)
    @constraint(m, mu_b[104] == mu_5)
    @constraint(m, mu_b[105] == mu_5)
    @constraint(m, mu_b[106] == mu_6)
    @constraint(m, mu_b[107] == mu_6)
    @constraint(m, mu_b[108] == mu_6)
    @constraint(m, mu_b[109] == mu_7)
    @constraint(m, mu_b[110] == mu_7)
    @constraint(m, mu_b[111] == mu_7)
    @constraint(m, mu_b[112] == mu_8)
    @constraint(m, mu_b[113] == mu_8)
    @constraint(m, mu_b[114] == mu_8)
    @constraint(m, mu_b[115] == mu_9)
    @constraint(m, mu_b[116] == mu_9)
    @constraint(m, mu_b[117] == mu_9)
    @constraint(m, mu_b[118] == mu_10)
    @constraint(m, mu_b[119] == mu_10)
    @constraint(m, mu_b[120] == mu_10)
    @constraint(m, mu_b[121] == mu_11)
    @constraint(m, mu_b[122] == mu_11)
    @constraint(m, mu_b[123] == mu_11)
    @constraint(m, mu_b[124] == mu_12)
    @constraint(m, mu_b[125] == mu_12)
    @constraint(m, mu_b[126] == mu_12)
    @constraint(m, mu_b[127] == mu_6)
    @constraint(m, mu_b[128] == mu_6)
    @constraint(m, mu_b[129] == mu_6)
    @constraint(m, mu_b[130] == mu_7)
    @constraint(m, mu_b[131] == mu_7)
    @constraint(m, mu_b[132] == mu_7)
    @constraint(m, mu_b[133] == mu_8)
    @constraint(m, mu_b[134] == mu_8)
    @constraint(m, mu_b[135] == mu_8)
    @constraint(m, mu_b[136] == mu_9)
    @constraint(m, mu_b[137] == mu_9)
    @constraint(m, mu_b[138] == mu_9)
    @constraint(m, mu_b[139] == mu_10)
    @constraint(m, mu_b[140] == mu_10)
    @constraint(m, mu_b[141] == mu_10)
    @constraint(m, mu_b[142] == mu_11)
    @constraint(m, mu_b[143] == mu_11)
    @constraint(m, mu_b[144] == mu_11)
    @constraint(m, mu_b[145] == mu_12)
    @constraint(m, mu_b[146] == mu_12)
    @constraint(m, mu_b[147] == mu_12)
    @constraint(m, mu_b[148] == mu_7)
    @constraint(m, mu_b[149] == mu_7)
    @constraint(m, mu_b[150] == mu_7)
    @constraint(m, mu_b[151] == mu_8)
    @constraint(m, mu_b[152] == mu_8)
    @constraint(m, mu_b[153] == mu_8)
    @constraint(m, mu_b[154] == mu_9)
    @constraint(m, mu_b[155] == mu_9)
    @constraint(m, mu_b[156] == mu_9)
    @constraint(m, mu_b[157] == mu_10)
    @constraint(m, mu_b[158] == mu_10)
    @constraint(m, mu_b[159] == mu_10)
    @constraint(m, mu_b[160] == mu_11)
    @constraint(m, mu_b[161] == mu_11)
    @constraint(m, mu_b[162] == mu_11)
    @constraint(m, mu_b[163] == mu_12)
    @constraint(m, mu_b[164] == mu_12)
    @constraint(m, mu_b[165] == mu_12)
    @constraint(m, mu_b[166] == mu_8)
    @constraint(m, mu_b[167] == mu_8)
    @constraint(m, mu_b[168] == mu_8)
    @constraint(m, mu_b[169] == mu_9)
    @constraint(m, mu_b[170] == mu_9)
    @constraint(m, mu_b[171] == mu_9)
    @constraint(m, mu_b[172] == mu_10)
    @constraint(m, mu_b[173] == mu_10)
    @constraint(m, mu_b[174] == mu_10)
    @constraint(m, mu_b[175] == mu_11)
    @constraint(m, mu_b[176] == mu_11)
    @constraint(m, mu_b[177] == mu_11)
    @constraint(m, mu_b[178] == mu_12)
    @constraint(m, mu_b[179] == mu_12)
    @constraint(m, mu_b[180] == mu_12)
    @constraint(m, mu_b[181] == mu_9)
    @constraint(m, mu_b[182] == mu_9)
    @constraint(m, mu_b[183] == mu_9)
    @constraint(m, mu_b[184] == mu_10)
    @constraint(m, mu_b[185] == mu_10)
    @constraint(m, mu_b[186] == mu_10)
    @constraint(m, mu_b[187] == mu_11)
    @constraint(m, mu_b[188] == mu_11)
    @constraint(m, mu_b[189] == mu_11)
    @constraint(m, mu_b[190] == mu_12)
    @constraint(m, mu_b[191] == mu_12)
    @constraint(m, mu_b[192] == mu_12)
    @constraint(m, mu_b[193] == mu_10)
    @constraint(m, mu_b[194] == mu_10)
    @constraint(m, mu_b[195] == mu_10)
    @constraint(m, mu_b[196] == mu_11)
    @constraint(m, mu_b[197] == mu_11)
    @constraint(m, mu_b[198] == mu_11)
    @constraint(m, mu_b[199] == mu_12)
    @constraint(m, mu_b[200] == mu_12)
    @constraint(m, mu_b[201] == mu_12)
    @constraint(m, mu_b[202] == mu_11)
    @constraint(m, mu_b[203] == mu_11)
    @constraint(m, mu_b[204] == mu_11)
    @constraint(m, mu_b[205] == mu_12)
    @constraint(m, mu_b[206] == mu_12)
    @constraint(m, mu_b[207] == mu_12)
    @constraint(m, mu_b[208] == mu_12)
    @constraint(m, mu_b[209] == mu_12)
    @constraint(m, mu_b[210] == mu_12)

    @variable(m, alpha_ab[1:210])
    @constraint(m, alpha_ab[1] == 0)
    @constraint(m, alpha_ab[2] == 0)
    @constraint(m, alpha_ab[3] == 0)
    @constraint(m, alpha_ab[4] == 0)
    @constraint(m, alpha_ab[5] == 0)
    @constraint(m, alpha_ab[6] == 0)
    @constraint(m, alpha_ab[7] == 0)
    @constraint(m, alpha_ab[8] == 0)
    @constraint(m, alpha_ab[9] == 0)
    @constraint(m, alpha_ab[10] == 0)
    @constraint(m, alpha_ab[11] == 0)
    @constraint(m, alpha_ab[12] == 0)
    @constraint(m, alpha_ab[13] == alpha_1_2)
    @constraint(m, alpha_ab[14] == alpha_1_2)
    @constraint(m, alpha_ab[15] == alpha_1_2)
    @constraint(m, alpha_ab[16] == alpha_1_3)
    @constraint(m, alpha_ab[17] == alpha_1_3)
    @constraint(m, alpha_ab[18] == alpha_1_3)
    @constraint(m, alpha_ab[19] == alpha_1_4)
    @constraint(m, alpha_ab[20] == alpha_1_4)
    @constraint(m, alpha_ab[21] == alpha_1_4)
    @constraint(m, alpha_ab[22] == alpha_1_5)
    @constraint(m, alpha_ab[23] == alpha_1_5)
    @constraint(m, alpha_ab[24] == alpha_1_5)
    @constraint(m, alpha_ab[25] == alpha_1_6)
    @constraint(m, alpha_ab[26] == alpha_1_6)
    @constraint(m, alpha_ab[27] == alpha_1_6)
    @constraint(m, alpha_ab[28] == alpha_1_7)
    @constraint(m, alpha_ab[29] == alpha_1_7)
    @constraint(m, alpha_ab[30] == alpha_1_7)
    @constraint(m, alpha_ab[31] == alpha_1_8)
    @constraint(m, alpha_ab[32] == alpha_1_8)
    @constraint(m, alpha_ab[33] == alpha_1_8)
    @constraint(m, alpha_ab[34] == alpha_1_9)
    @constraint(m, alpha_ab[35] == alpha_1_9)
    @constraint(m, alpha_ab[36] == alpha_1_9)
    @constraint(m, alpha_ab[37] == alpha_1_10)
    @constraint(m, alpha_ab[38] == alpha_1_10)
    @constraint(m, alpha_ab[39] == alpha_1_10)
    @constraint(m, alpha_ab[40] == alpha_1_11)
    @constraint(m, alpha_ab[41] == alpha_1_11)
    @constraint(m, alpha_ab[42] == alpha_1_11)
    @constraint(m, alpha_ab[43] == alpha_1_12)
    @constraint(m, alpha_ab[44] == alpha_1_12)
    @constraint(m, alpha_ab[45] == alpha_1_12)
    @constraint(m, alpha_ab[46] == alpha_2_3)
    @constraint(m, alpha_ab[47] == alpha_2_3)
    @constraint(m, alpha_ab[48] == alpha_2_3)
    @constraint(m, alpha_ab[49] == alpha_2_4)
    @constraint(m, alpha_ab[50] == alpha_2_4)
    @constraint(m, alpha_ab[51] == alpha_2_4)
    @constraint(m, alpha_ab[52] == alpha_2_5)
    @constraint(m, alpha_ab[53] == alpha_2_5)
    @constraint(m, alpha_ab[54] == alpha_2_5)
    @constraint(m, alpha_ab[55] == alpha_2_6)
    @constraint(m, alpha_ab[56] == alpha_2_6)
    @constraint(m, alpha_ab[57] == alpha_2_6)
    @constraint(m, alpha_ab[58] == alpha_2_7)
    @constraint(m, alpha_ab[59] == alpha_2_7)
    @constraint(m, alpha_ab[60] == alpha_2_7)
    @constraint(m, alpha_ab[61] == alpha_2_8)
    @constraint(m, alpha_ab[62] == alpha_2_8)
    @constraint(m, alpha_ab[63] == alpha_2_8)
    @constraint(m, alpha_ab[64] == alpha_2_9)
    @constraint(m, alpha_ab[65] == alpha_2_9)
    @constraint(m, alpha_ab[66] == alpha_2_9)
    @constraint(m, alpha_ab[67] == alpha_2_10)
    @constraint(m, alpha_ab[68] == alpha_2_10)
    @constraint(m, alpha_ab[69] == alpha_2_10)
    @constraint(m, alpha_ab[70] == alpha_2_11)
    @constraint(m, alpha_ab[71] == alpha_2_11)
    @constraint(m, alpha_ab[72] == alpha_2_11)
    @constraint(m, alpha_ab[73] == alpha_2_12)
    @constraint(m, alpha_ab[74] == alpha_2_12)
    @constraint(m, alpha_ab[75] == alpha_2_12)
    @constraint(m, alpha_ab[76] == alpha_3_4)
    @constraint(m, alpha_ab[77] == alpha_3_4)
    @constraint(m, alpha_ab[78] == alpha_3_4)
    @constraint(m, alpha_ab[79] == alpha_3_5)
    @constraint(m, alpha_ab[80] == alpha_3_5)
    @constraint(m, alpha_ab[81] == alpha_3_5)
    @constraint(m, alpha_ab[82] == alpha_3_6)
    @constraint(m, alpha_ab[83] == alpha_3_6)
    @constraint(m, alpha_ab[84] == alpha_3_6)
    @constraint(m, alpha_ab[85] == alpha_3_7)
    @constraint(m, alpha_ab[86] == alpha_3_7)
    @constraint(m, alpha_ab[87] == alpha_3_7)
    @constraint(m, alpha_ab[88] == alpha_3_8)
    @constraint(m, alpha_ab[89] == alpha_3_8)
    @constraint(m, alpha_ab[90] == alpha_3_8)
    @constraint(m, alpha_ab[91] == alpha_3_9)
    @constraint(m, alpha_ab[92] == alpha_3_9)
    @constraint(m, alpha_ab[93] == alpha_3_9)
    @constraint(m, alpha_ab[94] == alpha_3_10)
    @constraint(m, alpha_ab[95] == alpha_3_10)
    @constraint(m, alpha_ab[96] == alpha_3_10)
    @constraint(m, alpha_ab[97] == alpha_3_11)
    @constraint(m, alpha_ab[98] == alpha_3_11)
    @constraint(m, alpha_ab[99] == alpha_3_11)
    @constraint(m, alpha_ab[100] == alpha_3_12)
    @constraint(m, alpha_ab[101] == alpha_3_12)
    @constraint(m, alpha_ab[102] == alpha_3_12)
    @constraint(m, alpha_ab[103] == alpha_4_5)
    @constraint(m, alpha_ab[104] == alpha_4_5)
    @constraint(m, alpha_ab[105] == alpha_4_5)
    @constraint(m, alpha_ab[106] == alpha_4_6)
    @constraint(m, alpha_ab[107] == alpha_4_6)
    @constraint(m, alpha_ab[108] == alpha_4_6)
    @constraint(m, alpha_ab[109] == alpha_4_7)
    @constraint(m, alpha_ab[110] == alpha_4_7)
    @constraint(m, alpha_ab[111] == alpha_4_7)
    @constraint(m, alpha_ab[112] == alpha_4_8)
    @constraint(m, alpha_ab[113] == alpha_4_8)
    @constraint(m, alpha_ab[114] == alpha_4_8)
    @constraint(m, alpha_ab[115] == alpha_4_9)
    @constraint(m, alpha_ab[116] == alpha_4_9)
    @constraint(m, alpha_ab[117] == alpha_4_9)
    @constraint(m, alpha_ab[118] == alpha_4_10)
    @constraint(m, alpha_ab[119] == alpha_4_10)
    @constraint(m, alpha_ab[120] == alpha_4_10)
    @constraint(m, alpha_ab[121] == alpha_4_11)
    @constraint(m, alpha_ab[122] == alpha_4_11)
    @constraint(m, alpha_ab[123] == alpha_4_11)
    @constraint(m, alpha_ab[124] == alpha_4_12)
    @constraint(m, alpha_ab[125] == alpha_4_12)
    @constraint(m, alpha_ab[126] == alpha_4_12)
    @constraint(m, alpha_ab[127] == alpha_5_6)
    @constraint(m, alpha_ab[128] == alpha_5_6)
    @constraint(m, alpha_ab[129] == alpha_5_6)
    @constraint(m, alpha_ab[130] == alpha_5_7)
    @constraint(m, alpha_ab[131] == alpha_5_7)
    @constraint(m, alpha_ab[132] == alpha_5_7)
    @constraint(m, alpha_ab[133] == alpha_5_8)
    @constraint(m, alpha_ab[134] == alpha_5_8)
    @constraint(m, alpha_ab[135] == alpha_5_8)
    @constraint(m, alpha_ab[136] == alpha_5_9)
    @constraint(m, alpha_ab[137] == alpha_5_9)
    @constraint(m, alpha_ab[138] == alpha_5_9)
    @constraint(m, alpha_ab[139] == alpha_5_10)
    @constraint(m, alpha_ab[140] == alpha_5_10)
    @constraint(m, alpha_ab[141] == alpha_5_10)
    @constraint(m, alpha_ab[142] == alpha_5_11)
    @constraint(m, alpha_ab[143] == alpha_5_11)
    @constraint(m, alpha_ab[144] == alpha_5_11)
    @constraint(m, alpha_ab[145] == alpha_5_12)
    @constraint(m, alpha_ab[146] == alpha_5_12)
    @constraint(m, alpha_ab[147] == alpha_5_12)
    @constraint(m, alpha_ab[148] == alpha_6_7)
    @constraint(m, alpha_ab[149] == alpha_6_7)
    @constraint(m, alpha_ab[150] == alpha_6_7)
    @constraint(m, alpha_ab[151] == alpha_6_8)
    @constraint(m, alpha_ab[152] == alpha_6_8)
    @constraint(m, alpha_ab[153] == alpha_6_8)
    @constraint(m, alpha_ab[154] == alpha_6_9)
    @constraint(m, alpha_ab[155] == alpha_6_9)
    @constraint(m, alpha_ab[156] == alpha_6_9)
    @constraint(m, alpha_ab[157] == alpha_6_10)
    @constraint(m, alpha_ab[158] == alpha_6_10)
    @constraint(m, alpha_ab[159] == alpha_6_10)
    @constraint(m, alpha_ab[160] == alpha_6_11)
    @constraint(m, alpha_ab[161] == alpha_6_11)
    @constraint(m, alpha_ab[162] == alpha_6_11)
    @constraint(m, alpha_ab[163] == alpha_6_12)
    @constraint(m, alpha_ab[164] == alpha_6_12)
    @constraint(m, alpha_ab[165] == alpha_6_12)
    @constraint(m, alpha_ab[166] == alpha_7_8)
    @constraint(m, alpha_ab[167] == alpha_7_8)
    @constraint(m, alpha_ab[168] == alpha_7_8)
    @constraint(m, alpha_ab[169] == alpha_7_9)
    @constraint(m, alpha_ab[170] == alpha_7_9)
    @constraint(m, alpha_ab[171] == alpha_7_9)
    @constraint(m, alpha_ab[172] == alpha_7_10)
    @constraint(m, alpha_ab[173] == alpha_7_10)
    @constraint(m, alpha_ab[174] == alpha_7_10)
    @constraint(m, alpha_ab[175] == alpha_7_11)
    @constraint(m, alpha_ab[176] == alpha_7_11)
    @constraint(m, alpha_ab[177] == alpha_7_11)
    @constraint(m, alpha_ab[178] == alpha_7_12)
    @constraint(m, alpha_ab[179] == alpha_7_12)
    @constraint(m, alpha_ab[180] == alpha_7_12)
    @constraint(m, alpha_ab[181] == alpha_8_9)
    @constraint(m, alpha_ab[182] == alpha_8_9)
    @constraint(m, alpha_ab[183] == alpha_8_9)
    @constraint(m, alpha_ab[184] == alpha_8_10)
    @constraint(m, alpha_ab[185] == alpha_8_10)
    @constraint(m, alpha_ab[186] == alpha_8_10)
    @constraint(m, alpha_ab[187] == alpha_8_11)
    @constraint(m, alpha_ab[188] == alpha_8_11)
    @constraint(m, alpha_ab[189] == alpha_8_11)
    @constraint(m, alpha_ab[190] == alpha_8_12)
    @constraint(m, alpha_ab[191] == alpha_8_12)
    @constraint(m, alpha_ab[192] == alpha_8_12)
    @constraint(m, alpha_ab[193] == alpha_9_10)
    @constraint(m, alpha_ab[194] == alpha_9_10)
    @constraint(m, alpha_ab[195] == alpha_9_10)
    @constraint(m, alpha_ab[196] == alpha_9_11)
    @constraint(m, alpha_ab[197] == alpha_9_11)
    @constraint(m, alpha_ab[198] == alpha_9_11)
    @constraint(m, alpha_ab[199] == alpha_9_12)
    @constraint(m, alpha_ab[200] == alpha_9_12)
    @constraint(m, alpha_ab[201] == alpha_9_12)
    @constraint(m, alpha_ab[202] == alpha_10_11)
    @constraint(m, alpha_ab[203] == alpha_10_11)
    @constraint(m, alpha_ab[204] == alpha_10_11)
    @constraint(m, alpha_ab[205] == alpha_10_12)
    @constraint(m, alpha_ab[206] == alpha_10_12)
    @constraint(m, alpha_ab[207] == alpha_10_12)
    @constraint(m, alpha_ab[208] == alpha_11_12)
    @constraint(m, alpha_ab[209] == alpha_11_12)
    @constraint(m, alpha_ab[210] == alpha_11_12)

    @variable(m, alpha_ba[1:210])
    @constraint(m, alpha_ba[1] == 0)
    @constraint(m, alpha_ba[2] == 0)
    @constraint(m, alpha_ba[3] == 0)
    @constraint(m, alpha_ba[4] == 0)
    @constraint(m, alpha_ba[5] == 0)
    @constraint(m, alpha_ba[6] == 0)
    @constraint(m, alpha_ba[7] == 0)
    @constraint(m, alpha_ba[8] == 0)
    @constraint(m, alpha_ba[9] == 0)
    @constraint(m, alpha_ba[10] == 0)
    @constraint(m, alpha_ba[11] == 0)
    @constraint(m, alpha_ba[12] == 0)
    @constraint(m, alpha_ba[13] == alpha_2_1)
    @constraint(m, alpha_ba[14] == alpha_2_1)
    @constraint(m, alpha_ba[15] == alpha_2_1)
    @constraint(m, alpha_ba[16] == alpha_3_1)
    @constraint(m, alpha_ba[17] == alpha_3_1)
    @constraint(m, alpha_ba[18] == alpha_3_1)
    @constraint(m, alpha_ba[19] == alpha_4_1)
    @constraint(m, alpha_ba[20] == alpha_4_1)
    @constraint(m, alpha_ba[21] == alpha_4_1)
    @constraint(m, alpha_ba[22] == alpha_5_1)
    @constraint(m, alpha_ba[23] == alpha_5_1)
    @constraint(m, alpha_ba[24] == alpha_5_1)
    @constraint(m, alpha_ba[25] == alpha_6_1)
    @constraint(m, alpha_ba[26] == alpha_6_1)
    @constraint(m, alpha_ba[27] == alpha_6_1)
    @constraint(m, alpha_ba[28] == alpha_7_1)
    @constraint(m, alpha_ba[29] == alpha_7_1)
    @constraint(m, alpha_ba[30] == alpha_7_1)
    @constraint(m, alpha_ba[31] == alpha_8_1)
    @constraint(m, alpha_ba[32] == alpha_8_1)
    @constraint(m, alpha_ba[33] == alpha_8_1)
    @constraint(m, alpha_ba[34] == alpha_9_1)
    @constraint(m, alpha_ba[35] == alpha_9_1)
    @constraint(m, alpha_ba[36] == alpha_9_1)
    @constraint(m, alpha_ba[37] == alpha_10_1)
    @constraint(m, alpha_ba[38] == alpha_10_1)
    @constraint(m, alpha_ba[39] == alpha_10_1)
    @constraint(m, alpha_ba[40] == alpha_11_1)
    @constraint(m, alpha_ba[41] == alpha_11_1)
    @constraint(m, alpha_ba[42] == alpha_11_1)
    @constraint(m, alpha_ba[43] == alpha_12_1)
    @constraint(m, alpha_ba[44] == alpha_12_1)
    @constraint(m, alpha_ba[45] == alpha_12_1)
    @constraint(m, alpha_ba[46] == alpha_3_2)
    @constraint(m, alpha_ba[47] == alpha_3_2)
    @constraint(m, alpha_ba[48] == alpha_3_2)
    @constraint(m, alpha_ba[49] == alpha_4_2)
    @constraint(m, alpha_ba[50] == alpha_4_2)
    @constraint(m, alpha_ba[51] == alpha_4_2)
    @constraint(m, alpha_ba[52] == alpha_5_2)
    @constraint(m, alpha_ba[53] == alpha_5_2)
    @constraint(m, alpha_ba[54] == alpha_5_2)
    @constraint(m, alpha_ba[55] == alpha_6_2)
    @constraint(m, alpha_ba[56] == alpha_6_2)
    @constraint(m, alpha_ba[57] == alpha_6_2)
    @constraint(m, alpha_ba[58] == alpha_7_2)
    @constraint(m, alpha_ba[59] == alpha_7_2)
    @constraint(m, alpha_ba[60] == alpha_7_2)
    @constraint(m, alpha_ba[61] == alpha_8_2)
    @constraint(m, alpha_ba[62] == alpha_8_2)
    @constraint(m, alpha_ba[63] == alpha_8_2)
    @constraint(m, alpha_ba[64] == alpha_9_2)
    @constraint(m, alpha_ba[65] == alpha_9_2)
    @constraint(m, alpha_ba[66] == alpha_9_2)
    @constraint(m, alpha_ba[67] == alpha_10_2)
    @constraint(m, alpha_ba[68] == alpha_10_2)
    @constraint(m, alpha_ba[69] == alpha_10_2)
    @constraint(m, alpha_ba[70] == alpha_11_2)
    @constraint(m, alpha_ba[71] == alpha_11_2)
    @constraint(m, alpha_ba[72] == alpha_11_2)
    @constraint(m, alpha_ba[73] == alpha_12_2)
    @constraint(m, alpha_ba[74] == alpha_12_2)
    @constraint(m, alpha_ba[75] == alpha_12_2)
    @constraint(m, alpha_ba[76] == alpha_4_3)
    @constraint(m, alpha_ba[77] == alpha_4_3)
    @constraint(m, alpha_ba[78] == alpha_4_3)
    @constraint(m, alpha_ba[79] == alpha_5_3)
    @constraint(m, alpha_ba[80] == alpha_5_3)
    @constraint(m, alpha_ba[81] == alpha_5_3)
    @constraint(m, alpha_ba[82] == alpha_6_3)
    @constraint(m, alpha_ba[83] == alpha_6_3)
    @constraint(m, alpha_ba[84] == alpha_6_3)
    @constraint(m, alpha_ba[85] == alpha_7_3)
    @constraint(m, alpha_ba[86] == alpha_7_3)
    @constraint(m, alpha_ba[87] == alpha_7_3)
    @constraint(m, alpha_ba[88] == alpha_8_3)
    @constraint(m, alpha_ba[89] == alpha_8_3)
    @constraint(m, alpha_ba[90] == alpha_8_3)
    @constraint(m, alpha_ba[91] == alpha_9_3)
    @constraint(m, alpha_ba[92] == alpha_9_3)
    @constraint(m, alpha_ba[93] == alpha_9_3)
    @constraint(m, alpha_ba[94] == alpha_10_3)
    @constraint(m, alpha_ba[95] == alpha_10_3)
    @constraint(m, alpha_ba[96] == alpha_10_3)
    @constraint(m, alpha_ba[97] == alpha_11_3)
    @constraint(m, alpha_ba[98] == alpha_11_3)
    @constraint(m, alpha_ba[99] == alpha_11_3)
    @constraint(m, alpha_ba[100] == alpha_12_3)
    @constraint(m, alpha_ba[101] == alpha_12_3)
    @constraint(m, alpha_ba[102] == alpha_12_3)
    @constraint(m, alpha_ba[103] == alpha_5_4)
    @constraint(m, alpha_ba[104] == alpha_5_4)
    @constraint(m, alpha_ba[105] == alpha_5_4)
    @constraint(m, alpha_ba[106] == alpha_6_4)
    @constraint(m, alpha_ba[107] == alpha_6_4)
    @constraint(m, alpha_ba[108] == alpha_6_4)
    @constraint(m, alpha_ba[109] == alpha_7_4)
    @constraint(m, alpha_ba[110] == alpha_7_4)
    @constraint(m, alpha_ba[111] == alpha_7_4)
    @constraint(m, alpha_ba[112] == alpha_8_4)
    @constraint(m, alpha_ba[113] == alpha_8_4)
    @constraint(m, alpha_ba[114] == alpha_8_4)
    @constraint(m, alpha_ba[115] == alpha_9_4)
    @constraint(m, alpha_ba[116] == alpha_9_4)
    @constraint(m, alpha_ba[117] == alpha_9_4)
    @constraint(m, alpha_ba[118] == alpha_10_4)
    @constraint(m, alpha_ba[119] == alpha_10_4)
    @constraint(m, alpha_ba[120] == alpha_10_4)
    @constraint(m, alpha_ba[121] == alpha_11_4)
    @constraint(m, alpha_ba[122] == alpha_11_4)
    @constraint(m, alpha_ba[123] == alpha_11_4)
    @constraint(m, alpha_ba[124] == alpha_12_4)
    @constraint(m, alpha_ba[125] == alpha_12_4)
    @constraint(m, alpha_ba[126] == alpha_12_4)
    @constraint(m, alpha_ba[127] == alpha_6_5)
    @constraint(m, alpha_ba[128] == alpha_6_5)
    @constraint(m, alpha_ba[129] == alpha_6_5)
    @constraint(m, alpha_ba[130] == alpha_7_5)
    @constraint(m, alpha_ba[131] == alpha_7_5)
    @constraint(m, alpha_ba[132] == alpha_7_5)
    @constraint(m, alpha_ba[133] == alpha_8_5)
    @constraint(m, alpha_ba[134] == alpha_8_5)
    @constraint(m, alpha_ba[135] == alpha_8_5)
    @constraint(m, alpha_ba[136] == alpha_9_5)
    @constraint(m, alpha_ba[137] == alpha_9_5)
    @constraint(m, alpha_ba[138] == alpha_9_5)
    @constraint(m, alpha_ba[139] == alpha_10_5)
    @constraint(m, alpha_ba[140] == alpha_10_5)
    @constraint(m, alpha_ba[141] == alpha_10_5)
    @constraint(m, alpha_ba[142] == alpha_11_5)
    @constraint(m, alpha_ba[143] == alpha_11_5)
    @constraint(m, alpha_ba[144] == alpha_11_5)
    @constraint(m, alpha_ba[145] == alpha_12_5)
    @constraint(m, alpha_ba[146] == alpha_12_5)
    @constraint(m, alpha_ba[147] == alpha_12_5)
    @constraint(m, alpha_ba[148] == alpha_7_6)
    @constraint(m, alpha_ba[149] == alpha_7_6)
    @constraint(m, alpha_ba[150] == alpha_7_6)
    @constraint(m, alpha_ba[151] == alpha_8_6)
    @constraint(m, alpha_ba[152] == alpha_8_6)
    @constraint(m, alpha_ba[153] == alpha_8_6)
    @constraint(m, alpha_ba[154] == alpha_9_6)
    @constraint(m, alpha_ba[155] == alpha_9_6)
    @constraint(m, alpha_ba[156] == alpha_9_6)
    @constraint(m, alpha_ba[157] == alpha_10_6)
    @constraint(m, alpha_ba[158] == alpha_10_6)
    @constraint(m, alpha_ba[159] == alpha_10_6)
    @constraint(m, alpha_ba[160] == alpha_11_6)
    @constraint(m, alpha_ba[161] == alpha_11_6)
    @constraint(m, alpha_ba[162] == alpha_11_6)
    @constraint(m, alpha_ba[163] == alpha_12_6)
    @constraint(m, alpha_ba[164] == alpha_12_6)
    @constraint(m, alpha_ba[165] == alpha_12_6)
    @constraint(m, alpha_ba[166] == alpha_8_7)
    @constraint(m, alpha_ba[167] == alpha_8_7)
    @constraint(m, alpha_ba[168] == alpha_8_7)
    @constraint(m, alpha_ba[169] == alpha_9_7)
    @constraint(m, alpha_ba[170] == alpha_9_7)
    @constraint(m, alpha_ba[171] == alpha_9_7)
    @constraint(m, alpha_ba[172] == alpha_10_7)
    @constraint(m, alpha_ba[173] == alpha_10_7)
    @constraint(m, alpha_ba[174] == alpha_10_7)
    @constraint(m, alpha_ba[175] == alpha_11_7)
    @constraint(m, alpha_ba[176] == alpha_11_7)
    @constraint(m, alpha_ba[177] == alpha_11_7)
    @constraint(m, alpha_ba[178] == alpha_12_7)
    @constraint(m, alpha_ba[179] == alpha_12_7)
    @constraint(m, alpha_ba[180] == alpha_12_7)
    @constraint(m, alpha_ba[181] == alpha_9_8)
    @constraint(m, alpha_ba[182] == alpha_9_8)
    @constraint(m, alpha_ba[183] == alpha_9_8)
    @constraint(m, alpha_ba[184] == alpha_10_8)
    @constraint(m, alpha_ba[185] == alpha_10_8)
    @constraint(m, alpha_ba[186] == alpha_10_8)
    @constraint(m, alpha_ba[187] == alpha_11_8)
    @constraint(m, alpha_ba[188] == alpha_11_8)
    @constraint(m, alpha_ba[189] == alpha_11_8)
    @constraint(m, alpha_ba[190] == alpha_12_8)
    @constraint(m, alpha_ba[191] == alpha_12_8)
    @constraint(m, alpha_ba[192] == alpha_12_8)
    @constraint(m, alpha_ba[193] == alpha_10_9)
    @constraint(m, alpha_ba[194] == alpha_10_9)
    @constraint(m, alpha_ba[195] == alpha_10_9)
    @constraint(m, alpha_ba[196] == alpha_11_9)
    @constraint(m, alpha_ba[197] == alpha_11_9)
    @constraint(m, alpha_ba[198] == alpha_11_9)
    @constraint(m, alpha_ba[199] == alpha_12_9)
    @constraint(m, alpha_ba[200] == alpha_12_9)
    @constraint(m, alpha_ba[201] == alpha_12_9)
    @constraint(m, alpha_ba[202] == alpha_11_10)
    @constraint(m, alpha_ba[203] == alpha_11_10)
    @constraint(m, alpha_ba[204] == alpha_11_10)
    @constraint(m, alpha_ba[205] == alpha_12_10)
    @constraint(m, alpha_ba[206] == alpha_12_10)
    @constraint(m, alpha_ba[207] == alpha_12_10)
    @constraint(m, alpha_ba[208] == alpha_12_11)
    @constraint(m, alpha_ba[209] == alpha_12_11)
    @constraint(m, alpha_ba[210] == alpha_12_11)

    @variable(m, alpha_aa[1:210])
    @constraint(m, alpha_aa[1] == alpha_1_1)
    @constraint(m, alpha_aa[2] == alpha_2_2)
    @constraint(m, alpha_aa[3] == alpha_3_3)
    @constraint(m, alpha_aa[4] == alpha_4_4)
    @constraint(m, alpha_aa[5] == alpha_5_5)
    @constraint(m, alpha_aa[6] == alpha_6_6)
    @constraint(m, alpha_aa[7] == alpha_7_7)
    @constraint(m, alpha_aa[8] == alpha_8_8)
    @constraint(m, alpha_aa[9] == alpha_9_9)
    @constraint(m, alpha_aa[10] == alpha_10_10)
    @constraint(m, alpha_aa[11] == alpha_11_11)
    @constraint(m, alpha_aa[12] == alpha_12_12)
    @constraint(m, alpha_aa[13] == alpha_1_1)
    @constraint(m, alpha_aa[14] == alpha_1_1)
    @constraint(m, alpha_aa[15] == alpha_1_1)
    @constraint(m, alpha_aa[16] == alpha_1_1)
    @constraint(m, alpha_aa[17] == alpha_1_1)
    @constraint(m, alpha_aa[18] == alpha_1_1)
    @constraint(m, alpha_aa[19] == alpha_1_1)
    @constraint(m, alpha_aa[20] == alpha_1_1)
    @constraint(m, alpha_aa[21] == alpha_1_1)
    @constraint(m, alpha_aa[22] == alpha_1_1)
    @constraint(m, alpha_aa[23] == alpha_1_1)
    @constraint(m, alpha_aa[24] == alpha_1_1)
    @constraint(m, alpha_aa[25] == alpha_1_1)
    @constraint(m, alpha_aa[26] == alpha_1_1)
    @constraint(m, alpha_aa[27] == alpha_1_1)
    @constraint(m, alpha_aa[28] == alpha_1_1)
    @constraint(m, alpha_aa[29] == alpha_1_1)
    @constraint(m, alpha_aa[30] == alpha_1_1)
    @constraint(m, alpha_aa[31] == alpha_1_1)
    @constraint(m, alpha_aa[32] == alpha_1_1)
    @constraint(m, alpha_aa[33] == alpha_1_1)
    @constraint(m, alpha_aa[34] == alpha_1_1)
    @constraint(m, alpha_aa[35] == alpha_1_1)
    @constraint(m, alpha_aa[36] == alpha_1_1)
    @constraint(m, alpha_aa[37] == alpha_1_1)
    @constraint(m, alpha_aa[38] == alpha_1_1)
    @constraint(m, alpha_aa[39] == alpha_1_1)
    @constraint(m, alpha_aa[40] == alpha_1_1)
    @constraint(m, alpha_aa[41] == alpha_1_1)
    @constraint(m, alpha_aa[42] == alpha_1_1)
    @constraint(m, alpha_aa[43] == alpha_1_1)
    @constraint(m, alpha_aa[44] == alpha_1_1)
    @constraint(m, alpha_aa[45] == alpha_1_1)
    @constraint(m, alpha_aa[46] == alpha_2_2)
    @constraint(m, alpha_aa[47] == alpha_2_2)
    @constraint(m, alpha_aa[48] == alpha_2_2)
    @constraint(m, alpha_aa[49] == alpha_2_2)
    @constraint(m, alpha_aa[50] == alpha_2_2)
    @constraint(m, alpha_aa[51] == alpha_2_2)
    @constraint(m, alpha_aa[52] == alpha_2_2)
    @constraint(m, alpha_aa[53] == alpha_2_2)
    @constraint(m, alpha_aa[54] == alpha_2_2)
    @constraint(m, alpha_aa[55] == alpha_2_2)
    @constraint(m, alpha_aa[56] == alpha_2_2)
    @constraint(m, alpha_aa[57] == alpha_2_2)
    @constraint(m, alpha_aa[58] == alpha_2_2)
    @constraint(m, alpha_aa[59] == alpha_2_2)
    @constraint(m, alpha_aa[60] == alpha_2_2)
    @constraint(m, alpha_aa[61] == alpha_2_2)
    @constraint(m, alpha_aa[62] == alpha_2_2)
    @constraint(m, alpha_aa[63] == alpha_2_2)
    @constraint(m, alpha_aa[64] == alpha_2_2)
    @constraint(m, alpha_aa[65] == alpha_2_2)
    @constraint(m, alpha_aa[66] == alpha_2_2)
    @constraint(m, alpha_aa[67] == alpha_2_2)
    @constraint(m, alpha_aa[68] == alpha_2_2)
    @constraint(m, alpha_aa[69] == alpha_2_2)
    @constraint(m, alpha_aa[70] == alpha_2_2)
    @constraint(m, alpha_aa[71] == alpha_2_2)
    @constraint(m, alpha_aa[72] == alpha_2_2)
    @constraint(m, alpha_aa[73] == alpha_2_2)
    @constraint(m, alpha_aa[74] == alpha_2_2)
    @constraint(m, alpha_aa[75] == alpha_2_2)
    @constraint(m, alpha_aa[76] == alpha_3_3)
    @constraint(m, alpha_aa[77] == alpha_3_3)
    @constraint(m, alpha_aa[78] == alpha_3_3)
    @constraint(m, alpha_aa[79] == alpha_3_3)
    @constraint(m, alpha_aa[80] == alpha_3_3)
    @constraint(m, alpha_aa[81] == alpha_3_3)
    @constraint(m, alpha_aa[82] == alpha_3_3)
    @constraint(m, alpha_aa[83] == alpha_3_3)
    @constraint(m, alpha_aa[84] == alpha_3_3)
    @constraint(m, alpha_aa[85] == alpha_3_3)
    @constraint(m, alpha_aa[86] == alpha_3_3)
    @constraint(m, alpha_aa[87] == alpha_3_3)
    @constraint(m, alpha_aa[88] == alpha_3_3)
    @constraint(m, alpha_aa[89] == alpha_3_3)
    @constraint(m, alpha_aa[90] == alpha_3_3)
    @constraint(m, alpha_aa[91] == alpha_3_3)
    @constraint(m, alpha_aa[92] == alpha_3_3)
    @constraint(m, alpha_aa[93] == alpha_3_3)
    @constraint(m, alpha_aa[94] == alpha_3_3)
    @constraint(m, alpha_aa[95] == alpha_3_3)
    @constraint(m, alpha_aa[96] == alpha_3_3)
    @constraint(m, alpha_aa[97] == alpha_3_3)
    @constraint(m, alpha_aa[98] == alpha_3_3)
    @constraint(m, alpha_aa[99] == alpha_3_3)
    @constraint(m, alpha_aa[100] == alpha_3_3)
    @constraint(m, alpha_aa[101] == alpha_3_3)
    @constraint(m, alpha_aa[102] == alpha_3_3)
    @constraint(m, alpha_aa[103] == alpha_4_4)
    @constraint(m, alpha_aa[104] == alpha_4_4)
    @constraint(m, alpha_aa[105] == alpha_4_4)
    @constraint(m, alpha_aa[106] == alpha_4_4)
    @constraint(m, alpha_aa[107] == alpha_4_4)
    @constraint(m, alpha_aa[108] == alpha_4_4)
    @constraint(m, alpha_aa[109] == alpha_4_4)
    @constraint(m, alpha_aa[110] == alpha_4_4)
    @constraint(m, alpha_aa[111] == alpha_4_4)
    @constraint(m, alpha_aa[112] == alpha_4_4)
    @constraint(m, alpha_aa[113] == alpha_4_4)
    @constraint(m, alpha_aa[114] == alpha_4_4)
    @constraint(m, alpha_aa[115] == alpha_4_4)
    @constraint(m, alpha_aa[116] == alpha_4_4)
    @constraint(m, alpha_aa[117] == alpha_4_4)
    @constraint(m, alpha_aa[118] == alpha_4_4)
    @constraint(m, alpha_aa[119] == alpha_4_4)
    @constraint(m, alpha_aa[120] == alpha_4_4)
    @constraint(m, alpha_aa[121] == alpha_4_4)
    @constraint(m, alpha_aa[122] == alpha_4_4)
    @constraint(m, alpha_aa[123] == alpha_4_4)
    @constraint(m, alpha_aa[124] == alpha_4_4)
    @constraint(m, alpha_aa[125] == alpha_4_4)
    @constraint(m, alpha_aa[126] == alpha_4_4)
    @constraint(m, alpha_aa[127] == alpha_5_5)
    @constraint(m, alpha_aa[128] == alpha_5_5)
    @constraint(m, alpha_aa[129] == alpha_5_5)
    @constraint(m, alpha_aa[130] == alpha_5_5)
    @constraint(m, alpha_aa[131] == alpha_5_5)
    @constraint(m, alpha_aa[132] == alpha_5_5)
    @constraint(m, alpha_aa[133] == alpha_5_5)
    @constraint(m, alpha_aa[134] == alpha_5_5)
    @constraint(m, alpha_aa[135] == alpha_5_5)
    @constraint(m, alpha_aa[136] == alpha_5_5)
    @constraint(m, alpha_aa[137] == alpha_5_5)
    @constraint(m, alpha_aa[138] == alpha_5_5)
    @constraint(m, alpha_aa[139] == alpha_5_5)
    @constraint(m, alpha_aa[140] == alpha_5_5)
    @constraint(m, alpha_aa[141] == alpha_5_5)
    @constraint(m, alpha_aa[142] == alpha_5_5)
    @constraint(m, alpha_aa[143] == alpha_5_5)
    @constraint(m, alpha_aa[144] == alpha_5_5)
    @constraint(m, alpha_aa[145] == alpha_5_5)
    @constraint(m, alpha_aa[146] == alpha_5_5)
    @constraint(m, alpha_aa[147] == alpha_5_5)
    @constraint(m, alpha_aa[148] == alpha_6_6)
    @constraint(m, alpha_aa[149] == alpha_6_6)
    @constraint(m, alpha_aa[150] == alpha_6_6)
    @constraint(m, alpha_aa[151] == alpha_6_6)
    @constraint(m, alpha_aa[152] == alpha_6_6)
    @constraint(m, alpha_aa[153] == alpha_6_6)
    @constraint(m, alpha_aa[154] == alpha_6_6)
    @constraint(m, alpha_aa[155] == alpha_6_6)
    @constraint(m, alpha_aa[156] == alpha_6_6)
    @constraint(m, alpha_aa[157] == alpha_6_6)
    @constraint(m, alpha_aa[158] == alpha_6_6)
    @constraint(m, alpha_aa[159] == alpha_6_6)
    @constraint(m, alpha_aa[160] == alpha_6_6)
    @constraint(m, alpha_aa[161] == alpha_6_6)
    @constraint(m, alpha_aa[162] == alpha_6_6)
    @constraint(m, alpha_aa[163] == alpha_6_6)
    @constraint(m, alpha_aa[164] == alpha_6_6)
    @constraint(m, alpha_aa[165] == alpha_6_6)
    @constraint(m, alpha_aa[166] == alpha_7_7)
    @constraint(m, alpha_aa[167] == alpha_7_7)
    @constraint(m, alpha_aa[168] == alpha_7_7)
    @constraint(m, alpha_aa[169] == alpha_7_7)
    @constraint(m, alpha_aa[170] == alpha_7_7)
    @constraint(m, alpha_aa[171] == alpha_7_7)
    @constraint(m, alpha_aa[172] == alpha_7_7)
    @constraint(m, alpha_aa[173] == alpha_7_7)
    @constraint(m, alpha_aa[174] == alpha_7_7)
    @constraint(m, alpha_aa[175] == alpha_7_7)
    @constraint(m, alpha_aa[176] == alpha_7_7)
    @constraint(m, alpha_aa[177] == alpha_7_7)
    @constraint(m, alpha_aa[178] == alpha_7_7)
    @constraint(m, alpha_aa[179] == alpha_7_7)
    @constraint(m, alpha_aa[180] == alpha_7_7)
    @constraint(m, alpha_aa[181] == alpha_8_8)
    @constraint(m, alpha_aa[182] == alpha_8_8)
    @constraint(m, alpha_aa[183] == alpha_8_8)
    @constraint(m, alpha_aa[184] == alpha_8_8)
    @constraint(m, alpha_aa[185] == alpha_8_8)
    @constraint(m, alpha_aa[186] == alpha_8_8)
    @constraint(m, alpha_aa[187] == alpha_8_8)
    @constraint(m, alpha_aa[188] == alpha_8_8)
    @constraint(m, alpha_aa[189] == alpha_8_8)
    @constraint(m, alpha_aa[190] == alpha_8_8)
    @constraint(m, alpha_aa[191] == alpha_8_8)
    @constraint(m, alpha_aa[192] == alpha_8_8)
    @constraint(m, alpha_aa[193] == alpha_9_9)
    @constraint(m, alpha_aa[194] == alpha_9_9)
    @constraint(m, alpha_aa[195] == alpha_9_9)
    @constraint(m, alpha_aa[196] == alpha_9_9)
    @constraint(m, alpha_aa[197] == alpha_9_9)
    @constraint(m, alpha_aa[198] == alpha_9_9)
    @constraint(m, alpha_aa[199] == alpha_9_9)
    @constraint(m, alpha_aa[200] == alpha_9_9)
    @constraint(m, alpha_aa[201] == alpha_9_9)
    @constraint(m, alpha_aa[202] == alpha_10_10)
    @constraint(m, alpha_aa[203] == alpha_10_10)
    @constraint(m, alpha_aa[204] == alpha_10_10)
    @constraint(m, alpha_aa[205] == alpha_10_10)
    @constraint(m, alpha_aa[206] == alpha_10_10)
    @constraint(m, alpha_aa[207] == alpha_10_10)
    @constraint(m, alpha_aa[208] == alpha_11_11)
    @constraint(m, alpha_aa[209] == alpha_11_11)
    @constraint(m, alpha_aa[210] == alpha_11_11)

    @variable(m, alpha_bb[1:210])
    @constraint(m, alpha_bb[1] == 0)
    @constraint(m, alpha_bb[2] == 0)
    @constraint(m, alpha_bb[3] == 0)
    @constraint(m, alpha_bb[4] == 0)
    @constraint(m, alpha_bb[5] == 0)
    @constraint(m, alpha_bb[6] == 0)
    @constraint(m, alpha_bb[7] == 0)
    @constraint(m, alpha_bb[8] == 0)
    @constraint(m, alpha_bb[9] == 0)
    @constraint(m, alpha_bb[10] == 0)
    @constraint(m, alpha_bb[11] == 0)
    @constraint(m, alpha_bb[12] == 0)
    @constraint(m, alpha_bb[13] == alpha_2_2)
    @constraint(m, alpha_bb[14] == alpha_2_2)
    @constraint(m, alpha_bb[15] == alpha_2_2)
    @constraint(m, alpha_bb[16] == alpha_3_3)
    @constraint(m, alpha_bb[17] == alpha_3_3)
    @constraint(m, alpha_bb[18] == alpha_3_3)
    @constraint(m, alpha_bb[19] == alpha_4_4)
    @constraint(m, alpha_bb[20] == alpha_4_4)
    @constraint(m, alpha_bb[21] == alpha_4_4)
    @constraint(m, alpha_bb[22] == alpha_5_5)
    @constraint(m, alpha_bb[23] == alpha_5_5)
    @constraint(m, alpha_bb[24] == alpha_5_5)
    @constraint(m, alpha_bb[25] == alpha_6_6)
    @constraint(m, alpha_bb[26] == alpha_6_6)
    @constraint(m, alpha_bb[27] == alpha_6_6)
    @constraint(m, alpha_bb[28] == alpha_7_7)
    @constraint(m, alpha_bb[29] == alpha_7_7)
    @constraint(m, alpha_bb[30] == alpha_7_7)
    @constraint(m, alpha_bb[31] == alpha_8_8)
    @constraint(m, alpha_bb[32] == alpha_8_8)
    @constraint(m, alpha_bb[33] == alpha_8_8)
    @constraint(m, alpha_bb[34] == alpha_9_9)
    @constraint(m, alpha_bb[35] == alpha_9_9)
    @constraint(m, alpha_bb[36] == alpha_9_9)
    @constraint(m, alpha_bb[37] == alpha_10_10)
    @constraint(m, alpha_bb[38] == alpha_10_10)
    @constraint(m, alpha_bb[39] == alpha_10_10)
    @constraint(m, alpha_bb[40] == alpha_11_11)
    @constraint(m, alpha_bb[41] == alpha_11_11)
    @constraint(m, alpha_bb[42] == alpha_11_11)
    @constraint(m, alpha_bb[43] == alpha_12_12)
    @constraint(m, alpha_bb[44] == alpha_12_12)
    @constraint(m, alpha_bb[45] == alpha_12_12)
    @constraint(m, alpha_bb[46] == alpha_3_3)
    @constraint(m, alpha_bb[47] == alpha_3_3)
    @constraint(m, alpha_bb[48] == alpha_3_3)
    @constraint(m, alpha_bb[49] == alpha_4_4)
    @constraint(m, alpha_bb[50] == alpha_4_4)
    @constraint(m, alpha_bb[51] == alpha_4_4)
    @constraint(m, alpha_bb[52] == alpha_5_5)
    @constraint(m, alpha_bb[53] == alpha_5_5)
    @constraint(m, alpha_bb[54] == alpha_5_5)
    @constraint(m, alpha_bb[55] == alpha_6_6)
    @constraint(m, alpha_bb[56] == alpha_6_6)
    @constraint(m, alpha_bb[57] == alpha_6_6)
    @constraint(m, alpha_bb[58] == alpha_7_7)
    @constraint(m, alpha_bb[59] == alpha_7_7)
    @constraint(m, alpha_bb[60] == alpha_7_7)
    @constraint(m, alpha_bb[61] == alpha_8_8)
    @constraint(m, alpha_bb[62] == alpha_8_8)
    @constraint(m, alpha_bb[63] == alpha_8_8)
    @constraint(m, alpha_bb[64] == alpha_9_9)
    @constraint(m, alpha_bb[65] == alpha_9_9)
    @constraint(m, alpha_bb[66] == alpha_9_9)
    @constraint(m, alpha_bb[67] == alpha_10_10)
    @constraint(m, alpha_bb[68] == alpha_10_10)
    @constraint(m, alpha_bb[69] == alpha_10_10)
    @constraint(m, alpha_bb[70] == alpha_11_11)
    @constraint(m, alpha_bb[71] == alpha_11_11)
    @constraint(m, alpha_bb[72] == alpha_11_11)
    @constraint(m, alpha_bb[73] == alpha_12_12)
    @constraint(m, alpha_bb[74] == alpha_12_12)
    @constraint(m, alpha_bb[75] == alpha_12_12)
    @constraint(m, alpha_bb[76] == alpha_4_4)
    @constraint(m, alpha_bb[77] == alpha_4_4)
    @constraint(m, alpha_bb[78] == alpha_4_4)
    @constraint(m, alpha_bb[79] == alpha_5_5)
    @constraint(m, alpha_bb[80] == alpha_5_5)
    @constraint(m, alpha_bb[81] == alpha_5_5)
    @constraint(m, alpha_bb[82] == alpha_6_6)
    @constraint(m, alpha_bb[83] == alpha_6_6)
    @constraint(m, alpha_bb[84] == alpha_6_6)
    @constraint(m, alpha_bb[85] == alpha_7_7)
    @constraint(m, alpha_bb[86] == alpha_7_7)
    @constraint(m, alpha_bb[87] == alpha_7_7)
    @constraint(m, alpha_bb[88] == alpha_8_8)
    @constraint(m, alpha_bb[89] == alpha_8_8)
    @constraint(m, alpha_bb[90] == alpha_8_8)
    @constraint(m, alpha_bb[91] == alpha_9_9)
    @constraint(m, alpha_bb[92] == alpha_9_9)
    @constraint(m, alpha_bb[93] == alpha_9_9)
    @constraint(m, alpha_bb[94] == alpha_10_10)
    @constraint(m, alpha_bb[95] == alpha_10_10)
    @constraint(m, alpha_bb[96] == alpha_10_10)
    @constraint(m, alpha_bb[97] == alpha_11_11)
    @constraint(m, alpha_bb[98] == alpha_11_11)
    @constraint(m, alpha_bb[99] == alpha_11_11)
    @constraint(m, alpha_bb[100] == alpha_12_12)
    @constraint(m, alpha_bb[101] == alpha_12_12)
    @constraint(m, alpha_bb[102] == alpha_12_12)
    @constraint(m, alpha_bb[103] == alpha_5_5)
    @constraint(m, alpha_bb[104] == alpha_5_5)
    @constraint(m, alpha_bb[105] == alpha_5_5)
    @constraint(m, alpha_bb[106] == alpha_6_6)
    @constraint(m, alpha_bb[107] == alpha_6_6)
    @constraint(m, alpha_bb[108] == alpha_6_6)
    @constraint(m, alpha_bb[109] == alpha_7_7)
    @constraint(m, alpha_bb[110] == alpha_7_7)
    @constraint(m, alpha_bb[111] == alpha_7_7)
    @constraint(m, alpha_bb[112] == alpha_8_8)
    @constraint(m, alpha_bb[113] == alpha_8_8)
    @constraint(m, alpha_bb[114] == alpha_8_8)
    @constraint(m, alpha_bb[115] == alpha_9_9)
    @constraint(m, alpha_bb[116] == alpha_9_9)
    @constraint(m, alpha_bb[117] == alpha_9_9)
    @constraint(m, alpha_bb[118] == alpha_10_10)
    @constraint(m, alpha_bb[119] == alpha_10_10)
    @constraint(m, alpha_bb[120] == alpha_10_10)
    @constraint(m, alpha_bb[121] == alpha_11_11)
    @constraint(m, alpha_bb[122] == alpha_11_11)
    @constraint(m, alpha_bb[123] == alpha_11_11)
    @constraint(m, alpha_bb[124] == alpha_12_12)
    @constraint(m, alpha_bb[125] == alpha_12_12)
    @constraint(m, alpha_bb[126] == alpha_12_12)
    @constraint(m, alpha_bb[127] == alpha_6_6)
    @constraint(m, alpha_bb[128] == alpha_6_6)
    @constraint(m, alpha_bb[129] == alpha_6_6)
    @constraint(m, alpha_bb[130] == alpha_7_7)
    @constraint(m, alpha_bb[131] == alpha_7_7)
    @constraint(m, alpha_bb[132] == alpha_7_7)
    @constraint(m, alpha_bb[133] == alpha_8_8)
    @constraint(m, alpha_bb[134] == alpha_8_8)
    @constraint(m, alpha_bb[135] == alpha_8_8)
    @constraint(m, alpha_bb[136] == alpha_9_9)
    @constraint(m, alpha_bb[137] == alpha_9_9)
    @constraint(m, alpha_bb[138] == alpha_9_9)
    @constraint(m, alpha_bb[139] == alpha_10_10)
    @constraint(m, alpha_bb[140] == alpha_10_10)
    @constraint(m, alpha_bb[141] == alpha_10_10)
    @constraint(m, alpha_bb[142] == alpha_11_11)
    @constraint(m, alpha_bb[143] == alpha_11_11)
    @constraint(m, alpha_bb[144] == alpha_11_11)
    @constraint(m, alpha_bb[145] == alpha_12_12)
    @constraint(m, alpha_bb[146] == alpha_12_12)
    @constraint(m, alpha_bb[147] == alpha_12_12)
    @constraint(m, alpha_bb[148] == alpha_7_7)
    @constraint(m, alpha_bb[149] == alpha_7_7)
    @constraint(m, alpha_bb[150] == alpha_7_7)
    @constraint(m, alpha_bb[151] == alpha_8_8)
    @constraint(m, alpha_bb[152] == alpha_8_8)
    @constraint(m, alpha_bb[153] == alpha_8_8)
    @constraint(m, alpha_bb[154] == alpha_9_9)
    @constraint(m, alpha_bb[155] == alpha_9_9)
    @constraint(m, alpha_bb[156] == alpha_9_9)
    @constraint(m, alpha_bb[157] == alpha_10_10)
    @constraint(m, alpha_bb[158] == alpha_10_10)
    @constraint(m, alpha_bb[159] == alpha_10_10)
    @constraint(m, alpha_bb[160] == alpha_11_11)
    @constraint(m, alpha_bb[161] == alpha_11_11)
    @constraint(m, alpha_bb[162] == alpha_11_11)
    @constraint(m, alpha_bb[163] == alpha_12_12)
    @constraint(m, alpha_bb[164] == alpha_12_12)
    @constraint(m, alpha_bb[165] == alpha_12_12)
    @constraint(m, alpha_bb[166] == alpha_8_8)
    @constraint(m, alpha_bb[167] == alpha_8_8)
    @constraint(m, alpha_bb[168] == alpha_8_8)
    @constraint(m, alpha_bb[169] == alpha_9_9)
    @constraint(m, alpha_bb[170] == alpha_9_9)
    @constraint(m, alpha_bb[171] == alpha_9_9)
    @constraint(m, alpha_bb[172] == alpha_10_10)
    @constraint(m, alpha_bb[173] == alpha_10_10)
    @constraint(m, alpha_bb[174] == alpha_10_10)
    @constraint(m, alpha_bb[175] == alpha_11_11)
    @constraint(m, alpha_bb[176] == alpha_11_11)
    @constraint(m, alpha_bb[177] == alpha_11_11)
    @constraint(m, alpha_bb[178] == alpha_12_12)
    @constraint(m, alpha_bb[179] == alpha_12_12)
    @constraint(m, alpha_bb[180] == alpha_12_12)
    @constraint(m, alpha_bb[181] == alpha_9_9)
    @constraint(m, alpha_bb[182] == alpha_9_9)
    @constraint(m, alpha_bb[183] == alpha_9_9)
    @constraint(m, alpha_bb[184] == alpha_10_10)
    @constraint(m, alpha_bb[185] == alpha_10_10)
    @constraint(m, alpha_bb[186] == alpha_10_10)
    @constraint(m, alpha_bb[187] == alpha_11_11)
    @constraint(m, alpha_bb[188] == alpha_11_11)
    @constraint(m, alpha_bb[189] == alpha_11_11)
    @constraint(m, alpha_bb[190] == alpha_12_12)
    @constraint(m, alpha_bb[191] == alpha_12_12)
    @constraint(m, alpha_bb[192] == alpha_12_12)
    @constraint(m, alpha_bb[193] == alpha_10_10)
    @constraint(m, alpha_bb[194] == alpha_10_10)
    @constraint(m, alpha_bb[195] == alpha_10_10)
    @constraint(m, alpha_bb[196] == alpha_11_11)
    @constraint(m, alpha_bb[197] == alpha_11_11)
    @constraint(m, alpha_bb[198] == alpha_11_11)
    @constraint(m, alpha_bb[199] == alpha_12_12)
    @constraint(m, alpha_bb[200] == alpha_12_12)
    @constraint(m, alpha_bb[201] == alpha_12_12)
    @constraint(m, alpha_bb[202] == alpha_11_11)
    @constraint(m, alpha_bb[203] == alpha_11_11)
    @constraint(m, alpha_bb[204] == alpha_11_11)
    @constraint(m, alpha_bb[205] == alpha_12_12)
    @constraint(m, alpha_bb[206] == alpha_12_12)
    @constraint(m, alpha_bb[207] == alpha_12_12)
    @constraint(m, alpha_bb[208] == alpha_12_12)
    @constraint(m, alpha_bb[209] == alpha_12_12)
    @constraint(m, alpha_bb[210] == alpha_12_12)

    # Define overrides
    # Define observable overrides
    println("Defining observableParameter overrides...")

    # Define noise overrides
    println("Defining noiseParameter overrides...")

    # Model compartments
    println("Defining compartments...")
    @variable(m, compartment == 1.0, start=1.0)

    # Model species
    println("Defining species...")
    species_dict["A"] = @variable(m, 0 <= A[j in 1:210, k in 1:(length(t_sim)+1)] <= 1.6)
    species_dict["B"] = @variable(m, 0 <= B[j in 1:210, k in 1:(length(t_sim)+1)] <= 1.6)

    # Model initial assignments
    println("Defining initial assignments...")

    # Model ODEs
    println("Defining ODEs...")
    println("A")
    @NLconstraint(m, [j in 1:210, k in 1:length(t_sim)-1],
        A[j, k+1] == A[j, k] + ( +1.0*( compartment * mu_a[j_to_cond_par[j]] * A[j, k+1] ) +1.0*( compartment * alpha_ab[j_to_cond_par[j]] * A[j, k+1] * B[j, k+1] ) +1.0*( compartment * alpha_aa[j_to_cond_par[j]] * ^(A[j, k+1], 2) )     ) * ( t_sim[k+1] - t_sim[k] ) )
    println("B")
    @NLconstraint(m, [j in 1:210, k in 1:length(t_sim)-1],
        B[j, k+1] == B[j, k] + ( +1.0*( compartment * mu_b[j_to_cond_par[j]] * B[j, k+1] ) +1.0*( compartment * alpha_ba[j_to_cond_par[j]] * A[j, k+1] * B[j, k+1] ) +1.0*( compartment * alpha_bb[j_to_cond_par[j]] * ^(B[j, k+1], 2) )     ) * ( t_sim[k+1] - t_sim[k] ) )

    # Pre-equilibration constraints
    @constraint(m, [j in cond_without_preequ], A[j, length(t_sim)+1] == 0) # Dummy preequilibration
    @constraint(m, [j in cond_without_preequ], B[j, length(t_sim)+1] == 0) # Dummy preequilibration

    # Define observables
    println("Defining observables...")
    obs_dict["A_OD600"] = @variable(m, -1.3686368459579998 <= A_OD600[j in obs2conds["A_OD600"], k in 1:length(t_exp["A_OD600"][j])] <= 2.737334468196, start=1.)
    @NLconstraint(m, [j in obs2conds["A_OD600"], k in 1:length(t_exp["A_OD600"][j])], A_OD600[j, k] == A[j, t_sim_to_exp["A_OD600"][j][k]])
    obs_dict["B_OD600"] = @variable(m, -0.9509563485 <= B_OD600[j in obs2conds["B_OD600"], k in 1:length(t_exp["B_OD600"][j])] <= 1.901912697, start=1.)
    @NLconstraint(m, [j in obs2conds["B_OD600"], k in 1:length(t_exp["B_OD600"][j])], B_OD600[j, k] == B[j, t_sim_to_exp["B_OD600"][j][k]])

    # Defining objectivePriors
    println("Defining objectivePriors")
    @variable(m, prior_mean[l in 1:156], start=1.)
    @constraint(m, prior_mean[1] == 0.0)
    @constraint(m, prior_mean[2] == 0.0)
    @constraint(m, prior_mean[3] == 0.0)
    @constraint(m, prior_mean[4] == 0.0)
    @constraint(m, prior_mean[5] == 0.0)
    @constraint(m, prior_mean[6] == 0.0)
    @constraint(m, prior_mean[7] == 0.0)
    @constraint(m, prior_mean[8] == 0.0)
    @constraint(m, prior_mean[9] == 0.0)
    @constraint(m, prior_mean[10] == 0.0)
    @constraint(m, prior_mean[11] == 0.0)
    @constraint(m, prior_mean[12] == 0.0)
    @constraint(m, prior_mean[13] == 0.0)
    @constraint(m, prior_mean[14] == 0.0)
    @constraint(m, prior_mean[15] == 0.0)
    @constraint(m, prior_mean[16] == 0.0)
    @constraint(m, prior_mean[17] == 0.0)
    @constraint(m, prior_mean[18] == 0.0)
    @constraint(m, prior_mean[19] == 0.0)
    @constraint(m, prior_mean[20] == 0.0)
    @constraint(m, prior_mean[21] == 0.0)
    @constraint(m, prior_mean[22] == 0.0)
    @constraint(m, prior_mean[23] == 0.0)
    @constraint(m, prior_mean[24] == 0.0)
    @constraint(m, prior_mean[25] == 0.0)
    @constraint(m, prior_mean[26] == 0.0)
    @constraint(m, prior_mean[27] == 0.0)
    @constraint(m, prior_mean[28] == 0.0)
    @constraint(m, prior_mean[29] == 0.0)
    @constraint(m, prior_mean[30] == 0.0)
    @constraint(m, prior_mean[31] == 0.0)
    @constraint(m, prior_mean[32] == 0.0)
    @constraint(m, prior_mean[33] == 0.0)
    @constraint(m, prior_mean[34] == 0.0)
    @constraint(m, prior_mean[35] == 0.0)
    @constraint(m, prior_mean[36] == 0.0)
    @constraint(m, prior_mean[37] == 0.0)
    @constraint(m, prior_mean[38] == 0.0)
    @constraint(m, prior_mean[39] == 0.0)
    @constraint(m, prior_mean[40] == 0.0)
    @constraint(m, prior_mean[41] == 0.0)
    @constraint(m, prior_mean[42] == 0.0)
    @constraint(m, prior_mean[43] == 0.0)
    @constraint(m, prior_mean[44] == 0.0)
    @constraint(m, prior_mean[45] == 0.0)
    @constraint(m, prior_mean[46] == 0.0)
    @constraint(m, prior_mean[47] == 0.0)
    @constraint(m, prior_mean[48] == 0.0)
    @constraint(m, prior_mean[49] == 0.0)
    @constraint(m, prior_mean[50] == 0.0)
    @constraint(m, prior_mean[51] == 0.0)
    @constraint(m, prior_mean[52] == 0.0)
    @constraint(m, prior_mean[53] == 0.0)
    @constraint(m, prior_mean[54] == 0.0)
    @constraint(m, prior_mean[55] == 0.0)
    @constraint(m, prior_mean[56] == 0.0)
    @constraint(m, prior_mean[57] == 0.0)
    @constraint(m, prior_mean[58] == 0.0)
    @constraint(m, prior_mean[59] == 0.0)
    @constraint(m, prior_mean[60] == 0.0)
    @constraint(m, prior_mean[61] == 0.0)
    @constraint(m, prior_mean[62] == 0.0)
    @constraint(m, prior_mean[63] == 0.0)
    @constraint(m, prior_mean[64] == 0.0)
    @constraint(m, prior_mean[65] == 0.0)
    @constraint(m, prior_mean[66] == 0.0)
    @constraint(m, prior_mean[67] == 0.0)
    @constraint(m, prior_mean[68] == 0.0)
    @constraint(m, prior_mean[69] == 0.0)
    @constraint(m, prior_mean[70] == 0.0)
    @constraint(m, prior_mean[71] == 0.0)
    @constraint(m, prior_mean[72] == 0.0)
    @constraint(m, prior_mean[73] == 0.0)
    @constraint(m, prior_mean[74] == 0.0)
    @constraint(m, prior_mean[75] == 0.0)
    @constraint(m, prior_mean[76] == 0.0)
    @constraint(m, prior_mean[77] == 0.0)
    @constraint(m, prior_mean[78] == 0.0)
    @constraint(m, prior_mean[79] == 0.0)
    @constraint(m, prior_mean[80] == 0.0)
    @constraint(m, prior_mean[81] == 0.0)
    @constraint(m, prior_mean[82] == 0.0)
    @constraint(m, prior_mean[83] == 0.0)
    @constraint(m, prior_mean[84] == 0.0)
    @constraint(m, prior_mean[85] == 0.0)
    @constraint(m, prior_mean[86] == 0.0)
    @constraint(m, prior_mean[87] == 0.0)
    @constraint(m, prior_mean[88] == 0.0)
    @constraint(m, prior_mean[89] == 0.0)
    @constraint(m, prior_mean[90] == 0.0)
    @constraint(m, prior_mean[91] == 0.0)
    @constraint(m, prior_mean[92] == 0.0)
    @constraint(m, prior_mean[93] == 0.0)
    @constraint(m, prior_mean[94] == 0.0)
    @constraint(m, prior_mean[95] == 0.0)
    @constraint(m, prior_mean[96] == 0.0)
    @constraint(m, prior_mean[97] == 0.0)
    @constraint(m, prior_mean[98] == 0.0)
    @constraint(m, prior_mean[99] == 0.0)
    @constraint(m, prior_mean[100] == 0.0)
    @constraint(m, prior_mean[101] == 0.0)
    @constraint(m, prior_mean[102] == 0.0)
    @constraint(m, prior_mean[103] == 0.0)
    @constraint(m, prior_mean[104] == 0.0)
    @constraint(m, prior_mean[105] == 0.0)
    @constraint(m, prior_mean[106] == 0.0)
    @constraint(m, prior_mean[107] == 0.0)
    @constraint(m, prior_mean[108] == 0.0)
    @constraint(m, prior_mean[109] == 0.0)
    @constraint(m, prior_mean[110] == 0.0)
    @constraint(m, prior_mean[111] == 0.0)
    @constraint(m, prior_mean[112] == 0.0)
    @constraint(m, prior_mean[113] == 0.0)
    @constraint(m, prior_mean[114] == 0.0)
    @constraint(m, prior_mean[115] == 0.0)
    @constraint(m, prior_mean[116] == 0.0)
    @constraint(m, prior_mean[117] == 0.0)
    @constraint(m, prior_mean[118] == 0.0)
    @constraint(m, prior_mean[119] == 0.0)
    @constraint(m, prior_mean[120] == 0.0)
    @constraint(m, prior_mean[121] == 0.0)
    @constraint(m, prior_mean[122] == 0.0)
    @constraint(m, prior_mean[123] == 0.0)
    @constraint(m, prior_mean[124] == 0.0)
    @constraint(m, prior_mean[125] == 0.0)
    @constraint(m, prior_mean[126] == 0.0)
    @constraint(m, prior_mean[127] == 0.0)
    @constraint(m, prior_mean[128] == 0.0)
    @constraint(m, prior_mean[129] == 0.0)
    @constraint(m, prior_mean[130] == 0.0)
    @constraint(m, prior_mean[131] == 0.0)
    @constraint(m, prior_mean[132] == 0.0)
    @constraint(m, prior_mean[133] == 0.0)
    @constraint(m, prior_mean[134] == 0.0)
    @constraint(m, prior_mean[135] == 0.0)
    @constraint(m, prior_mean[136] == 0.0)
    @constraint(m, prior_mean[137] == 0.0)
    @constraint(m, prior_mean[138] == 0.0)
    @constraint(m, prior_mean[139] == 0.0)
    @constraint(m, prior_mean[140] == 0.0)
    @constraint(m, prior_mean[141] == 0.0)
    @constraint(m, prior_mean[142] == 0.0)
    @constraint(m, prior_mean[143] == 0.0)
    @constraint(m, prior_mean[144] == 0.0)
    @constraint(m, prior_mean[145] == 0.0)
    @constraint(m, prior_mean[146] == 0.0)
    @constraint(m, prior_mean[147] == 0.0)
    @constraint(m, prior_mean[148] == 0.0)
    @constraint(m, prior_mean[149] == 0.0)
    @constraint(m, prior_mean[150] == 0.0)
    @constraint(m, prior_mean[151] == 0.0)
    @constraint(m, prior_mean[152] == 0.0)
    @constraint(m, prior_mean[153] == 0.0)
    @constraint(m, prior_mean[154] == 0.0)
    @constraint(m, prior_mean[155] == 0.0)
    @constraint(m, prior_mean[156] == 0.0)

    @variable(m, 0 <= prior_std[l in 1:156], start=1.)
    @constraint(m, prior_std[1] == 3.0)
    @constraint(m, prior_std[2] == 3.0)
    @constraint(m, prior_std[3] == 3.0)
    @constraint(m, prior_std[4] == 3.0)
    @constraint(m, prior_std[5] == 3.0)
    @constraint(m, prior_std[6] == 3.0)
    @constraint(m, prior_std[7] == 3.0)
    @constraint(m, prior_std[8] == 3.0)
    @constraint(m, prior_std[9] == 3.0)
    @constraint(m, prior_std[10] == 3.0)
    @constraint(m, prior_std[11] == 3.0)
    @constraint(m, prior_std[12] == 3.0)
    @constraint(m, prior_std[13] == 3.0)
    @constraint(m, prior_std[14] == 3.0)
    @constraint(m, prior_std[15] == 3.0)
    @constraint(m, prior_std[16] == 3.0)
    @constraint(m, prior_std[17] == 3.0)
    @constraint(m, prior_std[18] == 3.0)
    @constraint(m, prior_std[19] == 3.0)
    @constraint(m, prior_std[20] == 3.0)
    @constraint(m, prior_std[21] == 3.0)
    @constraint(m, prior_std[22] == 3.0)
    @constraint(m, prior_std[23] == 3.0)
    @constraint(m, prior_std[24] == 3.0)
    @constraint(m, prior_std[25] == 3.0)
    @constraint(m, prior_std[26] == 3.0)
    @constraint(m, prior_std[27] == 3.0)
    @constraint(m, prior_std[28] == 3.0)
    @constraint(m, prior_std[29] == 3.0)
    @constraint(m, prior_std[30] == 3.0)
    @constraint(m, prior_std[31] == 3.0)
    @constraint(m, prior_std[32] == 3.0)
    @constraint(m, prior_std[33] == 3.0)
    @constraint(m, prior_std[34] == 3.0)
    @constraint(m, prior_std[35] == 3.0)
    @constraint(m, prior_std[36] == 3.0)
    @constraint(m, prior_std[37] == 3.0)
    @constraint(m, prior_std[38] == 3.0)
    @constraint(m, prior_std[39] == 3.0)
    @constraint(m, prior_std[40] == 3.0)
    @constraint(m, prior_std[41] == 3.0)
    @constraint(m, prior_std[42] == 3.0)
    @constraint(m, prior_std[43] == 3.0)
    @constraint(m, prior_std[44] == 3.0)
    @constraint(m, prior_std[45] == 3.0)
    @constraint(m, prior_std[46] == 3.0)
    @constraint(m, prior_std[47] == 3.0)
    @constraint(m, prior_std[48] == 3.0)
    @constraint(m, prior_std[49] == 3.0)
    @constraint(m, prior_std[50] == 3.0)
    @constraint(m, prior_std[51] == 3.0)
    @constraint(m, prior_std[52] == 3.0)
    @constraint(m, prior_std[53] == 3.0)
    @constraint(m, prior_std[54] == 3.0)
    @constraint(m, prior_std[55] == 3.0)
    @constraint(m, prior_std[56] == 3.0)
    @constraint(m, prior_std[57] == 3.0)
    @constraint(m, prior_std[58] == 3.0)
    @constraint(m, prior_std[59] == 3.0)
    @constraint(m, prior_std[60] == 3.0)
    @constraint(m, prior_std[61] == 3.0)
    @constraint(m, prior_std[62] == 3.0)
    @constraint(m, prior_std[63] == 3.0)
    @constraint(m, prior_std[64] == 3.0)
    @constraint(m, prior_std[65] == 3.0)
    @constraint(m, prior_std[66] == 3.0)
    @constraint(m, prior_std[67] == 3.0)
    @constraint(m, prior_std[68] == 3.0)
    @constraint(m, prior_std[69] == 3.0)
    @constraint(m, prior_std[70] == 3.0)
    @constraint(m, prior_std[71] == 3.0)
    @constraint(m, prior_std[72] == 3.0)
    @constraint(m, prior_std[73] == 3.0)
    @constraint(m, prior_std[74] == 3.0)
    @constraint(m, prior_std[75] == 3.0)
    @constraint(m, prior_std[76] == 3.0)
    @constraint(m, prior_std[77] == 3.0)
    @constraint(m, prior_std[78] == 3.0)
    @constraint(m, prior_std[79] == 3.0)
    @constraint(m, prior_std[80] == 3.0)
    @constraint(m, prior_std[81] == 3.0)
    @constraint(m, prior_std[82] == 3.0)
    @constraint(m, prior_std[83] == 3.0)
    @constraint(m, prior_std[84] == 3.0)
    @constraint(m, prior_std[85] == 3.0)
    @constraint(m, prior_std[86] == 3.0)
    @constraint(m, prior_std[87] == 3.0)
    @constraint(m, prior_std[88] == 3.0)
    @constraint(m, prior_std[89] == 3.0)
    @constraint(m, prior_std[90] == 3.0)
    @constraint(m, prior_std[91] == 3.0)
    @constraint(m, prior_std[92] == 3.0)
    @constraint(m, prior_std[93] == 3.0)
    @constraint(m, prior_std[94] == 3.0)
    @constraint(m, prior_std[95] == 3.0)
    @constraint(m, prior_std[96] == 3.0)
    @constraint(m, prior_std[97] == 3.0)
    @constraint(m, prior_std[98] == 3.0)
    @constraint(m, prior_std[99] == 3.0)
    @constraint(m, prior_std[100] == 3.0)
    @constraint(m, prior_std[101] == 3.0)
    @constraint(m, prior_std[102] == 3.0)
    @constraint(m, prior_std[103] == 3.0)
    @constraint(m, prior_std[104] == 3.0)
    @constraint(m, prior_std[105] == 3.0)
    @constraint(m, prior_std[106] == 3.0)
    @constraint(m, prior_std[107] == 3.0)
    @constraint(m, prior_std[108] == 3.0)
    @constraint(m, prior_std[109] == 3.0)
    @constraint(m, prior_std[110] == 3.0)
    @constraint(m, prior_std[111] == 3.0)
    @constraint(m, prior_std[112] == 3.0)
    @constraint(m, prior_std[113] == 3.0)
    @constraint(m, prior_std[114] == 3.0)
    @constraint(m, prior_std[115] == 3.0)
    @constraint(m, prior_std[116] == 3.0)
    @constraint(m, prior_std[117] == 3.0)
    @constraint(m, prior_std[118] == 3.0)
    @constraint(m, prior_std[119] == 3.0)
    @constraint(m, prior_std[120] == 3.0)
    @constraint(m, prior_std[121] == 3.0)
    @constraint(m, prior_std[122] == 3.0)
    @constraint(m, prior_std[123] == 3.0)
    @constraint(m, prior_std[124] == 3.0)
    @constraint(m, prior_std[125] == 3.0)
    @constraint(m, prior_std[126] == 3.0)
    @constraint(m, prior_std[127] == 3.0)
    @constraint(m, prior_std[128] == 3.0)
    @constraint(m, prior_std[129] == 3.0)
    @constraint(m, prior_std[130] == 3.0)
    @constraint(m, prior_std[131] == 3.0)
    @constraint(m, prior_std[132] == 3.0)
    @constraint(m, prior_std[133] == 3.0)
    @constraint(m, prior_std[134] == 3.0)
    @constraint(m, prior_std[135] == 3.0)
    @constraint(m, prior_std[136] == 3.0)
    @constraint(m, prior_std[137] == 3.0)
    @constraint(m, prior_std[138] == 3.0)
    @constraint(m, prior_std[139] == 3.0)
    @constraint(m, prior_std[140] == 3.0)
    @constraint(m, prior_std[141] == 3.0)
    @constraint(m, prior_std[142] == 3.0)
    @constraint(m, prior_std[143] == 3.0)
    @constraint(m, prior_std[144] == 3.0)
    @constraint(m, prior_std[145] == 3.0)
    @constraint(m, prior_std[146] == 3.0)
    @constraint(m, prior_std[147] == 3.0)
    @constraint(m, prior_std[148] == 3.0)
    @constraint(m, prior_std[149] == 3.0)
    @constraint(m, prior_std[150] == 3.0)
    @constraint(m, prior_std[151] == 3.0)
    @constraint(m, prior_std[152] == 3.0)
    @constraint(m, prior_std[153] == 3.0)
    @constraint(m, prior_std[154] == 3.0)
    @constraint(m, prior_std[155] == 3.0)
    @constraint(m, prior_std[156] == 3.0)

    @variable(m, par_est[l in 1:156], start=1.)
    @constraint(m, par_est[1] == mu_1)
    @constraint(m, par_est[2] == mu_2)
    @constraint(m, par_est[3] == mu_3)
    @constraint(m, par_est[4] == mu_4)
    @constraint(m, par_est[5] == mu_5)
    @constraint(m, par_est[6] == mu_6)
    @constraint(m, par_est[7] == mu_7)
    @constraint(m, par_est[8] == mu_8)
    @constraint(m, par_est[9] == mu_9)
    @constraint(m, par_est[10] == mu_10)
    @constraint(m, par_est[11] == mu_11)
    @constraint(m, par_est[12] == mu_12)
    @constraint(m, par_est[13] == alpha_1_2)
    @constraint(m, par_est[14] == alpha_2_1)
    @constraint(m, par_est[15] == alpha_1_3)
    @constraint(m, par_est[16] == alpha_3_1)
    @constraint(m, par_est[17] == alpha_1_4)
    @constraint(m, par_est[18] == alpha_4_1)
    @constraint(m, par_est[19] == alpha_1_5)
    @constraint(m, par_est[20] == alpha_5_1)
    @constraint(m, par_est[21] == alpha_1_6)
    @constraint(m, par_est[22] == alpha_6_1)
    @constraint(m, par_est[23] == alpha_1_7)
    @constraint(m, par_est[24] == alpha_7_1)
    @constraint(m, par_est[25] == alpha_1_8)
    @constraint(m, par_est[26] == alpha_8_1)
    @constraint(m, par_est[27] == alpha_1_9)
    @constraint(m, par_est[28] == alpha_9_1)
    @constraint(m, par_est[29] == alpha_1_10)
    @constraint(m, par_est[30] == alpha_10_1)
    @constraint(m, par_est[31] == alpha_1_11)
    @constraint(m, par_est[32] == alpha_11_1)
    @constraint(m, par_est[33] == alpha_1_12)
    @constraint(m, par_est[34] == alpha_12_1)
    @constraint(m, par_est[35] == alpha_2_3)
    @constraint(m, par_est[36] == alpha_3_2)
    @constraint(m, par_est[37] == alpha_2_4)
    @constraint(m, par_est[38] == alpha_4_2)
    @constraint(m, par_est[39] == alpha_2_5)
    @constraint(m, par_est[40] == alpha_5_2)
    @constraint(m, par_est[41] == alpha_2_6)
    @constraint(m, par_est[42] == alpha_6_2)
    @constraint(m, par_est[43] == alpha_2_7)
    @constraint(m, par_est[44] == alpha_7_2)
    @constraint(m, par_est[45] == alpha_2_8)
    @constraint(m, par_est[46] == alpha_8_2)
    @constraint(m, par_est[47] == alpha_2_9)
    @constraint(m, par_est[48] == alpha_9_2)
    @constraint(m, par_est[49] == alpha_2_10)
    @constraint(m, par_est[50] == alpha_10_2)
    @constraint(m, par_est[51] == alpha_2_11)
    @constraint(m, par_est[52] == alpha_11_2)
    @constraint(m, par_est[53] == alpha_2_12)
    @constraint(m, par_est[54] == alpha_12_2)
    @constraint(m, par_est[55] == alpha_3_4)
    @constraint(m, par_est[56] == alpha_4_3)
    @constraint(m, par_est[57] == alpha_3_5)
    @constraint(m, par_est[58] == alpha_5_3)
    @constraint(m, par_est[59] == alpha_3_6)
    @constraint(m, par_est[60] == alpha_6_3)
    @constraint(m, par_est[61] == alpha_3_7)
    @constraint(m, par_est[62] == alpha_7_3)
    @constraint(m, par_est[63] == alpha_3_8)
    @constraint(m, par_est[64] == alpha_8_3)
    @constraint(m, par_est[65] == alpha_3_9)
    @constraint(m, par_est[66] == alpha_9_3)
    @constraint(m, par_est[67] == alpha_3_10)
    @constraint(m, par_est[68] == alpha_10_3)
    @constraint(m, par_est[69] == alpha_3_11)
    @constraint(m, par_est[70] == alpha_11_3)
    @constraint(m, par_est[71] == alpha_3_12)
    @constraint(m, par_est[72] == alpha_12_3)
    @constraint(m, par_est[73] == alpha_4_5)
    @constraint(m, par_est[74] == alpha_5_4)
    @constraint(m, par_est[75] == alpha_4_6)
    @constraint(m, par_est[76] == alpha_6_4)
    @constraint(m, par_est[77] == alpha_4_7)
    @constraint(m, par_est[78] == alpha_7_4)
    @constraint(m, par_est[79] == alpha_4_8)
    @constraint(m, par_est[80] == alpha_8_4)
    @constraint(m, par_est[81] == alpha_4_9)
    @constraint(m, par_est[82] == alpha_9_4)
    @constraint(m, par_est[83] == alpha_4_10)
    @constraint(m, par_est[84] == alpha_10_4)
    @constraint(m, par_est[85] == alpha_4_11)
    @constraint(m, par_est[86] == alpha_11_4)
    @constraint(m, par_est[87] == alpha_4_12)
    @constraint(m, par_est[88] == alpha_12_4)
    @constraint(m, par_est[89] == alpha_5_6)
    @constraint(m, par_est[90] == alpha_6_5)
    @constraint(m, par_est[91] == alpha_5_7)
    @constraint(m, par_est[92] == alpha_7_5)
    @constraint(m, par_est[93] == alpha_5_8)
    @constraint(m, par_est[94] == alpha_8_5)
    @constraint(m, par_est[95] == alpha_5_9)
    @constraint(m, par_est[96] == alpha_9_5)
    @constraint(m, par_est[97] == alpha_5_10)
    @constraint(m, par_est[98] == alpha_10_5)
    @constraint(m, par_est[99] == alpha_5_11)
    @constraint(m, par_est[100] == alpha_11_5)
    @constraint(m, par_est[101] == alpha_5_12)
    @constraint(m, par_est[102] == alpha_12_5)
    @constraint(m, par_est[103] == alpha_6_7)
    @constraint(m, par_est[104] == alpha_7_6)
    @constraint(m, par_est[105] == alpha_6_8)
    @constraint(m, par_est[106] == alpha_8_6)
    @constraint(m, par_est[107] == alpha_6_9)
    @constraint(m, par_est[108] == alpha_9_6)
    @constraint(m, par_est[109] == alpha_6_10)
    @constraint(m, par_est[110] == alpha_10_6)
    @constraint(m, par_est[111] == alpha_6_11)
    @constraint(m, par_est[112] == alpha_11_6)
    @constraint(m, par_est[113] == alpha_6_12)
    @constraint(m, par_est[114] == alpha_12_6)
    @constraint(m, par_est[115] == alpha_7_8)
    @constraint(m, par_est[116] == alpha_8_7)
    @constraint(m, par_est[117] == alpha_7_9)
    @constraint(m, par_est[118] == alpha_9_7)
    @constraint(m, par_est[119] == alpha_7_10)
    @constraint(m, par_est[120] == alpha_10_7)
    @constraint(m, par_est[121] == alpha_7_11)
    @constraint(m, par_est[122] == alpha_11_7)
    @constraint(m, par_est[123] == alpha_7_12)
    @constraint(m, par_est[124] == alpha_12_7)
    @constraint(m, par_est[125] == alpha_8_9)
    @constraint(m, par_est[126] == alpha_9_8)
    @constraint(m, par_est[127] == alpha_8_10)
    @constraint(m, par_est[128] == alpha_10_8)
    @constraint(m, par_est[129] == alpha_8_11)
    @constraint(m, par_est[130] == alpha_11_8)
    @constraint(m, par_est[131] == alpha_8_12)
    @constraint(m, par_est[132] == alpha_12_8)
    @constraint(m, par_est[133] == alpha_9_10)
    @constraint(m, par_est[134] == alpha_10_9)
    @constraint(m, par_est[135] == alpha_9_11)
    @constraint(m, par_est[136] == alpha_11_9)
    @constraint(m, par_est[137] == alpha_9_12)
    @constraint(m, par_est[138] == alpha_12_9)
    @constraint(m, par_est[139] == alpha_10_11)
    @constraint(m, par_est[140] == alpha_11_10)
    @constraint(m, par_est[141] == alpha_10_12)
    @constraint(m, par_est[142] == alpha_12_10)
    @constraint(m, par_est[143] == alpha_11_12)
    @constraint(m, par_est[144] == alpha_12_11)
    @constraint(m, par_est[145] == alpha_1_1)
    @constraint(m, par_est[146] == alpha_2_2)
    @constraint(m, par_est[147] == alpha_3_3)
    @constraint(m, par_est[148] == alpha_4_4)
    @constraint(m, par_est[149] == alpha_5_5)
    @constraint(m, par_est[150] == alpha_6_6)
    @constraint(m, par_est[151] == alpha_7_7)
    @constraint(m, par_est[152] == alpha_8_8)
    @constraint(m, par_est[153] == alpha_9_9)
    @constraint(m, par_est[154] == alpha_10_10)
    @constraint(m, par_est[155] == alpha_11_11)
    @constraint(m, par_est[156] == alpha_12_12)

    normal_priors = [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, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156]
    @variable(m, nlp_normal)
    @NLconstraint(m, nlp_normal == sum( 0.5 * log(2*pi*prior_std[l]^2) + 0.5*((par_est[l]-prior_mean[l])/prior_std[l])^2 for l in normal_priors))

    @variable(m, neg_log_priors)
    @constraint(m, neg_log_priors == nlp_normal)

    # Define objective
    println("Defining objective...")
    @NLobjective(m, Min, sum(0.5 * log(2*pi*(( sigma ))^2) + 0.5*((A_OD600[j, deduplicated_time_idx["A_OD600"][j][k]]-m_exp["A_OD600"][j][k])/(( sigma )))^2 for j in obs2conds["A_OD600"] for k in 1:length(t_exp["A_OD600"][j]))
        + sum(0.5 * log(2*pi*(( sigma ))^2) + 0.5*((B_OD600[j, deduplicated_time_idx["B_OD600"][j][k]]-m_exp["B_OD600"][j][k])/(( sigma )))^2 for j in obs2conds["B_OD600"] for k in 1:length(t_exp["B_OD600"][j]))
        + neg_log_priors)

    println("Optimizing:")
    optimize!(m)

    println("Transfering results to Python...")
    parameter_names = [mu_1, mu_2, mu_3, mu_4, mu_5, mu_6, mu_7, mu_8, mu_9, mu_10, mu_11, mu_12, alpha_1_2, alpha_2_1, alpha_1_3, alpha_3_1, alpha_1_4, alpha_4_1, alpha_1_5, alpha_5_1, alpha_1_6, alpha_6_1, alpha_1_7, alpha_7_1, alpha_1_8, alpha_8_1, alpha_1_9, alpha_9_1, alpha_1_10, alpha_10_1, alpha_1_11, alpha_11_1, alpha_1_12, alpha_12_1, alpha_2_3, alpha_3_2, alpha_2_4, alpha_4_2, alpha_2_5, alpha_5_2, alpha_2_6, alpha_6_2, alpha_2_7, alpha_7_2, alpha_2_8, alpha_8_2, alpha_2_9, alpha_9_2, alpha_2_10, alpha_10_2, alpha_2_11, alpha_11_2, alpha_2_12, alpha_12_2, alpha_3_4, alpha_4_3, alpha_3_5, alpha_5_3, alpha_3_6, alpha_6_3, alpha_3_7, alpha_7_3, alpha_3_8, alpha_8_3, alpha_3_9, alpha_9_3, alpha_3_10, alpha_10_3, alpha_3_11, alpha_11_3, alpha_3_12, alpha_12_3, alpha_4_5, alpha_5_4, alpha_4_6, alpha_6_4, alpha_4_7, alpha_7_4, alpha_4_8, alpha_8_4, alpha_4_9, alpha_9_4, alpha_4_10, alpha_10_4, alpha_4_11, alpha_11_4, alpha_4_12, alpha_12_4, alpha_5_6, alpha_6_5, alpha_5_7, alpha_7_5, alpha_5_8, alpha_8_5, alpha_5_9, alpha_9_5, alpha_5_10, alpha_10_5, alpha_5_11, alpha_11_5, alpha_5_12, alpha_12_5, alpha_6_7, alpha_7_6, alpha_6_8, alpha_8_6, alpha_6_9, alpha_9_6, alpha_6_10, alpha_10_6, alpha_6_11, alpha_11_6, alpha_6_12, alpha_12_6, alpha_7_8, alpha_8_7, alpha_7_9, alpha_9_7, alpha_7_10, alpha_10_7, alpha_7_11, alpha_11_7, alpha_7_12, alpha_12_7, alpha_8_9, alpha_9_8, alpha_8_10, alpha_10_8, alpha_8_11, alpha_11_8, alpha_8_12, alpha_12_8, alpha_9_10, alpha_10_9, alpha_9_11, alpha_11_9, alpha_9_12, alpha_12_9, alpha_10_11, alpha_11_10, alpha_10_12, alpha_12_10, alpha_11_12, alpha_12_11, alpha_1_1, alpha_2_2, alpha_3_3, alpha_4_4, alpha_5_5, alpha_6_6, alpha_7_7, alpha_8_8, alpha_9_9, alpha_10_10, alpha_11_11, alpha_12_12, sigma]
    parameter_values = Dict()
    for p in parameter_names
        if occursin("[", string(p))
            parameter_values[split(string(p[1]), "[")[1]] = JuMP.value.(p)
        else
            parameter_values[string(p)] = JuMP.value.(p)
        end
    end

    species_names = ["A", "B", ]
    species_values = Dict(string(spec)=>Dict(cond_idx=>[value(species_dict[spec][cond_idx, val_idx]) for val_idx=1:length(t_sim)]
        for cond_idx in 1:length(keys(df_by_c))) for spec in species_names)

    observable_values = Dict(obs=>Dict(cond_idx=>[value(obs_dict[obs][cond_idx, val_idx]) for val_idx=1:length(list)]
        for (cond_idx, list) in dict) for (obs, dict) in m_exp)

    objective_val = objective_value(m)

    results["objective_value"][string(i_start)] = objective_val
    results["parameters"][string(i_start)] = parameter_values
    results["species"][string(i_start)] = species_values
    results["observables"][string(i_start)] = observable_values

    println("--------------------Finished $i_start. iteration.--------------------")
end

results

max_stars_repo_name: paulflang/DisFit

max_issues_repo_name: paulflang/DisFit

max_forks_repo_name: paulflang/DisFit


text:
function wk3imped(ω::Float64,Rc::Vector{Float64},Rp::Vector{Float64},C::Vector{Float64})
    Zt = Complex{Float64}[];
    magZt = Complex{Float64}[];
    phaseZt = Complex{Float64}[];
    append!(Zt,Rc + Rp./((ω*C.*Rp).^2+1) + im*(1./(ω*C))./(1+1./((ω*Rp.*C).^2)));
    append!(magZt,abs.(Zt))
    append!(phaseZt,angle.(Zt))
    return Zt,magZt,phaseZt
end

ext: jl