14 const std::string PassengerChoiceModel::_labels[
LAST_VALUE] =
15 {
"HardRestrictionModel",
"PriceOrientedModel",
"HybridModel"};
18 const char PassengerChoiceModel::
23 PassengerChoiceModel::PassengerChoiceModel()
29 PassengerChoiceModel::
31 : _model (iPassengerChoiceModel._model) {
35 PassengerChoiceModel::
37 : _model (iPassengerChoiceModel) {
41 PassengerChoiceModel::PassengerChoiceModel (
const char iModel) {
45 case 'H': _model =
HYBRID;
break;
51 std::ostringstream oMessage;
52 oMessage <<
"The passenger choice model '"
53 <<
"' is not known. Known passenger choice models " << lLabels;
61 return _labels[iModel];
66 return _modelLabels[iModel];
72 std::ostringstream oStr;
73 oStr << _modelLabels[iModel];
79 std::ostringstream ostr;
80 for (
unsigned short idx = 0; idx !=
LAST_VALUE; ++idx) {
84 ostr << _labels[idx] <<
" (" << _modelLabels[idx] <<
")";
96 std::ostringstream oStr;
97 oStr << _modelLabels[_model];
103 std::ostringstream ostr;
104 ostr << _labels[_model];
111 return (_model == iModel);