Hi,
I’m writing a program for a two MIP formulations with each a set of constraints. I would like to be able to compare the two in terms of computation time. Hence, I would like two set of constraints such that I can select the constraints needed for a formulation in the mathematical program. However, at the moment I have several constraints and a set as a subset of AllConstraints. Below, it shows a part of the code. I get the error: Expecting an element but the giben expression is of type reference in regards to the set Constraints1. How do I fix this?
Set Constraints1 {
Definition: {
{ charge_change, battery_max, battery_min, charging_limit, decharging_limit }
}
}
Constraint charge_change {
IndexDomain: t;
Definition: e(t) = e(t-1) + Eta_c * p_charged(t) - p_decharged(t) / Eta_d;
}
Constraint battery_max {
IndexDomain: t;
Definition: e(t) <= S_max;
}
Constraint battery_min {
IndexDomain: t;
Definition: e(t) >= S_min;
}
Constraint charging_limit {
IndexDomain: t;
Definition: p_charged(t) <= P_c * (1 - d(t));
}
Constraint decharging_limit {
IndexDomain: t;
Definition: p_decharged(t) <= P_d * d(t);
}
Question
Set of constraints
Sign up
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.