00001
00016
00017
00018 #include "OSoLWriter.h"
00019 #include "OSOption.h"
00020 #include "OSgLWriter.h"
00021 #include "OSGeneral.h"
00022 #include "OSStringUtil.h"
00023 #include "OSParameters.h"
00024 #include "OSConfig.h"
00025 #include "OSBase64.h"
00026 #include "OSMathUtil.h"
00027 #include <sstream>
00028 #include <iostream>
00029 #include <stdio.h>
00030
00031 using std::cout;
00032 using std::endl;
00033 using std::ostringstream;
00034
00035 OSoLWriter::OSoLWriter( )
00036 {
00037 m_bWriteBase64 = false;
00038 m_bWhiteSpace = false;
00039 }
00040
00041 OSoLWriter::~OSoLWriter()
00042 {
00043 }
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 std::string OSoLWriter::writeOSoL( OSOption *theosoption)
00057 {
00058 m_OSOption = theosoption;
00059 std::ostringstream outStr;
00060 #ifdef WIN_
00061 const char dirsep='\\';
00062 #else
00063 const char dirsep='/';
00064 #endif
00065
00066 std::string xsltDir;
00067 xsltDir = dirsep == '/' ? "../stylesheets/" : "..\\stylesheets\\";
00068
00069 xsltDir = "http://www.coin-or.org/OS/stylesheets/";
00070
00071 bool generalTagPrinted;
00072 #ifdef DEBUG
00073 cout << "in OSoLWriter" << endl;
00074 #endif
00075
00076 if(m_OSOption == NULL) return outStr.str();
00077 outStr << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" ;
00078 outStr << "<?xml-stylesheet type=\"text/xsl\" href=\"";
00079 outStr << xsltDir;
00080 outStr << "OSoL.xslt\"?>";
00081 outStr << endl;
00082 outStr << "<osol xmlns=\"os.optimizationservices.org\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
00083 outStr << "xsi:schemaLocation=\"os.optimizationservices.org http://www.optimizationservices.org/schemas/";
00084 outStr << OS_SCHEMA_VERSION;
00085 outStr << "/OSoL.xsd\" >" ;
00086 outStr << endl;
00087
00088 #ifdef DEBUG
00089 cout << "output <optionHeader>" << endl;
00090 #endif
00091 if(m_OSOption->optionHeader != NULL)
00092 {
00093 outStr << "<optionHeader>" << endl;
00094 outStr << writeGeneralFileHeader(m_OSOption->optionHeader, true);
00095 outStr << "</optionHeader>" << endl;
00096 }
00097
00098 #ifdef DEBUG
00099 cout << "output <general>" << endl;
00100 #endif
00101 if(m_OSOption->general != NULL)
00102 {
00103 generalTagPrinted = false;
00104 if (m_OSOption->general->serviceURI != "")
00105 {
00106 if (generalTagPrinted == false)
00107 {
00108 outStr << "<general>" << endl;
00109 generalTagPrinted = true;
00110 }
00111 outStr << "<serviceURI>" << m_OSOption->general->serviceURI << "</serviceURI>" << endl;
00112 }
00113 if (m_OSOption->general->serviceName != "")
00114 {
00115 if (generalTagPrinted == false)
00116 {
00117 outStr << "<general>" << endl;
00118 generalTagPrinted = true;
00119 }
00120 outStr << "<serviceName>" << m_OSOption->general->serviceName << "</serviceName>" << endl;
00121 }
00122 if (m_OSOption->general->instanceName != "")
00123 {
00124 if (generalTagPrinted == false)
00125 {
00126 outStr << "<general>" << endl;
00127 generalTagPrinted = true;
00128 }
00129 outStr << "<instanceName>" << m_OSOption->general->instanceName << "</instanceName>" << endl;
00130 }
00131 if (m_OSOption->general->instanceLocation != NULL)
00132 {
00133 if (generalTagPrinted == false)
00134 {
00135 outStr << "<general>" << endl;
00136 generalTagPrinted = true;
00137 }
00138 if (m_OSOption->general->instanceLocation->locationType == "")
00139 {
00140 outStr << "<instanceLocation>";
00141 }
00142 else
00143 {
00144 outStr << "<instanceLocation locationType=\"" << m_OSOption->general->instanceLocation->locationType << "\">";
00145 };
00146 outStr << m_OSOption->general->instanceLocation->value << "</instanceLocation>" << endl;
00147 }
00148 if (m_OSOption->general->jobID != "")
00149 {
00150 if (generalTagPrinted == false)
00151 {
00152 outStr << "<general>" << endl;
00153 generalTagPrinted = true;
00154 }
00155 outStr << "<jobID>" << m_OSOption->general->jobID << "</jobID>" << endl;
00156 }
00157 if (m_OSOption->general->solverToInvoke != "")
00158 {
00159 if (generalTagPrinted == false)
00160 {
00161 outStr << "<general>" << endl;
00162 generalTagPrinted = true;
00163 }
00164 outStr << "<solverToInvoke>" << m_OSOption->general->solverToInvoke << "</solverToInvoke>" << endl;
00165 }
00166 if (m_OSOption->general->license != "")
00167 {
00168 if (generalTagPrinted == false)
00169 {
00170 outStr << "<general>" << endl;
00171 generalTagPrinted = true;
00172 }
00173 outStr << "<license>" << m_OSOption->general->license << "</license>" << endl;
00174 }
00175 if (m_OSOption->general->userName != "")
00176 {
00177 if (generalTagPrinted == false)
00178 {
00179 outStr << "<general>" << endl;
00180 generalTagPrinted = true;
00181 }
00182 outStr << "<userName>" << m_OSOption->general->userName << "</userName>" << endl;
00183 }
00184 if (m_OSOption->general->password != "")
00185 {
00186 if (generalTagPrinted == false)
00187 {
00188 outStr << "<general>" << endl;
00189 generalTagPrinted = true;
00190 }
00191 outStr << "<password>" << m_OSOption->general->password << "</password>" << endl;
00192 }
00193 if (m_OSOption->general->contact != NULL)
00194 {
00195 if (generalTagPrinted == false)
00196 {
00197 outStr << "<general>" << endl;
00198 generalTagPrinted = true;
00199 }
00200 if (m_OSOption->general->contact->transportType == "")
00201 {
00202 outStr << "<contact>";
00203 }
00204 else
00205 {
00206 outStr << "<contact transportType=\"" << m_OSOption->general->contact->transportType << "\">";
00207 };
00208 outStr << m_OSOption->general->contact->value << "</contact>" << endl;
00209 }
00210 if (m_OSOption->general->otherOptions != NULL)
00211 {
00212 if (generalTagPrinted == false)
00213 {
00214 outStr << "<general>" << endl;
00215 generalTagPrinted = true;
00216 }
00217 outStr << "<otherOptions numberOfOtherOptions=\"";
00218 outStr << m_OSOption->general->otherOptions->numberOfOtherOptions << "\">" << endl;
00219 for (int i=0; i < m_OSOption->general->otherOptions->numberOfOtherOptions; i++)
00220 {
00221 outStr << "<other name=\"" << m_OSOption->general->otherOptions->other[i]->name << "\"";
00222 if (m_OSOption->general->otherOptions->other[i]->value != "")
00223 outStr << " value=\"" << m_OSOption->general->otherOptions->other[i]->value << "\"";
00224 if (m_OSOption->general->otherOptions->other[i]->description != "")
00225 outStr << " description=" << writeStringData(m_OSOption->general->otherOptions->other[i]->description);
00226 outStr << "/>" << endl;
00227 }
00228 outStr << "</otherOptions>" << endl;
00229 }
00230 if (generalTagPrinted == false)
00231 outStr << "<general>" << endl;
00232
00233 outStr << "</general>" << endl;
00234 #ifdef DEBUG
00235 cout << "Done with <general> element" << endl;
00236 #endif
00237 };
00238
00242 if(m_OSOption->system != NULL)
00243 {
00244 outStr << "<system>" << endl;
00245 if (m_OSOption->system->minDiskSpace != NULL)
00246 {
00247 outStr << "<minDiskSpace";
00248 if (m_OSOption->system->minDiskSpace->unit != "byte")
00249 outStr << " unit=\"" << m_OSOption->system->minDiskSpace->unit << "\"";
00250 if (m_OSOption->system->minDiskSpace->description != "")
00251 outStr << " description=" << writeStringData(m_OSOption->system->minDiskSpace->description);
00252 outStr << ">";
00253 if (!OSIsnan(m_OSOption->system->minDiskSpace->value))
00254 outStr << os_dtoa_format(m_OSOption->system->minDiskSpace->value);
00255 else
00256 outStr << "NaN";
00257 outStr << "</minDiskSpace>" << endl;
00258 }
00259 if (m_OSOption->system->minMemorySize != NULL)
00260 {
00261 outStr << "<minMemorySize";
00262 if (m_OSOption->system->minMemorySize->unit != "byte")
00263 outStr << " unit=\"" << m_OSOption->system->minMemorySize->unit << "\"";
00264 if (m_OSOption->system->minMemorySize->description != "")
00265 outStr << " description=" << writeStringData(m_OSOption->system->minMemorySize->description);
00266 outStr << ">";
00267 if (!OSIsnan(m_OSOption->system->minMemorySize->value))
00268 outStr << os_dtoa_format(m_OSOption->system->minMemorySize->value);
00269 else
00270 outStr << "NaN";
00271 outStr << "</minMemorySize>" << endl;
00272 }
00273 if (m_OSOption->system->minCPUSpeed != NULL)
00274 {
00275 outStr << "<minCPUSpeed";
00276 if (m_OSOption->system->minCPUSpeed->unit != "hertz")
00277 outStr << " unit=\"" << m_OSOption->system->minCPUSpeed->unit << "\"";
00278 if (m_OSOption->system->minCPUSpeed->description != "")
00279 outStr << " description=" << writeStringData(m_OSOption->system->minCPUSpeed->description);
00280 outStr << ">";
00281 if (!OSIsnan(m_OSOption->system->minCPUSpeed->value))
00282 outStr << os_dtoa_format(m_OSOption->system->minCPUSpeed->value);
00283 else
00284 outStr << "NaN";
00285 outStr << "</minCPUSpeed>" << endl;
00286 }
00287 if (m_OSOption->system->minCPUNumber != NULL)
00288 {
00289 outStr << "<minCPUNumber";
00290 if (m_OSOption->system->minCPUNumber->description != "")
00291 outStr << " description=" << writeStringData(m_OSOption->system->minCPUNumber->description);
00292 outStr << ">";
00293 outStr << m_OSOption->system->minCPUNumber->value << "</minCPUNumber>" << endl;
00294 };
00295 if (m_OSOption->system->otherOptions != NULL)
00296 {
00297 outStr << "<otherOptions numberOfOtherOptions=\"";
00298 outStr << m_OSOption->system->otherOptions->numberOfOtherOptions << "\">" << endl;
00299 for (int i=0; i < m_OSOption->system->otherOptions->numberOfOtherOptions; i++)
00300 {
00301 outStr << "<other name=\"" << m_OSOption->system->otherOptions->other[i]->name << "\"";
00302 if (m_OSOption->system->otherOptions->other[i]->value != "")
00303 outStr << " value=\"" << m_OSOption->system->otherOptions->other[i]->value << "\"";
00304 if (m_OSOption->system->otherOptions->other[i]->description != "")
00305 outStr << " description=" << writeStringData(m_OSOption->system->otherOptions->other[i]->description);
00306 outStr << "/>" << endl;
00307 }
00308 outStr << "</otherOptions>" << endl;
00309 }
00310 outStr << "</system>" << endl;
00311 #ifdef DEBUG
00312 cout << "Done with <system> element" << endl;
00313 #endif
00314 }
00315
00319 if(m_OSOption->service != NULL)
00320 {
00321 outStr << "<service>" << endl;
00322 if (m_OSOption->service->type != "")
00323 {
00324 outStr << "<type>" << m_OSOption->service->type << "</type>" << endl;
00325 }
00326 if (m_OSOption->service->otherOptions != NULL)
00327 {
00328 outStr << "<otherOptions numberOfOtherOptions=\"";
00329 outStr << m_OSOption->service->otherOptions->numberOfOtherOptions << "\">" << endl;
00330 for (int i=0; i < m_OSOption->service->otherOptions->numberOfOtherOptions; i++)
00331 {
00332 outStr << "<other name=\"" << m_OSOption->service->otherOptions->other[i]->name << "\"";
00333 if (m_OSOption->service->otherOptions->other[i]->value != "")
00334 outStr << " value=\"" << m_OSOption->service->otherOptions->other[i]->value << "\"";
00335 if (m_OSOption->service->otherOptions->other[i]->description != "")
00336 outStr << " description=" << writeStringData(m_OSOption->service->otherOptions->other[i]->description);
00337 outStr << "/>" << endl;
00338 }
00339 outStr << "</otherOptions>" << endl;
00340 }
00341 outStr << "</service>" << endl;
00342 #ifdef DEBUG
00343 cout << "Done with <service> element" << endl;
00344 #endif
00345 };
00346
00350 if(m_OSOption->job != NULL)
00351 {
00352 outStr << "<job>" << endl;
00353 if (m_OSOption->job->maxTime != NULL)
00354 {
00355 if (m_OSOption->job->maxTime->unit == "")
00356 m_OSOption->job->maxTime->unit = "second";
00357 outStr << "<maxTime unit=\"" << m_OSOption->job->maxTime->unit << "\">";
00358 if (!OSIsnan(m_OSOption->job->maxTime->value))
00359 outStr << os_dtoa_format(m_OSOption->job->maxTime->value);
00360 else
00361 outStr << "NaN";
00362 outStr << "</maxTime>" << endl;
00363 }
00364 if (m_OSOption->job->requestedStartTime != "")
00365 outStr << "<requestedStartTime>" << m_OSOption->job->requestedStartTime << "</requestedStartTime>" << endl;
00366 if (m_OSOption->job->dependencies != NULL)
00367 {
00368 outStr << "<dependencies numberOfJobIDs=\"";
00369 outStr << m_OSOption->job->dependencies->numberOfJobIDs << "\">" << endl;
00370 for (int i=0; i < m_OSOption->job->dependencies->numberOfJobIDs; i++)
00371 outStr << "<jobID>" << m_OSOption->job->dependencies->jobID[i] << "</jobID>" << endl;
00372 outStr << "</dependencies>" << endl;
00373 }
00374 if (m_OSOption->job->requiredDirectories != NULL)
00375 {
00376 outStr << "<requiredDirectories numberOfPaths=\"";
00377 outStr << m_OSOption->job->requiredDirectories->numberOfPaths << "\">" << endl;
00378 for (int i=0; i < m_OSOption->job->requiredDirectories->numberOfPaths; i++)
00379 outStr << "<path>" << m_OSOption->job->requiredDirectories->path[i] << "</path>" << endl;
00380 outStr << "</requiredDirectories>" << endl;
00381 }
00382 if (m_OSOption->job->requiredFiles != NULL)
00383 {
00384 outStr << "<requiredFiles numberOfPaths=\"";
00385 outStr << m_OSOption->job->requiredFiles->numberOfPaths << "\">" << endl;
00386 for (int i=0; i < m_OSOption->job->requiredFiles->numberOfPaths; i++)
00387 outStr << "<path>" << m_OSOption->job->requiredFiles->path[i] << "</path>" << endl;
00388 outStr << "</requiredFiles>" << endl;
00389 }
00390 if (m_OSOption->job->directoriesToMake != NULL)
00391 {
00392 outStr << "<directoriesToMake numberOfPaths=\"";
00393 outStr << m_OSOption->job->directoriesToMake->numberOfPaths << "\">" << endl;
00394 for (int i=0; i < m_OSOption->job->directoriesToMake->numberOfPaths; i++)
00395 outStr << "<path>" << m_OSOption->job->directoriesToMake->path[i] << "</path>" << endl;
00396 outStr << "</directoriesToMake>" << endl;
00397 }
00398 if (m_OSOption->job->filesToMake != NULL)
00399 {
00400 outStr << "<filesToMake numberOfPaths=\"";
00401 outStr << m_OSOption->job->filesToMake->numberOfPaths << "\">" << endl;
00402 for (int i=0; i < m_OSOption->job->filesToMake->numberOfPaths; i++)
00403 outStr << "<path>" << m_OSOption->job->filesToMake->path[i] << "</path>" << endl;
00404 outStr << "</filesToMake>" << endl;
00405 }
00406 if (m_OSOption->job->inputDirectoriesToMove != NULL)
00407 {
00408 outStr << "<inputDirectoriesToMove numberOfPathPairs=\"";
00409 outStr << m_OSOption->job->inputDirectoriesToMove->numberOfPathPairs << "\">" << endl;
00410 for (int i=0; i < m_OSOption->job->inputDirectoriesToMove->numberOfPathPairs; i++)
00411 {
00412 outStr << "<pathPair";
00413 outStr << " from=\"" << m_OSOption->job->inputDirectoriesToMove->pathPair[i]->from << "\"";
00414 outStr << " to=\"" << m_OSOption->job->inputDirectoriesToMove->pathPair[i]->to << "\"";
00415 if (m_OSOption->job->inputDirectoriesToMove->pathPair[i]->makeCopy)
00416 outStr << " makeCopy=\"true\"";
00417 outStr << "/>" << endl;
00418 }
00419 outStr << "</inputDirectoriesToMove>" << endl;
00420 }
00421 if (m_OSOption->job->inputFilesToMove != NULL)
00422 {
00423 outStr << "<inputFilesToMove numberOfPathPairs=\"";
00424 outStr << m_OSOption->job->inputFilesToMove->numberOfPathPairs << "\">" << endl;
00425 for (int i=0; i < m_OSOption->job->inputFilesToMove->numberOfPathPairs; i++)
00426 {
00427 outStr << "<pathPair";
00428 outStr << " from=\"" << m_OSOption->job->inputFilesToMove->pathPair[i]->from << "\"";
00429 outStr << " to=\"" << m_OSOption->job->inputFilesToMove->pathPair[i]->to << "\"";
00430 if (m_OSOption->job->inputFilesToMove->pathPair[i]->makeCopy)
00431 outStr << " makeCopy=\"true\"";
00432 outStr << "/>" << endl;
00433 }
00434 outStr << "</inputFilesToMove>" << endl;
00435 }
00436 if (m_OSOption->job->outputFilesToMove != NULL)
00437 {
00438 outStr << "<outputFilesToMove numberOfPathPairs=\"";
00439 outStr << m_OSOption->job->outputFilesToMove->numberOfPathPairs << "\">" << endl;
00440 for (int i=0; i < m_OSOption->job->outputFilesToMove->numberOfPathPairs; i++)
00441 {
00442 outStr << "<pathPair";
00443 outStr << " from=\"" << m_OSOption->job->outputFilesToMove->pathPair[i]->from << "\"";
00444 outStr << " to=\"" << m_OSOption->job->outputFilesToMove->pathPair[i]->to << "\"";
00445 if (m_OSOption->job->outputFilesToMove->pathPair[i]->makeCopy)
00446 outStr << " makeCopy=\"true\"";
00447 outStr << "/>" << endl;
00448 }
00449 outStr << "</outputFilesToMove>" << endl;
00450 }
00451 if (m_OSOption->job->outputDirectoriesToMove != NULL)
00452 {
00453 outStr << "<outputDirectoriesToMove numberOfPathPairs=\"";
00454 outStr << m_OSOption->job->outputDirectoriesToMove->numberOfPathPairs << "\">" << endl;
00455 for (int i=0; i < m_OSOption->job->outputDirectoriesToMove->numberOfPathPairs; i++)
00456 {
00457 outStr << "<pathPair";
00458 outStr << " from=\"" << m_OSOption->job->outputDirectoriesToMove->pathPair[i]->from << "\"";
00459 outStr << " to=\"" << m_OSOption->job->outputDirectoriesToMove->pathPair[i]->to << "\"";
00460 if (m_OSOption->job->outputDirectoriesToMove->pathPair[i]->makeCopy)
00461 outStr << " makeCopy=\"true\"";
00462 outStr << "/>" << endl;
00463 }
00464 outStr << "</outputDirectoriesToMove>" << endl;
00465 }
00466 if (m_OSOption->job->filesToDelete != NULL)
00467 {
00468 outStr << "<filesToDelete numberOfPaths=\"";
00469 outStr << m_OSOption->job->filesToDelete->numberOfPaths << "\">" << endl;
00470 for (int i=0; i < m_OSOption->job->filesToDelete->numberOfPaths; i++)
00471 outStr << "<path>" << m_OSOption->job->filesToDelete->path[i] << "</path>" << endl;
00472 outStr << "</filesToDelete>" << endl;
00473 }
00474 if (m_OSOption->job->directoriesToDelete != NULL)
00475 {
00476 outStr << "<directoriesToDelete numberOfPaths=\"";
00477 outStr << m_OSOption->job->directoriesToDelete->numberOfPaths << "\">" << endl;
00478 for (int i=0; i < m_OSOption->job->directoriesToDelete->numberOfPaths; i++)
00479 outStr << "<path>" << m_OSOption->job->directoriesToDelete->path[i] << "</path>" << endl;
00480 outStr << "</directoriesToDelete>" << endl;
00481 }
00482 if (m_OSOption->job->processesToKill != NULL)
00483 {
00484 outStr << "<processesToKill numberOfProcesses=\"";
00485 outStr << m_OSOption->job->processesToKill->numberOfProcesses << "\">" << endl;
00486 for (int i=0; i < m_OSOption->job->processesToKill->numberOfProcesses; i++)
00487 outStr << "<process>" << m_OSOption->job->processesToKill->process[i] << "</process>" << endl;
00488 outStr << "</processesToKill>" << endl;
00489 }
00490 if (m_OSOption->job->otherOptions != NULL)
00491 {
00492 outStr << "<otherOptions numberOfOtherOptions=\"";
00493 outStr << m_OSOption->job->otherOptions->numberOfOtherOptions << "\">" << endl;
00494 for (int i=0; i < m_OSOption->job->otherOptions->numberOfOtherOptions; i++)
00495 {
00496 outStr << "<other name=\"" << m_OSOption->job->otherOptions->other[i]->name << "\"";
00497 if (m_OSOption->job->otherOptions->other[i]->value != "")
00498 outStr << " value=\"" << m_OSOption->job->otherOptions->other[i]->value << "\"";
00499 if (m_OSOption->job->otherOptions->other[i]->description != "")
00500 outStr << " description=" << writeStringData(m_OSOption->job->otherOptions->other[i]->description);
00501 outStr << "/>" << endl;
00502 }
00503 outStr << "</otherOptions>" << endl;
00504 }
00505 outStr << "</job>" << endl;
00506 #ifdef DEBUG
00507 cout << "Done with <job> element" << endl;
00508 #endif
00509 };
00510
00514 if (m_OSOption->optimization != NULL)
00515 {
00516 outStr << "<optimization";
00517 if (m_OSOption->optimization->numberOfVariables >= 0)
00518 outStr << " numberOfVariables=\"" << m_OSOption->optimization->numberOfVariables << "\" ";
00519 if (m_OSOption->optimization->numberOfObjectives >= 0)
00520 outStr << " numberOfObjectives=\"" << m_OSOption->optimization->numberOfObjectives << "\" ";
00521 if (m_OSOption->optimization->numberOfConstraints >= 0)
00522 outStr << " numberOfConstraints=\"" << m_OSOption->optimization->numberOfConstraints << "\" ";
00523 outStr << ">" << endl;
00524 if (m_OSOption->optimization->variables != NULL)
00525 {
00526 outStr << "<variables";
00527 if (m_OSOption->optimization->variables->numberOfOtherVariableOptions > 0)
00528 outStr << " numberOfOtherVariableOptions=\"" << m_OSOption->optimization->variables->numberOfOtherVariableOptions << "\"";
00529 outStr << ">" << endl;
00530 #ifdef DEBUG
00531 cout << "initialVariableValues: " << (m_OSOption->optimization->variables->initialVariableValues != NULL) << endl;
00532 #endif
00533 if (m_OSOption->optimization->variables->initialVariableValues != NULL)
00534 {
00535 outStr << "<initialVariableValues numberOfVar=\"";
00536 outStr << m_OSOption->optimization->variables->initialVariableValues->numberOfVar << "\">" << endl;
00537 for (int i=0; i < m_OSOption->optimization->variables->initialVariableValues->numberOfVar; i++)
00538 {
00539 outStr << "<var";
00540 outStr << " idx=\"" << m_OSOption->optimization->variables->initialVariableValues->var[i]->idx << "\"";
00541 if (m_OSOption->optimization->variables->initialVariableValues->var[i]->name != "")
00542 outStr << " name=" << writeStringData(m_OSOption->optimization->variables->initialVariableValues->var[i]->name);
00543 if (!OSIsnan(m_OSOption->optimization->variables->initialVariableValues->var[i]->value))
00544 {
00545 outStr << " value=\"";
00546 outStr << os_dtoa_format(m_OSOption->optimization->variables->initialVariableValues->var[i]->value);
00547 outStr << "\"";
00548 }
00549 outStr << "/>" << endl;
00550 }
00551 outStr << "</initialVariableValues>" << endl;
00552 }
00553 #ifdef DEBUG
00554 cout << "initialVariableValuesString: " << (m_OSOption->optimization->variables->initialVariableValuesString != NULL) << endl;
00555 #endif
00556 if (m_OSOption->optimization->variables->initialVariableValuesString != NULL)
00557 {
00558 outStr << "<initialVariableValuesString numberOfVar=\"";
00559 outStr << m_OSOption->optimization->variables->initialVariableValuesString->numberOfVar << "\">" << endl;
00560 for (int i=0; i < m_OSOption->optimization->variables->initialVariableValuesString->numberOfVar; i++)
00561 {
00562 outStr << "<var";
00563 outStr << " idx=\"" << m_OSOption->optimization->variables->initialVariableValuesString->var[i]->idx << "\"";
00564 if (m_OSOption->optimization->variables->initialVariableValuesString->var[i]->name != "")
00565 outStr << " name=" << writeStringData(m_OSOption->optimization->variables->initialVariableValuesString->var[i]->name);
00566 outStr << " value=\"" << m_OSOption->optimization->variables->initialVariableValuesString->var[i]->value << "\"";
00567 outStr << "/>" << endl;
00568 }
00569 outStr << "</initialVariableValuesString>" << endl;
00570 }
00571
00572 if (m_OSOption->optimization->variables->initialBasisStatus != NULL)
00573 {
00574 #ifdef DEBUG
00575 cout << "output <variables> <basisStatus>" << endl;
00576 #endif
00577 outStr << "<initialBasisStatus>" << endl;
00578 outStr << writeBasisStatus(m_OSOption->optimization->variables->initialBasisStatus, m_bWhiteSpace, m_bWriteBase64);
00579 outStr << "</initialBasisStatus>" << endl;
00580 }
00581
00582 #ifdef DEBUG
00583 cout << "integerVariableBranchingWeights: " << (m_OSOption->optimization->variables->integerVariableBranchingWeights != NULL) << endl;
00584 #endif
00585 if (m_OSOption->optimization->variables->integerVariableBranchingWeights != NULL)
00586 {
00587 outStr << "<integerVariableBranchingWeights numberOfVar=\"";
00588 outStr << m_OSOption->optimization->variables->integerVariableBranchingWeights->numberOfVar << "\">" << endl;
00589 for (int i=0; i < m_OSOption->optimization->variables->integerVariableBranchingWeights->numberOfVar; i++)
00590 {
00591 outStr << "<var";
00592 outStr << " idx=\"" << m_OSOption->optimization->variables->integerVariableBranchingWeights->var[i]->idx << "\"";
00593 if (m_OSOption->optimization->variables->integerVariableBranchingWeights->var[i]->name != "")
00594 outStr << " name=" << writeStringData(m_OSOption->optimization->variables->integerVariableBranchingWeights->var[i]->name);
00595 if (!OSIsnan(m_OSOption->optimization->variables->integerVariableBranchingWeights->var[i]->value))
00596 {
00597 outStr << " value=\"";
00598 outStr << os_dtoa_format(m_OSOption->optimization->variables->integerVariableBranchingWeights->var[i]->value);
00599 outStr << "\"";
00600 }
00601 outStr << "/>" << endl;
00602 }
00603 outStr << "</integerVariableBranchingWeights>" << endl;
00604 }
00605 #ifdef DEBUG
00606 cout << "sosVariableBranchingWeights: " << (m_OSOption->optimization->variables->sosVariableBranchingWeights != NULL) << endl;
00607 #endif
00608 if (m_OSOption->optimization->variables->sosVariableBranchingWeights != NULL)
00609 {
00610 outStr << "<sosVariableBranchingWeights numberOfSOS=\"";
00611 #ifdef DEBUG
00612 cout << "start: numberOfSOS" << endl;
00613 #endif
00614 outStr << m_OSOption->optimization->variables->sosVariableBranchingWeights->numberOfSOS << "\">" << endl;
00615 for (int i=0; i < m_OSOption->optimization->variables->sosVariableBranchingWeights->numberOfSOS; i++)
00616 {
00617 outStr << "<sos";
00618 #ifdef DEBUG
00619 cout << "sosIdx - nvar: " << m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->numberOfVar << endl;
00620 #endif
00621 outStr << " sosIdx=\"" << m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->sosIdx << "\"";
00622 outStr << " numberOfVar=\"" << m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->numberOfVar << "\"";
00623 if (!OSIsnan(m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->groupWeight))
00624 {
00625 outStr << " groupWeight=\"";
00626 outStr << os_dtoa_format(m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->groupWeight);
00627 outStr << "\">" << endl;
00628 }
00629 for (int j=0; j < m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->numberOfVar; j++)
00630 {
00631 outStr << "<var";
00632 #ifdef DEBUG
00633 cout << "idx" << endl;
00634 #endif
00635 outStr << " idx=\"" << m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->var[j]->idx << "\"";
00636 if (m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->var[j]->name != "")
00637 outStr << " name=" << writeStringData(m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->var[j]->name);
00638 if (!OSIsnan(m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->var[j]->value))
00639 {
00640 outStr << " value=\"";
00641 outStr << os_dtoa_format(m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->var[j]->value);
00642 outStr << "\"";
00643 }
00644 outStr << "/>" << endl;
00645 }
00646 outStr << "</sos>" << endl;
00647 }
00648 outStr << "</sosVariableBranchingWeights>" << endl;
00649 }
00650 #ifdef DEBUG
00651 printf("\n%s%d\n","Number of other variable options: ",m_OSOption->optimization->variables->numberOfOtherVariableOptions);
00652 #endif
00653
00654 for (int i=0; i < m_OSOption->optimization->variables->numberOfOtherVariableOptions; i++)
00655 {
00656 outStr << "<other name=\"" << m_OSOption->optimization->variables->other[i]->name << "\"";
00657
00658 outStr << " numberOfVar=\"" << m_OSOption->optimization->variables->other[i]->numberOfVar << "\"";
00659
00660 outStr << " numberOfEnumerations=\"" << m_OSOption->optimization->variables->other[i]->numberOfEnumerations << "\"";
00661 if (m_OSOption->optimization->variables->other[i]->value != "")
00662 outStr << " value=\"" << m_OSOption->optimization->variables->other[i]->value << "\"";
00663 if (m_OSOption->optimization->variables->other[i]->solver != "")
00664 outStr << " solver=\"" << m_OSOption->optimization->variables->other[i]->solver << "\"";
00665 if (m_OSOption->optimization->variables->other[i]->category != "")
00666 outStr << " category=\"" << m_OSOption->optimization->variables->other[i]->category << "\"";
00667 if (m_OSOption->optimization->variables->other[i]->type != "")
00668 outStr << " type=\"" << m_OSOption->optimization->variables->other[i]->type << "\"";
00669 if (m_OSOption->optimization->variables->other[i]->description != "")
00670 outStr << " description=" << writeStringData(m_OSOption->optimization->variables->other[i]->description);
00671 outStr << ">" << endl;
00672
00673 for (int j=0; j < m_OSOption->optimization->variables->other[i]->numberOfVar; j++)
00674 {
00675 outStr << "<var idx=\"" << m_OSOption->optimization->variables->other[i]->var[j]->idx << "\"";
00676 if (m_OSOption->optimization->variables->other[i]->var[j]->name != "")
00677 outStr << " name=" << writeStringData(m_OSOption->optimization->variables->other[i]->var[j]->name);
00678 if (m_OSOption->optimization->variables->other[i]->var[j]->value != "")
00679 outStr << " value=\"" << m_OSOption->optimization->variables->other[i]->var[j]->value << "\"";
00680 if (m_OSOption->optimization->variables->other[i]->var[j]->lbValue != "")
00681 outStr << " lbValue=\"" << m_OSOption->optimization->variables->other[i]->var[j]->lbValue << "\"";
00682 if (m_OSOption->optimization->variables->other[i]->var[j]->ubValue != "")
00683 outStr << " ubValue=\"" << m_OSOption->optimization->variables->other[i]->var[j]->ubValue << "\"";
00684 outStr << "/>" << endl;
00685 }
00686
00687 {
00688
00689 for (int j=0; j < m_OSOption->optimization->variables->other[i]->numberOfEnumerations; j++)
00690 outStr << writeOtherOptionEnumeration(m_OSOption->optimization->variables->other[i]->enumeration[j], m_bWhiteSpace, m_bWriteBase64);
00691 }
00692 outStr << "</other>" << endl;
00693 }
00694 outStr << "</variables>" << endl;
00695 }
00696 if (m_OSOption->optimization->objectives != NULL)
00697 {
00698 outStr << "<objectives";
00699
00700 outStr << " numberOfOtherObjectiveOptions=\"" << m_OSOption->optimization->objectives->numberOfOtherObjectiveOptions << "\"";
00701 outStr << ">" << endl;
00702 if (m_OSOption->optimization->objectives->initialObjectiveValues != NULL)
00703 {
00704 outStr << "<initialObjectiveValues numberOfObj=\"";
00705 outStr << m_OSOption->optimization->objectives->initialObjectiveValues->numberOfObj << "\">" << endl;
00706 for (int i=0; i < m_OSOption->optimization->objectives->initialObjectiveValues->numberOfObj; i++)
00707 {
00708 outStr << "<obj";
00709 outStr << " idx=\"" << m_OSOption->optimization->objectives->initialObjectiveValues->obj[i]->idx << "\"";
00710 if (m_OSOption->optimization->objectives->initialObjectiveValues->obj[i]->name != "")
00711 outStr << " name=" << writeStringData(m_OSOption->optimization->objectives->initialObjectiveValues->obj[i]->name);
00712 if (!OSIsnan(m_OSOption->optimization->objectives->initialObjectiveValues->obj[i]->value))
00713 {
00714 outStr << " value=\"";
00715 outStr << os_dtoa_format(m_OSOption->optimization->objectives->initialObjectiveValues->obj[i]->value);
00716 outStr << "\"";
00717 }
00718 outStr << "/>" << endl;
00719 }
00720 outStr << "</initialObjectiveValues>" << endl;
00721 }
00722 if (m_OSOption->optimization->objectives->initialObjectiveBounds != NULL)
00723 {
00724 outStr << "<initialObjectiveBounds numberOfObj=\"";
00725 outStr << m_OSOption->optimization->objectives->initialObjectiveBounds->numberOfObj << "\">" << endl;
00726 for (int i=0; i < m_OSOption->optimization->objectives->initialObjectiveBounds->numberOfObj; i++)
00727 {
00728 outStr << "<obj";
00729 outStr << " idx=\"" << m_OSOption->optimization->objectives->initialObjectiveBounds->obj[i]->idx << "\"";
00730 if (m_OSOption->optimization->objectives->initialObjectiveBounds->obj[i]->name != "")
00731 outStr << " name=" << writeStringData(m_OSOption->optimization->objectives->initialObjectiveBounds->obj[i]->name);
00732 if (!OSIsnan(m_OSOption->optimization->objectives->initialObjectiveBounds->obj[i]->lbValue))
00733 {
00734 outStr << " lbValue=\"";
00735 outStr << os_dtoa_format(m_OSOption->optimization->objectives->initialObjectiveBounds->obj[i]->lbValue);
00736 outStr << "\"";
00737 }
00738 if (!OSIsnan(m_OSOption->optimization->objectives->initialObjectiveBounds->obj[i]->ubValue))
00739 {
00740 outStr << " ubValue=\"";
00741 outStr << os_dtoa_format(m_OSOption->optimization->objectives->initialObjectiveBounds->obj[i]->ubValue);
00742 outStr << "\"";
00743 }
00744 outStr << "/>" << endl;
00745 }
00746 outStr << "</initialObjectiveBounds>" << endl;
00747 }
00748
00749 if (m_OSOption->optimization->objectives->initialBasisStatus != NULL)
00750 {
00751 #ifdef DEBUG
00752 cout << "output <objectives> <basisStatus>" << endl;
00753 #endif
00754 outStr << "<initialBasisStatus>" << endl;
00755 outStr << writeBasisStatus(m_OSOption->optimization->objectives->initialBasisStatus, m_bWhiteSpace, m_bWriteBase64);
00756 outStr << "</initialBasisStatus>" << endl;
00757 }
00758
00759 #ifdef DEBUG
00760 printf("\n%s%d\n","Number of other objective options: ",m_OSOption->optimization->objectives->numberOfOtherObjectiveOptions);
00761 #endif
00762
00763 for (int i=0; i < m_OSOption->optimization->objectives->numberOfOtherObjectiveOptions; i++)
00764 {
00765 outStr << "<other name=\"" << m_OSOption->optimization->objectives->other[i]->name << "\"";
00766
00767 outStr << " numberOfObj=\"" << m_OSOption->optimization->objectives->other[i]->numberOfObj << "\"";
00768
00769 outStr << " numberOfEnumerations=\"" << m_OSOption->optimization->objectives->other[i]->numberOfEnumerations << "\"";
00770 if (m_OSOption->optimization->objectives->other[i]->value != "")
00771 outStr << " value=\"" << m_OSOption->optimization->objectives->other[i]->value << "\"";
00772 if (m_OSOption->optimization->objectives->other[i]->solver != "")
00773 outStr << " solver=\"" << m_OSOption->optimization->objectives->other[i]->solver << "\"";
00774 if (m_OSOption->optimization->objectives->other[i]->category != "")
00775 outStr << " category=\"" << m_OSOption->optimization->objectives->other[i]->category << "\"";
00776 if (m_OSOption->optimization->objectives->other[i]->type != "")
00777 outStr << " type=\"" << m_OSOption->optimization->objectives->other[i]->type << "\"";
00778 if (m_OSOption->optimization->objectives->other[i]->description != "")
00779 outStr << " description=" << writeStringData(m_OSOption->optimization->objectives->other[i]->description);
00780 outStr << ">" << endl;
00781
00782 for (int j=0; j < m_OSOption->optimization->objectives->other[i]->numberOfObj; j++)
00783 {
00784 outStr << "<obj idx=\"" << m_OSOption->optimization->objectives->other[i]->obj[j]->idx << "\"";
00785 if (m_OSOption->optimization->objectives->other[i]->obj[j]->name != "")
00786 outStr << " name=" << writeStringData(m_OSOption->optimization->objectives->other[i]->obj[j]->name);
00787 if (m_OSOption->optimization->objectives->other[i]->obj[j]->value != "")
00788 outStr << " value=\"" << m_OSOption->optimization->objectives->other[i]->obj[j]->value << "\"";
00789 outStr << "/>" << endl;
00790 }
00791
00792 for (int j=0; j < m_OSOption->optimization->objectives->other[i]->numberOfEnumerations; j++)
00793 outStr << writeOtherOptionEnumeration(m_OSOption->optimization->objectives->other[i]->enumeration[j], m_bWhiteSpace, m_bWriteBase64);
00794
00795 outStr << "</other>" << endl;
00796 }
00797 outStr << "</objectives>" << endl;
00798 }
00799 #ifdef DEBUG
00800 cout << "Done with <objectives> element" << endl;
00801 #endif
00802 if (m_OSOption->optimization->constraints != NULL)
00803 {
00804 outStr << "<constraints";
00805
00806 outStr << " numberOfOtherConstraintOptions=\"" << m_OSOption->optimization->constraints->numberOfOtherConstraintOptions << "\"";
00807 outStr << ">" << endl;
00808 if (m_OSOption->optimization->constraints->initialConstraintValues != NULL)
00809 {
00810 outStr << "<initialConstraintValues numberOfCon=\"";
00811 outStr << m_OSOption->optimization->constraints->initialConstraintValues->numberOfCon << "\">" << endl;
00812 for (int i=0; i < m_OSOption->optimization->constraints->initialConstraintValues->numberOfCon; i++)
00813 {
00814 outStr << "<con";
00815 outStr << " idx=\"" << m_OSOption->optimization->constraints->initialConstraintValues->con[i]->idx << "\"";
00816 if (m_OSOption->optimization->constraints->initialConstraintValues->con[i]->name != "")
00817 outStr << " name=" << writeStringData(m_OSOption->optimization->constraints->initialConstraintValues->con[i]->name);
00818 if (!OSIsnan(m_OSOption->optimization->constraints->initialConstraintValues->con[i]->value))
00819 {
00820 outStr << " value=\"";
00821 outStr << os_dtoa_format(m_OSOption->optimization->constraints->initialConstraintValues->con[i]->value);
00822 outStr << "\"";
00823 }
00824 outStr << "/>" << endl;
00825 }
00826 outStr << "</initialConstraintValues>" << endl;
00827 }
00828
00829 if (m_OSOption->optimization->constraints->initialDualValues != NULL)
00830 {
00831 outStr << "<initialDualValues numberOfCon=\"";
00832 outStr << m_OSOption->optimization->constraints->initialDualValues->numberOfCon << "\">" << endl;
00833 for (int i=0; i < m_OSOption->optimization->constraints->initialDualValues->numberOfCon; i++)
00834 {
00835 outStr << "<con";
00836 outStr << " idx=\"" << m_OSOption->optimization->constraints->initialDualValues->con[i]->idx << "\"";
00837 if (m_OSOption->optimization->constraints->initialDualValues->con[i]->name != "")
00838 outStr << " name=" << writeStringData(m_OSOption->optimization->constraints->initialDualValues->con[i]->name);
00839 if (!OSIsnan(m_OSOption->optimization->constraints->initialDualValues->con[i]->lbDualValue))
00840 {
00841 outStr << " lbDualValue=\"";
00842 outStr << os_dtoa_format(m_OSOption->optimization->constraints->initialDualValues->con[i]->lbDualValue);
00843 outStr << "\"";
00844 }
00845 if (!OSIsnan(m_OSOption->optimization->constraints->initialDualValues->con[i]->ubDualValue))
00846 {
00847 outStr << " ubDualValue=\"";
00848 outStr << os_dtoa_format(m_OSOption->optimization->constraints->initialDualValues->con[i]->ubDualValue);
00849 outStr << "\"";
00850 }
00851 outStr << "/>" << endl;
00852 }
00853 outStr << "</initialDualValues>" << endl;
00854 }
00855
00856 if (m_OSOption->optimization->constraints->initialBasisStatus != NULL)
00857 {
00858 #ifdef DEBUG
00859 cout << "output <constraints> <basisStatus>" << endl;
00860 #endif
00861 outStr << "<initialBasisStatus>" << endl;
00862 outStr << writeBasisStatus(m_OSOption->optimization->constraints->initialBasisStatus, m_bWhiteSpace, m_bWriteBase64);
00863 outStr << "</initialBasisStatus>" << endl;
00864 }
00865
00866 #ifdef DEBUG
00867 printf("\n%s%d\n","Number of other constraint options: ",m_OSOption->optimization->constraints->numberOfOtherConstraintOptions);
00868 #endif
00869
00870 for (int i=0; i < m_OSOption->optimization->constraints->numberOfOtherConstraintOptions; i++)
00871 {
00872 outStr << "<other name=\"" << m_OSOption->optimization->constraints->other[i]->name << "\"";
00873
00874
00875 outStr << " numberOfCon=\"" << m_OSOption->optimization->constraints->other[i]->numberOfCon << "\"";
00876
00877 outStr << " numberOfEnumerations=\"" << m_OSOption->optimization->constraints->other[i]->numberOfEnumerations << "\"";
00878 if (m_OSOption->optimization->constraints->other[i]->value != "")
00879 outStr << " value=\"" << m_OSOption->optimization->constraints->other[i]->value << "\"";
00880 if (m_OSOption->optimization->constraints->other[i]->solver != "")
00881 outStr << " solver=\"" << m_OSOption->optimization->constraints->other[i]->solver << "\"";
00882 if (m_OSOption->optimization->constraints->other[i]->category != "")
00883 outStr << " category=\"" << m_OSOption->optimization->constraints->other[i]->category << "\"";
00884 if (m_OSOption->optimization->constraints->other[i]->type != "")
00885 outStr << " type=\"" << m_OSOption->optimization->constraints->other[i]->type << "\"";
00886 if (m_OSOption->optimization->constraints->other[i]->description != "")
00887 outStr << " description=" << writeStringData(m_OSOption->optimization->constraints->other[i]->description);
00888 outStr << ">" << endl;
00889
00890 for (int j=0; j < m_OSOption->optimization->constraints->other[i]->numberOfCon; j++)
00891 {
00892 outStr << "<con idx=\"" << m_OSOption->optimization->constraints->other[i]->con[j]->idx << "\"";
00893 if (m_OSOption->optimization->constraints->other[i]->con[j]->name != "")
00894 outStr << " name=" << writeStringData(m_OSOption->optimization->constraints->other[i]->con[j]->name);
00895 if (m_OSOption->optimization->constraints->other[i]->con[j]->value != "")
00896 outStr << " value=\"" << m_OSOption->optimization->constraints->other[i]->con[j]->value << "\"";
00897 if (m_OSOption->optimization->constraints->other[i]->con[j]->lbValue != "")
00898 outStr << " lbValue=\"" << m_OSOption->optimization->constraints->other[i]->con[j]->lbValue << "\"";
00899 if (m_OSOption->optimization->constraints->other[i]->con[j]->ubValue != "")
00900 outStr << " ubValue=\"" << m_OSOption->optimization->constraints->other[i]->con[j]->ubValue << "\"";
00901 outStr << "/>" << endl;
00902 }
00903
00904 for (int j=0; j < m_OSOption->optimization->constraints->other[i]->numberOfEnumerations; j++)
00905 outStr << writeOtherOptionEnumeration(m_OSOption->optimization->constraints->other[i]->enumeration[j], m_bWhiteSpace, m_bWriteBase64);
00906
00907 outStr << "</other>" << endl;
00908 }
00909 outStr << "</constraints>" << endl;
00910 }
00911 #ifdef DEBUG
00912 cout << "Done with <constraint> element" << endl;
00913 #endif
00914 if (m_OSOption->optimization->solverOptions != NULL)
00915 {
00916
00917 {
00918 outStr << "<solverOptions numberOfSolverOptions=\"";
00919 outStr << m_OSOption->optimization->solverOptions->numberOfSolverOptions << "\">" << endl;
00920 for (int i=0; i < m_OSOption->optimization->solverOptions->numberOfSolverOptions; i++)
00921 {
00922 outStr << "<solverOption name=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->name << "\"";
00923 if (m_OSOption->optimization->solverOptions->solverOption[i]->value != "")
00924 outStr << " value=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->value << "\"";
00925 if (m_OSOption->optimization->solverOptions->solverOption[i]->solver != "")
00926 outStr << " solver=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->solver << "\"";
00927 if (m_OSOption->optimization->solverOptions->solverOption[i]->category != "")
00928 outStr << " category=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->category << "\"";
00929 if (m_OSOption->optimization->solverOptions->solverOption[i]->type != "")
00930 outStr << " type=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->type << "\"";
00931 if (m_OSOption->optimization->solverOptions->solverOption[i]->description != "")
00932 outStr << " description=" << writeStringData(m_OSOption->optimization->solverOptions->solverOption[i]->description);
00933 if (m_OSOption->optimization->solverOptions->solverOption[i]->numberOfItems == 0)
00934 outStr << "/>" << endl;
00935 else
00936 {
00937 outStr << " numberOfItems=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->numberOfItems << "\">";
00938 for (int k=0; k<m_OSOption->optimization->solverOptions->solverOption[i]->numberOfItems; k++)
00939 outStr << "<item>" << m_OSOption->optimization->solverOptions->solverOption[i]->item[k] << "</item>" << endl;
00940 outStr << "</solverOption>" << endl;
00941 }
00942 }
00943 outStr << "</solverOptions>" << endl;
00944 }
00945 }
00946 outStr << "</optimization>" << endl;
00947 };
00948 outStr << "</osol>" << endl;
00949 #ifdef DEBUG
00950 cout << "Done with <optimization> element" << endl;
00951 #endif
00952 return outStr.str();
00953 }
00954
00955
00956