model.py
In this section, we describe both the mathemical model and the code implementation of the function execution.py
Objective function
Implementation in Pyomo:
def obj_rule(m):
return (float(w1)*(sum(pr[j] * m.x[a, j] for j in WP for a in A))/ub_x +
float(w2)*(sum(m.y[a, j, k, f] for a in A for j in WP for k in K for f in F))/ub_y -
1000*sum(m.s[a, k, f] for a in A for k in K for f in F))
model.obj = pe.Objective(rule=obj_rule, sense=pe.maximize)