Flowsheet Base Class
Abstract base class for all DWSIM flowsheet implementations.
Provides core flowsheet functionality including simulation object management,
property package handling, calculation orchestration, undo/redo, scripting,
and XML serialization support.
Definition
Namespace: DWSIM.FlowsheetBase
Assembly: DWSIM.FlowsheetBase (in DWSIM.FlowsheetBase.dll) Version: 10.0.0.0
Assembly: DWSIM.FlowsheetBase (in DWSIM.FlowsheetBase.dll) Version: 10.0.0.0
C#
[ComVisibleAttribute(true)]
public abstract class FlowsheetBase : IFlowsheet,
IFlowsheetCalculationQueueVB
<ComVisibleAttribute(true)>
Public MustInherit Class FlowsheetBase
Implements IFlowsheet, IFlowsheetCalculationQueue- Inheritance
- Object FlowsheetBase
- Derived
- Implements
- IFlowsheet, IFlowsheetCalculationQueue
Constructors
Properties
| AvailableCompounds | |
| AvailableExternalUnitOperations | |
| AvailablePropertyPackages | Gets or sets the dictionary of property packages available for selection in this flowsheet instance. |
| AvailableSimulationObjects | |
| AvailableSystemsOfUnits | Gets or sets the list of unit-of-measure systems available for this flowsheet. |
| CalculationQueue | Gets or sets the FIFO queue of pending calculation requests consumed by the flowsheet solver. |
| Charts | |
| DynamicMode | Gets or sets a value indicating whether the flowsheet is operating in dynamic simulation mode. |
| DynamicsManager | Gets or sets the dynamics manager responsible for dynamic simulation scheduling and event handling. |
| ErrorMessage | |
| ErrorMessages | Gets or sets the list of exceptions raised during the last calculation pass. |
| ExternalSolvers | |
| ExternalUnitOperations | Gets or sets the dictionary of external (plugin-defined) unit operations registered with this flowsheet. |
| ExtraProperties | Gets or sets a dynamic property bag for attaching arbitrary extra data to the flowsheet at runtime. |
| FileDatabaseProvider | |
| FilePath | Gets or sets the full file path of the simulation file on disk. |
| FlowsheetOptions | Gets the flowsheet configuration options (units, compounds, property packages, solver settings). |
| GHGEmissionCompositions | Gets or sets the dictionary of GHG emission compositions associated with streams in this flowsheet. |
| GraphicObjects | Gets or sets the dictionary of all graphic objects currently placed on the flowsheet surface, keyed by unique ID. |
| InternalUnitOperations | Gets or sets the dictionary of internal unit operations registered with this flowsheet. |
| LastSuccessfulSolutionState | |
| MasterFlowsheet | |
| MasterUnitOp | |
| Message | |
| MessagesLog | Gets or sets the list of informational and diagnostic messages generated during simulation. |
| MobileCompatibilityMode | |
| Options | |
| ParticleSizeDistributions | |
| PropertyPackages | Gets or sets the dictionary of property packages attached to this flowsheet, keyed by unique ID. |
| PythonPreprocessor | |
| Reactions | Gets or sets the dictionary of reactions defined for this flowsheet, keyed by unique ID. |
| ReactionSets | Gets or sets the dictionary of reaction sets (groups of reactions) defined for this flowsheet, keyed by name. |
| RedirectMessages | Gets or sets a value indicating whether flowsheet messages should be redirected to an external listener instead of the UI log. |
| Results | |
| ScriptKeywordsF | Gets or sets custom script keyword definitions for flowsheet-level scripts. |
| ScriptKeywordsU | Gets or sets custom script keyword definitions for user-defined unit operation scripts. |
| Scripts | |
| SelectedCompounds | Gets or sets the ordered dictionary of compounds currently selected for this flowsheet, sorted according to the configured ordering mode. |
| SimulationObjects | Gets or sets the dictionary of all simulation objects in this flowsheet, keyed by unique ID. |
| Solved | |
| StoredSolutions | |
| SupressDataLoading | Gets or sets a value indicating whether data loading is suppressed during deserialization. |
| SupressMessages | |
| UtilityPlugins | |
| WatchItems | |
| WeatherProvider | Gets or sets the weather data provider used for ambient condition lookups. |
Methods
| AddCompound | |
| AddCompoundsToMaterialStream | Adds all compounds currently selected in the flowsheet to all phases of the given material stream, then equalises the overall composition and recalculates mass fractions. |
| AddConnectedObjects | Automatically creates and connects material/energy streams around the specified object according to the given scheme. |
| AddDefaultProperties | |
| AddExternalUOs | |
| AddFlowsheetObject | Creates a simulation object by type name at the default position (50, 50) and assigns the given object name. |
| AddGraphicObject | Adds a graphic object to both the drawing surface and the GraphicObjects dictionary. |
| AddGraphicObjects | |
| AddObject(ObjectType, Int32, Int32, String) | Creates a simulation object of the specified type, places its graphic on the surface, and returns the new object. |
| AddObject(ObjectType, Int32, Int32, String, String) | Creates a simulation object with an explicit ID, places its graphic on the surface, and returns the new object. |
| AddObject(String, Int32, Int32, String, String, Boolean) | Creates a simulation object identified by its human-readable type name and places it on the flowsheet surface. |
| AddObjectToSurface | Low-level method that instantiates the graphic and simulation objects for a given ObjectType, adds them to the drawing surface and the SimulationObjects dictionary, and returns the new object's ID. |
| AddPropertyPackage | Registers a property package with the flowsheet, assigning a unique ID and tag if not already set. |
| AddPropPacks | |
| AddReaction | |
| AddReactionSet | |
| AddReactionToSet | |
| AddSimulationObject | Adds a simulation object directly to the SimulationObjects dictionary without creating a graphic counterpart. |
| AddSimulationObjects | |
| AddSystemsOfUnits | |
| AddTables | |
| AddUndoRedoAction | |
| AutoLayout | |
| CalcReactionStoichiometry | |
| ChangeCalculationOrder | |
| CheckStatus | Checks whether the flowsheet solver should pause or abort the current calculation, e.g. on user request. |
| CheckTag | |
| ClearLog | |
| Clone | |
| CloseOpenEditForms | Closes all currently open property editors. Must be implemented by the concrete host. |
| Connect | Connects two simulation objects. If both are unit operations, an intermediate material stream is created automatically and positioned between them. |
| ConnectObject | |
| ConnectObjects | Connects two graphic objects via their connector ports and registers an undo snapshot. |
| CopyObjects | |
| CreateAndAddPropertyPackage | |
| CreateConversionReaction | Creates a conversion reaction |
| CreateEquilibriumReaction | Creates an equilibrium reaction |
| CreateHetCatReaction | creates a heterogeneous catalytic reaction |
| CreateKineticReaction | creates a kinetic reaction |
| CreatePropertyPackage | |
| CreateReactionSet | |
| CutObjects | |
| DeleteObject | |
| DeleteSelectedObject | Removes a graphic object and its associated simulation object from the flowsheet, automatically disconnecting all attached connectors and cleaning up spec/adjust references. |
| Disconnect | Disconnects two previously connected simulation objects via their graphic representations. |
| DisconnectObjects | Disconnects two previously connected graphic objects and registers an undo snapshot. |
| DisplayBrowserWindow | |
| DisplayDockableBrowserWindow | |
| DisplayForm | Displays a form or panel within the flowsheet's docking area. Must be implemented by the concrete UI host. |
| GetApplicationObject | |
| GetAvailableFlowsheetObjectTypeNames | Returns a sorted array of all built-in flowsheet object type names that can be passed to AddObject(String, Int32, Int32, String, String, Boolean). |
| GetAvailablePropertyPackages | |
| GetCompound | |
| GetDockPanel | |
| GetFlowsheetBag | |
| GetFlowsheetGraphicObject | Returns the graphic object whose user-visible tag matches the specified value. |
| GetFlowsheetSimulationObject | Returns the simulation object whose user-visible tag matches the specified value. |
| GetFlowsheetSurfaceHeight | |
| GetFlowsheetSurfaceWidth | |
| GetNewInstance | Creates and returns a new empty flowsheet instance of the same concrete type. |
| GetObject | |
| GetProcessData | |
| GetPropertyPackage | |
| GetPropertyPackages | |
| GetReaction | |
| GetReactionSet | |
| GetResultIDs | |
| GetResultUnits | |
| GetResultValue | |
| GetScriptText | |
| GetSelectedFlowsheetSimulationObject | Returns the currently selected simulation object, or searches by tag if one is provided. |
| GetSimulationFileDirectory | |
| GetSimulationFilePath | |
| GetSnapshot | |
| GetSnapshotObjectID | |
| GetSpreadsheetData | |
| GetSpreadsheetFormat | |
| GetSpreadsheetObject | |
| GetSurface | Returns the underlying GraphicsSurface used for drawing and hit-testing flowsheet objects. |
| GetSurfaceControl | Returns the UI control that hosts the drawing surface, or Nothing in non-UI contexts. |
| GetTranslatedString(String) | Looks up a localised string by key, searching flowsheet string resources first, then property name resources. Falls back to the original key if no translation is found. |
| GetTranslatedString(String, String) | Overload that ignores locale and delegates to GetTranslatedString(String). |
| GetUtility | |
| Initialize | |
| IsZipFilePasswordProtected | |
| LoadExtenders | |
| LoadFromExtensionsFolder | |
| LoadFromMXML | |
| LoadFromXML | |
| LoadProcessData | |
| LoadZippedXML | |
| LoadZippedXMLDoc | |
| NaturalLayout | |
| PasteObjects | |
| ProcessRedo | |
| ProcessScripts | |
| ProcessUndo | |
| RefreshInterface | |
| RegisterSnapshot | |
| ReleaseResources | |
| RequestCalculation | Requests a flowsheet calculation, optionally scoped to a single changed object. When sender is provided the object is queued and the solver runs asynchronously. |
| RequestCalculation2 | Requests a full flowsheet calculation, optionally blocking the calling thread until it completes. |
| RequestCalculation3 | Requests a calculation scoped to a single object, or a full solve when Obj is Nothing. |
| RequestCalculationAndWait | Runs a full flowsheet calculation synchronously and returns any exceptions raised during the solve. |
| RequestSave | |
| RequestSaveWithDirectory | |
| RequestSaveWithPath | |
| Reset | |
| ResetCalculationStatus | Marks all simulation objects as dirty and uncalculated, forcing a full recalculation on the next solve request. |
| RestoreLastSuccessfulSolutionState | |
| RestoreSnapshot | |
| RunCodeOnUIThread | |
| RunCodeOnUIThread2 | |
| RunScript | |
| RunScript_IronPython | |
| RunScript_PythonNET | |
| RunScriptAsync | |
| SaveCurrentStateAsLastSuccessfulSolution | |
| SavePFDScreenshotToPNG | |
| SaveToMXML | |
| SaveToXML | |
| SetDirtyStatus | |
| SetMessageListener | |
| SetPropertyResourcesManager | Sets the resource manager used for resolving localised property names in this flowsheet. |
| SetResourcesManager | Sets the resource manager used for resolving localised strings in this flowsheet. |
| SetTranslateTextExternalFunction | |
| ShowDebugInfo | Writes a debug message at the specified verbosity level to the diagnostic output. Must be implemented by the concrete host. |
| ShowMessage | Displays a message to the user via the log panel or equivalent output. Must be implemented by the concrete host. |
| Solve | Requests a full flowsheet calculation using the configured solver mode. |
| ToggleFlowsheetAnimation | |
| TriggerNewDataLoadedEvent | Raises the new-data-loaded event. Override in derived classes to update the UI after data changes. |
| UnloadExtenders | |
| UpdateInformation | |
| UpdateInterface | |
| UpdateMassAndEnergyBalance | |
| UpdateOpenEditForms | Refreshes all open property editors to reflect the current state of simulation objects. Must be implemented by the concrete host. |
| UpdateSpreadsheet | |
| WriteSpreadsheetVariables |
Events
| FlowsheetLoadedFromXML | Raised after the flowsheet state has been successfully deserialized from XML. |
| FlowsheetLoadingFromXML | Raised just before the flowsheet state is deserialized from XML. |
| FlowsheetSavedToXML | Raised after the flowsheet state has been successfully serialized to XML. |
| FlowsheetSavingToXML | Raised just before the flowsheet state is serialized to XML. |
Fields
| _translatefunction | Optional translation function used to localize strings returned by GetTranslatedString(String). |
| AvailablePropPacks | |
| Extenders | Shared list of extender collections that add custom menu items or initialization scripts to flowsheet windows. |
| FlowsheetSurface | |
| GetSpreadsheetObjectFunc | Function that returns the active spreadsheet object for scripting access. |
| loaded | |
| LoadSpreadsheetData | Delegate invoked to load spreadsheet data from the simulation XML document. |
| ObjectList | |
| OptimizationCollection | Collection of optimization cases defined for this flowsheet. |
| prm | |
| RedoStack | Stack of serialized snapshots used to support redo operations. |
| RetrieveSpreadsheetData | Function that retrieves cell values from the spreadsheet by range address. |
| RetrieveSpreadsheetFormat | Function that retrieves cell formatting information from the spreadsheet by range address. |
| rm | |
| SaveSpreadsheetData | Delegate invoked to load spreadsheet data from the simulation XML document. |
| SensAnalysisCollection | Collection of sensitivity analysis cases defined for this flowsheet. |
| UndoStack | Stack of serialized snapshots used to support undo operations. |
Extension Methods
| GetEnumNames | (Defined by General) |
| IsValidDouble | (Defined by General) |