107 for( run1 = 0; run1 < nS; run1++ ){
108 B[run1] =
new DMatrix[ getNV() ];
109 for( run2 = 0; run2 < getNV(); run2++ )
110 B[run1][run2] = rhs.
B[run1][run2];
118 for( run1 = 0; run1 < nS; run1++ )
119 lbB[run1] = rhs.
lbB[run1];
125 for( run1 = 0; run1 < nS; run1++ )
126 ubB[run1] = rhs.
ubB[run1];
131 if( rhs.
x != 0 ) x =
new DVector(*rhs.
x);
151 for( run1 = 0; run1 < nS; run1++ ){
153 else ylbB[run1] = 0 ;
156 else yubB[run1] = 0 ;
171 for( run1 = 0; run1 < nS; run1++ ){
173 if( B[run1] != 0 )
delete[] B[run1];
174 if( ylbB[run1] != 0 )
delete ylbB[run1];
175 if( yubB[run1] != 0 )
delete yubB[run1];
178 if( B != 0 ) free(B) ;
179 if( ylbB != 0 ) free(ylbB);
180 if( yubB != 0 ) free(yubB);
182 if( lbB != 0 ) free(lbB);
183 if( ubB != 0 ) free(ubB);
185 if( ylbA != 0 )
delete ylbA;
186 if( yubA != 0 )
delete yubA;
188 if( ylb != 0 )
delete ylb;
189 if( yub != 0 )
delete yub;
191 if( x != 0 )
delete x;
223 for( run1 = 0; run1 < getNV(); run1++ ){
225 ylb->operator()(run1) = y_(run1);
226 yub->operator()(run1) = 0.0 ;
229 ylb->operator()(run1) = 0.0 ;
230 yub->operator()(run1) = y_(run1);
241 for( run1 = 0; run1 < getNC(); run1++ ){
243 ylbA->operator()(run1) = y_(getNV()+run1);
244 yubA->operator()(run1) = 0.0 ;
247 ylbA->operator()(run1) = 0.0 ;
248 yubA->operator()(run1) = y_(getNV()+run1);
259 DVector dualSolution( getNV()+getNC() );
262 for( i=0; i<getNV(); ++i )
265 dualSolution(i) = (*ylb)(i);
267 dualSolution(i) = (*yub)(i);
270 for( i=0; i<getNC(); ++i )
273 dualSolution( getNV()+i ) = (*ylbA)(i);
275 dualSolution( getNV()+i ) = (*yubA)(i);
284 const char*
const startString,
285 const char*
const endString,
288 const char*
const colSeparator,
289 const char*
const rowSeparator
292 H.print (cout,
"H", startString,endString,width,precision,colSeparator,rowSeparator );
293 g.print (cout,
"g", startString,endString,width,precision,colSeparator,rowSeparator );
294 lb.print (cout,
"lb", startString,endString,width,precision,colSeparator,rowSeparator );
295 ub.print (cout,
"ub", startString,endString,width,precision,colSeparator,rowSeparator );
296 A.print (cout,
"A", startString,endString,width,precision,colSeparator,rowSeparator );
297 lbA.print(cout,
"lbA",startString,endString,width,precision,colSeparator,rowSeparator );
298 ubA.print(cout,
"ubA",startString,endString,width,precision,colSeparator,rowSeparator );
308 H.print (cout,
"H", printScheme );
309 g.print (cout,
"g", printScheme );
310 lb.print (cout,
"lb", printScheme );
311 ub.print (cout,
"ub", printScheme );
312 A.print (cout,
"A", printScheme );
313 lbA.print(cout,
"lbA",printScheme );
314 ubA.print(cout,
"ubA",printScheme );
321 const char*
const name,
322 const char*
const startString,
323 const char*
const endString,
326 const char*
const colSeparator,
327 const char*
const rowSeparator
330 H.print ( filename,
"H", startString,endString,width,precision,colSeparator,rowSeparator );
331 g.print ( filename,
"g", startString,endString,width,precision,colSeparator,rowSeparator );
332 lb.print ( filename,
"lb", startString,endString,width,precision,colSeparator,rowSeparator );
333 ub.print ( filename,
"ub", startString,endString,width,precision,colSeparator,rowSeparator );
334 A.print ( filename,
"A", startString,endString,width,precision,colSeparator,rowSeparator );
335 lbA.print( filename,
"lbA",startString,endString,width,precision,colSeparator,rowSeparator );
336 ubA.print( filename,
"ubA",startString,endString,width,precision,colSeparator,rowSeparator );
343 const char*
const name,
344 const char*
const startString,
345 const char*
const endString,
348 const char*
const colSeparator,
349 const char*
const rowSeparator
352 H.print ( stream,
"H", startString,endString,width,precision,colSeparator,rowSeparator );
353 g.print ( stream,
"g", startString,endString,width,precision,colSeparator,rowSeparator );
354 lb.print ( stream,
"lb", startString,endString,width,precision,colSeparator,rowSeparator );
355 ub.print ( stream,
"ub", startString,endString,width,precision,colSeparator,rowSeparator );
356 A.print ( stream,
"A", startString,endString,width,precision,colSeparator,rowSeparator );
357 lbA.print( stream,
"lbA",startString,endString,width,precision,colSeparator,rowSeparator );
358 ubA.print( stream,
"ubA",startString,endString,width,precision,colSeparator,rowSeparator );
365 const char*
const name,
369 H.print ( filename,
"H", printScheme );
370 g.print ( filename,
"g", printScheme );
371 lb.print ( filename,
"lb", printScheme );
372 ub.print ( filename,
"ub", printScheme );
373 A.print ( filename,
"A", printScheme );
374 lbA.print( filename,
"lbA",printScheme );
375 ubA.print( filename,
"ubA",printScheme );
382 const char*
const name,
386 H.print ( stream,
"H", printScheme );
387 g.print ( stream,
"g", printScheme );
388 lb.print ( stream,
"lb", printScheme );
389 ub.print ( stream,
"ub", printScheme );
390 A.print ( stream,
"A", printScheme );
391 lbA.print( stream,
"lbA",printScheme );
392 ubA.print( stream,
"ubA",printScheme );
400 const char*
const startString,
401 const char*
const endString,
404 const char*
const colSeparator,
405 const char*
const rowSeparator
409 x->
print(cout,
"x", startString,endString,width,precision,colSeparator,rowSeparator );
412 ylb->print(cout,
"ylb",startString,endString,width,precision,colSeparator,rowSeparator );
415 yub->print(cout,
"yub", startString,endString,width,precision,colSeparator,rowSeparator );
418 ylbA->print(cout,
"ylbA", startString,endString,width,precision,colSeparator,rowSeparator );
421 yubA->print(cout,
"yubA", startString,endString,width,precision,colSeparator,rowSeparator );
432 x->
print(cout,
"x", printScheme );
435 ylb->print(cout,
"ylb",printScheme );
438 yub->print(cout,
"yub", printScheme );
441 ylbA->print(cout,
"ylbA", printScheme );
444 yubA->print(cout,
"yubA", printScheme );
451 const char*
const name,
452 const char*
const startString,
453 const char*
const endString,
456 const char*
const colSeparator,
457 const char*
const rowSeparator
461 x->
print( filename,
"x", startString,endString,width,precision,colSeparator,rowSeparator );
464 ylb->print( filename,
"ylb",startString,endString,width,precision,colSeparator,rowSeparator );
467 yub->print( filename,
"yub", startString,endString,width,precision,colSeparator,rowSeparator );
470 ylbA->print( filename,
"ylbA", startString,endString,width,precision,colSeparator,rowSeparator );
473 yubA->print( filename,
"yubA", startString,endString,width,precision,colSeparator,rowSeparator );
480 const char*
const name,
481 const char*
const startString,
482 const char*
const endString,
485 const char*
const colSeparator,
486 const char*
const rowSeparator
490 x->
print( stream,
"x", startString,endString,width,precision,colSeparator,rowSeparator );
493 ylb->print( stream,
"ylb",startString,endString,width,precision,colSeparator,rowSeparator );
496 yub->print( stream,
"yub", startString,endString,width,precision,colSeparator,rowSeparator );
499 ylbA->print( stream,
"ylbA", startString,endString,width,precision,colSeparator,rowSeparator );
502 yubA->print( stream,
"yubA", startString,endString,width,precision,colSeparator,rowSeparator );
509 const char*
const name,
514 x->
print( filename,
"x", printScheme );
517 ylb->print( filename,
"ylb",printScheme );
520 yub->print( filename,
"yub", printScheme );
523 ylbA->print( filename,
"ylbA", printScheme );
526 yubA->print( filename,
"yubA", printScheme );
533 const char*
const name,
538 x->
print( stream,
"x", printScheme );
541 ylb->print( stream,
"ylb",printScheme );
544 yub->print( stream,
"yub", printScheme );
547 ylbA->print( stream,
"ylbA", printScheme );
550 yubA->print( stream,
"yubA", printScheme );
DenseCP & operator=(const DenseCP &rhs)
Allows to pass back messages to the calling function.
returnValue print(const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
returnValue setQPsolution(const DVector &x_, const DVector &y_)
BooleanType acadoIsGreater(double x, double y, double TOL)
#define CLOSE_NAMESPACE_ACADO
DVector getMergedDualSolution() const
Data class for storing generic conic programs.
void copy(const DenseCP &rhs)
void rhs(const real_t *x, real_t *f)
GenericVector< double > DVector
returnValue printToFile(const char *const filename, const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
#define BEGIN_NAMESPACE_ACADO
returnValue printSolutionToFile(const char *const filename, const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
returnValue printSolution(const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
returnValue init(uint nV_, uint nC_)