Spec Class

Represents a Spec (specification) block that copies a property from a source simulation object, evaluates an optional mathematical expression using that value, and writes the result to a target simulation object. Optionally clamps the result within configurable minimum/maximum bounds.

Definition

Namespace: DWSIM.UnitOperations.SpecialOps
Assembly: DWSIM.UnitOperations (in DWSIM.UnitOperations.dll) Version: 10.0.0.0
[SerializableAttribute]
public class Spec : SpecialOpBaseClass, ISpec
Inheritance
Object    BaseClass    SpecialOpBaseClass    Spec
Implements
ISpec

Constructors

SpecInitializes a new default instance of the Spec class.
Spec(String, String) Initializes a new instance of the Spec class with a name and description.

Properties

AdjustVarType If an Adjust object is attached to this object, returns a variable describing how this object is used by it (manipulated, controlled or reference).
(Inherited from BaseClass)
Annotation
(Inherited from BaseClass)
AttachedAdjustId If an Adjust object is attached to this object, returns its ID.
(Inherited from BaseClass)
AttachedInfoCarrierId
(Inherited from BaseClass)
AttachedSpecId If an Specification object is attached to this object, returns its ID.
(Inherited from BaseClass)
AttachedUtilities
(Inherited from BaseClass)
Bottom
(Inherited from BaseClass)
Calculated
(Inherited from BaseClass)
CalculateTargetObjectGets or sets whether the target simulation object should be recalculated after the specification is applied.
CanUsePreviousResults
(Inherited from BaseClass)
ComponentDescription
(Inherited from BaseClass)
ComponentName
(Inherited from BaseClass)
CreateChartAction
(Inherited from BaseClass)
DebugMode
(Inherited from BaseClass)
DebugText
(Inherited from BaseClass)
DetailedDebugReport
(Inherited from BaseClass)
DynamicsOnly
(Inherited from BaseClass)
DynamicsSpec
(Inherited from BaseClass)
EnergyFlow Energy Flow property. Only implemented for Energy Streams.
(Inherited from BaseClass)
ErrorMessage Gets or sets the error message regarding the last calculation attempt.
(Inherited from BaseClass)
ExpContextGets or sets the expression evaluation context providing variable bindings and math imports (not serialized).
ExprGets or sets the compiled generic expression object used to evaluate the specification formula (not serialized).
ExpressionGets or sets the mathematical expression string evaluated by this spec block (variables: X = source value, Y = target value).
ExtraProperties
(Inherited from BaseClass)
ExtraPropertiesDescriptions
(Inherited from BaseClass)
ExtraPropertiesTypes
(Inherited from BaseClass)
ExtraPropertiesUnitTypes
(Inherited from BaseClass)
FlowSheet Gets the current flowsheet where this object is located.
(Inherited from BaseClass)
GHGEmissionData
(Inherited from BaseClass)
GraphicObject Gets or sets the graphic object representation of this object in the flowsheet.
(Inherited from BaseClass)
HasPropertiesForDynamicModeGets a value indicating whether this block exposes properties for dynamic mode.
(Overrides BaseClassHasPropertiesForDynamicMode)
Height
(Inherited from BaseClass)
InfoCarrierVarType
(Inherited from BaseClass)
IsAdjustAttached Checks if an Adjust operation is attached to this object.
(Inherited from BaseClass)
IsDirty
(Inherited from BaseClass)
IsFunctional
(Inherited from BaseClass)
IsInfoCarrierAttached
(Inherited from BaseClass)
IsSink
(Inherited from BaseClass)
IsSource
(Inherited from BaseClass)
IsSpecAttached Checks if an Specification operation is attached to this object.
(Inherited from BaseClass)
LastSolutionInputSnapshot
(Inherited from BaseClass)
LastUpdated
(Inherited from BaseClass)
Left
(Inherited from BaseClass)
MaxValGets or sets the optional upper bound clamping value applied to the evaluated expression result.
MinValGets or sets the optional lower bound clamping value applied to the evaluated expression result.
MobileCompatibleGets a value indicating whether this block is compatible with the DWSIM mobile interface.
(Overrides BaseClassMobileCompatible)
Name Object's Unique ID (Name)
(Inherited from BaseClass)
ObjectClass Gets or sets the simulation object class, which is always Logical for special operations.
(Inherited from SpecialOpBaseClass)
OverrideCalculationRoutine
(Inherited from BaseClass)
Phases Phase collection, only implemented for Material Streams.
(Inherited from BaseClass)
PreferredFlashAlgorithmTag
(Inherited from BaseClass)
ProductAssembly
(Inherited from BaseClass)
ProductAuthor
(Inherited from BaseClass)
ProductContactInfo
(Inherited from BaseClass)
ProductDescription
(Inherited from BaseClass)
ProductName
(Inherited from BaseClass)
ProductPage
(Inherited from BaseClass)
ProductVersion
(Inherited from BaseClass)
PropertyPackage
(Inherited from BaseClass)
ReferenceObjectIDGets or sets the unique ID of the reference simulation object used for relative expressions.
Right
(Inherited from BaseClass)
SourceObjectGets or sets the source simulation object instance (not serialized).
SourceObjectDataGets or sets the metadata describing the source simulation object and property whose value is read.
SpecCalculationModeGets or sets the calculation mode that determines when this spec block is evaluated.
SpecVarType If an Specification object is attached to this object, returns a variable describing how this object is used by it (target or source).
(Inherited from BaseClass)
StatusGets or sets a status message describing the outcome of the last calculation attempt.
StoreDetailedDebugReport
(Inherited from BaseClass)
SupportsDynamicModeGets a value indicating whether this block supports dynamic simulation mode.
(Overrides BaseClassSupportsDynamicMode)
TargetObjectGets or sets the target simulation object instance (not serialized).
TargetObjectDataGets or sets the metadata describing the target simulation object and property that receives the expression result.
Top
(Inherited from BaseClass)
UserDefinedChartNames
(Inherited from BaseClass)
Visible
(Inherited from BaseClass)
Width
(Inherited from BaseClass)

