src/app/services/model-run.service.ts
Interface with SWIM model execution services.
Properties |
|
Methods |
|
constructor(http: HttpClient, http2: HttpClient, handler: HttpBackend, router: Router, loggerService: LoggerService, locale: string, errorHandler: ErrorHandlerService)
|
||||||||||||||||||||||||
|
Class constructor uses http client class
Parameters :
|
| appendScenarioTheme | ||||||||
appendScenarioTheme(themeID: string)
|
||||||||
|
Append the scenario themes selected for this run
Parameters :
Returns :
void
|
| getAppendableInputList | ||||||||
getAppendableInputList(units: string)
|
||||||||
|
Get model inputs filtered by units
Parameters :
Returns :
{}
|
| getAppendableList | ||||||||||||
getAppendableList(units: string, exclude: string)
|
||||||||||||
|
Get model outputs filtered by units, excuding one of the outputs
Parameters :
Returns :
{}
|
| getModelID |
getModelID()
|
|
Get the id of the currently loaded model
Returns :
any
the id of the current model |
| getProjectionStart |
getProjectionStart()
|
|
returns start date of projection included in the user scenario spec. To use on output details
Returns :
any
|
| getProjectionStartInner |
getProjectionStartInner()
|
|
returns the start date of projection locally set on the service, not on the scenario spec before the run. To use on theme learn more and input details.
Returns :
string
|
| getScenarioDescription |
getScenarioDescription()
|
|
Gets current user scenario description text
Returns :
string
|
| getScenarioID |
getScenarioID()
|
|
Get the id of the executed user scenario
Returns :
any
the id of the current executed scenario |
| getScenarioName |
getScenarioName()
|
|
Get the name of the scenario
Returns :
any
|
| getScenarioThemes |
getScenarioThemes()
|
|
Returns list of scenario themes linked to this model
Returns :
{}
|
| getScenarioUpdateListener |
getScenarioUpdateListener()
|
|
Scenario update observable object
Returns :
any
observable scenario updated object |
| getToolStatus |
getToolStatus()
|
|
Returns the dynamic tool status
Returns :
boolean
|
| getUserRole |
getUserRole()
|
|
gets the role of the user
Returns :
string
|
| modelServicePing | ||||||||
modelServicePing(modelID: string)
|
||||||||
|
Ping a model service
Parameters :
Returns :
void
|
| resetScenarioDescription |
resetScenarioDescription()
|
|
Returns :
void
|
| setProjectionStart | ||||||
setProjectionStart(start: string)
|
||||||
|
set projection start date
Parameters :
Returns :
void
|
| setScenarioDescription | ||||||||
setScenarioDescription(description: string)
|
||||||||
|
Sets user scenario description
Parameters :
Returns :
void
|
| setToolStatus | ||||||||
setToolStatus(hide: boolean)
|
||||||||
|
Hide or show flag for dynamic tools on the output details
Parameters :
Returns :
void
|
| setUserRole | ||||||||
setUserRole(role: string)
|
||||||||
|
sets the role of the user
Parameters :
Returns :
void
|
| submitModelScenario | ||||||||
submitModelScenario(modelScenario: UserScenario)
|
||||||||
|
Submits a model scenario for execution Local Development: http://localhost:9280/runmodel --> Scilab Service http://localhost:9179/user-scenario-input --> GAMS Service Testing Server: https://services.cybershare.utep.edu/swim-scilab/runmodel/ --> Scilab Service https://services.cybershare.utep.edu/water/distribuitor/ --> GAMS Service
Parameters :
Returns :
void
|
| updateModelDescription | ||||||||
updateModelDescription(description: string)
|
||||||||
|
Update the model scenario description
Parameters :
Returns :
void
|
| updateModelScenario | ||||||||
updateModelScenario(scenario: UserScenario)
|
||||||||
|
Update the model scenario without triggering the observable object. Used when loading saved runs from the database.
Parameters :
Returns :
void
|
| Private hideTools |
Default value : false
|
|
Hide Dynamic Data Tools Flag |
| Public lanIndex |
Type : number
|
Default value : 0
|
|
Language Index |
| Public locale |
Type : string
|
Decorators :
@Inject(LOCALE_ID)
|
| Private modelScenario |
Type : UserScenario
|
|
Holds the user scenario specification |
| Private modelScenarioUpdated |
Default value : new Subject<UserScenario>()
|
|
Subscribable subject to updates on the user scenario specification |
| Private projectionStart |
Type : string
|
Default value : '2020'
|
|
Projection start year |
| Private running |
Default value : false
|
|
Model Semaphore |
| Private scenarioDescription |
Type : string
|
Default value : ''
|
|
Descriptive text of user scenario added to the descripton field before model run |
| Public scenarioThemes |
Type : string[]
|
Default value : new Array()
|
|
Scenario themes linked to this run |
| Private userRole |
Type : string
|
|
Holds the user selected role |