Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplifing / normalizing tariffs #58

Open
rudolphfroger opened this issue Oct 4, 2023 · 0 comments
Open

Simplifing / normalizing tariffs #58

rudolphfroger opened this issue Oct 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@rudolphfroger
Copy link
Contributor

rudolphfroger commented Oct 4, 2023

It would be great if the tool could simplify tariffs by removing everything which has no effect.

Example with price components which do nothing:

{
  "id": "EXAMPLE",
  "currency": "EUR",
  "elements": [
    {
      "price_components": [
        {
          "type": "FLAT",
          "price": 0,
          "step_size": 1
        },
        {
          "type": "TIME",
          "price": 0,
          "step_size": 1
        },
        {
          "type": "ENERGY",
          "price": 0.54,
          "step_size": 1
        }
      ]
    }
  ],
  "last_updated": "2023-10-04T07:15:01.745Z"
}

Is equal to:

{
  "id": "EXAMPLE",
  "currency": "EUR",
  "elements": [
    {
      "price_components": [
        {
          "type": "ENERGY",
          "price": 0.54,
          "step_size": 1
        }
      ]
    }
  ],
  "last_updated": "2023-10-04T07:15:01.745Z"
}

Another typical example are restrictions which do not restrict anything. Such as:

  • "start_time": "00:00", "stop_time": "00:00"
  • probably not correct but with the same intention: "start_time": "00:00", "stop_time": "23:59"
  • "day_of_week": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]
  • "min_duration": 0 (probably goes for all min_* restrictions)

Also having more generic tariff elements (for a certain dimension) specified before more restricting elements makes the latter one unnecessary.

I expect that tariffs with these no-op components and no-op restrictions exist because the OCPI tariff structure is generated in a way which always specified these things.

@rudolphfroger rudolphfroger added the enhancement New feature or request label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant