Contains informations about cuts and user specified global equations. More...

#include <SequentialAssembly.h>

Inheritance diagram for SequentialAssembly:

Public Member Functions

 SequentialAssembly (void)
 Lifecycle. More...
 
 ~SequentialAssembly (void)
 
double deltaseq (void) const
 
int neqs (void) const
 returns the number of Assignments More...
 
void wegsteinstep (void)
 Substitutes RHS into *LHSP for all Assignments. More...
 
void directstep (void)
 Updates *LHSP with RHS using Wegstein accelerated direct substitution for all Assignments. More...
 
void makeAssignment (std::list< Assignment * >::iterator &p, Value &lhs, Value rhs, std::string tag, std::string rhsstring, int i, Libpf::Utility::ScalingMode sm=Libpf::Utility::ScalingMode::noscaling, double xmin=0.0, double xmax=1.0, Value factor=One)
 
void addCut (std::string name, Stream *in, Stream *out)
 
void removeCut (std::string tag)
 
Assignmentoperator<< (Assignment *ep)
 includes a new Assignment to the corresponding collection More...
 
void print (void) const
 
void purgeAss (void)
 delete all equations More...
 
void setDamping (double d)
 set damping coefficient for direct substitution More...
 
double damping (void) const
 returns current value of the damping coefficient for direct substitution More...
 
void setMaxChange (double c)
 set maximum relative step change for direct substitution More...
 
double maxChange (void) const
 returns current value of maximum relative step change for direct substitution More...
 
- Public Member Functions inherited from Diagnostic
 Diagnostic (void)
 
void setVerbosity (int verbosity)
 sets the verbosity level for this instance More...
 
int verbosity (void) const
 

Public Attributes

std::map< std::string, Cut * > cuts_
 collection of cut streams to automatically generate the Assignments converging them More...
 
std::list< Assignment * > ass_
 collection of Assignments, containing the assembly of explicit equations More...
 
std::vector< Scaler * > scalers_
 collection of optional scalers for the unknowns More...
 

Protected Member Functions

virtual bool isAssignmentActive (std::list< Assignment * >::iterator &q) const =0
 will be implemented in Model-aware derived class More...
 
- Protected Member Functions inherited from Diagnostic
virtual ~Diagnostic ()=default
 

Additional Inherited Members

- Protected Attributes inherited from Diagnostic
int verbosityInstance
 

Detailed Description

Contains informations about cuts and user specified global equations.

#include <libpf/flowsheet/SequentialAssembly.h>

Remarks
Warning
Thread safe:
Extendable:
Platform dependencies:

Constructor & Destructor Documentation

◆ SequentialAssembly()

SequentialAssembly::SequentialAssembly ( void  )

Lifecycle.

◆ ~SequentialAssembly()

SequentialAssembly::~SequentialAssembly ( void  )

Member Function Documentation

◆ addCut()

void SequentialAssembly::addCut ( std::string  name,
Stream in,
Stream out 
)

includes a new cut to the collection

Parameters
namethe tag of the out-stream (without the bis suffix)
inIf the stream XXX->YYY is cut, a pointer to tag of the source->YYY end (typically SSSbis)
outIf the stream XXX->YYY is cut, a pointer to the XXX->sink end (i.e. SSS)

◆ damping()

double SequentialAssembly::damping ( void  ) const

returns current value of the damping coefficient for direct substitution

◆ deltaseq()

double SequentialAssembly::deltaseq ( void  ) const

◆ directstep()

void SequentialAssembly::directstep ( void  )

Updates *LHSP with RHS using Wegstein accelerated direct substitution for all Assignments.

◆ isAssignmentActive()

virtual bool SequentialAssembly::isAssignmentActive ( std::list< Assignment * >::iterator &  q) const
protectedpure virtual

will be implemented in Model-aware derived class

Implemented in FlowSheet.

◆ makeAssignment()

void SequentialAssembly::makeAssignment ( std::list< Assignment * >::iterator &  p,
Value lhs,
Value  rhs,
std::string  tag,
std::string  rhsstring,
int  i,
Libpf::Utility::ScalingMode  sm = Libpf::Utility::ScalingMode::noscaling,
double  xmin = 0.0,
double  xmax = 1.0,
Value  factor = One 
)

add or evaluate one new Assignment to the collection and increment id; sets scaling

Parameters
ppointer to the current position in the Assignment container; indicates whether we are adding (p == ass_.end()) or evaluating
lhsthe left hand side, a Value lvalue where the result of the right hand side should be written
rhsthe right hand side
tagthe descriptive tag
rhsstringthe right hand side as a string
ia hack to handle Assignments inside loops ...
smScalingMode
xminminimum unscaled value
xmaxmaximum unscaled value
factorresidual will be multiplied by this factor when solving simultaneously
See also
Assignment::Assignment

◆ maxChange()

double SequentialAssembly::maxChange ( void  ) const

returns current value of maximum relative step change for direct substitution

◆ neqs()

int SequentialAssembly::neqs ( void  ) const

returns the number of Assignments

◆ operator<<()

Assignment * SequentialAssembly::operator<< ( Assignment ep)

includes a new Assignment to the corresponding collection

◆ print()

void SequentialAssembly::print ( void  ) const

◆ purgeAss()

void SequentialAssembly::purgeAss ( void  )

delete all equations

◆ removeCut()

void SequentialAssembly::removeCut ( std::string  tag)

removes a cut from the collection

Parameters
tagthe tag of the out-stream (without the bis suffix)

◆ setDamping()

void SequentialAssembly::setDamping ( double  d)

set damping coefficient for direct substitution

◆ setMaxChange()

void SequentialAssembly::setMaxChange ( double  c)

set maximum relative step change for direct substitution

◆ wegsteinstep()

void SequentialAssembly::wegsteinstep ( void  )

Substitutes RHS into *LHSP for all Assignments.

Member Data Documentation

◆ ass_

std::list<Assignment *> SequentialAssembly::ass_

collection of Assignments, containing the assembly of explicit equations

◆ cuts_

std::map<std::string, Cut *> SequentialAssembly::cuts_

collection of cut streams to automatically generate the Assignments converging them

◆ scalers_

std::vector<Scaler *> SequentialAssembly::scalers_

collection of optional scalers for the unknowns


The documentation for this class was generated from the following file: