Hi all,

I am working on lagrangian relaxation of a particular problem, and I meet the following error.

The original problem consists of 10 almost independent subproblems, where 10 subproblems are only linked by 1 simple linking constraint.

Hence the linking constraint is penalized, moved to objective, and then 10 independent subproblems are solved with modified objective.

```
read problem input W
m = Vector{Model}( undef, 10 )
# add variables and constraints
# to define feasible region for each subproblem
for k in 1:10
m[ k ] = Model( solver = GurobiSolver() )
@variable( m[ k ] , c )
end
# outter loop for update lagrangian dual variables
for it in 1:50
set up lagrangian dual variable \lambda
# inner loop for solving decomposed subproblem
# with modified objective
for k in 1:10
@objective( m[ k ] , Min , c - \lambda )
solve( m[ k ] )
end
end
```

But julia says `c`

is not defined when it encoutner the second loop. Can anyone help me on this?

```
ERROR: LoadError: UndefVarError: c not defined
Stacktrace:
[1] top-level scope at C:\Users\tommyricardo\.julia\packages\JuMP\PbnIJ\src\parseExpr_staged.jl:508
[2] top-level scope at C:\Users\tommyricardo\.julia\packages\JuMP\PbnIJ\src\macros.jl:859
[3] top-level scope at F:\a__top_secret\lagrangian_relaxation_TypeExperiment_SingleUnitQIP.jl:173
in expression starting at F:\a__top_secret\lagrangian_relaxation_TypeExperiment_SingleUnitQIP.jl:171
```