preprocessor: make ramsey_policy/ramsey_model and discretionary_policy mutually exclusive. closes #1047

time-shift
Houtan Bastani 2015-09-03 17:04:34 +02:00
parent 7697067062
commit f72fcbbe78
1 changed files with 7 additions and 0 deletions

View File

@ -141,6 +141,13 @@ ModFile::checkPass()
exit(EXIT_FAILURE);
}
if ((mod_file_struct.ramsey_model_present || mod_file_struct.ramsey_policy_present)
&& mod_file_struct.discretionary_policy_present)
{
cerr << "ERROR: You cannot use the discretionary_policy command when you use either rasmey_model or ramsey_policy and vice versa" << endl;
exit(EXIT_FAILURE);
}
if (((mod_file_struct.ramsey_model_present || mod_file_struct.discretionary_policy_present)
&& !mod_file_struct.planner_objective_present)
|| (!(mod_file_struct.ramsey_model_present || mod_file_struct.discretionary_policy_present)