Changeset 418 in PSPA for Interface_Web/trunk/pspaWT/sources/controler/src/elementFit.cc
- Timestamp:
- Jun 21, 2013, 10:16:56 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/src/elementFit.cc
r359 r418 11 11 // transportOk_ = true; 12 12 // parmelaIgnored_ = true; 13 registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);14 registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolIgnore);13 // registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk); 14 // registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolIgnore); 15 15 } 16 16 17 17 void elementFit::setDefaultValues() 18 18 { 19 default Label_ = "fit";19 defaultSpecificName_ = "fit"; 20 20 variableNameDef_ = ""; 21 21 variableValueDef_ = 0.0; … … 25 25 void elementFit::setDefaults() 26 26 { 27 label_ = defaultLabel_;27 specificName_ = defaultSpecificName_; 28 28 variableName_ = variableNameDef_; 29 29 variableValue_ = variableValueDef_; … … 37 37 int compteur = -1; 38 38 parametersString_[++compteur] = mixedTools::intToString(nbParam_); 39 parametersString_[++compteur] = label_;39 parametersString_[++compteur] = specificName_; 40 40 parametersString_[++compteur] = variableName_; 41 41 parametersString_[++compteur] = mixedTools::doubleToString(variableValue_ ); … … 63 63 } 64 64 65 label_ = param[++compteur];65 specificName_ = param[++compteur]; 66 66 variableName_ = param[++compteur]; 67 67 variableValue_ = atof(param[++compteur].c_str()); … … 70 70 71 71 72 string elementFit::parmelaOutputFlow() const73 {74 ostringstream sortie;75 return sortie.str();76 }72 // string elementFit::parmelaOutputFlow() const 73 // { 74 // ostringstream sortie; 75 // return sortie.str(); 76 // } 77 77 78 string elementFit::transportOutputFlow() const79 {80 ostringstream sortie;81 sortie << label_ << ":" << " FIT," << variableName_ << " = " << variableValue_ << ", TOLER = " << tolerance_ << " ;" << endl;82 if ( variableName_ == "R11" || variableName_ == "R22" || variableName_ == "R12" || variableName_ == "R21" ) {83 sortie << " PRINT, TRANS;" << endl;84 }85 return sortie.str();86 }78 // string elementFit::transportOutputFlow() const 79 // { 80 // ostringstream sortie; 81 // sortie << specificName_ << ":" << " FIT," << variableName_ << " = " << variableValue_ << ", TOLER = " << tolerance_ << " ;" << endl; 82 // if ( variableName_ == "R11" || variableName_ == "R22" || variableName_ == "R12" || variableName_ == "R21" ) { 83 // sortie << " PRINT, TRANS;" << endl; 84 // } 85 // return sortie.str(); 86 // } 87 87 88 88 string elementFit::FileOutputFlow() const … … 90 90 ostringstream sortie; 91 91 // sortie << elementName_.getElementType() << endl; 92 sortie << elementName_.get ElementLabel() << endl;93 sortie << label_ << endl;92 sortie << elementName_.getGenericLabel() << endl; 93 sortie << specificName_ << endl; 94 94 sortie << variableName_ << " " << variableValue_ << " " << tolerance_ << endl; 95 95 return sortie.str(); 96 96 } 97 97 98 vector< pair<string, vector<string> > > elementFit::parametersToSoftware () const { 99 vector< pair<string, vector<string> > > sortie; 100 sortie.push_back( pair<string, vector<string> >("labelsGenericSpecific", vector<string>() ) ); 101 sortie.back().second.push_back(elementName_.getGenericLabel()); 102 sortie.back().second.push_back(specificName_); 103 sortie.push_back( pair<string, vector<string> >("variable", vector<string>() ) ); 104 sortie.back().second.push_back(variableName_); 105 sortie.back().second.push_back(mixedTools::doubleToString(variableValue_)); 106 sortie.back().second.push_back(mixedTools::doubleToString(tolerance_)); 107 return sortie; 108 } 109 110 98 111 void elementFit::FileInput(ifstream& ifs) 99 112 { 100 ifs >> label_;113 ifs >> specificName_; 101 114 ifs >> variableName_ >> variableValue_ >> tolerance_; 102 115 } … … 106 119 string txt = ""; 107 120 108 txt += label_;121 txt += specificName_; 109 122 return txt; 110 123 }
Note: See TracChangeset
for help on using the changeset viewer.