.NET Interface to CHEMCAD
1.1.11
|
Entry object for using CHEMCAD as a COM server More...
Public Member Functions | |||||||||||||||||
ServerImpl (string licenseKey) | |||||||||||||||||
Initialize a Server, load the configuration and validates the license. More... | |||||||||||||||||
void | Dispose (bool disposing) | ||||||||||||||||
Realease chemcad server and deactivete license. More... | |||||||||||||||||
Flowsheet | LoadFlowsheet (string path) | ||||||||||||||||
Opens a flowsheet from a user defined path and allows access to this flowsheet. Table of errors thrown:
| |||||||||||||||||
void | CloseSimulation () | ||||||||||||||||
void | Run () | ||||||||||||||||
Executes the simulation. More... | |||||||||||||||||
void | Save () | ||||||||||||||||
Saves this flowsheet to file. More... | |||||||||||||||||
void | Pause () | ||||||||||||||||
Pause simulation. More... | |||||||||||||||||
void | RunOptimization () | ||||||||||||||||
Run optimization. More... | |||||||||||||||||
void | RunOptimizationFile (string path) | ||||||||||||||||
Run optimization from specified file. More... | |||||||||||||||||
OptimizationVariables | GetOptimizationVariables (string path) | ||||||||||||||||
Run all units in a steady state simulation. More... | |||||||||||||||||
void | SetOptimizationVaraibles (string filePath, OptimizationVariables optimizationVariables) | ||||||||||||||||
Set Optimization variables in the file. More... | |||||||||||||||||
void | RunDataReconciliation () | ||||||||||||||||
Run Data reconciliation and parameter estimation. More... | |||||||||||||||||
void | RunAllUnits () | ||||||||||||||||
Run all units in a steady state simulation. More... | |||||||||||||||||
void | RunSelectedUnits (params UnitOperation[] unitOps) | ||||||||||||||||
Run selected units in a steady state simulation. Select Units More... | |||||||||||||||||
void | RunNamedSequence (string name) | ||||||||||||||||
Run a namend sequence in a steady state simulation. More... | |||||||||||||||||
void | RunAllSteps () | ||||||||||||||||
Run all steps in a dynamic simulation. More... | |||||||||||||||||
void | RunStep () | ||||||||||||||||
Run one step in a dynamic simulation. More... | |||||||||||||||||
void | RestoreToInitialState () | ||||||||||||||||
Restore dynamic simulation to initial state. More... | |||||||||||||||||
void | SetCurrentAsInitialState () | ||||||||||||||||
Sets the current state as the initial state. More... | |||||||||||||||||
void | TakeSnapshot (string name) | ||||||||||||||||
Take snapshot of the current simulation state. More... | |||||||||||||||||
void | LoadSnapshot (string name) | ||||||||||||||||
Load snapshot of simulation state. More... | |||||||||||||||||
string | GetJobAt (short jobIndex) | ||||||||||||||||
Gets the job at specified index. More... | |||||||||||||||||
short | GetNumberOfCasesInJob (string jobpath) | ||||||||||||||||
Gets the number of cases in the job. More... | |||||||||||||||||
string | GetCaseAt (string jobPath, short caseIndex) | ||||||||||||||||
Gets the case from the job at specified number More... | |||||||||||||||||
Protected Member Functions | |
void | ExecuteAndLogUsage (string command, Action action) |
void | LogUsage (string command, string message, TimeSpan duration, Exception ex=null) |
string | Sha1Hash (string input) |
Properties | |
override Flowsheet | CurrentFlowsheet [get] |
The flowsheet that is currently loaded More... | |
string | RuntimeMessages [get] |
Returns the runtime messages of CHEMCAD. More... | |
float | TimeInMinute [get] |
Returns the time of a dynamic simulation in minutes. More... | |
float | TimeStepInMinute [get] |
Returns the time step of a dynamic simulation in minutes. More... | |
float | TimeScale [get, set] |
Time scale used for operator training system. More... | |
new int | Version [get] |
Returns the current version of CHEMCAD. More... | |
string | WorkingDirectory [get, set] |
Gets the working directory used by CHEMCAD. More... | |
short | GetNumberOfJobsInWorkDirectory [get] |
Gets the number of jobs in the working directory. More... | |
int | PId [get] |
Properties inherited from CCAPI.Chemcad | |
abstract Flowsheet | CurrentFlowsheet [get] |
The currently opened flowsheet. More... | |
int | Version [get] |
Returns the current version of CHEMCAD. More... | |
Properties inherited from CCAPI.IServer | |
int | PId [get] |
Flowsheet | CurrentFlowsheet [get] |
string | RuntimeMessages [get] |
float | TimeInMinute [get] |
float | TimeStepInMinute [get] |
float | TimeScale [get, set] |
int | Version [get] |
string | WorkingDirectory [get, set] |
Entry object for using CHEMCAD as a COM server
CCAPI.ServerImpl.ServerImpl | ( | string | licenseKey | ) |
Initialize a Server, load the configuration and validates the license.
LicenseException | Code 1010. Thrown if a license was deactivated |
void CCAPI.ServerImpl.Dispose | ( | bool | disposing | ) |
Realease chemcad server and deactivete license.
disposing | Dispose any managed objects |
string CCAPI.ServerImpl.GetCaseAt | ( | string | jobPath, |
short | caseIndex | ||
) |
Gets the case from the job at specified number
string CCAPI.ServerImpl.GetJobAt | ( | short | jobIndex | ) |
Gets the job at specified index.
short CCAPI.ServerImpl.GetNumberOfCasesInJob | ( | string | jobpath | ) |
Gets the number of cases in the job.
OptimizationVariables CCAPI.ServerImpl.GetOptimizationVariables | ( | string | path | ) |
Run all units in a steady state simulation.
Flowsheet CCAPI.ServerImpl.LoadFlowsheet | ( | string | path | ) |
Opens a flowsheet from a user defined path and allows access to this flowsheet. Table of errors thrown:
Code | Error |
---|---|
100 | No license found. |
200 | File not found. |
201 | The file exists, but cannot be loaded. |
202 | CHEMCAD cannot write to the temp directory. |
203 | Another user opened the simulation. |
204 | The simulation is already open. |
205 | The simulation ZIP file is corrupted. |
ChemcadAndFlowsheetVersionsDoNotMatchException | Thrown if CHEMCAD and Flowsheet version doesn't match |
ChemcadVersionNotSupportedException | Code=2002. CHEMCAD version not yet supported. |
ChemcadLicenseNotFoundException | Code=100. Could not load flowsheet, no CHEMCAD license found. |
FlowsheetFileNotFoundException | Code=200. Could not load flowsheet, file not found. |
FlowsheetFileExistsButCannotBeLoadedException | Code=201. Could not load flowsheet, the file exists but cannot be loaded. |
ChemcadCannotWriteToTheTempDirectoryException | Code=202. Could not load flowsheet, CHEMCAD cannot write to the temp directory. |
AnotherUserOpenedTheSimulationException | Code=203. Could not load flowsheet, another user opened the simulation. |
TheSimulationIsAlreadyOpenException | Code=204. Could not load flowsheet, the simulation is already open. |
TheSimulationZipFileIsCorrupted | Code=205. Could not load flowsheet, the simulation ZIP file is corrupted. |
ChemcadException | Thrown if CHEMCAD response with an unknown error code |
Implements CCAPI.IServer.
void CCAPI.ServerImpl.LoadSnapshot | ( | string | name | ) |
void CCAPI.ServerImpl.Pause | ( | ) |
Pause simulation.
Implements CCAPI.IServer.
void CCAPI.ServerImpl.RestoreToInitialState | ( | ) |
Restore dynamic simulation to initial state.
Implements CCAPI.IServer.
void CCAPI.ServerImpl.Run | ( | ) |
Executes the simulation.
FlowsheetConvergenceException | Code 2010. Thrown if running the job failed |
Implements CCAPI.IServer.
void CCAPI.ServerImpl.RunAllSteps | ( | ) |
Run all steps in a dynamic simulation.
FlowsheetConvergenceException | Code 2020. Thrown if could not run all steps |
Implements CCAPI.IServer.
void CCAPI.ServerImpl.RunAllUnits | ( | ) |
Run all units in a steady state simulation.
FlowsheetConvergenceException | Code 2012. Thrown if running the flowsheet failed |
UnitOpRuntimeErrorException | Code 2012. Thrown if running the flowsheet failed |
Implements CCAPI.IServer.
void CCAPI.ServerImpl.RunDataReconciliation | ( | ) |
Run Data reconciliation and parameter estimation.
ChemcadException | Code 2011. Thrown if could not run optimization |
void CCAPI.ServerImpl.RunNamedSequence | ( | string | name | ) |
Run a namend sequence in a steady state simulation.
name |
ChemcadException | Code 2014. Thrown if could not run namend sequence |
Implements CCAPI.IServer.
void CCAPI.ServerImpl.RunOptimization | ( | ) |
Run optimization.
ChemcadException | Code 2011. Thrown if could not run optimization |
Implements CCAPI.IServer.
void CCAPI.ServerImpl.RunOptimizationFile | ( | string | path | ) |
Run optimization from specified file.
ChemcadException | Code 2011. Thrown if could not run optimization |
void CCAPI.ServerImpl.RunSelectedUnits | ( | params UnitOperation[] | unitOps | ) |
Run selected units in a steady state simulation. Select Units
unitOps |
ChemcadException | Code 2013. Thrown if running the selected units failed |
Implements CCAPI.IServer.
void CCAPI.ServerImpl.RunStep | ( | ) |
Run one step in a dynamic simulation.
FlowsheetConvergenceException | Code 2021. Thrown if could not run step |
Implements CCAPI.IServer.
void CCAPI.ServerImpl.Save | ( | ) |
Saves this flowsheet to file.
ChemcadException | Thrown if saving the flowsheet failed |
Implements CCAPI.IServer.
void CCAPI.ServerImpl.SetCurrentAsInitialState | ( | ) |
Sets the current state as the initial state.
Implements CCAPI.IServer.
void CCAPI.ServerImpl.SetOptimizationVaraibles | ( | string | filePath, |
OptimizationVariables | optimizationVariables | ||
) |
Set Optimization variables in the file.
void CCAPI.ServerImpl.TakeSnapshot | ( | string | name | ) |
|
get |
The flowsheet that is currently loaded
|
get |
Gets the number of jobs in the working directory.
|
get |
Returns the runtime messages of CHEMCAD.
|
get |
Returns the time of a dynamic simulation in minutes.
|
getset |
Time scale used for operator training system.
|
get |
Returns the time step of a dynamic simulation in minutes.
|
get |
Returns the current version of CHEMCAD.
|
getset |
Gets the working directory used by CHEMCAD.