Error: JuMP model variable not defined

The Julia variable y_con1_1 is not assigned to anything even if there is a variable with name y_con1_1 in the model dual_model. You can get a variable by its name with variable_by_name, e.g.

y_con1_1 = variable_by_name(dual_model, "y_con1_1")
3 Likes