Methods

AddDynamicProperty
(Inherited from BaseClass)
AddExtraProperty
(Inherited from BaseClass)
AppendDebugLine
(Inherited from BaseClass)
Calculate Evaluates the expression and writes the result to the target simulation object's property. Clamps the result within MinVal and MaxVal if both are set.
(Overrides BaseClassCalculate(Object))
CheckDirtyStatus
(Inherited from BaseClass)
CheckSpec Checks if a value is valid.
(Inherited from BaseClass)
ClearExtraProperties
(Inherited from BaseClass)
ClearPropertyPackageInstance
(Inherited from BaseClass)
Clone Clones the current object, returning a new one with identical properties.
(Inherited from BaseClass)
CloneJSONCreates a deep copy of this spec block via JSON serialization.
(Overrides BaseClassCloneJSON)
CloneXMLCreates a deep copy of this spec block via XML serialization.
(Overrides BaseClassCloneXML)
CloseDynamicsEditForm
(Inherited from BaseClass)
CloseEditFormCloses and disposes the editing form for this spec block if it is open.
(Overrides BaseClassCloseEditForm)
ConnectEnergyStream
(Inherited from BaseClass)
ConnectFeedEnergyStream
(Inherited from BaseClass)
ConnectFeedMaterialStream
(Inherited from BaseClass)
ConnectProductEnergyStream
(Inherited from BaseClass)
ConnectProductMaterialStream
(Inherited from BaseClass)
CopyDataToClipboard Copies the object properties to the Clipboard.
(Inherited from BaseClass)
CreateDynamicProperties
(Inherited from BaseClass)
CreateNew
(Inherited from BaseClass)
DeCalculate
(Inherited from BaseClass)
DisplayDynamicsEditForm
(Inherited from BaseClass)
DisplayEditFormOpens or activates the editing form for this spec block.
(Overrides BaseClassDisplayEditForm)
DisplayExtraPropertiesEditForm
(Inherited from BaseClass)
Dispose
(Inherited from BaseClass)
Dispose(Boolean)
(Inherited from BaseClass)
FT Formats a property string, adding its units in parenthesis.
(Inherited from BaseClass)
GetAsObject
(Inherited from BaseClass)
GetBytesFromResource
(Inherited from BaseClass)
GetChartModel
(Inherited from BaseClass)
GetChartModelNames
(Inherited from BaseClass)
GetConnectionPortsInfo
(Inherited from BaseClass)
GetConnectionPortsList
(Inherited from BaseClass)
GetDebugReport
(Inherited from BaseClass)
GetDebugWriter
(Inherited from BaseClass)
GetDefaultProperties
(Inherited from BaseClass)
GetDisplayDescriptionReturns the localized display description for the spec block type.
(Overrides BaseClassGetDisplayDescription)
GetDisplayNameReturns the localized display name for the spec block type.
(Overrides BaseClassGetDisplayName)
GetDynamicContents
(Inherited from BaseClass)
GetDynamicProperty
(Inherited from BaseClass)
GetDynamicPropertyUnitType
(Inherited from BaseClass)
GetDynamicResidenceTime
(Inherited from BaseClass)
GetDynamicVolume
(Inherited from BaseClass)
GetEditingForm
(Inherited from BaseClass)
GetEnergyBalanceResidual
(Inherited from BaseClass)
GetEnergyConsumption
(Inherited from BaseClass)
GetExtraPropertyValue
(Inherited from BaseClass)
GetFlowsheet
(Inherited from BaseClass)
GetIconBitmapReturns the icon bitmap resource for the spec block.
(Overrides BaseClassGetIconBitmap)
GetIconBitmapBytesReturns the raw bytes of the spec block icon image resource.
(Overrides BaseClassGetIconBitmapBytes)
GetMassBalanceResidual
(Inherited from BaseClass)
GetPowerGeneratedOrConsumed
(Inherited from BaseClass)
GetPreferredGraphicObjectHeight
(Inherited from BaseClass)
GetPreferredGraphicObjectWidth
(Inherited from BaseClass)
GetProperties Returns the list of property identifiers available for this spec block.
(Overrides BaseClassGetProperties(PropertyType))
GetProperties2
(Inherited from BaseClass)
GetPropertyDescription
(Inherited from BaseClass)
GetPropertyUnit Returns the unit string for the specified property.
(Overrides BaseClassGetPropertyUnit(String, IUnitsOfMeasure))
GetPropertyUnits2
(Inherited from BaseClass)
GetPropertyValue Returns the value of the specified property.
(Overrides BaseClassGetPropertyValue(String, IUnitsOfMeasure))
GetPropertyValue2
(Inherited from BaseClass)
GetReport
(Inherited from BaseClass)
GetSourceVarUnitReturns the unit string for the source variable in the active unit system.
GetSourceVarValue Returns the current value of the source variable in the active unit system.
GetStructuredReport
(Inherited from BaseClass)
GetTargetVarUnitReturns the unit string for the target variable in the active unit system.
GetTargetVarValue Returns the current value of the target variable in the active unit system.
GetVersion
(Inherited from BaseClass)
IsDynamicProperty
(Inherited from BaseClass)
LoadData Restores the spec block state from a list of XML elements.
(Overrides BaseClassLoadData(ListXElement))
ObjectCopy
(Inherited from BaseClass)
ParseExpression Compiles and evaluates the expression string using the current source (X) and target (Y) variable values.
PerformPostCalcValidation
(Inherited from BaseClass)
RemoveDynamicProperty
(Inherited from BaseClass)
RemoveExtraProperty
(Inherited from BaseClass)
RunDynamicModel
(Inherited from BaseClass)
SaveData Serializes the spec block state to a list of XML elements for persistence.
(Overrides BaseClassSaveData)
SetCanUsePreviousResults
(Inherited from BaseClass)
SetDirtyStatus
(Inherited from BaseClass)
SetDynamicProperty
(Inherited from BaseClass)
SetExtraPropertyValue
(Inherited from BaseClass)
SetFlowsheet Sets the Flowsheet to which this object belongs to.
(Inherited from BaseClass)
SetPropertyPackageInstance
(Inherited from BaseClass)
SetPropertyValue Sets the value of the specified property.
(Overrides BaseClassSetPropertyValue(String, Object, IUnitsOfMeasure))
SetPropertyValue2
(Inherited from BaseClass)
SetTargetVarValue Writes a value to the target variable of the configured target simulation object.
Solve
(Inherited from BaseClass)
StoreDebugReport
(Inherited from BaseClass)
ToString
(Inherited from BaseClass)
TransferAdditionalSolidData
(Inherited from BaseClass)
UpdateDynamicsEditForm
(Inherited from BaseClass)
UpdateEditFormRefreshes the displayed data in the editing form if it is currently open.
(Overrides BaseClassUpdateEditForm)
UpdateExtraPropertiesEditForm
(Inherited from BaseClass)
Validate Validates the object, checking its connections and other parameters.
(Inherited from BaseClass)

Fields

Extension Methods

GetEnumNames
(Defined by General)
IsValidDouble
(Defined by General)

See Also