My Project
OSoLWriter.cpp
Go to the documentation of this file.
1 /* $Id$ */
17 #include "OSoLWriter.h"
18 #include "OSOption.h"
19 #include "OSgLWriter.h"
20 #include "OSGeneral.h"
21 #include "OSStringUtil.h"
22 #include "OSParameters.h"
23 #include "OSConfig.h"
24 #include "OSBase64.h"
25 #include "OSMathUtil.h"
26 #include "OSOutput.h"
27 #include <sstream>
28 #include <iostream>
29 #include <stdio.h>
30 
31 using std::endl;
32 using std::ostringstream;
33 
35 {
36  m_bWriteBase64 = false;
37  m_bWhiteSpace = false;
38 }
39 
41 {
42 }
43 
44 
45 std::string OSoLWriter::writeOSoL( OSOption *theosoption)
46 {
47  m_OSOption = theosoption;
48  std::ostringstream osolStr, outStr;
49 #ifdef WIN_
50  const char dirsep='\\';
51 #else
52  const char dirsep='/';
53 #endif
54  // Set directory containing stylesheet files.
55  std::string xsltDir;
56  xsltDir = dirsep == '/' ? "../stylesheets/" : "..\\stylesheets\\";
57  // always go with '/' -- it is a hypertext reference
58  xsltDir = "http://www.coin-or.org/OS/stylesheets/";
59 
60  bool generalTagPrinted;
61 #ifndef NDEBUG
63 #endif
64 
65  if(m_OSOption == NULL) return osolStr.str();
66  osolStr << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" ;
67  osolStr << "<?xml-stylesheet type=\"text/xsl\" href=\"";
68  osolStr << xsltDir;
69  osolStr << "OSoL.xslt\"?>";
70  osolStr << endl;
71  osolStr << "<osol xmlns=\"os.optimizationservices.org\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
72  osolStr << "xsi:schemaLocation=\"os.optimizationservices.org http://www.optimizationservices.org/schemas/";
73  osolStr << OS_SCHEMA_VERSION;
74  osolStr << "/OSoL.xsd\" >" ;
75  osolStr << endl;
76 
77 #ifndef NDEBUG
78  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSoLwriter, ENUM_OUTPUT_LEVEL_trace, "output <optionHeader>");
79 #endif
80  if(m_OSOption->optionHeader != NULL)
81  {
82  osolStr << "<optionHeader>" << endl;
84  osolStr << "</optionHeader>" << endl;
85  }
86 
87 #ifndef NDEBUG
88  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSoLwriter, ENUM_OUTPUT_LEVEL_trace, "output <general>");
89 #endif
90  if(m_OSOption->general != NULL)
91  {
92  generalTagPrinted = false;
93  if (m_OSOption->general->serviceURI != "")
94  {
95  if (generalTagPrinted == false)
96  {
97  osolStr << "<general>" << endl;
98  generalTagPrinted = true;
99  }
100  osolStr << "<serviceURI>" << m_OSOption->general->serviceURI << "</serviceURI>" << endl;
101  }
102  if (m_OSOption->general->serviceName != "")
103  {
104  if (generalTagPrinted == false)
105  {
106  osolStr << "<general>" << endl;
107  generalTagPrinted = true;
108  }
109  osolStr << "<serviceName>" << m_OSOption->general->serviceName << "</serviceName>" << endl;
110  }
111  if (m_OSOption->general->instanceName != "")
112  {
113  if (generalTagPrinted == false)
114  {
115  osolStr << "<general>" << endl;
116  generalTagPrinted = true;
117  }
118  osolStr << "<instanceName>" << m_OSOption->general->instanceName << "</instanceName>" << endl;
119  }
120  if (m_OSOption->general->instanceLocation != NULL)
121  {
122  if (generalTagPrinted == false)
123  {
124  osolStr << "<general>" << endl;
125  generalTagPrinted = true;
126  }
128  {
129  osolStr << "<instanceLocation>";
130  }
131  else
132  {
133  osolStr << "<instanceLocation locationType=\"" << m_OSOption->general->instanceLocation->locationType << "\">";
134  };
135  osolStr << m_OSOption->general->instanceLocation->value << "</instanceLocation>" << endl;
136  }
137  if (m_OSOption->general->jobID != "")
138  {
139  if (generalTagPrinted == false)
140  {
141  osolStr << "<general>" << endl;
142  generalTagPrinted = true;
143  }
144  osolStr << "<jobID>" << m_OSOption->general->jobID << "</jobID>" << endl;
145  }
146  if (m_OSOption->general->solverToInvoke != "")
147  {
148  if (generalTagPrinted == false)
149  {
150  osolStr << "<general>" << endl;
151  generalTagPrinted = true;
152  }
153  osolStr << "<solverToInvoke>" << m_OSOption->general->solverToInvoke << "</solverToInvoke>" << endl;
154  }
155  if (m_OSOption->general->license != "")
156  {
157  if (generalTagPrinted == false)
158  {
159  osolStr << "<general>" << endl;
160  generalTagPrinted = true;
161  }
162  osolStr << "<license>" << m_OSOption->general->license << "</license>" << endl;
163  }
164  if (m_OSOption->general->userName != "")
165  {
166  if (generalTagPrinted == false)
167  {
168  osolStr << "<general>" << endl;
169  generalTagPrinted = true;
170  }
171  osolStr << "<userName>" << m_OSOption->general->userName << "</userName>" << endl;
172  }
173  if (m_OSOption->general->password != "")
174  {
175  if (generalTagPrinted == false)
176  {
177  osolStr << "<general>" << endl;
178  generalTagPrinted = true;
179  }
180  osolStr << "<password>" << m_OSOption->general->password << "</password>" << endl;
181  }
182  if (m_OSOption->general->contact != NULL)
183  {
184  if (generalTagPrinted == false)
185  {
186  osolStr << "<general>" << endl;
187  generalTagPrinted = true;
188  }
190  {
191  osolStr << "<contact>";
192  }
193  else
194  {
195  osolStr << "<contact transportType=\"" << m_OSOption->general->contact->transportType << "\">";
196  };
197  osolStr << m_OSOption->general->contact->value << "</contact>" << endl;
198  }
199  if (m_OSOption->general->otherOptions != NULL)
200  {
201  if (generalTagPrinted == false)
202  {
203  osolStr << "<general>" << endl;
204  generalTagPrinted = true;
205  }
206  osolStr << "<otherOptions numberOfOtherOptions=\"";
207  osolStr << m_OSOption->general->otherOptions->numberOfOtherOptions << "\">" << endl;
208  for (int i=0; i < m_OSOption->general->otherOptions->numberOfOtherOptions; i++)
209  {
210  osolStr << "<other name=\"" << m_OSOption->general->otherOptions->other[i]->name << "\"";
211  if (m_OSOption->general->otherOptions->other[i]->value != "")
212  osolStr << " value=\"" << m_OSOption->general->otherOptions->other[i]->value << "\"";
214  osolStr << " description=" << writeStringData(m_OSOption->general->otherOptions->other[i]->description);
215  osolStr << "/>" << endl;
216  }
217  osolStr << "</otherOptions>" << endl;
218  }
219  if (generalTagPrinted == false)
220  osolStr << "<general>" << endl;
221 
222  osolStr << "</general>" << endl;
223 #ifndef NDEBUG
224  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSoLwriter, ENUM_OUTPUT_LEVEL_trace, "Done with <general> element");
225 #endif
226  };
227 
231  if(m_OSOption->system != NULL)
232  {
233 
234  osolStr << "<system>" << endl;
235  if (m_OSOption->system->minDiskSpace != NULL)
236  {
237  osolStr << "<minDiskSpace";
238  if (m_OSOption->system->minDiskSpace->unit != "byte")
239  osolStr << " unit=\"" << m_OSOption->system->minDiskSpace->unit << "\"";
241  osolStr << " description=" << writeStringData(m_OSOption->system->minDiskSpace->description);
242  osolStr << ">";
245  else
246  osolStr << "NaN";
247  osolStr << "</minDiskSpace>" << endl;
248  }
249  if (m_OSOption->system->minMemorySize != NULL)
250  {
251  osolStr << "<minMemorySize";
252  if (m_OSOption->system->minMemorySize->unit != "byte")
253  osolStr << " unit=\"" << m_OSOption->system->minMemorySize->unit << "\"";
255  osolStr << " description=" << writeStringData(m_OSOption->system->minMemorySize->description);
256  osolStr << ">";
259  else
260  osolStr << "NaN";
261  osolStr << "</minMemorySize>" << endl;
262  }
263  if (m_OSOption->system->minCPUSpeed != NULL)
264  {
265  osolStr << "<minCPUSpeed";
266  if (m_OSOption->system->minCPUSpeed->unit != "hertz")
267  osolStr << " unit=\"" << m_OSOption->system->minCPUSpeed->unit << "\"";
269  osolStr << " description=" << writeStringData(m_OSOption->system->minCPUSpeed->description);
270  osolStr << ">";
273  else
274  osolStr << "NaN";
275  osolStr << "</minCPUSpeed>" << endl;
276  }
277  if (m_OSOption->system->minCPUNumber != NULL)
278  {
279  osolStr << "<minCPUNumber";
281  osolStr << " description=" << writeStringData(m_OSOption->system->minCPUNumber->description);
282  osolStr << ">";
283  osolStr << m_OSOption->system->minCPUNumber->value << "</minCPUNumber>" << endl;
284  };
285  if (m_OSOption->system->otherOptions != NULL)
286  {
287  osolStr << "<otherOptions numberOfOtherOptions=\"";
288  osolStr << m_OSOption->system->otherOptions->numberOfOtherOptions << "\">" << endl;
289  for (int i=0; i < m_OSOption->system->otherOptions->numberOfOtherOptions; i++)
290  {
291  osolStr << "<other name=\"" << m_OSOption->system->otherOptions->other[i]->name << "\"";
292  if (m_OSOption->system->otherOptions->other[i]->value != "")
293  osolStr << " value=\"" << m_OSOption->system->otherOptions->other[i]->value << "\"";
295  osolStr << " description=" << writeStringData(m_OSOption->system->otherOptions->other[i]->description);
296  osolStr << "/>" << endl;
297  }
298  osolStr << "</otherOptions>" << endl;
299  }
300  osolStr << "</system>" << endl;
301 #ifndef NDEBUG
302  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSoLwriter, ENUM_OUTPUT_LEVEL_trace, "Done with <system> element");
303 #endif
304  }
305 
309  if(m_OSOption->service != NULL)
310  {
311  osolStr << "<service>" << endl;
312  if (m_OSOption->service->type != "")
313  {
314  osolStr << "<type>" << m_OSOption->service->type << "</type>" << endl;
315  }
316  if (m_OSOption->service->otherOptions != NULL)
317  {
318  osolStr << "<otherOptions numberOfOtherOptions=\"";
319  osolStr << m_OSOption->service->otherOptions->numberOfOtherOptions << "\">" << endl;
320  for (int i=0; i < m_OSOption->service->otherOptions->numberOfOtherOptions; i++)
321  {
322  osolStr << "<other name=\"" << m_OSOption->service->otherOptions->other[i]->name << "\"";
323  if (m_OSOption->service->otherOptions->other[i]->value != "")
324  osolStr << " value=\"" << m_OSOption->service->otherOptions->other[i]->value << "\"";
326  osolStr << " description=" << writeStringData(m_OSOption->service->otherOptions->other[i]->description);
327  osolStr << "/>" << endl;
328  }
329  osolStr << "</otherOptions>" << endl;
330  }
331  osolStr << "</service>" << endl;
332 #ifndef NDEBUG
333  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSoLwriter, ENUM_OUTPUT_LEVEL_trace, "Done with <service> element");
334 #endif
335  };
336 
340  if(m_OSOption->job != NULL)
341  {
342  osolStr << "<job>" << endl;
343  if (m_OSOption->job->maxTime != NULL)
344  {
345  if (m_OSOption->job->maxTime->unit == "")
346  m_OSOption->job->maxTime->unit = "second";
347  osolStr << "<maxTime unit=\"" << m_OSOption->job->maxTime->unit << "\">";
349  osolStr << os_dtoa_format(m_OSOption->job->maxTime->value);
350  else
351  osolStr << "NaN";
352  osolStr << "</maxTime>" << endl;
353  }
354  if (m_OSOption->job->requestedStartTime != "")
355  osolStr << "<requestedStartTime>" << m_OSOption->job->requestedStartTime << "</requestedStartTime>" << endl;
356  if (m_OSOption->job->dependencies != NULL)
357  {
358  osolStr << "<dependencies numberOfJobIDs=\"";
359  osolStr << m_OSOption->job->dependencies->numberOfJobIDs << "\">" << endl;
360  for (int i=0; i < m_OSOption->job->dependencies->numberOfJobIDs; i++)
361  osolStr << "<jobID>" << m_OSOption->job->dependencies->jobID[i] << "</jobID>" << endl;
362  osolStr << "</dependencies>" << endl;
363  }
364  if (m_OSOption->job->requiredDirectories != NULL)
365  {
366  osolStr << "<requiredDirectories numberOfPaths=\"";
367  osolStr << m_OSOption->job->requiredDirectories->numberOfPaths << "\">" << endl;
368  for (int i=0; i < m_OSOption->job->requiredDirectories->numberOfPaths; i++)
369  osolStr << "<path>" << m_OSOption->job->requiredDirectories->path[i] << "</path>" << endl;
370  osolStr << "</requiredDirectories>" << endl;
371  }
372  if (m_OSOption->job->requiredFiles != NULL)
373  {
374  osolStr << "<requiredFiles numberOfPaths=\"";
375  osolStr << m_OSOption->job->requiredFiles->numberOfPaths << "\">" << endl;
376  for (int i=0; i < m_OSOption->job->requiredFiles->numberOfPaths; i++)
377  osolStr << "<path>" << m_OSOption->job->requiredFiles->path[i] << "</path>" << endl;
378  osolStr << "</requiredFiles>" << endl;
379  }
380  if (m_OSOption->job->directoriesToMake != NULL)
381  {
382  osolStr << "<directoriesToMake numberOfPaths=\"";
383  osolStr << m_OSOption->job->directoriesToMake->numberOfPaths << "\">" << endl;
384  for (int i=0; i < m_OSOption->job->directoriesToMake->numberOfPaths; i++)
385  osolStr << "<path>" << m_OSOption->job->directoriesToMake->path[i] << "</path>" << endl;
386 
387  osolStr << "</directoriesToMake>" << endl;
388  }
389  if (m_OSOption->job->filesToMake != NULL)
390  {
391  osolStr << "<filesToMake numberOfPaths=\"";
392  osolStr << m_OSOption->job->filesToMake->numberOfPaths << "\">" << endl;
393  for (int i=0; i < m_OSOption->job->filesToMake->numberOfPaths; i++)
394  osolStr << "<path>" << m_OSOption->job->filesToMake->path[i] << "</path>" << endl;
395  osolStr << "</filesToMake>" << endl;
396  }
397  if (m_OSOption->job->inputDirectoriesToMove != NULL)
398  {
399  osolStr << "<inputDirectoriesToMove numberOfPathPairs=\"";
400  osolStr << m_OSOption->job->inputDirectoriesToMove->numberOfPathPairs << "\">" << endl;
401  for (int i=0; i < m_OSOption->job->inputDirectoriesToMove->numberOfPathPairs; i++)
402  {
403  osolStr << "<pathPair";
404  osolStr << " from=\"" << m_OSOption->job->inputDirectoriesToMove->pathPair[i]->from << "\"";
405  osolStr << " to=\"" << m_OSOption->job->inputDirectoriesToMove->pathPair[i]->to << "\"";
407  osolStr << " makeCopy=\"true\"";
408  osolStr << "/>" << endl;
409  }
410  osolStr << "</inputDirectoriesToMove>" << endl;
411  }
412  if (m_OSOption->job->inputFilesToMove != NULL)
413  {
414  osolStr << "<inputFilesToMove numberOfPathPairs=\"";
415  osolStr << m_OSOption->job->inputFilesToMove->numberOfPathPairs << "\">" << endl;
416  for (int i=0; i < m_OSOption->job->inputFilesToMove->numberOfPathPairs; i++)
417  {
418  osolStr << "<pathPair";
419  osolStr << " from=\"" << m_OSOption->job->inputFilesToMove->pathPair[i]->from << "\"";
420  osolStr << " to=\"" << m_OSOption->job->inputFilesToMove->pathPair[i]->to << "\"";
422  osolStr << " makeCopy=\"true\"";
423  osolStr << "/>" << endl;
424  }
425  osolStr << "</inputFilesToMove>" << endl;
426  }
427  if (m_OSOption->job->outputFilesToMove != NULL)
428  {
429  osolStr << "<outputFilesToMove numberOfPathPairs=\"";
430  osolStr << m_OSOption->job->outputFilesToMove->numberOfPathPairs << "\">" << endl;
431  for (int i=0; i < m_OSOption->job->outputFilesToMove->numberOfPathPairs; i++)
432  {
433  osolStr << "<pathPair";
434  osolStr << " from=\"" << m_OSOption->job->outputFilesToMove->pathPair[i]->from << "\"";
435  osolStr << " to=\"" << m_OSOption->job->outputFilesToMove->pathPair[i]->to << "\"";
437  osolStr << " makeCopy=\"true\"";
438  osolStr << "/>" << endl;
439  }
440  osolStr << "</outputFilesToMove>" << endl;
441  }
442  if (m_OSOption->job->outputDirectoriesToMove != NULL)
443  {
444  osolStr << "<outputDirectoriesToMove numberOfPathPairs=\"";
445  osolStr << m_OSOption->job->outputDirectoriesToMove->numberOfPathPairs << "\">" << endl;
446  for (int i=0; i < m_OSOption->job->outputDirectoriesToMove->numberOfPathPairs; i++)
447  {
448  osolStr << "<pathPair";
449  osolStr << " from=\"" << m_OSOption->job->outputDirectoriesToMove->pathPair[i]->from << "\"";
450  osolStr << " to=\"" << m_OSOption->job->outputDirectoriesToMove->pathPair[i]->to << "\"";
452  osolStr << " makeCopy=\"true\"";
453  osolStr << "/>" << endl;
454  }
455  osolStr << "</outputDirectoriesToMove>" << endl;
456  }
457  if (m_OSOption->job->filesToDelete != NULL)
458  {
459  osolStr << "<filesToDelete numberOfPaths=\"";
460  osolStr << m_OSOption->job->filesToDelete->numberOfPaths << "\">" << endl;
461  for (int i=0; i < m_OSOption->job->filesToDelete->numberOfPaths; i++)
462  osolStr << "<path>" << m_OSOption->job->filesToDelete->path[i] << "</path>" << endl;
463  osolStr << "</filesToDelete>" << endl;
464  }
465  if (m_OSOption->job->directoriesToDelete != NULL)
466  {
467  osolStr << "<directoriesToDelete numberOfPaths=\"";
468  osolStr << m_OSOption->job->directoriesToDelete->numberOfPaths << "\">" << endl;
469  for (int i=0; i < m_OSOption->job->directoriesToDelete->numberOfPaths; i++)
470  osolStr << "<path>" << m_OSOption->job->directoriesToDelete->path[i] << "</path>" << endl;
471  osolStr << "</directoriesToDelete>" << endl;
472  }
473  if (m_OSOption->job->processesToKill != NULL)
474  {
475  osolStr << "<processesToKill numberOfProcesses=\"";
476  osolStr << m_OSOption->job->processesToKill->numberOfProcesses << "\">" << endl;
477  for (int i=0; i < m_OSOption->job->processesToKill->numberOfProcesses; i++)
478  osolStr << "<process>" << m_OSOption->job->processesToKill->process[i] << "</process>" << endl;
479  osolStr << "</processesToKill>" << endl;
480  }
481  if (m_OSOption->job->otherOptions != NULL)
482  {
483  osolStr << "<otherOptions numberOfOtherOptions=\"";
484  osolStr << m_OSOption->job->otherOptions->numberOfOtherOptions << "\">" << endl;
485  for (int i=0; i < m_OSOption->job->otherOptions->numberOfOtherOptions; i++)
486  {
487  osolStr << "<other name=\"" << m_OSOption->job->otherOptions->other[i]->name << "\"";
488  if (m_OSOption->job->otherOptions->other[i]->value != "")
489  osolStr << " value=\"" << m_OSOption->job->otherOptions->other[i]->value << "\"";
490  if (m_OSOption->job->otherOptions->other[i]->description != "")
491  osolStr << " description=" << writeStringData(m_OSOption->job->otherOptions->other[i]->description);
492  osolStr << "/>" << endl;
493  }
494  osolStr << "</otherOptions>" << endl;
495  }
496  osolStr << "</job>" << endl;
497 #ifndef NDEBUG
498  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSoLwriter, ENUM_OUTPUT_LEVEL_trace, "Done with <job> element");
499 #endif
500  };
501 
505  if (m_OSOption->optimization != NULL)
506  {
507  osolStr << "<optimization";
509  osolStr << " numberOfVariables=\"" << m_OSOption->optimization->numberOfVariables << "\" ";
511  osolStr << " numberOfObjectives=\"" << m_OSOption->optimization->numberOfObjectives << "\" ";
513  osolStr << " numberOfConstraints=\"" << m_OSOption->optimization->numberOfConstraints << "\" ";
514  osolStr << ">" << endl;
515  if (m_OSOption->optimization->variables != NULL)
516  {
517  osolStr << "<variables";
519  osolStr << " numberOfOtherVariableOptions=\"" << m_OSOption->optimization->variables->numberOfOtherVariableOptions << "\"";
520  osolStr << ">" << endl;
521 #ifndef NDEBUG
522  outStr.str("");
523  outStr.clear();
524  outStr << "initialVariableValues: "
525  << (m_OSOption->optimization->variables->initialVariableValues != NULL) << endl;
527 #endif
529  {
530  osolStr << "<initialVariableValues numberOfVar=\"";
531  osolStr << m_OSOption->optimization->variables->initialVariableValues->numberOfVar << "\">" << endl;
533  {
534  osolStr << "<var";
535  osolStr << " idx=\"" << m_OSOption->optimization->variables->initialVariableValues->var[i]->idx << "\"";
539  {
540  osolStr << " value=\"";
542  osolStr << "\"";
543  }
544  osolStr << "/>" << endl;
545  }
546  osolStr << "</initialVariableValues>" << endl;
547  }
548 #ifndef NDEBUG
549  outStr.str("");
550  outStr.clear();
551  outStr << "initialVariableValuesString: "
554 #endif
556  {
557  osolStr << "<initialVariableValuesString numberOfVar=\"";
560  {
561  osolStr << "<var";
562  osolStr << " idx=\"" << m_OSOption->optimization->variables->initialVariableValuesString->var[i]->idx << "\"";
565  osolStr << " value=\"" << m_OSOption->optimization->variables->initialVariableValuesString->var[i]->value << "\"";
566  osolStr << "/>" << endl;
567  }
568  osolStr << "</initialVariableValuesString>" << endl;
569  }
570 
572  {
573 #ifndef NDEBUG
575  "output <variables> <basisStatus>");
576 #endif
577  osolStr << "<initialBasisStatus>" << endl;
579  osolStr << "</initialBasisStatus>" << endl;
580  }
581 
582 #ifndef NDEBUG
583  outStr.str("");
584  outStr.clear();
585  outStr << "integerVariableBranchingWeights: "
588 #endif
590  {
591  osolStr << "<integerVariableBranchingWeights numberOfVar=\"";
594  {
595  osolStr << "<var";
596  osolStr << " idx=\"" << m_OSOption->optimization->variables->integerVariableBranchingWeights->var[i]->idx << "\"";
600  {
601  osolStr << " value=\"";
603  osolStr << "\"";
604  }
605  osolStr << "/>" << endl;
606  }
607  osolStr << "</integerVariableBranchingWeights>" << endl;
608  }
609 #ifndef NDEBUG
610  outStr.str("");
611  outStr.clear();
612  outStr << "sosVariableBranchingWeights: "
615 #endif
617  {
618  osolStr << "<sosVariableBranchingWeights numberOfSOS=\"";
619 #ifndef NDEBUG
620  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSoLwriter, ENUM_OUTPUT_LEVEL_trace, "start: numberOfSOS");
621 #endif
624  {
625  osolStr << "<sos";
626 #ifndef NDEBUG
627  outStr.str("");
628  outStr.clear();
629  outStr << "sosIdx - nvar: "
631  << endl;
633 #endif
634  osolStr << " sosIdx=\"" << m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->sosIdx << "\"";
635  osolStr << " numberOfVar=\"" << m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->numberOfVar << "\"";
637  {
638  osolStr << " groupWeight=\"";
640  osolStr << "\">" << endl;
641  }
643  {
644  osolStr << "<var";
645 #ifndef NDEBUG
647 #endif
648  osolStr << " idx=\"" << m_OSOption->optimization->variables->sosVariableBranchingWeights->sos[i]->var[j]->idx << "\"";
652  {
653  osolStr << " value=\"";
655  osolStr << "\"";
656  }
657  osolStr << "/>" << endl;
658  }
659  osolStr << "</sos>" << endl;
660  }
661  osolStr << "</sosVariableBranchingWeights>" << endl;
662  }
663 #ifndef NDEBUG
664  outStr.str("");
665  outStr.clear();
666  outStr << "Number of other variable options: "
668  << std::endl;
670 #endif
671 // if (m_OSOption->optimization->variables->numberOfOtherVariableOptions > 0)
673  {
674  osolStr << "<other name=\"" << m_OSOption->optimization->variables->other[i]->name << "\"";
675 // if (m_OSOption->optimization->variables->other[i]->numberOfVar > 0)
676  osolStr << " numberOfVar=\"" << m_OSOption->optimization->variables->other[i]->numberOfVar << "\"";
677 // if (m_OSOption->optimization->variables->other[i]->numberOfEnumerations > 0)
678  osolStr << " numberOfEnumerations=\"" << m_OSOption->optimization->variables->other[i]->numberOfEnumerations << "\"";
679  if (m_OSOption->optimization->variables->other[i]->value != "")
680  osolStr << " value=\"" << m_OSOption->optimization->variables->other[i]->value << "\"";
681  if (m_OSOption->optimization->variables->other[i]->solver != "")
682  osolStr << " solver=\"" << m_OSOption->optimization->variables->other[i]->solver << "\"";
684  osolStr << " category=\"" << m_OSOption->optimization->variables->other[i]->category << "\"";
685  if (m_OSOption->optimization->variables->other[i]->type != "")
686  osolStr << " type=\"" << m_OSOption->optimization->variables->other[i]->type << "\"";
688  osolStr << " description=" << writeStringData(m_OSOption->optimization->variables->other[i]->description);
689  if (m_OSOption->optimization->variables->other[i]->varType != "")
690  osolStr << " varType=\"" << m_OSOption->optimization->variables->other[i]->varType << "\"";
692  osolStr << " enumType=\"" << m_OSOption->optimization->variables->other[i]->enumType << "\"";
693  osolStr << ">" << endl;
694 // if (m_OSOption->optimization->variables->other[i]->numberOfVar > 0)
695  for (int j=0; j < m_OSOption->optimization->variables->other[i]->numberOfVar; j++)
696  {
697  osolStr << "<var idx=\"" << m_OSOption->optimization->variables->other[i]->var[j]->idx << "\"";
698  if (m_OSOption->optimization->variables->other[i]->var[j]->name != "")
699  osolStr << " name=" << writeStringData(m_OSOption->optimization->variables->other[i]->var[j]->name);
700  if (m_OSOption->optimization->variables->other[i]->var[j]->value != "")
701  osolStr << " value=\"" << m_OSOption->optimization->variables->other[i]->var[j]->value << "\"";
702  if (m_OSOption->optimization->variables->other[i]->var[j]->lbValue != "")
703  osolStr << " lbValue=\"" << m_OSOption->optimization->variables->other[i]->var[j]->lbValue << "\"";
704  if (m_OSOption->optimization->variables->other[i]->var[j]->ubValue != "")
705  osolStr << " ubValue=\"" << m_OSOption->optimization->variables->other[i]->var[j]->ubValue << "\"";
706  osolStr << "/>" << endl;
707  }
708 // else
709  {
710 // if (m_OSOption->optimization->variables->other[i]->numberOfEnumerations > 0)
711  for (int j=0; j < m_OSOption->optimization->variables->other[i]->numberOfEnumerations; j++)
713  }
714  osolStr << "</other>" << endl;
715  }
716  osolStr << "</variables>" << endl;
717  }
718  if (m_OSOption->optimization->objectives != NULL)
719  {
720  osolStr << "<objectives";
721 // if (m_OSOption->optimization->objectives->numberOfOtherObjectiveOptions > 0)
722  osolStr << " numberOfOtherObjectiveOptions=\"" << m_OSOption->optimization->objectives->numberOfOtherObjectiveOptions << "\"";
723  osolStr << ">" << endl;
725  {
726  osolStr << "<initialObjectiveValues numberOfObj=\"";
727  osolStr << m_OSOption->optimization->objectives->initialObjectiveValues->numberOfObj << "\">" << endl;
729  {
730  osolStr << "<obj";
731  osolStr << " idx=\"" << m_OSOption->optimization->objectives->initialObjectiveValues->obj[i]->idx << "\"";
735  {
736  osolStr << " value=\"";
738  osolStr << "\"";
739  }
740  osolStr << "/>" << endl;
741  }
742  osolStr << "</initialObjectiveValues>" << endl;
743  }
745  {
746  osolStr << "<initialObjectiveBounds numberOfObj=\"";
747  osolStr << m_OSOption->optimization->objectives->initialObjectiveBounds->numberOfObj << "\">" << endl;
749  {
750  osolStr << "<obj";
751  osolStr << " idx=\"" << m_OSOption->optimization->objectives->initialObjectiveBounds->obj[i]->idx << "\"";
755  {
756  osolStr << " lbValue=\"";
758  osolStr << "\"";
759  }
761  {
762  osolStr << " ubValue=\"";
764  osolStr << "\"";
765  }
766  osolStr << "/>" << endl;
767  }
768  osolStr << "</initialObjectiveBounds>" << endl;
769  }
770 
772  {
773 #ifndef NDEBUG
775  "output <objectives> <basisStatus>");
776 #endif
777  osolStr << "<initialBasisStatus>" << endl;
779  osolStr << "</initialBasisStatus>" << endl;
780  }
781 
782 #ifndef NDEBUG
783  outStr.str("");
784  outStr.clear();
785  outStr << "Number of other objective options: "
788 #endif
789 // if (m_OSOption->optimization->objectives->numberOfOtherObjectiveOptions > 0)
791  {
792  osolStr << "<other name=\"" << m_OSOption->optimization->objectives->other[i]->name << "\"";
793 // if (m_OSOption->optimization->objectives->other[i]->numberOfObj > 0)
794  osolStr << " numberOfObj=\"" << m_OSOption->optimization->objectives->other[i]->numberOfObj << "\"";
795 // if (m_OSOption->optimization->objectives->other[i]->numberOfEnumerations > 0)
796  osolStr << " numberOfEnumerations=\"" << m_OSOption->optimization->objectives->other[i]->numberOfEnumerations << "\"";
797  if (m_OSOption->optimization->objectives->other[i]->value != "")
798  osolStr << " value=\"" << m_OSOption->optimization->objectives->other[i]->value << "\"";
799  if (m_OSOption->optimization->objectives->other[i]->solver != "")
800  osolStr << " solver=\"" << m_OSOption->optimization->objectives->other[i]->solver << "\"";
802  osolStr << " category=\"" << m_OSOption->optimization->objectives->other[i]->category << "\"";
803  if (m_OSOption->optimization->objectives->other[i]->type != "")
804  osolStr << " type=\"" << m_OSOption->optimization->objectives->other[i]->type << "\"";
806  osolStr << " description=" << writeStringData(m_OSOption->optimization->objectives->other[i]->description);
808  osolStr << " objType=\"" << m_OSOption->optimization->objectives->other[i]->objType << "\"";
810  osolStr << " enumType=\"" << m_OSOption->optimization->objectives->other[i]->enumType << "\"";
811  osolStr << ">" << endl;
812 // if (m_OSOption->optimization->objectives->other[i]->numberOfObj > 0)
813  for (int j=0; j < m_OSOption->optimization->objectives->other[i]->numberOfObj; j++)
814  {
815  osolStr << "<obj idx=\"" << m_OSOption->optimization->objectives->other[i]->obj[j]->idx << "\"";
816  if (m_OSOption->optimization->objectives->other[i]->obj[j]->name != "")
817  osolStr << " name=" << writeStringData(m_OSOption->optimization->objectives->other[i]->obj[j]->name);
818  if (m_OSOption->optimization->objectives->other[i]->obj[j]->value != "")
819  osolStr << " value=\"" << m_OSOption->optimization->objectives->other[i]->obj[j]->value << "\"";
820  osolStr << "/>" << endl;
821  }
822 // else if (m_OSOption->optimization->objectives->other[i]->numberOfEnumerations > 0)
823  for (int j=0; j < m_OSOption->optimization->objectives->other[i]->numberOfEnumerations; j++)
825 
826  osolStr << "</other>" << endl;
827  }
828  osolStr << "</objectives>" << endl;
829  }
830 #ifndef NDEBUG
831  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSoLwriter, ENUM_OUTPUT_LEVEL_trace, "Done with <objectives> element");
832 #endif
833  if (m_OSOption->optimization->constraints != NULL)
834  {
835  osolStr << "<constraints";
836 // if (m_OSOption->optimization->constraints->numberOfOtherConstraintOptions > 0)
837  osolStr << " numberOfOtherConstraintOptions=\"" << m_OSOption->optimization->constraints->numberOfOtherConstraintOptions << "\"";
838  osolStr << ">" << endl;
840  {
841  osolStr << "<initialConstraintValues numberOfCon=\"";
844  {
845  osolStr << "<con";
846  osolStr << " idx=\"" << m_OSOption->optimization->constraints->initialConstraintValues->con[i]->idx << "\"";
850  {
851  osolStr << " value=\"";
853  osolStr << "\"";
854  }
855  osolStr << "/>" << endl;
856  }
857  osolStr << "</initialConstraintValues>" << endl;
858  }
859 
861  {
862  osolStr << "<initialDualValues numberOfCon=\"";
863  osolStr << m_OSOption->optimization->constraints->initialDualValues->numberOfCon << "\">" << endl;
865  {
866  osolStr << "<con";
867  osolStr << " idx=\"" << m_OSOption->optimization->constraints->initialDualValues->con[i]->idx << "\"";
871  {
872  osolStr << " lbDualValue=\"";
874  osolStr << "\"";
875  }
877  {
878  osolStr << " ubDualValue=\"";
880  osolStr << "\"";
881  }
882  osolStr << "/>" << endl;
883  }
884  osolStr << "</initialDualValues>" << endl;
885  }
886 
888  {
889 #ifndef NDEBUG
891  "output <constraints> <basisStatus>");
892 #endif
893  osolStr << "<initialBasisStatus>" << endl;
895  osolStr << "</initialBasisStatus>" << endl;
896  }
897 
898 #ifndef NDEBUG
899  outStr.str("");
900  outStr.clear();
901  outStr << "Number of other constraint options: "
903  << std::endl;
905 #endif
906 // if (m_OSOption->optimization->constraints->numberOfOtherConstraintOptions > 0)
908  {
909  osolStr << "<other name=\"" << m_OSOption->optimization->constraints->other[i]->name << "\"";
910 
911 // if (m_OSOption->optimization->constraints->other[i]->numberOfCon > 0)
912  osolStr << " numberOfCon=\"" << m_OSOption->optimization->constraints->other[i]->numberOfCon << "\"";
913 // if (m_OSOption->optimization->constraints->other[i]->numberOfEnumerations > 0)
914  osolStr << " numberOfEnumerations=\"" << m_OSOption->optimization->constraints->other[i]->numberOfEnumerations << "\"";
915  if (m_OSOption->optimization->constraints->other[i]->value != "")
916  osolStr << " value=\"" << m_OSOption->optimization->constraints->other[i]->value << "\"";
918  osolStr << " solver=\"" << m_OSOption->optimization->constraints->other[i]->solver << "\"";
920  osolStr << " category=\"" << m_OSOption->optimization->constraints->other[i]->category << "\"";
921  if (m_OSOption->optimization->constraints->other[i]->type != "")
922  osolStr << " type=\"" << m_OSOption->optimization->constraints->other[i]->type << "\"";
924  osolStr << " description=" << writeStringData(m_OSOption->optimization->constraints->other[i]->description);
926  osolStr << " conType=\"" << m_OSOption->optimization->constraints->other[i]->conType << "\"";
928  osolStr << " enumType=\"" << m_OSOption->optimization->constraints->other[i]->enumType << "\"";
929  osolStr << ">" << endl;
930 // if (m_OSOption->optimization->constraints->other[i]->numberOfCon > 0)
931  for (int j=0; j < m_OSOption->optimization->constraints->other[i]->numberOfCon; j++)
932  {
933  osolStr << "<con idx=\"" << m_OSOption->optimization->constraints->other[i]->con[j]->idx << "\"";
934  if (m_OSOption->optimization->constraints->other[i]->con[j]->name != "")
935  osolStr << " name=" << writeStringData(m_OSOption->optimization->constraints->other[i]->con[j]->name);
936  if (m_OSOption->optimization->constraints->other[i]->con[j]->value != "")
937  osolStr << " value=\"" << m_OSOption->optimization->constraints->other[i]->con[j]->value << "\"";
938  if (m_OSOption->optimization->constraints->other[i]->con[j]->lbValue != "")
939  osolStr << " lbValue=\"" << m_OSOption->optimization->constraints->other[i]->con[j]->lbValue << "\"";
940  if (m_OSOption->optimization->constraints->other[i]->con[j]->ubValue != "")
941  osolStr << " ubValue=\"" << m_OSOption->optimization->constraints->other[i]->con[j]->ubValue << "\"";
942  osolStr << "/>" << endl;
943  }
944 // else if (m_OSOption->optimization->constraints->other[i]->numberOfEnumerations > 0)
945  for (int j=0; j < m_OSOption->optimization->constraints->other[i]->numberOfEnumerations; j++)
947 
948  osolStr << "</other>" << endl;
949  }
950  osolStr << "</constraints>" << endl;
951  }
952 #ifndef NDEBUG
953  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSoLwriter, ENUM_OUTPUT_LEVEL_trace, "Done with <constraint> element");
954 #endif
955  if (m_OSOption->optimization->solverOptions != NULL)
956  {
957 // if (m_OSOption->optimization->solverOptions->numberOfSolverOptions > 0)
958  {
959  osolStr << "<solverOptions numberOfSolverOptions=\"";
960  osolStr << m_OSOption->optimization->solverOptions->numberOfSolverOptions << "\">" << endl;
962  {
963  osolStr << "<solverOption name=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->name << "\"";
965  osolStr << " value=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->value << "\"";
967  osolStr << " solver=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->solver << "\"";
969  osolStr << " category=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->category << "\"";
971  osolStr << " type=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->type << "\"";
973  osolStr << " description=" << writeStringData(m_OSOption->optimization->solverOptions->solverOption[i]->description);
975  osolStr << "/>" << endl;
976  else
977  {
978  osolStr << " numberOfItems=\"" << m_OSOption->optimization->solverOptions->solverOption[i]->numberOfItems << "\">";
979  for (int k=0; k<m_OSOption->optimization->solverOptions->solverOption[i]->numberOfItems; k++)
980  osolStr << "<item>" << m_OSOption->optimization->solverOptions->solverOption[i]->item[k] << "</item>" << endl;
981  osolStr << "</solverOption>" << endl;
982  }
983  }
984  osolStr << "</solverOptions>" << endl;
985  }
986  }
987  osolStr << "</optimization>" << endl;
988  };
989  osolStr << "</osol>" << endl;
990 #ifndef NDEBUG
991  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSoLwriter, ENUM_OUTPUT_LEVEL_trace, "Done with <optimization> element");
992 #endif
993  return osolStr.str();
994 }// end writeOSoL
995 
996 
997 
const OSSmartPtr< OSOutput > osoutput
Definition: OSOutput.cpp:39
std::string os_dtoa_format(double x)
Definition: OSMathUtil.cpp:154
bool OSIsnan(double x)
checks whether a given double is NaN
std::string writeStringData(std::string str)
writeStringData
std::string writeGeneralFileHeader(GeneralFileHeader *v, bool addWhiteSpace)
Take a GeneralFileHeader object and write a string that validates against the OSgL schema.
Definition: OSgLWriter.cpp:36
std::string writeOtherOptionOrResultEnumeration(OtherOptionOrResultEnumeration *e, bool addWhiteSpace, bool writeBase64)
Take an OtherOptionOrResultEnumeration object and write a string that validates against the OSgL sche...
Definition: OSgLWriter.cpp:81
std::string writeBasisStatus(BasisStatus *bs, bool addWhiteSpace, bool writeBase64)
Take a BasisStatus object and write a string that validates against the OSgL schema.
Definition: OSgLWriter.cpp:190
std::string name
optional variable name
Definition: OSOption.h:1619
double value
branching weight
Definition: OSOption.h:1622
int idx
index of the variable
Definition: OSOption.h:1616
std::string description
additional description about the CPU
Definition: OSGeneral.h:876
int value
the number of CPUs
Definition: OSGeneral.h:879
std::string description
additional description about the CPU speed
Definition: OSGeneral.h:820
std::string unit
the unit in which CPU speed is measured
Definition: OSGeneral.h:817
double value
the CPU speed (expressed in multiples of unit)
Definition: OSGeneral.h:823
InitConstraintValues * initialConstraintValues
initial values for the constraints
Definition: OSOption.h:3271
InitDualVariableValues * initialDualValues
initial dual values for the constraints
Definition: OSOption.h:3274
OtherConstraintOption ** other
other information about the constraints
Definition: OSOption.h:3280
int numberOfOtherConstraintOptions
number of <other> child elements
Definition: OSOption.h:3268
BasisStatus * initialBasisStatus
initial basis status for the slack variables
Definition: OSOption.h:3277
std::string value
the value of the <contact> element
Definition: OSOption.h:104
std::string transportType
the contact mechanism
Definition: OSOption.h:101
int numberOfPaths
the number of <path> children
Definition: OSOption.h:785
std::string * path
the list of directory and file paths
Definition: OSOption.h:788
OtherOptions * otherOptions
the list of other general options
Definition: OSOption.h:320
InstanceLocationOption * instanceLocation
the location of the instance
Definition: OSOption.h:299
std::string license
the license information
Definition: OSOption.h:308
std::string serviceURI
the service URI
Definition: OSOption.h:290
std::string serviceName
the name of the service
Definition: OSOption.h:293
std::string jobID
the job ID
Definition: OSOption.h:302
std::string userName
the username
Definition: OSOption.h:311
std::string instanceName
the name of the instance
Definition: OSOption.h:296
std::string solverToInvoke
the solver to invoke
Definition: OSOption.h:305
std::string password
the password
Definition: OSOption.h:314
ContactOption * contact
the contact method
Definition: OSOption.h:317
double value
initial value
Definition: OSOption.h:2774
std::string name
optional variable name
Definition: OSOption.h:2771
int idx
constraint index
Definition: OSOption.h:2768
InitConValue ** con
initial value for each constraint
Definition: OSOption.h:2830
int numberOfCon
number of <con> children
Definition: OSOption.h:2827
std::string name
optional variable name
Definition: OSOption.h:2932
int idx
constraint index
Definition: OSOption.h:2929
double ubDualValue
initial upper bound
Definition: OSOption.h:2938
double lbDualValue
initial lower bound
Definition: OSOption.h:2935
int numberOfCon
number of <con> children
Definition: OSOption.h:2992
InitDualVarValue ** con
initial dual values for each constraint
Definition: OSOption.h:2995
double lbValue
initial lower bound
Definition: OSOption.h:2354
int idx
objective index
Definition: OSOption.h:2348
double ubValue
initial upper bound
Definition: OSOption.h:2357
std::string name
optional variable name
Definition: OSOption.h:2351
std::string name
optional objective name
Definition: OSOption.h:2190
double value
initial value
Definition: OSOption.h:2193
int idx
objective index
Definition: OSOption.h:2187
InitObjBound ** obj
initial bounds for each objective
Definition: OSOption.h:2413
int numberOfObj
number of <obj> children
Definition: OSOption.h:2410
InitObjValue ** obj
initial value for each objective
Definition: OSOption.h:2249
int numberOfObj
number of <obj> children
Definition: OSOption.h:2246
double value
initial value
Definition: OSOption.h:1170
std::string name
optional variable name
Definition: OSOption.h:1167
int idx
variable index
Definition: OSOption.h:1164
std::string value
initial value
Definition: OSOption.h:1331
int idx
variable index
Definition: OSOption.h:1325
std::string name
optional variable name
Definition: OSOption.h:1328
InitVarValue ** var
initial value for each variable
Definition: OSOption.h:1226
int numberOfVar
number of children
Definition: OSOption.h:1223
InitVarValueString ** var
initial value for each variable
Definition: OSOption.h:1387
int numberOfVar
number of children
Definition: OSOption.h:1384
std::string value
the value of the <instanceLocation> element
Definition: OSOption.h:47
std::string locationType
the type of the location
Definition: OSOption.h:44
BranchingWeight ** var
branching weight for each variable
Definition: OSOption.h:1679
int numberOfVar
number of children
Definition: OSOption.h:1676
std::string * jobID
the list of job IDs
Definition: OSOption.h:717
int numberOfJobIDs
the number of entries in the list of job dependencies
Definition: OSOption.h:714
Processes * processesToKill
processes to kill upon completion
Definition: OSOption.h:1108
DirectoriesAndFiles * requiredDirectories
directories required to run the job
Definition: OSOption.h:1078
DirectoriesAndFiles * filesToMake
files to make during the job
Definition: OSOption.h:1087
DirectoriesAndFiles * directoriesToDelete
directories to delete upon completion
Definition: OSOption.h:1105
std::string requestedStartTime
the requested time to start the job
Definition: OSOption.h:1072
DirectoriesAndFiles * requiredFiles
files required to run the job
Definition: OSOption.h:1081
DirectoriesAndFiles * filesToDelete
files to delete upon completion
Definition: OSOption.h:1102
JobDependencies * dependencies
the dependency set
Definition: OSOption.h:1075
PathPairs * inputFilesToMove
input files to move or copy
Definition: OSOption.h:1093
TimeSpan * maxTime
the maximum time allowed
Definition: OSOption.h:1069
PathPairs * outputDirectoriesToMove
output directories to move or copy
Definition: OSOption.h:1099
PathPairs * inputDirectoriesToMove
input directories to move or copy
Definition: OSOption.h:1090
PathPairs * outputFilesToMove
output files to move or copy
Definition: OSOption.h:1096
DirectoriesAndFiles * directoriesToMake
directories to make during the job
Definition: OSOption.h:1084
OtherOptions * otherOptions
list of other job options
Definition: OSOption.h:1111
The Option Class.
Definition: OSOption.h:3565
OptimizationOption * optimization
optimizationOption holds the fifth child of the OSOption specified by the OSoL Schema.
Definition: OSOption.h:3596
GeneralOption * general
generalOption holds the first child of the OSOption specified by the OSoL Schema.
Definition: OSOption.h:3580
GeneralFileHeader * optionHeader
OSOption has a header and five other children: general, system, service, job, and optimization.
Definition: OSOption.h:3576
ServiceOption * service
serviceOption holds the third child of the OSOption specified by the OSoL Schema.
Definition: OSOption.h:3588
SystemOption * system
systemOption holds the second child of the OSOption specified by the OSoL Schema.
Definition: OSOption.h:3584
JobOption * job
jobOption holds the fourth child of the OSOption specified by the OSoL Schema.
Definition: OSOption.h:3592
std::string writeOSoL(OSOption *theosoption)
create an osol string from an OSOption object
Definition: OSoLWriter.cpp:45
bool m_bWriteBase64
m_bWriteBase64 is set to true if we encode the linear constraint coefficients in base64 binary
Definition: OSoLWriter.h:62
bool m_bWhiteSpace
m_bWhiteSpace is set to true if we write white space in the file
Definition: OSoLWriter.h:66
OSoLWriter()
Default constructor.
Definition: OSoLWriter.cpp:34
~OSoLWriter()
Class destructor.
Definition: OSoLWriter.cpp:40
const OSOption * m_OSOption
m_OSOption is an object in the class OSOption
Definition: OSoLWriter.h:35
int numberOfOtherObjectiveOptions
number of <other> child elements
Definition: OSOption.h:2686
OtherObjectiveOption ** other
other information about the objectives
Definition: OSOption.h:2698
InitObjectiveValues * initialObjectiveValues
initial values for the objectives
Definition: OSOption.h:2689
BasisStatus * initialBasisStatus
initial basis status for the objectives
Definition: OSOption.h:2695
InitObjectiveBounds * initialObjectiveBounds
initial bounds for the objectives
Definition: OSOption.h:2692
VariableOption * variables
the options for the variables
Definition: OSOption.h:3509
int numberOfConstraints
the number of constraints
Definition: OSOption.h:3506
ObjectiveOption * objectives
the options for the objectives
Definition: OSOption.h:3512
SolverOptions * solverOptions
other solver options
Definition: OSOption.h:3518
ConstraintOption * constraints
the options for the constraints
Definition: OSOption.h:3515
int numberOfObjectives
the number of objectives
Definition: OSOption.h:3503
int numberOfVariables
the number of variables
Definition: OSOption.h:3500
std::string lbValue
lower bound of the option
Definition: OSOption.h:3105
std::string ubValue
upper bound of the option
Definition: OSOption.h:3108
std::string name
optional variable name
Definition: OSOption.h:3099
int idx
variable index
Definition: OSOption.h:3096
std::string value
value of the option
Definition: OSOption.h:3102
std::string conType
type of the values in the con array
Definition: OSOption.h:3188
std::string category
name of the category into which this option falls
Definition: OSOption.h:3176
std::string name
name of the option
Definition: OSOption.h:3167
int numberOfCon
number of <con> children
Definition: OSOption.h:3161
OtherConOption ** con
array of option values
Definition: OSOption.h:3185
std::string type
type of the option value (integer, double, boolean, string)
Definition: OSOption.h:3179
OtherOptionOrResultEnumeration ** enumeration
Definition: OSOption.h:3194
std::string description
description of the option
Definition: OSOption.h:3182
std::string solver
name of the solver to which this option applies
Definition: OSOption.h:3173
std::string enumType
type of the values in the enumeration array
Definition: OSOption.h:3197
int numberOfEnumerations
number of <enumeration> child elements
Definition: OSOption.h:3164
std::string value
value of the option
Definition: OSOption.h:3170
std::string name
optional variable name
Definition: OSOption.h:2517
int idx
variable index
Definition: OSOption.h:2514
std::string value
value of the option
Definition: OSOption.h:2520
OtherObjOption ** obj
array of option values
Definition: OSOption.h:2603
int numberOfObj
number of <obj> children
Definition: OSOption.h:2579
std::string name
name of the option
Definition: OSOption.h:2585
std::string value
value of the option
Definition: OSOption.h:2588
std::string solver
name of the solver to which this option applies
Definition: OSOption.h:2591
int numberOfEnumerations
number of <enumeration> child elements
Definition: OSOption.h:2582
std::string objType
type of the values in the obj array
Definition: OSOption.h:2606
std::string category
name of the category into which this option falls
Definition: OSOption.h:2594
std::string type
type of the option value (integer, double, boolean, string)
Definition: OSOption.h:2597
std::string description
description of the option
Definition: OSOption.h:2600
std::string enumType
type of the values in the enumeration array
Definition: OSOption.h:2615
OtherOptionOrResultEnumeration ** enumeration
Definition: OSOption.h:2612
std::string value
the value of the option
Definition: OSOption.h:160
std::string description
the description of the option
Definition: OSOption.h:163
std::string name
the name of the option
Definition: OSOption.h:157
OtherOption ** other
the list of other options
Definition: OSOption.h:219
int numberOfOtherOptions
the number of other options
Definition: OSOption.h:216
std::string value
value of the option
Definition: OSOption.h:1938
std::string ubValue
lower bound on the value
Definition: OSOption.h:1944
std::string name
optional variable name
Definition: OSOption.h:1935
int idx
variable index
Definition: OSOption.h:1932
std::string lbValue
lower bound on the value
Definition: OSOption.h:1941
int numberOfVar
number of child elements
Definition: OSOption.h:1994
int numberOfEnumerations
number of <enumeration> child elements
Definition: OSOption.h:1997
std::string type
type of the option value (integer, double, boolean, string)
Definition: OSOption.h:2012
std::string name
name of the option
Definition: OSOption.h:2000
std::string solver
name of the solver to which this option applies
Definition: OSOption.h:2006
std::string enumType
type of the values in the enumeration array
Definition: OSOption.h:2030
OtherOptionOrResultEnumeration ** enumeration
Definition: OSOption.h:2027
std::string category
name of the category into which this option falls
Definition: OSOption.h:2009
OtherVarOption ** var
array of option values
Definition: OSOption.h:2018
std::string description
description of the option
Definition: OSOption.h:2015
std::string varType
type of the values in the var array
Definition: OSOption.h:2021
std::string value
value of the option
Definition: OSOption.h:2003
std::string from
the file or directory to move/copy from
Definition: OSOption.h:856
bool makeCopy
record whether a copy is to be made
Definition: OSOption.h:862
std::string to
the file or directory to move/copy to
Definition: OSOption.h:859
PathPair ** pathPair
the list of directory and file paths
Definition: OSOption.h:918
int numberOfPathPairs
the number of <path> children
Definition: OSOption.h:915
std::string * process
the list of processes
Definition: OSOption.h:1001
int numberOfProcesses
the number of <process> children
Definition: OSOption.h:998
SOSWeights ** sos
branching weights for the SOS
Definition: OSOption.h:1861
int numberOfSOS
number of <sos> children
Definition: OSOption.h:1858
BranchingWeight ** var
branching weights for individual variables
Definition: OSOption.h:1789
int sosIdx
index of the SOS (to match the OSiL file)
Definition: OSOption.h:1780
int numberOfVar
number of children
Definition: OSOption.h:1786
double groupWeight
branching weight for the entire SOS
Definition: OSOption.h:1783
std::string type
the service type
Definition: OSOption.h:615
OtherOptions * otherOptions
the list of other service options
Definition: OSOption.h:618
std::string * item
the list of items of the option
Definition: OSOption.h:3370
std::string value
the value of the option
Definition: OSOption.h:3352
std::string solver
the solver to which the option applies
Definition: OSOption.h:3355
std::string description
the description of the option
Definition: OSOption.h:3364
std::string type
the type of the option value (integer, double, boolean, string)
Definition: OSOption.h:3361
std::string category
the category to which the option belongs
Definition: OSOption.h:3358
int numberOfItems
the number of items (additional pieces of data) of the option
Definition: OSOption.h:3367
std::string name
the name of the option
Definition: OSOption.h:3349
SolverOption ** solverOption
the list of solver options
Definition: OSOption.h:3426
int numberOfSolverOptions
the number of solver options
Definition: OSOption.h:3423
std::string unit
the unit in which storage capacity is measured
Definition: OSGeneral.h:759
double value
the number of units of storage capacity
Definition: OSGeneral.h:765
std::string description
additional description about the storage
Definition: OSGeneral.h:762
StorageCapacity * minDiskSpace
the minimum disk space required
Definition: OSOption.h:550
StorageCapacity * minMemorySize
the minimum memory required
Definition: OSOption.h:553
CPUSpeed * minCPUSpeed
the minimum CPU speed required
Definition: OSOption.h:556
CPUNumber * minCPUNumber
the minimum number of processors required
Definition: OSOption.h:559
OtherOptions * otherOptions
the list of other system options
Definition: OSOption.h:562
std::string unit
the unit in which time is measured
Definition: OSGeneral.h:929
double value
the number of units
Definition: OSGeneral.h:932
BasisStatus * initialBasisStatus
initial basis information
Definition: OSOption.h:2110
int numberOfOtherVariableOptions
number of <other> child elements
Definition: OSOption.h:2101
InitVariableValuesString * initialVariableValuesString
initial values for string-valued variables
Definition: OSOption.h:2107
OtherVariableOption ** other
other variable options
Definition: OSOption.h:2119
SOSVariableBranchingWeights * sosVariableBranchingWeights
branching weights for SOS variables and groups
Definition: OSOption.h:2116
InitVariableValues * initialVariableValues
initial values for the variables
Definition: OSOption.h:2104
IntegerVariableBranchingWeights * integerVariableBranchingWeights
branching weights for integer variables
Definition: OSOption.h:2113
#define OS_SCHEMA_VERSION
Definition: OSParameters.h:83
@ ENUM_OUTPUT_LEVEL_detailed_trace
Definition: OSParameters.h:116
@ ENUM_OUTPUT_LEVEL_debug
Definition: OSParameters.h:114
@ ENUM_OUTPUT_LEVEL_trace
Definition: OSParameters.h:115
@ ENUM_OUTPUT_AREA_OSoLwriter
Definition: OSParameters.h:142