NDOSolver / FiOracle
Interfaces and Solvers for NonDifferentiable Optimization
Loading...
Searching...
No Matches
QPPnltMP.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/*---------------------------- File QPPnltMP.h -----------------------------*/
3/*--------------------------------------------------------------------------*/
16/*--------------------------------------------------------------------------*/
17/*----------------------------- DEFINITIONS --------------------------------*/
18/*--------------------------------------------------------------------------*/
19
20#ifndef __QPPnltMP
21 #define __QPPnltMP /* self-identification: #endif at the end of the file */
22
23/*--------------------------------------------------------------------------*/
24/*-------------------------------- MACROS ----------------------------------*/
25/*--------------------------------------------------------------------------*/
50/*------------------------------ HV_NNVAR ----------------------------------*/
58#define HV_NNVAR 1
59
60/*------------------------------ G_IMPLM -----------------------------------*/
104#define G_IMPLM 0
105
106/*------------------------------ ADD_CNST ----------------------------------*/
115#define ADD_CNST 0
116
117/*---------------------------- RECOMPUTE_GTZ -------------------------------*/
138#define RECOMPUTE_GTZ 0
139
141/*--------------------------------------------------------------------------*/
142/*------------------------------ INCLUDES ----------------------------------*/
143/*--------------------------------------------------------------------------*/
144
145#include "MPSolver.h"
146
147#if( HV_NNVAR )
148 #include "BMinQuad.h"
149#else
150 #include "MinQuad.h"
151
152 #define TWOSIDED 0
153#endif
154
155/*--------------------------------------------------------------------------*/
156/*------------------------ NAMESPACE and USINGS ----------------------------*/
157/*--------------------------------------------------------------------------*/
158
159namespace NDO_di_unipi_it
160{
161 using namespace MinQuad_di_unipi_it;
162
163/*--------------------------------------------------------------------------*/
164/*----------------------------- CLASSES ------------------------------------*/
165/*--------------------------------------------------------------------------*/
166
167class QPPenaltyMP : public MPSolver ,
168 #if( HV_NNVAR )
169 private BMinQuad
170 #else
171 private MinQuad
172 #endif
173{
174
175/*--------------------------------------------------------------------------*/
176/*----------------------- PUBLIC PART OF THE CLASS -------------------------*/
177/*--------------------------------------------------------------------------*/
178/*-- --*/
179/*-- The following methods and data are the actual interface of the --*/
180/*-- class: the standard user should use these methods and data only. --*/
181/*-- --*/
182/*--------------------------------------------------------------------------*/
183
184 public:
185
186/*--------------------------------------------------------------------------*/
187/*--------------------------- PUBLIC METHODS -------------------------------*/
188/*--------------------------------------------------------------------------*/
189/*---------------------------- CONSTRUCTOR ---------------------------------*/
190/*--------------------------------------------------------------------------*/
191
192 QPPenaltyMP( std::istream *iStrm = 0 );
193
216/*--------------------------------------------------------------------------*/
217/*-------------------------- OTHER INITIALIZATIONS -------------------------*/
218/*--------------------------------------------------------------------------*/
219
220 void SetDim( cIndex MxBSz = 0 , FiOracle *Oracle = 0 ,
221 const bool UsAvSt = false ) override;
222
223/*--------------------------------------------------------------------------*/
224 // "publicize" the MinQuad::SetPricing method
225
227
228/*--------------------------------------------------------------------------*/
229
230#if( HV_NNVAR )
231 // "publicize" the BMinQuad::SetMaxVarAdd method
233
234 // "publicize" the BMinQuad::SetMaxVarRmv method
236#else
237 // provide a dummy implementation of BMinQuad::SetMaxVarAdd
238 inline void SetMaxVarAdd( cIndex MVA = 1 ) { }
239
240 // provide a dummy implementation of BMinQuad::SetMaxVarRmv
241 inline void SetMaxVarRmv( cIndex MVR = 1 ) { }
242#endif
243
244/*--------------------------------------------------------------------------*/
245
246 void Sett( cHpNum tt = 1 ) override { tCurr = tt; }
247
248/*--------------------------------------------------------------------------*/
249
250 void SetPar( const int wp , cHpNum value ) override
251 {
252 switch( wp ) {
253 case( kMaxTme ): SetMaxTime( value ); break;
254 case( kOptEps ): SetEpsilonR( value ); break;
255 case( kFsbEps ):
256 #if( HV_NNVAR )
257 SetEpsilonD( value );
258 #else
259 EpsD = value;
260 #endif
261 break;
262 // case( kZero ): SetMinFVal( value ); break;
263 default: throw( NDOException( "SetPar( HpNum ): unknown parameter" ) );
264 }
265 } // end( QPPenaltyMP::SetPar( HpNum ) )
266
267/*--------------------------------------------------------------------------*/
274 cIndex wFi = Inf< Index >() ) override;
275
276/*--------------------------------------------------------------------------*/
277
278 void CheckIdentical( const bool Chk = true ) override { ChkIde = Chk; }
279
280/*--------------------------------------------------------------------------*/
296 void SetMPLog( std::ostream *outs = 0 , const char lvl = 0 ) override
297 {
298 if( ( MPLog = outs ) )
299 MPLLvl = lvl;
300 else
301 MPLLvl = 0;
302
303 #if( LOG_MQ )
304 if( outs )
305 SetMQLog( outs );
306 #endif
307 #if( HV_NNVAR )
308 #if( LOG_BMQ )
309 if( outs )
310 SetBMQLog( outs );
311 #endif
312 #endif
313 }
314
315/*--------------------------------------------------------------------------*/
316/*-------------------- METHODS FOR SOLVING THE PROBLEM ---------------------*/
317/*--------------------------------------------------------------------------*/
318
319 MPStatus SolveMP( void ) override;
320
321/*--------------------------------------------------------------------------*/
322/*---------------------- METHODS FOR READING RESULTS -----------------------*/
323/*--------------------------------------------------------------------------*/
324
326
327/*--------------------------------------------------------------------------*/
328
329 HpNum ReadDt( cHpNum tt = 1 ) override
330 {
331 return( ( ( tt == tCurr ? tt : ( tt * tt ) / tCurr ) / 2 ) * ReadzNorm() );
332 }
333
334/*--------------------------------------------------------------------------*/
335
336 HpNum ReadSigma( cIndex wFi = Inf< Index >() ) override
337 {
338 #if( HV_NNVAR )
339 return( BMinQuad::ReadSigma() );
340 #else
341 return( MinQuad::ReadSigma() );
342 #endif
343 }
344
345/*--------------------------------------------------------------------------*/
346
347 HpNum ReadDStart( cHpNum tt = 1 ) override
348 {
349 return( ( tt / 2 ) * ReadzNorm() );
350 }
351
352/*--------------------------------------------------------------------------*/
353
354 cLMRow Readd( bool Fulld = false ) override;
355
356/*--------------------------------------------------------------------------*/
357
358 void ReadZ( LMRow tz , cIndex_Set &I , Index &D ,
359 cIndex wFi = Inf< Index >() ) override;
360
361/*--------------------------------------------------------------------------*/
362
364 const bool IncldCnst = false ) override;
365
366/*--------------------------------------------------------------------------*/
367
368 HpNum ReadLBMult( cIndex wFi = Inf< Index >() ) override;
369
370/*--------------------------------------------------------------------------*/
371
372 HpNum ReadGid( cIndex Nm = Inf< Index >() ) override;
373
374/*--------------------------------------------------------------------------*/
375
376 void MakeLambda1( cHpRow Lmbd , HpRow Lmbd1 , cHpNum Tau ) override;
377
378/*--------------------------------------------------------------------------*/
379
380 void SensitAnals( HpNum &lp , HpNum &cp ) override;
381
382/*--------------------------------------------------------------------------*/
383/*-------------- METHODS FOR READING THE DATA OF THE PROBLEM ---------------*/
384/*--------------------------------------------------------------------------*/
385
386 Index BSize( cIndex wFi = Inf< Index >() ) override { return( ActBDim ); }
387
388/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
389
390 Index BCSize( cIndex wFi = Inf< Index >() ) override { return( ActCNum ); }
391
392/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
393
394 Index MaxName( cIndex wFi = Inf< Index >() ) override
395 {
396 return( MaxItemN() );
397 }
398
399/*--------------------------------------------------------------------------*/
400
401 Index WComponent( cIndex i ) override
402 {
403 return( ( ( i < MaxItemN() ) && IsThere( i ) ) ? 1 : Inf< Index >() );
404 }
405
406/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
407
408 bool IsSubG( cIndex i ) override
409 {
410 return( ( i < MaxItemN() ? IsASubG( i ) : false ) );
411 }
412
413/*--------------------------------------------------------------------------*/
414
415#if( HV_NNVAR )
416
417 Index NumNNVars( void ) override { return( NNVars ); }
418
419/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
420
421 Index NumBxdVars( void ) override
422 {
423 #if( TWOSIDED )
424 return( BxdVars );
425 #else
426 return( NNVars );
427 #endif
428 }
429
430/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
431
432 bool IsNN( cIndex i ) override
433 {
434 return( LowerBounds()[ i ] > - Inf< HpNum >() );
435 }
436
437#endif
438
439/*--------------------------------------------------------------------------*/
440
441 cHpRow ReadLinErr( void ) override { return( ReadAlfa() ); }
442
443/*--------------------------------------------------------------------------*/
444
446 if( ! wFi )
447 throw( NDOException( "QPPenaltyMP::ReadLowerBound: wFi == 0" ) );
448
449 if( ( wFi > 1 ) || ( ! RHSp ) )
450 return( ReadLB() );
451
452 return( - Inf< HpNum >() );
453 }
454
455/*--------------------------------------------------------------------------*/
456
457 Index ReadGi( cIndex Nm , SgRow Gi , cIndex_Set &GB );
458
459/*--------------------------------------------------------------------------*/
460
461 HpNum EpsilonD( void ) override
462 {
463 #if( HV_NNVAR )
464 return( BMinQuad::EpsilonD() );
465 #else
466 return( EpsD * ( BDim ? BDim : 1 ) );
467 #endif
468 }
469
470/*--------------------------------------------------------------------------*/
471/*------------- METHODS FOR ADDING / REMOVING / CHANGING DATA --------------*/
472/*--------------------------------------------------------------------------*/
473
474 SgRow GetItem( cIndex wFi = Inf< Index >() ) override;
475
476 void SetItemBse( cIndex_Set SGBse = 0 , cIndex SGBDm = 0 ) override;
477
478 Index CheckSubG( cHpNum DFi , cHpNum Tau , HpNum &Ai , HpNum &ScPri )
479 override;
480
481 Index CheckCnst( HpNum &Ai , HpNum &ScPri , cHpRow CrrPnt ) override;
482
483 bool ChangesMPSol( void ) override;
484
485 void SetItem( cIndex Nm = Inf< Index >() ) override;
486
487 void SubstItem( cIndex Nm ) override;
488
489/*--------------------------------------------------------------------------*/
490
491 void RmvItem( cIndex i ) override;
492
493 void RmvItems( void ) override;
494
495/*--------------------------------------------------------------------------*/
496
497 void SetActvSt( cIndex_Set AVrs = 0 , cIndex AVDm = 0 ) override;
498
499/*--------------------------------------------------------------------------*/
500
501 void AddActvSt( cIndex_Set Addd , cIndex AdDm , cIndex_Set AVrs ) override;
502
503 void RmvActvSt( cIndex_Set Rmvd , cIndex RmDm , cIndex_Set AVrs ) override;
504
505/*--------------------------------------------------------------------------*/
506
507 void AddVars( cIndex NNwVrs ) override;
508
509 void RmvVars( cIndex_Set whch = 0 , Index hwmny = 0 ) override;
510
511/*--------------------------------------------------------------------------*/
512
513 void ChgAlfa( cHpRow DeltaAlfa ) override;
514
515 void ChgAlfa( cHpRow NewAlfa , cIndex wFi ) override;
516
517 void ChgAlfa( cIndex i , cHpNum Ai ) override;
518
519/*--------------------------------------------------------------------------*/
520
521 void ChangeCurrPoint( cLMRow DLambda , cHpRow DFi ) override;
522
523 void ChangeCurrPoint( cHpNum Tau , cHpRow DFi ) override;
524
525/*--------------------------------------------------------------------------*/
526
527 void ChgSubG( cIndex strt , Index stp , cIndex wFi ) override;
528
529/*--------------------------------------------------------------------------*/
530/*------------------------------ DESTRUCTOR --------------------------------*/
531/*--------------------------------------------------------------------------*/
532
533 virtual ~QPPenaltyMP();
534
535/*--------------------------------------------------------------------------*/
536/*-------------------- PROTECTED PART OF THE CLASS -------------------------*/
537/*--------------------------------------------------------------------------*/
538
539 protected:
540
541/*--------------------------------------------------------------------------*/
542/*-------------------------- PROTECTED METHODS -----------------------------*/
543/*--------------------------------------------------------------------------*/
544
545/*--------------------------------------------------------------------------*/
546/*----------------------- PROTECTED DATA STRUCTURES -----------------------*/
547/*--------------------------------------------------------------------------*/
548
549/*--------------------------------------------------------------------------*/
550/*--------------------- PRIVATE PART OF THE CLASS --------------------------*/
551/*--------------------------------------------------------------------------*/
552/*-- --*/
553/*-- Nobody should ever look at this part: everything that is under this --*/
554/*-- advice may be changed without notice in any new release of the code. --*/
555/*-- --*/
556/*--------------------------------------------------------------------------*/
557
558 private:
559
560/*--------------------------------------------------------------------------*/
561/*-------------------------- PRIVATE METHODS -------------------------------*/
562/*--------------------------------------------------------------------------*/
563
564 void ComputeRHSxd( void );
565
566/*--------------------------------------------------------------------------*/
567
568 void Computedir( bool Fulld );
569
570/*--------------------------------------------------------------------------*/
571
572 Index CheckBCopy( void );
573
574/*--------------------------------------------------------------------------*/
575
576#if( LAZY_Q )
577
578 QuNum GiTGj( cIndex i , cIndex j ) override;
579
580#else
581
582 void GiTG( cIndex i , QuRow Qi , cIndex iMax ) override;
583
584#endif
585
586/* The "standard" interface with the (QP) solver, common to both the MinQuad
587 and BMinQuad classes. */
588
589/*--------------------------------------------------------------------------*/
590
591#if( HV_NNVAR )
592
593 cSgRow GiTilde( cIndex i ) override;
594
595/* This method of the BMinQuad-specific part of the interface with the (QP)
596 solver returns a pointer to the i-th row of the matrix of subgradients:
597 if such a row is not available for free, GiTilde() constructs it in some
598 temporary memory (the vector TSGk) and returns a pointer to it. */
599
600#endif
601
602/*--------------------------------------------------------------------------*/
603
604 LMNum CalculateZ( cIndex h );
605
606 void CalculateZ( cIndex_Set Wh , LMRow z );
607
608#if( HV_NNVAR )
609
610 void CalculateZ( LMRow z ) override;
611
612#else
613
614 void CalculateZ( LMRow z );
615
616#endif
617
618/* These methods are used to construct the tentative direction. If HV_NNVAR,
619 one of the CalculateZ()'s (depending on LAZY_D) is called by the BMinQuad
620 class at each iteration; otherwise they are called by the methods of the
621 QPPenaltyMP class when the direction needs to be computed.
622
623 If ActvVrs != NULL, CalculateZ( z ) only calculates the entries of z
624 corresponding to *existing* variables, those whose names are in ActvVrs[].
625 The other two variants can also be used *only* to calculate entries of z
626 corresponding to existing variables. */
627
628/*--------------------------------------------------------------------------*/
629
630#if( HV_NNVAR )
631
632 LMNum GiTLB( cIndex h , cLMRow l , cIndex_Set lB , cIndex lBd ) override;
633
634 void GiTLB( HpRow gtlb , cLMRow l , cIndex_Set lB , cIndex lBd ,
635 const bool add ) override;
636
637/* These methods of the BMinQuad-specific part of the interface with the (QP)
638 solver needs to be defined only if HV_NNVAR > 0. */
639
640#endif
641
642/*--------------------------------------------------------------------------*/
643
644#if( ( G_IMPLM > 0 ) && ( G_IMPLM < 3 ) )
645
646 void GetNewGTRow( cIndex i );
647
648 void SetGTRow( cIndex i );
649
650 void PutGTRow( cIndex i );
651
652/* GetNewGTRow() and PutGTRow() can *only* be called if ActvVrs != NULL, i.e.,
653 Buffer[] is defined. */
654
655#endif
656
657/*--------------------------------------------------------------------------*/
658
659#if( G_IMPLM < 1 )
660
661 SgRow TSGi( cIndex i );
662
663#endif
664
665/*--------------------------------------------------------------------------*/
666
667 void FullZ( LMRow z , cIndex_Set tB , cHpRow tM );
668
669/* Construct the full Z into z, using tB and tM as the Base and Mult. */
670
671/*--------------------------------------------------------------------------*/
672
673 void CompleteZ( bool Fullz = true );
674
675/* If necessary, complete a partly calculated z*. If Fullz == true a "full"
676 z* is computed, otherwise only the *existing* entries of z* are computed.
677 The thing is set in the internal data structures of BMinQuad if HV_NNVAR,
678 and in the field dir[] of QPPenaltyMP otherwise. */
679
680/*--------------------------------------------------------------------------*/
681
682#if( ADD_CNST )
683
684 void ComputeZBase( void );
685
686/* Extract from the current base the part relative to constraints and store
687 it in ZBase/ZMult. */
688
689#endif
690
691/*--------------------------------------------------------------------------*/
692
693#if( HV_NNVAR )
694
695 void CheckBounds( void );
696
697#endif
698
699/*--------------------------------------------------------------------------*/
700
701 void ChgRHS( cIndex strt , cIndex stp );
702
703/* Changes the current RHS to the new one contained in tmpG1. Only the
704 entries with indices between strt (included) and stp (excluded) have
705 changed w.r.t. the previous value; it is assumed that strt >= 0 and
706 stp <= CrrSGLen.
707
708 tmpG1 is assumed to contain the new values of the RHS in "dense" format,
709 i.e., tmpG1[ i ] contains the RHS of variable strt + i for 0 <= i <
710 stp - strt.
711
712 Also, G1Perz is assumed to be zero if the new values of the RHS are all
713 zero (this is done automatically SetItemBse()). */
714
715/*--------------------------------------------------------------------------*/
716
717 void CheckSG( void );
718
719/*--------------------------------------------------------------------------*/
720
721 void CheckGT( void );
722
723/*--------------------------------------------------------------------------*/
724
725 void MemDealloc( void );
726
727/* Deallocates all the memory of the class. */
728
729/*--------------------------------------------------------------------------*/
730/*----------------------- PRIVATE DATA STRUCTURES -------------------------*/
731/*--------------------------------------------------------------------------*/
732
733 FiOracle *CrrOrcl; // the current oracle
734
735 Index DimMinQuad; // dimension of the Bundle "seen" by [B]MinQuad
736
737 HpNum MinNewAlfa; // the min. among the Alfa's of "new" items
738 HpNum tCurr; // current value of t
739 HpNum Alfa1; // linearization error of the newly inserted item:
740 // Alfa1 == Inf< HpNum >() signals that the item is
741 // the RHS (0-th component)
742 HpNum G1Perz; // scalar product between the newly inserted item and z
743 #if( ADD_CNST )
744 bool G1IsSubg; // true if the newly inserted item is a subgradient
745 #endif
746
747 LMRow dir; // when HV_NNVAR > 0, z* is contained into the internal
748 // data structure of the BMinQuad class, and dir[] is
749 // used as the temporary for SettmpD() and to hold the
750 // actual direction; when HV_NNVAR == 0 instead, dir[]
751 // holds either z* or d*, since only the scaling factor
752 // "- t" distinguishes the two
753
754 char ZCmptd; // 0 = the (QP) has not been (correctly) solved
755 // 1 = no entries of z* have been calculated
756 // 2 = only the "defined" entries for NN variables
757 // (only happens with HV_NNVAR && LAZY_D == 2)
758 // 3 = only the "defined" entries for *all* variables
759 // 4 = *all* the entries
760 // note that if HV_NNVAR > 0 then the entries are
761 // written and held into the internal data structure
762 // of the BMinQuad class, otherwise into dir[]
763
764 char dirCmptd; // tells the status of dir[]:
765 // 0 = no entries of dir[] have been calculated
766 // 1 = only the "defined" entries (in ActvVrs[])
767 // 2 = *all* the entries have been computed
768
769 SgRow RHSp; // the Right Hand Side of the variables
770 HpNum RHSxd; // contains ( - 1 / t ) * scalar product between the
771 // RHS and d*; if there are no "active bounds" (which
772 // is true in particular if HV_NNVAR == 0) this is
773 // the scalar product between the RHS and z*,
774 // otherwise the two numbers are different
775
776 cIndex_Set ActvVrs; // the "active set" of variables
777 Index ActvVDim; // size of the active set
778
779 #if( HV_NNVAR )
780 Index NNVars; // number of the variables that are constrained in sign
781 #if( TWOSIDED )
782 Index BxdVars; // number of variables that have either an upper or
783 // a lower bound
784 #endif
785 #else
786 HpNum EpsD; // precision in checking feasibility
787 #endif
788
789 #if( G_IMPLM < 3 )
790 SgMat SubG; // the bundle (itself)
791
792 #if( G_IMPLM < 1 )
793 SgRow TSGk; // temporary: a row in the bundle
794 #endif
795 #else
796 Index Insrtd; // the "name" of G1 (see below)
797 #endif
798
799 SgRow tmpG1; // temporary: the current subgradient
800
801 #if( G_IMPLM > 0 )
802 SgMat TSubG; // Transpose of G (GT)
803 Index NrAllRws; // how many rows of GT have been allocated so far
804
805 #if( ( G_IMPLM > 0 ) && ( G_IMPLM < 3 ) )
806 SgMat Buffer; // Temporary buffer of rows of G
807 Index BFCntr; // current size of Buffer
808 #endif
809 #endif
810
811 #if( ADD_CNST )
812 Index_Set ZBase; // the "base" for doing aggregation
813 HpRow ZMult; // its multipliers
814 Index ZBDim; // its size
815 Index CBZDim; // number of constraints in the last optimal Base
816 #endif
817
818 bool ChkIde; // true if checks for discovering and discarding
819 // identical items are performed
820
821/*--------------------------------------------------------------------------*/
822
823 }; // end( class QPPenaltyMP )
824
825/*--------------------------------------------------------------------------*/
826
827 } // end( namespace NDO_di_unipi_it )
828
829/*--------------------------------------------------------------------------*/
830/*--------------------------------------------------------------------------*/
831
832#endif /* QPPnltMP.h included */
833
834/*--------------------------------------------------------------------------*/
835/*------------------------- End File QPPnltMP.h ----------------------------*/
836/*--------------------------------------------------------------------------*/
Definition BMinQuad.h:212
HpNum ReadSigma(const bool IncldCnst=true)
Definition BMinQuad.h:697
void SetMaxVarAdd(cIndex MVA=1)
Definition BMinQuad.h:267
void SetMaxVarRmv(cIndex MVR=1)
Definition BMinQuad.h:279
LMRow LowerBounds(void)
Definition BMinQuad.h:398
void SetEpsilonD(HpNum NeweD=0)
cHpRow ReadAlfa(void)
Definition BMinQuad.h:373
HpNum ReadzNorm(void)
Definition BMinQuad.h:681
Definition MinQuad.h:188
bool IsThere(cIndex n)
Returns true if there is an item with name 'n'.
Definition MinQuad.h:457
Index MaxItemN(void)
Definition MinQuad.h:481
cHpNum ReadLB(void)
returns the current value of the Lower Bound
Definition MinQuad.h:587
bool IsASubG(cIndex n)
Returns true if the item with "name" 'n' is a subgradient.
Definition MinQuad.h:462
void SetPricing(cHpNum Brk=Inf< HpNum >())
Definition MinQuad.h:361
Index ActCNum
Definition MinQuad.h:1094
virtual HpNum ReadSigma(const bool IncldCnst=true)
Definition MinQuad.h:776
Index ActBDim
Number of items currently in the bundle.
Definition MinQuad.h:1093
void SetMaxTime(cHpNum NewMaxTime)
Definition MinQuad.h:379
void SetEpsilonR(HpNum NeweR=0)
Index BDim
n. of items in Base
Definition MinQuad.h:1102
Definition FiOracle.h:231
Definition MPSolver.h:121
MPStatus
Definition MPSolver.h:151
Definition FiOracle.h:66
Definition QPPnltMP.h:173
HpNum ReadDt(cHpNum tt=1) override
Definition QPPnltMP.h:329
HpNum ReadFiBLambda(cIndex wFi=Inf< Index >()) override
Index NumBxdVars(void) override
Definition QPPnltMP.h:421
void RmvVars(cIndex_Set whch=0, Index hwmny=0) override
void MakeLambda1(cHpRow Lmbd, HpRow Lmbd1, cHpNum Tau) override
void SensitAnals(HpNum &lp, HpNum &cp) override
bool ChangesMPSol(void) override
bool IsSubG(cIndex i) override
Definition QPPnltMP.h:408
void AddVars(cIndex NNwVrs) override
void SetMaxVarAdd(cIndex MVA=1)
Definition BMinQuad.h:267
void SetMaxVarRmv(cIndex MVR=1)
Definition BMinQuad.h:279
Index WComponent(cIndex i) override
Definition QPPnltMP.h:401
cLMRow Readd(bool Fulld=false) override
void GiTLB(HpRow gtlb, cLMRow l, cIndex_Set lB, cIndex lBd, const bool add) override
Index BSize(cIndex wFi=Inf< Index >()) override
returns the current number of items (of either type) in the bundle.
Definition QPPnltMP.h:386
void RmvActvSt(cIndex_Set Rmvd, cIndex RmDm, cIndex_Set AVrs) override
Index BCSize(cIndex wFi=Inf< Index >()) override
returns the current number of constraints in the bundle.
Definition QPPnltMP.h:390
HpNum ReadLowerBound(cIndex wFi=Inf< Index >()) override
Definition QPPnltMP.h:445
void ChangeCurrPoint(cLMRow DLambda, cHpRow DFi) override
void ChgSubG(cIndex strt, Index stp, cIndex wFi) override
void SetPar(const int wp, cHpNum value) override
Definition QPPnltMP.h:250
HpNum ReadSigma(cIndex wFi=Inf< Index >()) override
Definition QPPnltMP.h:336
LMNum GiTLB(cIndex h, cLMRow l, cIndex_Set lB, cIndex lBd) override
void SetActvSt(cIndex_Set AVrs=0, cIndex AVDm=0) override
cSgRow GiTilde(cIndex i) override
SgRow GetItem(cIndex wFi=Inf< Index >()) override
void RmvItem(cIndex i) override
void RmvItems(void) override
void Sett(cHpNum tt=1) override
Definition QPPnltMP.h:246
void SetItem(cIndex Nm=Inf< Index >()) override
void CalculateZ(LMRow z) override
void CheckIdentical(const bool Chk=true) override
Definition QPPnltMP.h:278
bool IsNN(cIndex i) override
Definition QPPnltMP.h:432
void SetItemBse(cIndex_Set SGBse=0, cIndex SGBDm=0) override
void ComputeRHSxd(void)
just the destructor
void ChgAlfa(cHpRow NewAlfa, cIndex wFi) override
Index NumNNVars(void) override
Definition QPPnltMP.h:417
MPStatus SolveMP(void) override
cHpRow ReadLinErr(void) override
Definition QPPnltMP.h:441
void SetDim(cIndex MxBSz=0, FiOracle *Oracle=0, const bool UsAvSt=false) override
HpNum ReadDStart(cHpNum tt=1) override
Definition QPPnltMP.h:347
Index CheckSubG(cHpNum DFi, cHpNum Tau, HpNum &Ai, HpNum &ScPri) override
HpNum ReadGid(cIndex Nm=Inf< Index >()) override
HpNum EpsilonD(void) override
Definition QPPnltMP.h:461
void ChgAlfa(cHpRow DeltaAlfa) override
HpNum ReadLBMult(cIndex wFi=Inf< Index >()) override
void GiTG(cIndex i, QuRow Qi, cIndex iMax) override
void SetLowerBound(cHpNum LwBnd=- Inf< HpNum >(), cIndex wFi=Inf< Index >()) override
void ChangeCurrPoint(cHpNum Tau, cHpRow DFi) override
void AddActvSt(cIndex_Set Addd, cIndex AdDm, cIndex_Set AVrs) override
void SubstItem(cIndex Nm) override
cHpRow ReadMult(cIndex_Set &I, Index &D, cIndex wFi=Inf< Index >(), const bool IncldCnst=false) override
void ReadZ(LMRow tz, cIndex_Set &I, Index &D, cIndex wFi=Inf< Index >()) override
Index CheckCnst(HpNum &Ai, HpNum &ScPri, cHpRow CrrPnt) override
void SetMPLog(std::ostream *outs=0, const char lvl=0) override
Definition QPPnltMP.h:296
void ChgAlfa(cIndex i, cHpNum Ai) override
Index MaxName(cIndex wFi=Inf< Index >()) override
Definition QPPnltMP.h:394
HpNum * HpRow
"finer" (fp) array
Definition OPTtypes.h:99
const HpNum cHpNum
a read-only HpNum
Definition OPTtypes.h:102
double HpNum
"finer" floating point numbers
Definition OPTtypes.h:98
const Index cIndex
a read-only Index
Definition OPTtypes.h:64
cIndex * cIndex_Set
read-only array
Definition OPTtypes.h:65
Index * Index_Set
set (array) of indices
Definition OPTtypes.h:61
unsigned int Index
Index in a vector ( >= 0 )
Definition OPTtypes.h:60
cHpNum * cHpRow
read-only array
Definition OPTtypes.h:103
SgRow * SgMat
a bundle (set of subgradients)
Definition OPTtypes.h:113
SgNum * SgRow
a subgradient
Definition OPTtypes.h:112
LMNum * LMRow
a vector of Lagrangean Multipliers
Definition OPTtypes.h:130
double LMNum
a Lagrangean Multiplier
Definition OPTtypes.h:129
cLMNum * cLMRow
a read-only vector of LMs
Definition OPTtypes.h:134
double QuNum
numbers in Q ( G{i}{T} * G{j} )
Definition OPTtypes.h:120
QuNum * QuRow
row of Q
Definition OPTtypes.h:121
cSgNum * cSgRow
a read-only subgradient
Definition OPTtypes.h:116
static constexpr T Inf(void) noexcept
Inf< T >() = infinity value for T.
Definition OPTUtils.h:357
Definition BMinQuad.h:157
Definition Bundle.h:68