00001
00016
00017
00018 #include "OSrLWriter.h"
00019 #include "OSResult.h"
00020 #include "OSgLWriter.h"
00021 #include "OSGeneral.h"
00022 #include "OSParameters.h"
00023 #include "OSConfig.h"
00024 #include "OSBase64.h"
00025 #include "OSMathUtil.h"
00026 #include <sstream>
00027 #include <iostream>
00028 #include <stdio.h>
00029
00030 using std::cout;
00031 using std::endl;
00032 using std::ostringstream;
00033
00034 OSrLWriter::OSrLWriter( ) {
00035 m_bWriteBase64 = false;
00036 m_bWhiteSpace = false;
00037 }
00038
00039 OSrLWriter::~OSrLWriter(){
00040 }
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 std::string OSrLWriter::writeOSrL( OSResult *theosresult){
00054 m_OSResult = theosresult;
00055 std::ostringstream outStr;
00056 #ifdef WIN_
00057 const char dirsep='\\';
00058 #else
00059 const char dirsep='/';
00060 #endif
00061
00062 std::string xsltDir;
00063 xsltDir = dirsep == '/' ? "../stylesheets/" : "..\\stylesheets\\";
00064
00065
00066 xsltDir = "http://www.coin-or.org/OS/stylesheets/";
00067
00068 int i, j;
00069 bool generalTagPrinted;
00070 bool systemTagPrinted;
00071 bool serviceTagPrinted;
00072 bool jobTagPrinted;
00073 #ifdef DEBUG
00074 cout << "in OSrLWriter" << endl;
00075 #endif
00076
00077 if(m_OSResult == NULL) return outStr.str();
00078 outStr << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" ;
00079 outStr << "<?xml-stylesheet type=\"text/xsl\" href=\"";
00080 outStr << xsltDir;
00081 outStr << "OSrL.xslt\"?>";
00082 outStr << endl;
00083 outStr << "<osrl xmlns=\"os.optimizationservices.org\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
00084 outStr << "xsi:schemaLocation=\"os.optimizationservices.org http://www.optimizationservices.org/schemas/";
00085 outStr << OS_SCHEMA_VERSION;
00086 outStr << "/OSrL.xsd\" >" ;
00087 outStr << endl;
00088
00089 #ifdef DEBUG
00090 cout << "output <resultHeader>" << endl;
00091 #endif
00092 if(m_OSResult->resultHeader != NULL)
00093 {
00094 if (m_OSResult->resultHeader->name != "" ||
00095 m_OSResult->resultHeader->source != "" ||
00096 m_OSResult->resultHeader->description != "" ||
00097 m_OSResult->resultHeader->fileCreator != "" ||
00098 m_OSResult->resultHeader->licence != "" )
00099 {
00100 outStr << "<resultHeader>" << endl;
00101 outStr << writeGeneralFileHeader(m_OSResult->resultHeader, true);
00102 outStr << "</resultHeader>" << endl;
00103 }
00104 }
00105
00106
00107 #ifdef DEBUG
00108 cout << "output <general>" << endl;
00109 #endif
00110 if(m_OSResult->general != NULL)
00111 {
00112 generalTagPrinted = false;
00113 if(m_OSResult->general->generalStatus != NULL){
00114 if (generalTagPrinted == false)
00115 {
00116 outStr << "<general>" << endl;
00117 generalTagPrinted = true;
00118 }
00119 outStr << "<generalStatus";
00120 if(m_OSResult->general->generalStatus->type.length() > 0){
00121 outStr << " type=\"";
00122 outStr << m_OSResult->general->generalStatus->type ;
00123 outStr << "\"";
00124 }
00125 if(m_OSResult->general->generalStatus->description.length() > 0){
00126 outStr << " description=\"";
00127 outStr << m_OSResult->general->generalStatus->description ;
00128 outStr << "\"";
00129 }
00130 if (m_OSResult->general->generalStatus->numberOfSubstatuses > 0)
00131 {
00132 outStr << " numberOfSubstatuses=\"";
00133 outStr << m_OSResult->general->generalStatus->numberOfSubstatuses;
00134 outStr << "\"";
00135 }
00136 outStr << ">" << endl;
00137 for (int i=0; i < m_OSResult->general->generalStatus->numberOfSubstatuses; i++)
00138 { outStr << "<substatus";
00139 if (m_OSResult->general->generalStatus->substatus[i]->name.length() > 0)
00140 { outStr << " name=\"";
00141 outStr << m_OSResult->general->generalStatus->substatus[i]->name ;
00142 outStr << "\"";
00143 }
00144 if (m_OSResult->general->generalStatus->substatus[i]->description.length() > 0)
00145 { outStr << " description=\"";
00146 outStr << m_OSResult->general->generalStatus->substatus[i]->description ;
00147 outStr << "\"";
00148 }
00149 outStr << "/>" << endl;
00150 }
00151 outStr << "</generalStatus>" << endl;
00152 }
00153
00154 if(m_OSResult->general->message.length() > 0){
00155 if (generalTagPrinted == false)
00156 {
00157 outStr << "<general>" << endl;
00158 generalTagPrinted = true;
00159 }
00160 outStr << "<message>" + m_OSResult->general->message + "</message>" << endl;
00161 }
00162 if(m_OSResult->general->serviceURI.length() > 0){
00163 if (generalTagPrinted == false)
00164 {
00165 outStr << "<general>" << endl;
00166 generalTagPrinted = true;
00167 }
00168 outStr << "<serviceURI>" + m_OSResult->general->serviceURI + "</serviceURI>" << endl;
00169 }
00170 if(m_OSResult->general->serviceName.length() > 0){
00171 if (generalTagPrinted == false)
00172 {
00173 outStr << "<general>" << endl;
00174 generalTagPrinted = true;
00175 }
00176 outStr << "<serviceName>" + m_OSResult->general->serviceName + "</serviceName>" << endl;
00177 }
00178 if(m_OSResult->general->instanceName.length() > 0){
00179 if (generalTagPrinted == false)
00180 {
00181 outStr << "<general>" << endl;
00182 generalTagPrinted = true;
00183 }
00184 outStr << "<instanceName>" + m_OSResult->general->instanceName + "</instanceName>" << endl;
00185 }
00186 if(m_OSResult->general->jobID.length() > 0){
00187 if (generalTagPrinted == false)
00188 {
00189 outStr << "<general>" << endl;
00190 generalTagPrinted = true;
00191 }
00192 outStr << "<jobID>" + m_OSResult->general->jobID + "</jobID>" << endl;
00193 }
00194 if(m_OSResult->general->solverInvoked.length() > 0){
00195 if (generalTagPrinted == false)
00196 {
00197 outStr << "<general>" << endl;
00198 generalTagPrinted = true;
00199 }
00200 outStr << "<solverInvoked>" + m_OSResult->general->solverInvoked + "</solverInvoked>" << endl;
00201 }
00202 if(m_OSResult->general->timeStamp.length() > 0){
00203 if (generalTagPrinted == false)
00204 {
00205 outStr << "<general>" << endl;
00206 generalTagPrinted = true;
00207 }
00208 outStr << "<timeStamp>" + m_OSResult->general->timeStamp + "</timeStamp>" << endl;
00209 }
00210
00211 if(m_OSResult->general->otherResults != NULL)
00212 { if(m_OSResult->general->otherResults->numberOfOtherResults > 0)
00213 {
00214 if (generalTagPrinted == false)
00215 {
00216 outStr << "<general>" << endl;
00217 generalTagPrinted = true;
00218 }
00219 outStr << "<otherResults numberOfOtherResults=\"";
00220 outStr << m_OSResult->general->otherResults->numberOfOtherResults;
00221 outStr << "\">" << endl;
00222 for (int i=0; i < m_OSResult->general->otherResults->numberOfOtherResults; i++)
00223 { outStr << "<other";
00224 if (m_OSResult->general->otherResults->other[i]->name.length() > 0)
00225 { outStr << " name=\"";
00226 outStr << m_OSResult->general->otherResults->other[i]->name;
00227 outStr << "\"";
00228 }
00229 if (m_OSResult->general->otherResults->other[i]->value.length() > 0)
00230 { outStr << " value=\"";
00231 outStr << m_OSResult->general->otherResults->other[i]->value;
00232 outStr << "\"";
00233 }
00234 if (m_OSResult->general->otherResults->other[i]->description.length() > 0)
00235 { outStr << " description=\"";
00236 outStr << m_OSResult->general->otherResults->other[i]->description;
00237 outStr << "\"";
00238 }
00239 outStr << " />" << endl;
00240 }
00241 outStr << "</otherResults>" << endl;;
00242 }
00243 }
00244 if (generalTagPrinted == true)
00245 outStr << "</general>" << endl;
00246 }
00247
00248
00249 #ifdef DEBUG
00250 cout << "output <system>" << endl;
00251 #endif
00252 if(m_OSResult->system != NULL){
00253 systemTagPrinted = false;
00254 if(m_OSResult->system->systemInformation.length() > 0){
00255 if (systemTagPrinted == false)
00256 {
00257 outStr << "<system>" << endl;
00258 systemTagPrinted = true;
00259 }
00260 outStr << "<systemInformation>" + m_OSResult->system->systemInformation + "</systemInformation>" << endl;
00261 }
00262
00263 if(m_OSResult->system->availableDiskSpace != NULL){
00264 if (systemTagPrinted == false)
00265 {
00266 outStr << "<system>" << endl;
00267 systemTagPrinted = true;
00268 }
00269 outStr << "<availableDiskSpace";
00270 if(m_OSResult->system->availableDiskSpace->unit.length() > 0){
00271 outStr << " unit=\"";
00272 outStr << m_OSResult->system->availableDiskSpace->unit ;
00273 outStr << "\"";
00274 }
00275 if(m_OSResult->system->availableDiskSpace->description.length() > 0){
00276 outStr << " description=\"";
00277 outStr << m_OSResult->system->availableDiskSpace->description ;
00278 outStr << "\"";
00279 }
00280 outStr << ">";
00281 outStr << os_dtoa_format(m_OSResult->system->availableDiskSpace->value);
00282 outStr << "</availableDiskSpace>" << endl;
00283 }
00284
00285 if(m_OSResult->system->availableMemory != NULL){
00286 if (systemTagPrinted == false)
00287 {
00288 outStr << "<system>" << endl;
00289 systemTagPrinted = true;
00290 }
00291 outStr << "<availableMemory";
00292 if(m_OSResult->system->availableMemory->unit.length() > 0){
00293 outStr << " unit=\"";
00294 outStr << m_OSResult->system->availableMemory->unit ;
00295 outStr << "\"";
00296 }
00297 if(m_OSResult->system->availableMemory->description.length() > 0){
00298 outStr << " description=\"";
00299 outStr << m_OSResult->system->availableMemory->description ;
00300 outStr << "\"";
00301 }
00302 outStr << ">";
00303 outStr << os_dtoa_format(m_OSResult->system->availableMemory->value);
00304 outStr << "</availableMemory>" << endl;
00305 }
00306
00307 if(m_OSResult->system->availableCPUSpeed != NULL){
00308 if (systemTagPrinted == false)
00309 {
00310 outStr << "<system>" << endl;
00311 systemTagPrinted = true;
00312 }
00313 outStr << "<availableCPUSpeed";
00314 if(m_OSResult->system->availableCPUSpeed->unit.length() > 0){
00315 outStr << " unit=\"";
00316 outStr << m_OSResult->system->availableCPUSpeed->unit ;
00317 outStr << "\"";
00318 }
00319 if(m_OSResult->system->availableCPUSpeed->description.length() > 0){
00320 outStr << " description=\"";
00321 outStr << m_OSResult->system->availableCPUSpeed->description ;
00322 outStr << "\"";
00323 }
00324 outStr << ">";
00325 outStr << os_dtoa_format(m_OSResult->system->availableCPUSpeed->value);
00326 outStr << "</availableCPUSpeed>" << endl;
00327 }
00328
00329 if(m_OSResult->system->availableCPUNumber != NULL){
00330 if (systemTagPrinted == false)
00331 {
00332 outStr << "<system>" << endl;
00333 systemTagPrinted = true;
00334 }
00335 outStr << "<availableCPUNumber";
00336 if(m_OSResult->system->availableCPUNumber->description.length() > 0){
00337 outStr << " description=\"";
00338 outStr << m_OSResult->system->availableCPUNumber->description ;
00339 outStr << "\"";
00340 }
00341 outStr << ">";
00342 outStr << m_OSResult->system->availableCPUNumber->value;
00343 outStr << "</availableCPUNumber>" << endl;
00344 }
00345
00346 if(m_OSResult->system->otherResults != NULL)
00347 { if(m_OSResult->system->otherResults->numberOfOtherResults > 0)
00348 {
00349 if (systemTagPrinted == false)
00350 {
00351 outStr << "<system>" << endl;
00352 systemTagPrinted = true;
00353 }
00354 outStr << "<otherResults numberOfOtherResults=\"";
00355 outStr << m_OSResult->system->otherResults->numberOfOtherResults;
00356 outStr << "\">" << endl;
00357 for (int i=0; i < m_OSResult->system->otherResults->numberOfOtherResults; i++)
00358 { outStr << "<other";
00359 if (m_OSResult->system->otherResults->other[i]->name.length() > 0)
00360 { outStr << " name=\"";
00361 outStr << m_OSResult->system->otherResults->other[i]->name;
00362 outStr << "\"";
00363 }
00364 if (m_OSResult->system->otherResults->other[i]->value.length() > 0)
00365 { outStr << " value=\"";
00366 outStr << m_OSResult->system->otherResults->other[i]->value;
00367 outStr << "\"";
00368 }
00369 if (m_OSResult->system->otherResults->other[i]->description.length() > 0)
00370 { outStr << " description=\"";
00371 outStr << m_OSResult->system->otherResults->other[i]->description;
00372 outStr << "\"";
00373 }
00374 outStr << " />" << endl;
00375 }
00376 outStr << "</otherResults>" << endl;
00377 }
00378 }
00379 if (systemTagPrinted == true)
00380 outStr << "</system>" << endl;
00381 }
00382
00383
00384 #ifdef DEBUG
00385 cout << "output <service>" << endl;
00386 #endif
00387 if(m_OSResult->service != NULL){
00388 serviceTagPrinted = false;
00389 if(m_OSResult->service->currentState.length() > 0 && m_OSResult->service->currentState != "unknown"){
00390 if (serviceTagPrinted == false)
00391 {
00392 outStr << "<service>" << endl;
00393 serviceTagPrinted = true;
00394 }
00395 outStr << "<currentState>" << m_OSResult->service->currentState << "</currentState>" << endl;
00396 }
00397 if(m_OSResult->service->currentJobCount >= 0){
00398 if (serviceTagPrinted == false)
00399 {
00400 outStr << "<service>" << endl;
00401 serviceTagPrinted = true;
00402 }
00403 outStr << "<currentJobCount>" << m_OSResult->service->currentJobCount << "</currentJobCount>" << endl;
00404 }
00405 if(m_OSResult->service->totalJobsSoFar >= 0){
00406 if (serviceTagPrinted == false)
00407 {
00408 outStr << "<service>" << endl;
00409 serviceTagPrinted = true;
00410 }
00411 outStr << "<totalJobsSoFar>" << m_OSResult->service->totalJobsSoFar << "</totalJobsSoFar>" << endl;
00412 }
00413 if(m_OSResult->service->timeServiceStarted.length() > 0 && m_OSResult->service->timeServiceStarted != "1970-01-01T00:00:00-00:00"){
00414 if (serviceTagPrinted == false)
00415 {
00416 outStr << "<service>" << endl;
00417 serviceTagPrinted = true;
00418 }
00419 outStr << "<timeServiceStarted>" << m_OSResult->service->timeServiceStarted << "</timeServiceStarted>" << endl;
00420 }
00421 if(m_OSResult->service->serviceUtilization != -1.0){
00422 if (serviceTagPrinted == false)
00423 {
00424 outStr << "<service>" << endl;
00425 serviceTagPrinted = true;
00426 }
00427 outStr << "<serviceUtilization>" << os_dtoa_format(m_OSResult->service->serviceUtilization) << "</serviceUtilization>" << endl;
00428 }
00429
00430 if(m_OSResult->service->otherResults != NULL)
00431 { if(m_OSResult->service->otherResults->numberOfOtherResults > 0)
00432 {
00433 if (serviceTagPrinted == false)
00434 {
00435 outStr << "<service>" << endl;
00436 serviceTagPrinted = true;
00437 }
00438 outStr << "<otherResults numberOfOtherResults=\"";
00439 outStr << m_OSResult->service->otherResults->numberOfOtherResults;
00440 outStr << "\">" << endl;
00441 for (int i=0; i < m_OSResult->service->otherResults->numberOfOtherResults; i++)
00442 { outStr << "<other";
00443 if (m_OSResult->service->otherResults->other[i]->name.length() > 0)
00444 { outStr << " name=\"";
00445 outStr << m_OSResult->service->otherResults->other[i]->name;
00446 outStr << "\"";
00447 }
00448 if (m_OSResult->service->otherResults->other[i]->value.length() > 0)
00449 { outStr << " value=\"";
00450 outStr << m_OSResult->service->otherResults->other[i]->value;
00451 outStr << "\"";
00452 }
00453 if (m_OSResult->service->otherResults->other[i]->description.length() > 0)
00454 { outStr << " description=\"";
00455 outStr << m_OSResult->service->otherResults->other[i]->description;
00456 outStr << "\"";
00457 }
00458 outStr << " />" << endl;
00459 }
00460 outStr << "</otherResults>" << endl;
00461 }
00462 }
00463 if (serviceTagPrinted == true)
00464 outStr << "</service>" << endl;
00465 }
00466
00467
00468 #ifdef DEBUG
00469 cout << "output <job>" << endl;
00470 #endif
00471 if(m_OSResult->job != NULL){
00472 jobTagPrinted = false;
00473
00474 if(m_OSResult->job->status.length() > 0 && m_OSResult->job->status != "finished"){
00475 if (jobTagPrinted == false)
00476 {
00477 outStr << "<job>" << endl;
00478 jobTagPrinted = true;
00479 }
00480 outStr << "<status>" + m_OSResult->job->status + "</status>" << endl;
00481 }
00482 if(m_OSResult->job->submitTime.length() > 0 && m_OSResult->job->submitTime != "1970-01-01T00:00:00-00:00"){
00483 if (jobTagPrinted == false)
00484 {
00485 outStr << "<job>" << endl;
00486 jobTagPrinted = true;
00487 }
00488 outStr << "<submitTime>" + m_OSResult->job->submitTime + "</submitTime>" << endl;
00489 }
00490 if(m_OSResult->job->scheduledStartTime.length() > 0 && m_OSResult->job->scheduledStartTime != "1970-01-01T00:00:00-00:00"){
00491 if (jobTagPrinted == false)
00492 {
00493 outStr << "<job>" << endl;
00494 jobTagPrinted = true;
00495 }
00496 outStr << "<scheduledStartTime>" + m_OSResult->job->scheduledStartTime + "</scheduledStartTime>" << endl;
00497 }
00498 if(m_OSResult->job->actualStartTime.length() > 0 && m_OSResult->job->actualStartTime != "1970-01-01T00:00:00-00:00"){
00499 if (jobTagPrinted == false)
00500 {
00501 outStr << "<job>" << endl;
00502 jobTagPrinted = true;
00503 }
00504 outStr << "<actualStartTime>" + m_OSResult->job->actualStartTime + "</actualStartTime>" << endl;
00505 }
00506 if(m_OSResult->job->endTime.length() > 0 && m_OSResult->job->endTime != "1970-01-01T00:00:00-00:00"){
00507 if (jobTagPrinted == false)
00508 {
00509 outStr << "<job>" << endl;
00510 jobTagPrinted = true;
00511 }
00512 outStr << "<endTime>" + m_OSResult->job->endTime + "</endTime>" << endl;
00513 }
00514
00515 if (m_OSResult->job->timingInformation != NULL)
00516 {
00517 if (jobTagPrinted == false)
00518 {
00519 outStr << "<job>" << endl;
00520 jobTagPrinted = true;
00521 }
00522 outStr << "<timingInformation numberOfTimes=\"";
00523 outStr << m_OSResult->job->timingInformation->numberOfTimes << "\">" << endl;
00524 for (i=0; i<m_OSResult->job->timingInformation->numberOfTimes; i++)
00525 {
00526 outStr << "<time ";
00527 if (m_OSResult->job->timingInformation->time[i]->type != "")
00528 outStr << "type=\"" << m_OSResult->job->timingInformation->time[i]->type << "\" ";
00529 if (m_OSResult->job->timingInformation->time[i]->unit != "")
00530 outStr << "unit=\"" << m_OSResult->job->timingInformation->time[i]->unit << "\" ";
00531 if (m_OSResult->job->timingInformation->time[i]->category != "")
00532 outStr << "category=\"" << m_OSResult->job->timingInformation->time[i]->category << "\" ";
00533 if (m_OSResult->job->timingInformation->time[i]->description != "")
00534 outStr << "description=\"" << m_OSResult->job->timingInformation->time[i]->description << "\" ";
00535 outStr << ">" << endl;
00536 outStr << os_dtoa_format(m_OSResult->job->timingInformation->time[i]->value);
00537 outStr << "</time>" << endl;
00538 }
00539 outStr << "</timingInformation>" << endl;
00540 }
00541
00542 if(m_OSResult->job->usedDiskSpace != NULL){
00543 if (jobTagPrinted == false)
00544 {
00545 outStr << "<job>" << endl;
00546 jobTagPrinted = true;
00547 }
00548 outStr << "<usedDiskSpace";
00549 if(m_OSResult->job->usedDiskSpace->unit.length() > 0){
00550 outStr << " unit=\"";
00551 outStr << m_OSResult->job->usedDiskSpace->unit ;
00552 outStr << "\"";
00553 }
00554 if(m_OSResult->job->usedDiskSpace->description.length() > 0){
00555 outStr << " description=\"";
00556 outStr << m_OSResult->job->usedDiskSpace->description ;
00557 outStr << "\"";
00558 }
00559 outStr << ">";
00560 outStr << os_dtoa_format(m_OSResult->job->usedDiskSpace->value);
00561 outStr << "</usedDiskSpace>" << endl;
00562 }
00563
00564 if(m_OSResult->job->usedMemory != NULL){
00565 if (jobTagPrinted == false)
00566 {
00567 outStr << "<job>" << endl;
00568 jobTagPrinted = true;
00569 }
00570 outStr << "<usedMemory";
00571 if(m_OSResult->job->usedMemory->unit.length() > 0){
00572 outStr << " unit=\"";
00573 outStr << m_OSResult->job->usedMemory->unit ;
00574 outStr << "\"";
00575 }
00576 if(m_OSResult->job->usedMemory->description.length() > 0){
00577 outStr << " description=\"";
00578 outStr << m_OSResult->job->usedMemory->description ;
00579 outStr << "\"";
00580 }
00581 outStr << ">";
00582 outStr << os_dtoa_format(m_OSResult->job->usedMemory->value);
00583 outStr << "</usedMemory>" << endl;
00584 }
00585
00586 if(m_OSResult->job->usedCPUSpeed != NULL){
00587 if (jobTagPrinted == false)
00588 {
00589 outStr << "<job>" << endl;
00590 jobTagPrinted = true;
00591 }
00592 outStr << "<usedCPUSpeed";
00593 if(m_OSResult->job->usedCPUSpeed->unit.length() > 0){
00594 outStr << " unit=\"";
00595 outStr << m_OSResult->job->usedCPUSpeed->unit ;
00596 outStr << "\"";
00597 }
00598 if(m_OSResult->job->usedCPUSpeed->description.length() > 0){
00599 outStr << " description=\"";
00600 outStr << m_OSResult->job->usedCPUSpeed->description;
00601 outStr << "\"";
00602 }
00603 outStr << ">";
00604 outStr << os_dtoa_format(m_OSResult->job->usedCPUSpeed->value);
00605 outStr << "</usedCPUSpeed>" << endl;
00606 }
00607
00608 if(m_OSResult->job->usedCPUNumber != NULL){
00609 if (jobTagPrinted == false)
00610 {
00611 outStr << "<job>" << endl;
00612 jobTagPrinted = true;
00613 }
00614 outStr << "<usedCPUNumber";
00615 if(m_OSResult->job->usedCPUNumber->description.length() > 0){
00616 outStr << " description=\"";
00617 outStr << m_OSResult->job->usedCPUNumber->description;
00618 outStr << "\"";
00619 }
00620 outStr << ">";
00621 outStr << m_OSResult->job->usedCPUNumber->value;
00622 outStr << "</usedCPUNumber>" << endl;
00623 }
00624
00625 if(m_OSResult->job->otherResults != NULL)
00626 { if(m_OSResult->job->otherResults->numberOfOtherResults > 0)
00627 {
00628 if (jobTagPrinted == false)
00629 {
00630 outStr << "<job>" << endl;
00631 jobTagPrinted = true;
00632 }
00633 outStr << "<otherResults numberOfOtherResults=\"";
00634 outStr << m_OSResult->job->otherResults->numberOfOtherResults;
00635 outStr << "\">" << endl;
00636 for (int i=0; i < m_OSResult->job->otherResults->numberOfOtherResults; i++)
00637 { outStr << "<other";
00638 if (m_OSResult->job->otherResults->other[i]->name.length() > 0)
00639 { outStr << " name=\"";
00640 outStr << m_OSResult->job->otherResults->other[i]->name;
00641 outStr << "\"";
00642 }
00643 if (m_OSResult->job->otherResults->other[i]->value.length() > 0)
00644 { outStr << " value=\"";
00645 outStr << m_OSResult->job->otherResults->other[i]->value;
00646 outStr << "\"";
00647 }
00648 if (m_OSResult->job->otherResults->other[i]->description.length() > 0)
00649 { outStr << " description=\"";
00650 outStr << m_OSResult->job->otherResults->other[i]->description;
00651 outStr << "\"";
00652 }
00653 outStr << " />" << endl;
00654 }
00655 outStr << "</otherResults>" << endl;
00656 }
00657 }
00658 if (jobTagPrinted == true)
00659 outStr << "</job>" << endl;
00660 }
00661
00662
00663 #ifdef DEBUG
00664 cout << "output <optimization>" << endl;
00665 #endif
00666 if(m_OSResult->optimization != NULL)
00667 {
00668 outStr << "<optimization " ;
00669 outStr << "numberOfSolutions=\"";
00670 outStr << m_OSResult->optimization->numberOfSolutions ;
00671 outStr << "\"";
00672 if (m_OSResult->optimization->numberOfVariables >= 0)
00673 {
00674 outStr << " numberOfVariables=\"";
00675 outStr << m_OSResult->optimization->numberOfVariables ;
00676 outStr << "\"";
00677 }
00678 if (m_OSResult->optimization->numberOfConstraints >= 0)
00679 {
00680 outStr << " numberOfConstraints=\"";
00681 outStr << m_OSResult->optimization->numberOfConstraints ;
00682 outStr << "\"";
00683 }
00684 if (m_OSResult->optimization->numberOfObjectives >= 0)
00685 {
00686 outStr << " numberOfObjectives=\"";
00687 outStr << m_OSResult->optimization->numberOfObjectives ;
00688 outStr << "\"" ;
00689 }
00690 outStr << ">" << endl;
00691
00692 for(i = 0; i < m_OSResult->optimization->numberOfSolutions; i++){
00693 if(m_OSResult->optimization->solution[i] != NULL)
00694 {
00695 outStr << "<solution" ;
00696 outStr << " targetObjectiveIdx=\"";
00697 outStr << m_OSResult->optimization->solution[i]->targetObjectiveIdx ;
00698 outStr << "\"" ;
00699 if (m_OSResult->optimization->solution[i]->weightedObjectives)
00700 outStr << " weightedObjectives=\"true\"";
00701 outStr << ">" << endl;
00702 if(m_OSResult->optimization->solution[i]->status != NULL){
00703 outStr << "<status";
00704 if (m_OSResult->optimization->solution[i]->status->numberOfSubstatuses > 0)
00705 {
00706 outStr << " numberOfSubstatuses=\"";
00707 outStr << m_OSResult->optimization->solution[i]->status->numberOfSubstatuses ;
00708 outStr << "\"";
00709 }
00710 if(m_OSResult->optimization->solution[i]->status->type.length() > 0){
00711 outStr << " type=\"";
00712 outStr << m_OSResult->optimization->solution[i]->status->type;
00713 outStr << "\"";
00714 }
00715 if(m_OSResult->optimization->solution[i]->status->description.length() > 0){
00716 outStr << " description=\"";
00717 outStr << m_OSResult->optimization->solution[i]->status->description;
00718 outStr << "\"" ;
00719 }
00720 outStr << ">" << endl;
00721 for (int j=0; j < m_OSResult->optimization->solution[i]->status->numberOfSubstatuses; j++)
00722 { outStr << "<substatus";
00723 if(m_OSResult->optimization->solution[i]->status->substatus[j]->type.length() > 0){
00724 outStr << " type=\"";
00725 outStr << m_OSResult->optimization->solution[i]->status->substatus[j]->type;
00726 outStr << "\"";
00727 }
00728 if(m_OSResult->optimization->solution[i]->status->substatus[j]->description.length() > 0){
00729 outStr << " description=\"";
00730 outStr << m_OSResult->optimization->solution[i]->status->substatus[j]->description;
00731 outStr << "\"" ;
00732 }
00733 outStr << "/>" << endl;
00734 }
00735 outStr << "</status>" << endl;
00736 }
00737
00738 if(m_OSResult->optimization->solution[i]->message != ""){
00739 outStr << "<message>";
00740 outStr << m_OSResult->optimization->solution[i]->message;
00741 outStr << "</message>" << endl;
00742 }
00743 if(m_OSResult->optimization->solution[i]->variables != NULL){
00744 outStr << "<variables ";
00745 if (m_OSResult->optimization->solution[i]->variables->numberOfOtherVariableResults > 0)
00746 outStr << "numberOfOtherVariableResults=\"" << m_OSResult->optimization->solution[i]->variables->numberOfOtherVariableResults << "\"";
00747 outStr << ">" << endl;
00748 if(m_OSResult->optimization->solution[i]->variables->values != NULL){
00749 #ifdef DEBUG
00750 cout << "output <variables> <values>" << endl;
00751 #endif
00752 outStr << "<values numberOfVar=\"" << m_OSResult->optimization->solution[i]->variables->values->numberOfVar << "\">" << endl;
00753 for(j = 0; j < m_OSResult->optimization->solution[i]->variables->values->numberOfVar; j++){
00754 if(m_OSResult->optimization->solution[i]->variables->values->var[j] != NULL){
00755 outStr << "<var";
00756 outStr << " idx=\"";
00757 outStr << m_OSResult->optimization->solution[i]->variables->values->var[j]->idx;
00758 outStr << "\">";
00759 outStr << os_dtoa_format( m_OSResult->optimization->solution[i]->variables->values->var[j]->value );
00760 outStr << "</var>" << endl;
00761 }
00762 }
00763 outStr << "</values>" << endl;
00764 }
00765
00766 if(m_OSResult->optimization->solution[i]->variables->valuesString != NULL){
00767 #ifdef DEBUG
00768 cout << "output <variables> <valuesString>" << endl;
00769 #endif
00770 outStr << "<valuesString numberOfVar=\"" << m_OSResult->optimization->solution[i]->variables->valuesString->numberOfVar << "\">" << endl;
00771 for(j = 0; j < m_OSResult->optimization->solution[i]->variables->valuesString->numberOfVar; j++){
00772 if(m_OSResult->optimization->solution[i]->variables->valuesString->var[j] != NULL){
00773 outStr << "<var";
00774 outStr << " idx=\"";
00775 outStr << m_OSResult->optimization->solution[i]->variables->valuesString->var[j]->idx;
00776 outStr << "\">";
00777 outStr << m_OSResult->optimization->solution[i]->variables->valuesString->var[j]->value;
00778 outStr << "</var>" << endl;
00779 }
00780 }
00781 outStr << "</valuesString>" << endl;
00782 }
00783
00784 if(m_OSResult->optimization->solution[i]->variables->basisStatus != NULL)
00785 {
00786 #ifdef DEBUG
00787 cout << "output <variables> <basisStatus>" << endl;
00788 #endif
00789 outStr << "<basisStatus>" << endl;
00790 outStr << writeBasisStatus(m_OSResult->optimization->solution[i]->variables->basisStatus, m_bWhiteSpace, m_bWriteBase64);
00791 outStr << "</basisStatus>" << endl;
00792 }
00793
00794 #ifdef DEBUG
00795 cout << "output <variables> <other>" << endl;
00796 #endif
00797 if(m_OSResult->optimization->solution[i]->variables->other != NULL){
00798 if(m_OSResult->optimization->solution[i]->variables->numberOfOtherVariableResults > 0){
00799 for(int k = 0; k < m_OSResult->optimization->solution[i]->variables->numberOfOtherVariableResults; k++)
00800 {
00801 outStr << "<other";
00802 if (m_OSResult->optimization->solution[i]->variables->other[k]->numberOfVar > 0)
00803 {
00804 outStr << " numberOfVar=\"";
00805 outStr << m_OSResult->optimization->solution[i]->variables->other[k]->numberOfVar;
00806 outStr << "\"" ;
00807 }
00808 else if(m_OSResult->optimization->solution[i]->variables->other[k]->numberOfEnumerations > 0)
00809 {
00810 outStr << " numberOfEnumerations=\"";
00811 outStr << m_OSResult->optimization->solution[i]->variables->other[k]->numberOfEnumerations;
00812 outStr << "\"" ;
00813 }
00814 outStr << " name=\"";
00815 outStr << m_OSResult->optimization->solution[i]->variables->other[k]->name;
00816 outStr << "\"" ;
00817 if (m_OSResult->optimization->solution[i]->variables->other[k]->value != "")
00818 {
00819 outStr << " value=\"";
00820 outStr << m_OSResult->optimization->solution[i]->variables->other[k]->value;
00821 outStr << "\"" ;
00822 }
00823 if (m_OSResult->optimization->solution[i]->variables->other[k]->description != "")
00824 {
00825 outStr << " description=\"";
00826 outStr << m_OSResult->optimization->solution[i]->variables->other[k]->description;
00827 outStr << "\"" ;
00828 }
00829 outStr << ">" << endl;
00830 if(m_OSResult->optimization->solution[i]->variables->other[k]->numberOfVar > 0)
00831 {
00832 for(j = 0; j < m_OSResult->optimization->solution[i]->variables->other[k]->numberOfVar; j++)
00833 {
00834 outStr << "<var";
00835 outStr << " idx=\"";
00836 outStr << m_OSResult->optimization->solution[i]->variables->other[k]->var[j]->idx ;
00837 outStr << "\">";
00838 outStr << m_OSResult->optimization->solution[i]->variables->other[k]->var[j]->value;
00839 outStr << "</var>" << endl;
00840 }
00841 }
00842 else if (m_OSResult->optimization->solution[i]->variables->other[k]->numberOfEnumerations > 0)
00843 {
00844 for(j = 0; j < m_OSResult->optimization->solution[i]->variables->other[k]->numberOfEnumerations; j++)
00845 {
00846 outStr << writeOtherOptionEnumeration(m_OSResult->optimization->solution[i]->variables->other[k]->enumeration[j],
00847 m_bWhiteSpace, m_bWriteBase64);
00848 }
00849 }
00850 outStr << "</other>" << endl;
00851 }
00852 }
00853 }
00854 outStr << "</variables>" << endl;
00855 }
00856 if(m_OSResult->optimization->solution[i]->objectives != NULL){
00857 outStr << "<objectives ";
00858 if (m_OSResult->optimization->solution[i]->objectives->numberOfOtherObjectiveResults > 0)
00859 outStr << "numberOfOtherObjectiveResults=\"" << m_OSResult->optimization->solution[i]->objectives->numberOfOtherObjectiveResults << "\"";
00860 outStr << ">" << endl;
00861 #ifdef DEBUG
00862 cout << "output <objectives> <values>" << endl;
00863 #endif
00864 if(m_OSResult->optimization->solution[i]->objectives->values != NULL){
00865 outStr << "<values numberOfObj=\"" << m_OSResult->optimization->solution[i]->objectives->values->numberOfObj << "\">" << endl;
00866 for(j = 0; j < m_OSResult->optimization->solution[i]->objectives->values->numberOfObj; j++){
00867 if(m_OSResult->optimization->solution[i]->objectives->values->obj[j] != NULL){
00868 outStr << "<obj";
00869 outStr << " idx=\"";
00870 outStr << m_OSResult->optimization->solution[i]->objectives->values->obj[j]->idx;
00871 outStr << "\">";
00872 outStr << os_dtoa_format( m_OSResult->optimization->solution[i]->objectives->values->obj[j]->value);
00873 outStr << "</obj>" << endl;
00874 }
00875 }
00876
00877 outStr << "</values>" << endl;
00878 }
00879
00880 if(m_OSResult->optimization->solution[i]->objectives->basisStatus != NULL){
00881 #ifdef DEBUG
00882 cout << "output <objectives> <basisStatus>" << endl;
00883 #endif
00884 outStr << "<basisStatus>" << endl;
00885 outStr << writeBasisStatus(m_OSResult->optimization->solution[i]->objectives->basisStatus, m_bWhiteSpace, m_bWriteBase64);
00886 outStr << "</basisStatus>" << endl;
00887 }
00888
00889 #ifdef DEBUG
00890 cout << "output <objectives> <other>" << endl;
00891 #endif
00892 if(m_OSResult->optimization->solution[i]->objectives->other != NULL){
00893 if(m_OSResult->optimization->solution[i]->objectives->numberOfOtherObjectiveResults > 0){
00894 for(int k = 0; k < m_OSResult->optimization->solution[i]->objectives->numberOfOtherObjectiveResults; k++)
00895 {
00896 outStr << "<other" ;
00897 if (m_OSResult->optimization->solution[i]->objectives->other[k]->numberOfObj > 0)
00898 {
00899 outStr << " numberOfObj=\"";
00900 outStr << m_OSResult->optimization->solution[i]->objectives->other[k]->numberOfObj;
00901 outStr << "\"" ;
00902 }
00903 else if(m_OSResult->optimization->solution[i]->objectives->other[k]->numberOfEnumerations > 0)
00904 {
00905 outStr << " numberOfEnumerations=\"";
00906 outStr << m_OSResult->optimization->solution[i]->objectives->other[k]->numberOfEnumerations;
00907 outStr << "\"" ;
00908 }
00909 if (m_OSResult->optimization->solution[i]->objectives->other[k]->name != "")
00910 {
00911 outStr << " name=\"";\
00912 outStr << m_OSResult->optimization->solution[i]->objectives->other[k]->name;
00913 outStr << "\"" ;
00914 };
00915 if (m_OSResult->optimization->solution[i]->objectives->other[k]->value != "")
00916 {
00917 outStr << " value=\"";\
00918 outStr << m_OSResult->optimization->solution[i]->objectives->other[k]->value;
00919 outStr << "\"" ;
00920 };
00921 if (m_OSResult->optimization->solution[i]->objectives->other[k]->description != "")
00922 {
00923 outStr << " description=\"";
00924 outStr << m_OSResult->optimization->solution[i]->objectives->other[k]->description;
00925 outStr << "\"" ;
00926 };
00927 outStr << ">" << endl;
00928 if(m_OSResult->optimization->solution[i]->objectives->other[k]->numberOfObj > 0)
00929 {
00930 for(j = 0; j < m_OSResult->optimization->solution[i]->objectives->other[k]->numberOfObj; j++)
00931 {
00932 outStr << "<obj";
00933 outStr << " idx=\"";
00934 outStr << m_OSResult->optimization->solution[i]->objectives->other[k]->obj[j]->idx;
00935 outStr << "\">";
00936 outStr << m_OSResult->optimization->solution[i]->objectives->other[k]->obj[j]->value;
00937 outStr << "</obj>" << endl;
00938 }
00939 }
00940 else if (m_OSResult->optimization->solution[i]->objectives->other[k]->numberOfEnumerations > 0)
00941 {
00942 for(j = 0; j < m_OSResult->optimization->solution[i]->objectives->other[k]->numberOfEnumerations; j++)
00943 {
00944 outStr << writeOtherOptionEnumeration(m_OSResult->optimization->solution[i]->objectives->other[k]->enumeration[j],
00945 m_bWhiteSpace, m_bWriteBase64);
00946 }
00947 }
00948 outStr << "</other>" << endl;
00949 }
00950 }
00951 }
00952 outStr << "</objectives>" << endl;
00953 }
00954 if(m_OSResult->optimization->solution[i]->constraints != NULL){
00955 outStr << "<constraints ";
00956 if (m_OSResult->optimization->solution[i]->constraints->numberOfOtherConstraintResults > 0)
00957 outStr << "numberOfOtherConstraintResults=\"" << m_OSResult->optimization->solution[i]->constraints->numberOfOtherConstraintResults << "\"";
00958 outStr << ">" << endl;
00959 #ifdef DEBUG
00960 cout << "output <constraints> <dualValues>" << endl;
00961 #endif
00962 if(m_OSResult->optimization->solution[i]->constraints->dualValues != NULL){
00963 outStr << "<dualValues numberOfCon=\"" << m_OSResult->optimization->solution[i]->constraints->dualValues->numberOfCon << "\">" << endl;
00964 for(j = 0; j < m_OSResult->optimization->solution[i]->constraints->dualValues->numberOfCon; j++){
00965 if(m_OSResult->optimization->solution[i]->constraints->dualValues->con[j] != NULL){
00966 outStr << "<con";
00967 outStr << " idx=\"";
00968 outStr << m_OSResult->optimization->solution[i]->constraints->dualValues->con[j]->idx;
00969 outStr << "\">";
00970 outStr << os_dtoa_format( m_OSResult->optimization->solution[i]->constraints->dualValues->con[j]->value);
00971 outStr << "</con>" << endl;
00972 }
00973 }
00974 outStr << "</dualValues>" << endl;
00975 }
00976
00977 if(m_OSResult->optimization->solution[i]->constraints->basisStatus != NULL){
00978 #ifdef DEBUG
00979 cout << "output <constraints> <basisStatus>" << endl;
00980 #endif
00981 outStr << "<basisStatus>" << endl;
00982 outStr << writeBasisStatus(m_OSResult->optimization->solution[i]->constraints->basisStatus, m_bWhiteSpace, m_bWriteBase64);
00983 outStr << "</basisStatus>" << endl;
00984 }
00985
00986 #ifdef DEBUG
00987 cout << "output <constraints> <other>" << endl;
00988 #endif
00989 if(m_OSResult->optimization->solution[i]->constraints->other != NULL){
00990 if(m_OSResult->optimization->solution[i]->constraints->numberOfOtherConstraintResults > 0){
00991 for(int k = 0; k < m_OSResult->optimization->solution[i]->constraints->numberOfOtherConstraintResults; k++){
00992 outStr << "<other" ;
00993 if (m_OSResult->optimization->solution[i]->constraints->other[k]->numberOfCon > 0)
00994 {
00995 outStr << " numberOfCon=\"";
00996 outStr << m_OSResult->optimization->solution[i]->constraints->other[k]->numberOfCon;
00997 outStr << "\"";
00998 }
00999 else if(m_OSResult->optimization->solution[i]->constraints->other[k]->numberOfEnumerations > 0)
01000 {
01001 outStr << " numberOfEnumerations=\"";
01002 outStr << m_OSResult->optimization->solution[i]->constraints->other[k]->numberOfEnumerations;
01003 outStr << "\"" ;
01004 }
01005 outStr << " name=\"";\
01006 outStr << m_OSResult->optimization->solution[i]->constraints->other[k]->name;
01007 outStr << "\"" ;
01008 if (m_OSResult->optimization->solution[i]->constraints->other[k]->value != "")
01009 {
01010 outStr << " value=\"";\
01011 outStr << m_OSResult->optimization->solution[i]->constraints->other[k]->value;
01012 outStr << "\"" ;
01013 };
01014 if (m_OSResult->optimization->solution[i]->constraints->other[k]->description != "")
01015 {
01016 outStr << " description=\"";
01017 outStr << m_OSResult->optimization->solution[i]->constraints->other[k]->description;
01018 outStr << "\"" ;
01019 };
01020 outStr << ">" << endl;
01021 if(m_OSResult->optimization->solution[i]->constraints->other[k]->numberOfCon > 0)
01022 {
01023 for(j = 0; j < m_OSResult->optimization->solution[i]->constraints->other[k]->numberOfCon; j++){
01024 outStr << "<con";
01025 outStr << " idx=\"";
01026 outStr << m_OSResult->optimization->solution[i]->constraints->other[k]->con[j]->idx;
01027 outStr << "\">";
01028 outStr << m_OSResult->optimization->solution[i]->constraints->other[k]->con[j]->value;
01029 outStr << "</con>" << endl;
01030 }
01031 }
01032 else if (m_OSResult->optimization->solution[i]->constraints->other[k]->numberOfEnumerations > 0)
01033 {
01034 for(j = 0; j < m_OSResult->optimization->solution[i]->constraints->other[k]->numberOfEnumerations; j++)
01035 {
01036 outStr << writeOtherOptionEnumeration(m_OSResult->optimization->solution[i]->constraints->other[k]->enumeration[j],
01037 m_bWhiteSpace, m_bWriteBase64);
01038 }
01039 }
01040 outStr << "</other>" << endl;
01041 }
01042 }
01043 }
01044 outStr << "</constraints>" << endl;
01045 }
01046
01047
01048 #ifdef DEBUG
01049 cout << "output <otherSolutionResults>" << endl;
01050 #endif
01051 if (m_OSResult->optimization->solution[i]->otherSolutionResults != NULL)
01052 {
01053 outStr << "<otherSolutionResults numberOfOtherSolutionResults=\"";
01054 outStr << m_OSResult->optimization->solution[i]->otherSolutionResults->numberOfOtherSolutionResults;
01055 outStr << "\">" << std::endl;
01056 for(int k = 0; k < m_OSResult->optimization->solution[i]->otherSolutionResults->numberOfOtherSolutionResults; k++)
01057 {
01058 outStr << "<otherSolutionResult";
01059 outStr << " name=\"";
01060 outStr << m_OSResult->optimization->solution[i]->otherSolutionResults->otherSolutionResult[k]->name;
01061 outStr << "\"";
01062 outStr << " numberOfItems=\"";
01063 outStr << m_OSResult->optimization->solution[i]->otherSolutionResults->otherSolutionResult[k]->numberOfItems;
01064 outStr << "\"";
01065 if (m_OSResult->optimization->solution[i]->otherSolutionResults->otherSolutionResult[k]->category != "")
01066 outStr << " category=\"" << m_OSResult->optimization->solution[i]->otherSolutionResults->otherSolutionResult[k]->category << "\"";
01067 if (m_OSResult->optimization->solution[i]->otherSolutionResults->otherSolutionResult[k]->description != "")
01068 outStr << " description=\"" << m_OSResult->optimization->solution[i]->otherSolutionResults->otherSolutionResult[k]->description << "\"";
01069 outStr << ">" << std::endl;
01070 for(int j = 0; j < m_OSResult->optimization->solution[i]->otherSolutionResults->otherSolutionResult[k]->numberOfItems; j++)
01071 outStr << "<item>" << m_OSResult->optimization->solution[i]->otherSolutionResults->otherSolutionResult[k]->item[j] << "</item>" << std::endl;
01072 outStr << "</otherSolutionResult>" << std::endl;
01073 }
01074 outStr << "</otherSolutionResults>" << std::endl;
01075 }
01076 outStr << "</solution>" << endl;
01077 }
01078 }
01079
01080
01081 #ifdef DEBUG
01082 cout << "output <otherSolverOutput>" << endl;
01083 #endif
01084 if (m_OSResult->optimization->otherSolverOutput != NULL)
01085
01086 {
01087 outStr << "<otherSolverOutput numberOfSolverOutputs=\"";
01088 outStr << m_OSResult->optimization->otherSolverOutput->numberOfSolverOutputs;
01089 outStr << "\">" << std::endl;
01090 for(int k = 0; k < m_OSResult->optimization->otherSolverOutput->numberOfSolverOutputs; k++){
01091 outStr << "<solverOutput";
01092 outStr << " name=\"";
01093 outStr << m_OSResult->optimization->otherSolverOutput->solverOutput[k]->name;
01094 outStr << "\"";
01095 outStr << " numberOfItems=\"";
01096 outStr << m_OSResult->optimization->otherSolverOutput->solverOutput[k]->numberOfItems;
01097 outStr << "\"";
01098 if (m_OSResult->optimization->otherSolverOutput->solverOutput[k]->category != "")
01099 outStr << " category=\"" << m_OSResult->optimization->otherSolverOutput->solverOutput[k]->category << "\"";
01100 if (m_OSResult->optimization->otherSolverOutput->solverOutput[k]->description != "")
01101 outStr << " description=\"" << m_OSResult->optimization->otherSolverOutput->solverOutput[k]->description << "\"";
01102 outStr << ">" << std::endl;
01103 for(int j = 0; j < m_OSResult->optimization->otherSolverOutput->solverOutput[k]->numberOfItems; j++){
01104 outStr << "<item>" << m_OSResult->optimization->otherSolverOutput->solverOutput[k]->item[j] << "</item>" << std::endl;
01105 }
01106 outStr << "</solverOutput>" << std::endl;
01107 }
01108 outStr << "</otherSolverOutput>" << std::endl;
01109 }
01110
01111 outStr << "</optimization>" << endl;
01112 }
01113 outStr << "</osrl>" << endl ;
01114 #ifdef DEBUG
01115 cout << "done" << endl;
01116 #endif
01117 return outStr.str();
01118 }
01119
01120