Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • airGRiwrm airGRiwrm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

La forge institutionnelle d'INRAE étant en production depuis le 10 juin 2025, nous vous recommandons d'y créer tous vos nouveaux projets.

  • IN-WOP
  • airGRiwrmairGRiwrm
  • Issues
  • #161
Closed
Open
Issue created Jun 27, 2024 by Dorchies David@david.dorchiesOwner

Reservoir release cannot be regulated by a Controller if there is a Diversion on the reservoir

This is a regression due to the implementation of #146 (closed) allowing Diversion in the reservoir.

Both Qrelease and Qdiv are variables provided by the user and can be controlled by the Supervisor. However, since the location of the command U is only defined by the node ID and both diversion and reservoir have the same node ID, only one of them can be addressed. In the code, we see that only Diversion would be considered in case of the presence of a Diversion in a Reservoir:

    if (sv$nodeProperties[locU, "DirectInjection"]) {
      # Direct injection node => update Qusptream of downstream node
      node <- sv$griwrm4U$down[sv$griwrm4U$id == locU]
      # ! Qupstream contains warm up period and run period => the index is shifted
      if (!is.null(sv$InputsModel[[node]])) {
        sv$InputsModel[[node]]$Qupstream[sv$ts.index0 + sv$ts.index, locU] <- U
      }
    } else if (sv$nodeProperties[locU, "Diversion"]){
      # Diversion node => update Qdiv with -U
      sv$InputsModel[[locU]]$Qdiv[sv$ts.index0 + sv$ts.index] <- -U
    } else if (sv$nodeProperties[locU, "Reservoir"]) {
      sv$InputsModel[[locU]]$Qrelease[sv$ts.index0 + sv$ts.index] <- U
    } else {
      stop("Node ", locU, " must be a Direct Injection or a Diversion node")
    }
Assignee
Assign to
Time tracking