Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • O OMEGAlpes
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 33
    • Issues 33
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • OMEGAlpes
  • OMEGAlpes
  • Issues
  • #30
Closed
Open
Created Jan 24, 2019 by EXT Hodencq@SachaHOwner

Soc min and soc max checks when lists

Summary

In the storage unit, there are two times the soc_min and soc_max are not properly checked when their type is list :

  • line 116 : the elements of a list of soc_min should be below the elements of a list of soc_max OR a float soc_min should be below any element of a list of soc_max OR the elements of a list of soc_min should be below a float soc_max.

  • line 238 when e_f is not None and capacity is not None, ValueError should be raised when e_f set out of bounds, when soc_min and soc_max are floats but also when they are one of the two are lists

Possible fixes

  • l 238 : Todo : the checks hereunder, taking into account soc_min and soc_max can be int or float but also lists ! if capacity is not None and (e_f > soc_max * capacity or e_f < soc_min * capacity): # the e_f value should be in between : # [soc_mincapacity; soc_maxcapacity] raise ValueError('e_f should be in the following boundaries ' '[soc_mincapacity; soc_maxcapacity] but ' 'is {0}'.format(e_f)) else:
Edited Jan 24, 2019 by EXT Hodencq
Assignee
Assign to
Time tracking