Add new calculate_price-projet.

This commit is contained in:
Gerhard Hoffmann 2023-01-23 15:50:37 +01:00
commit 68110d524b
30 changed files with 44523 additions and 0 deletions

5
calculate_parking.pro Normal file
View File

@ -0,0 +1,5 @@
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = calculate_parking_tickets main
main.depends = calculate_parking_tickets

View File

@ -0,0 +1,4 @@
p 24*60
p 24*60*7
p 24*60*7*2
quit

View File

@ -0,0 +1,5 @@
#include "calculate_parking_tickets.h"
Calculate_parking_tickets::Calculate_parking_tickets()
{
}

View File

@ -0,0 +1,12 @@
#ifndef CALCULATE_PARKING_TICKETS_H
#define CALCULATE_PARKING_TICKETS_H
#include "calculate_parking_tickets_global.h"
class CALCULATE_PARKING_TICKETS_EXPORT Calculate_parking_tickets
{
public:
Calculate_parking_tickets();
};
#endif // CALCULATE_PARKING_TICKETS_H

View File

@ -0,0 +1,46 @@
QT -= gui
TEMPLATE = lib
DEFINES += CALCULATE_PARKING_TICKETS_LIBRARY
CONFIG += c++11
QMAKE_CXXFLAGS += -Wno-deprecated-copy
INCLUDEPATH += ./rapidjson
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
calculate_parking_tickets.cpp \
calculate_parking_tickets_utils.cpp \
calculate_parking_tickets_day.cpp \
calculate_parking_tickets_algorithms.cpp \
calculate_parking_tickets_tariff.cpp \
calculate_parking_tickets_tariff_step.cpp
HEADERS += \
calculate_parking_tickets_global.h \
calculate_parking_tickets.h \
calculate_parking_tickets_utils.h \
calculate_parking_tickets_tariff_step.h \
calculate_parking_tickets_day.h \
calculate_parking_tickets_algorithms.h \
calculate_parking_tickets_tariff.h
OTHER_FILES += germersheim.conf
# Default rules for deployment.
unix {
target.path = /usr/lib
}
!isEmpty(target.path): INSTALLS += target

View File

@ -0,0 +1,314 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.0, 2022-12-23T20:06:58. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{c2bbab97-5376-485d-80a0-17f0450f5730}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{fb1cff28-cc0f-4303-b6a9-21ad8289ece7}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/linux/build-calculate_parking_tickets-Desktop-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Erstellen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Erstellen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Bereinigen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Bereinigen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/linux/build-calculate_parking_tickets-Desktop-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Erstellen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Erstellen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Bereinigen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Bereinigen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/linux/build-calculate_parking_tickets-Desktop-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Erstellen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Erstellen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Bereinigen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Bereinigen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
<value type="QString">cpu-cycles</value>
</valuelist>
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
<value type="int" key="Analyzer.Perf.Frequency">250</value>
<valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
<value type="QString">-e</value>
<value type="QString">cpu-cycles</value>
<value type="QString">--call-graph</value>
<value type="QString">dwarf,4096</value>
<value type="QString">-F</value>
<value type="QString">250</value>
</valuelist>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>

View File

@ -0,0 +1,323 @@
#include "calculate_parking_tickets_algorithms.h"
#include "calculate_parking_tickets_global.h"
#include "calculate_parking_tickets_tariff_step.h"
#include "calculate_parking_tickets_utils.h"
#include "calculate_parking_tickets_tariff.h"
#include "calculate_parking_tickets_day.h"
#include <QDebug>
#include <QDateTime>
#include <cmath>
/* BEGRIFFE
bezahltes Parken am Ende der Parkdauer vor Einsteigen ins Auto:
pay on foot parking
bezahltes Parken am Anfang der Parkdauer und Quittung an der Windschutzscheibe
pay and display parking
Parkdauer
parking time
Parkschein
parking voucher
Parkgutschein
parking voucher
Maximale Parkdauer
maximal parking time
*/
#if 0
bool get_price(parking_tariff_t const *tariff, QDateTime const &qdt,
uint32_t &price_units) {
QDate const &qdate = qdt.date();
QTime const &qtime = qdt.time();
qDebug() << qdate << qtime;
if (!TUtils::isHoliday(tariff, qdate)) {
int const dayOfWeek = qdate.dayOfWeek();
switch (dayOfWeek) {
case Qt::Monday:
return Monday::price(tariff, qtime, &price_units);
case Qt::Tuesday:
return Tuesday::price(tariff, qtime, &price_units);
case Qt::Wednesday:
return Wednesday::price(tariff, qtime, &price_units);
case Qt::Thursday:
return Thursday::price(tariff, qtime, &price_units);
case Qt::Friday:
return Friday::price(tariff, qtime, &price_units);
case Qt::Saturday:
return Saturday::price(tariff, qtime, &price_units);
case Qt::Sunday:
return Sunday::price(tariff, qtime, &price_units);
}
}
return false;
// return Holiday::price(tariff, qtime, &price_units);
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
static bool checkCalculatePreConditions(parking_tariff_t const* tariff,
minute_t startMinute, // CET
minute_t endMinute, // CET
struct price_t *price) {
if (startMinute > endMinute) {
qCritical() << "startMinute > endMinute ("
<< startMinute << endMinute << ")";
return false;
}
minute_t const parkingTime = endMinute - startMinute;
if (parkingTime == 0) {
qCritical() << "startMinute == endMinute => no parking time";
return false;
}
if (tariff->max_parking_time != -1) {
if (parkingTime > tariff->max_parking_time) {
qCritical() << "parkingTime" << parkingTime
<< ">" << tariff->max_parking_time;
return false;
}
}
minute_t const effectiveStartMinute = startMinute + tariff->free_of_charge;
QDateTime const start = TUtils::fromMinutes(startMinute);
//QDateTime const effStart = TUtils::fromMinutes(effectiveStartMinute);
QDateTime const end = TUtils::fromMinutes(endMinute);
if (effectiveStartMinute > endMinute) {
fprintf(stderr,
"[start:%02d:%02d, ende:%02d:%02d]: %ld free minutes. no charge.\n",
start.time().hour(), start.time().minute(),
end.time().hour(), end.time().minute(), tariff->free_of_charge);
memset(price, 0x00, sizeof(*price));
return false;
}
// start algorithm
return true;
}
#define DEBUG_INTERNAL 1
TariffStep const *
compute_price_for_parking_ticket_internal(parking_tariff_t const *tariff,
minute_t startMinute, // CET
minute_t endMinute, // CET
struct price_t *price) {
TariffStep const *stepDbg = nullptr;
QDateTime const start = TUtils::fromMinutes(startMinute);
QDateTime const end = TUtils::fromMinutes(endMinute);
int const minute = start.time().minute();
int const hour = start.time().hour();
int const day = start.date().dayOfWeek()-Qt::Monday;
int const week = 0;
// printf("%d%d%04d\n", week, day, hour*60+minute);
TariffStep const *step = &tariff->m_tariffSteps[week][day][hour*60+minute];
// TODO: tageslimit muss beruecksichtigt werden
stepDbg = step;
uint32_t price_units = 0;
if (tariff->max_price_for_24_hours == (uint32_t)(-1)) {
while (step->dateTime() < end) {
price_units += step->price();
step = step->next();
}
} else {
QDateTime stepDateTime = step->dateTime();
QDateTime nextStepDateTime;
// QDateTime prevStepDateTime;
QDateTime _24hDateTime = stepDateTime;
uint32_t _24h_price_units = 0;
long t0 = _24hDateTime.toSecsSinceEpoch();
bool dbg = true;
while (stepDateTime < end) {
long const t1 = stepDateTime.toSecsSinceEpoch();
uint32_t const price_units_tmp = step->price();
step = step->next();
nextStepDateTime = step->dateTime();
long const diff = t1 - t0;
if (diff < SECS_PER_DAY) {
_24h_price_units += price_units_tmp;
if (_24h_price_units > tariff->max_price_for_24_hours) {
_24h_price_units = tariff->max_price_for_24_hours;
if (dbg) {
#if DEBUG_INTERNAL
fprintf(stderr,
"[%s:%02d:%02d %d]\n",
stepDateTime.date().toString().toStdString().c_str(),
stepDateTime.time().hour(), stepDateTime.time().minute(),
_24h_price_units);
dbg = false;
#endif
}
} else {
#if DEBUG_INTERNAL
dbg = true;
fprintf(stderr,
"[%s:%02d:%02d %d]\n",
stepDateTime.date().toString().toStdString().c_str(),
stepDateTime.time().hour(), stepDateTime.time().minute(),
_24h_price_units);
#endif
}
} else {
price_units += _24h_price_units;
_24h_price_units = price_units_tmp;
#if DEBUG_INTERNAL
fprintf(stderr,
"[%s:%02d:%02d 24h max. %d]\n",
stepDateTime.date().toString().toStdString().c_str(),
stepDateTime.time().hour(), stepDateTime.time().minute(),
price_units);
fprintf(stderr,
"[%s:%02d:%02d %d]\n",
stepDateTime.date().toString().toStdString().c_str(),
stepDateTime.time().hour(), stepDateTime.time().minute(),
_24h_price_units);
#endif
_24hDateTime = stepDateTime;
t0 = _24hDateTime.toSecsSinceEpoch();
}
// prevStepDateTime = stepDateTime;
stepDateTime = nextStepDateTime;
}
price_units += _24h_price_units;
}
price->units = price_units;
price->netto = roundf((price->units * tariff->unit_scale_factor) / tariff->unit_definition);
price->vat_percentage = tariff->vat;
price->vat = price->netto * price->vat_percentage;
price->brutto = price->netto + price->vat;
return stepDbg;
}
bool compute_price_for_parking_ticket(parking_tariff_t const *tariff,
minute_t startMinute, // CET
minute_t endMinute, // CET
struct price_t *price) {
if (!checkCalculatePreConditions(tariff, startMinute, endMinute, price)) { // CET
return false;
}
// minute_t const parkingTime = endMinute - startMinute;
memset(price, 0x00, sizeof(*price));
minute_t const effectiveStartMinute = startMinute + tariff->free_of_charge;
QDateTime const start = TUtils::fromMinutes(startMinute);
QDateTime const effStart = TUtils::fromMinutes(effectiveStartMinute);
QDateTime const end = TUtils::fromMinutes(endMinute);
//qDebug() << effStart;
//qDebug() << end;
TariffStep const *stepDbg =
compute_price_for_parking_ticket_internal(tariff,
effectiveStartMinute,
endMinute, price);
if (stepDbg) {
#if 0
if (tariff->free_of_charge == 0) {
fprintf(stderr,
"[EINFAHRT: %s:%02d:%02d, AUSFAHRT: %s:%02d:%02d]\n\t",
effStart.date().toString().toStdString().c_str(),
effStart.time().hour(), effStart.time().minute(),
end.date().toString().toStdString().c_str(),
end.time().hour(), end.time().minute());
} else {
fprintf(stderr,
"[EINFAHRT: %s:%02d:%02d, %ld Minuten frei -> "
"EFF. EINFAHRT: %s:%02d:%02d, AUSFAHRT: %s:%02d:%02d]\n\t",
start.date().toString().toStdString().c_str(),
start.time().hour(), start.time().minute(),
tariff->free_of_charge,
effStart.date().toString().toStdString().c_str(),
effStart.time().hour(), effStart.time().minute(),
end.date().toString().toStdString().c_str(),
end.time().hour(), end.time().minute());
}
int cnt = -1;
while (stepDbg->dateTime() < end) {
// qDebug() << price_units << step->price();
fprintf(stderr, "%s %02d:%02d +%u |",
(++cnt == 0) ? "|" : "",
stepDbg->dateTime().time().hour(),
stepDbg->dateTime().time().minute(),
stepDbg->price());
//price_units += stepDbg->price();
//qDebug() << price_units << step->price();
stepDbg = stepDbg->next();
}
#endif
if (price->units > tariff->max_parking_price_units) {
qCritical() << "gesamt" << price->units
<< ">" << tariff->max_parking_price_units;
return false;
}
fprintf(stderr, " : gesamt %.2f (netto: %.2f)\n", price->brutto/100, price->netto/100);
return true;
} else {
qCritical() << "compute_price_for_parking_ticket";
}
return false;
}
bool compute_duration_for_parking_ticket(parking_tariff_t const *tariff,
minute_t start_parking_time,
minute_t *end_parking_time,
struct price_t const *price) {
price_t p;
for (int i = 0; i < tariff->max_parking_time; ++i) {
minute_t end_time = start_parking_time + i;
if (compute_price_for_parking_ticket(tariff, start_parking_time,
end_time, &p)) {
if (p.netto >= price->netto) {
*end_parking_time = end_time;
return true;
}
}
}
return false;
}
bool compute_price_for_tages_ticket(parking_tariff_t *tariff,
time_t parking_time_start, // minutes
struct price_t *price) {
QDateTime dateTime = TUtils::fromMinutes(parking_time_start).addDays(1);
dateTime.setTime(QTime(0, 0));
time_t parking_time_end = dateTime.toSecsSinceEpoch() / 60;
return compute_price_for_parking_ticket(tariff, parking_time_start,
parking_time_end, price);
}
bool compute_price_for_24h_ticket(parking_tariff_t *tariff,
time_t parking_time_start, // minutes
struct price_t *price) {
QDateTime dateTime = TUtils::fromMinutes(parking_time_start).addDays(1);
time_t parking_time_end = dateTime.toSecsSinceEpoch() / 60;
return compute_price_for_parking_ticket(tariff, parking_time_start,
parking_time_end, price);
}
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,35 @@
#ifndef CALCULATE_PARKING_TICKETS_ALGORITHMS_H_INCLUDED
#define CALCULATE_PARKING_TICKETS_ALGORITHMS_H_INCLUDED
#include <ctime>
#include "calculate_parking_tickets_global.h"
#include "calculate_parking_tickets_tariff.h"
#ifdef __cplusplus
extern "C" {
#endif
bool compute_price_for_parking_ticket(parking_tariff_t const *tariff,
minute_t start_parking_time,
minute_t end_parking_time,
struct price_t *price);
bool compute_duration_for_parking_ticket(parking_tariff_t const *tariff,
minute_t start_parking_time,
minute_t *end_parking_time,
struct price_t const *price);
bool compute_price_for_tages_ticket(parking_tariff_t *tariff,
time_t parking_time_start,
struct price_t *price);
bool compute_price_for_24h_ticket(parking_tariff_t *tariff,
time_t start_parking_time,
struct price_t *price);
#ifdef __cplusplus
}
#endif
#endif // CALCULATE_PARKING_TICKETS_ALGORITHMS_H_INCLUDED

View File

@ -0,0 +1,4 @@
#include "calculate_parking_tickets_day.h"
#include <cstring>

View File

@ -0,0 +1,85 @@
#ifndef CALCULATE_PARKING_TICKETS_DAY_H_INCLUDED
#define CALCULATE_PARKING_TICKETS_DAY_H_INCLUDED
#include "calculate_parking_tickets_global.h"
#include "calculate_parking_tickets_tariff_step.h"
#include "calculate_parking_tickets_tariff.h"
#include "calculate_parking_tickets_utils.h"
#include <QTime>
#include <QVector>
#include <QPair>
#include <cinttypes>
#include <array>
struct DayInternal {
};
struct parking_tariff_t;
template <class T>
struct Day {
static bool price(parking_tariff_t const * /*tariff*/,
QTime const & /*time*/,
uint32_t * /*price_units*/) {
// minute_t const minute = time.hour()*60 + time.minute();
// for (int i = 0; i < MIN_PER_DAY; ++i) {
//if (m_tariffSteps[i].isValid()) {
//}
//}
return true;
}
protected:
//std::array<TariffStep, MIN_PER_DAY> m_tariffSteps;
#if 0
static bool price(parking_tariff_t const *tariff,
QTime const &time, uint32_t *price_units, int dayIndex) {
minute_t const minute = time.hour()*60 + time.minute();
for (int i = 0; i < tariff->m_tariffSteps[dayIndex].size(); ++i) {
//if (minute >= tariff->m_tariff[dayIndex][i].first) {
// *price_units += tariff->m_tariff[dayIndex][i].second;
// return true;
//}
}
return true;
// return false;
}
#endif
};
struct Holiday : Day<Holiday> {
enum { dayIndex = 0 };
};
struct Monday : Day<Monday> {
enum { dayIndex = Qt::Monday };
};
struct Tuesday : Day<Tuesday> {
enum { dayIndex = Qt::Tuesday };
};
struct Wednesday : Day<Wednesday> {
enum { dayIndex = Qt::Wednesday };
};
struct Thursday : Day<Thursday> {
enum { dayIndex = Qt::Thursday };
};
struct Friday : Day<Friday> {
enum { dayIndex = Qt::Friday };
};
struct Saturday : Day<Saturday> {
enum { dayIndex = Qt::Saturday };
};
struct Sunday : Day<Sunday> {
enum { dayIndex = Qt::Sunday };
};
#endif // CALCULATE_PARKING_TICKETS_DAY_H_INCLUDED

View File

@ -0,0 +1,59 @@
#ifndef CALCULATE_PARKING_TICKETS_GLOBAL_H
#define CALCULATE_PARKING_TICKETS_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(CALCULATE_PARKING_TICKETS_LIBRARY)
# define CALCULATE_PARKING_TICKETS_EXPORT Q_DECL_EXPORT
#else
# define CALCULATE_PARKING_TICKETS_EXPORT Q_DECL_IMPORT
#endif
#include <cinttypes>
#include <ctime>
typedef time_t minute_t;
typedef struct price_t {
uint32_t units;
double netto;
double brutto;
double vat_percentage;
double vat;
} price_t;
static constexpr uint16_t const MIN_PER_DAY = 1440;
static constexpr uint16_t const MINUTES_PER_DAY = 1440;
static constexpr uint32_t const SECS_PER_DAY = 1440*60;
//struct TariffLine {
// uint32_t line;
// obere 11 bit: 2 bit week, 3 bit day, 11 bit minute
//};
struct TariffMinute {
uint32_t price_units;
uint32_t next_minute;
};
static constexpr uint16_t const WEEKS = 3;
static constexpr uint16_t const DAYS = 7;
static constexpr uint32_t const MAX_OFFSET = (uint32_t)sizeof(TariffMinute[3][7][1440]);
static constexpr uint32_t const UNDEFINED_NEXT_MINUTE = MAX_OFFSET;
struct TariffDay {
TariffMinute m[1];
//TariffMinute m[MINUTES_PER_DAY];
};
struct TariffWeek {
TariffDay mon = {{}};
};
struct TariffSteps {
};
#endif // CALCULATE_PARKING_TICKETS_GLOBAL_H

View File

@ -0,0 +1,184 @@
#include "calculate_parking_tickets_parse_tariff.h"
#include "calculate_parking_tickets_tariff.h"
#include <cstdio>
#include <string>
#include <QDebug>
#include <QDateTime>
#include <rapidjson/filereadstream.h>
#include <rapidjson/document.h>
#include <rapidjson/encodings.h>
#include <rapidjson/error/en.h>
#include "rapidjson/stringbuffer.h"
#include <rapidjson/writer.h>
#include <rapidjson/prettywriter.h>
using namespace rapidjson;
#define MAX_READ_BUFFER_SIZE 10000000
static const char *weekStr[] {
"week1", "week2", "week3"
};
static const char *weekDayStr[] {
"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"
};
static const int constexpr STEP_PRICE = 1;
static const int constexpr STEP_NEXT = 2;
parking_tariff_t *parking_tariff_t::parseTariff(const char *confFile) {
parking_tariff_t *tariff = 0;
FILE* fp = fopen(confFile, "r");
if (fp) {
fseek(fp, 0 , SEEK_END);
long const bufSize = ftell(fp) + 1024;
fseek(fp, 0 , SEEK_SET);
char *readBuffer = (char *)malloc(bufSize);
if (readBuffer) {
memset(readBuffer, 0x00, bufSize);
FileReadStream is(fp, readBuffer, bufSize);
Document d;
if (d.ParseStream(is).HasParseError()) {
fprintf(stderr, "\nError(offset %u): %s\n",
(unsigned)d.GetErrorOffset(),
GetParseError_En(d.GetParseError()));
free(readBuffer);
fclose(fp);
return 0;
}
tariff = new parking_tariff_t();
if (d.HasMember(FREE_OF_CHARGE)) {
Value::MemberIterator o = d.FindMember(FREE_OF_CHARGE);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string foc = o->value.GetString();
tariff->free_of_charge = std::stoi(foc);
}
if (d.HasMember(UNIT_SCALE_FACTOR)) {
Value::MemberIterator o = d.FindMember(UNIT_SCALE_FACTOR);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string usf = o->value.GetString();
tariff->unit_scale_factor = std::stof(usf);
}
if (d.HasMember(UNIT_DEFINITION)) {
Value::MemberIterator o = d.FindMember(UNIT_DEFINITION);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string udef = o->value.GetString();
tariff->unit_definition = std::stoi(udef);
}
if (d.HasMember(VAT)) {
Value::MemberIterator o = d.FindMember(VAT);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string vat = o->value.GetString();
tariff->vat = std::stof(vat);
}
if (d.HasMember(MAX_PARKING_PRICE)) {
Value::MemberIterator o = d.FindMember(MAX_PARKING_PRICE);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string mp = o->value.GetString();
if (mp == "unlimited") {
tariff->max_parking_price_units = ~0;
} else {
tariff->max_parking_price_units = (uint32_t)std::stoul(mp);
}
}
if (d.HasMember(MAX_PRICE_FOR_24_HOURS)) {
Value::MemberIterator o = d.FindMember(MAX_PRICE_FOR_24_HOURS);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string mp = o->value.GetString();
if (mp == "unlimited") {
tariff->max_price_for_24_hours = ~0;
} else {
tariff->max_price_for_24_hours = (uint32_t)std::stoul(mp);
}
}
QDate today = QDate::currentDate();
int todayWeekDay = today.dayOfWeek();
if (todayWeekDay > Qt::Monday) {
int day = today.day() - todayWeekDay;
if (!today.setDate(today.year(), today.month(), day)) {
qFatal("Setting today failed");
}
}
QDate monday = today;
// "week1" : {
for (int w = 0; w < 3; ++w) {
assert(d.HasMember(weekStr[w]));
// "Monday": {
for (int j = Qt::Monday - 1; j < Qt::Sunday; ++j) {
QDateTime startMinute(monday.addDays(w*7+j), QTime( 0, 0));
Value::MemberIterator wObj = d.FindMember(weekStr[w]);
assert(wObj != d.MemberEnd());
assert(wObj->value.IsObject());
Value::MemberIterator stepsForDay = wObj->value.FindMember(weekDayStr[j]);
assert(stepsForDay != wObj->value.MemberEnd());
assert(stepsForDay->value.IsObject());
// name : time, price, next-tariff-step
// "000000" : [ "00:00", "800000", "000001" ],
// "000001" : [ "07:00", "350000", "000002" ],
// ...
// "000014" : [ "20:00", "800000", "000011" ]
// },
int k = 0;
for (Value::ConstMemberIterator step = stepsForDay->value.MemberBegin();
step != stepsForDay->value.MemberEnd(); ++step) {
assert(step->name.IsString());
assert(step->value.IsArray());
QString name(step->name.GetString());
int const week = name.midRef(0, 1).toInt();
int const weekDay = name.midRef(1, 1).toInt();
int const stepIndex = name.midRef(2).toInt();
assert(w == week);
assert(j == weekDay);
assert(k == stepIndex);
uint32_t price_units = QString(step->value[STEP_PRICE].GetString()).toUInt();
QString next = QString(step->value[STEP_NEXT].GetString());
int const nextWeek = next.midRef(0, 1).toInt();
int const nextWeekDay = next.midRef(1, 1).toInt();
int const nextStepIndex = next.midRef(2).toInt();
//qDebug() << startMinute.addSecs(stepIndex*60)
// << "(" << week << weekDay << stepIndex << ")"
// << "(" << nextWeek << nextWeekDay << nextStepIndex << ")";
tariff->m_tariffSteps[week][weekDay][stepIndex] =
TariffStep(startMinute.addSecs(stepIndex*60),
price_units,
&tariff->m_tariffSteps[nextWeek][nextWeekDay][nextStepIndex]);
++k;
}
}
}
free(readBuffer);
}
fclose(fp);
}
return tariff;
}

View File

@ -0,0 +1,16 @@
#ifndef CALCULATE_PARKING_TICKETS_PARSE_TARIFF_H_INCLUDED
#define CALCULATE_PARKING_TICKETS_PARSE_TARIFF_H_INCLUDED
#include "calculate_parking_tickets_tariff.h"
#define FREE_OF_CHARGE "free_of_charge"
#define UNIT_SCALE_FACTOR "unit_scale_factor"
#define UNIT_DEFINITION "unit_definition"
#define VAT "vat"
#define MAX_PARKING_PRICE "max_parking_price"
#define MAX_PRICE_FOR_24_HOURS "max_price_for_24_hours"
parking_tariff_t *parking_tariff_t::parseTariff(const char *confFile);
#endif // CALCULATE_PARKING_TICKETS_PARSE_TARIFF_H_INCLUDED

View File

@ -0,0 +1,217 @@
#include "calculate_parking_tickets_tariff.h"
#include <cstdio>
#include <string>
#include <QDebug>
#include <QDateTime>
#include <rapidjson/filereadstream.h>
#include <rapidjson/document.h>
#include <rapidjson/encodings.h>
#include <rapidjson/error/en.h>
#include "rapidjson/stringbuffer.h"
#include <rapidjson/writer.h>
#include <rapidjson/prettywriter.h>
using namespace rapidjson;
#define FREE_OF_CHARGE "free_of_charge"
#define UNIT_SCALE_FACTOR "unit_scale_factor"
#define UNIT_DEFINITION "unit_definition"
#define VAT "vat"
#define MAX_PARKING_PRICE "max_parking_price"
#define MAX_PRICE_FOR_24_HOURS "max_price_for_24_hours"
#define MAX_PARKING_TIME "max_parking_time"
static const char *weekStr[] {
"week1", "week2", "week3"
};
static const char *weekDayStr[] {
"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"
};
static const int constexpr STEP_PRICE = 1;
static const int constexpr STEP_NEXT = 2;
parking_tariff_t *parking_tariff_t::parseTariff(const char *confFile) {
parking_tariff_t *tariff = 0;
FILE* fp = fopen(confFile, "r");
if (fp) {
fseek(fp, 0 , SEEK_END);
long const bufSize = ftell(fp) + 1024;
fseek(fp, 0 , SEEK_SET);
char *readBuffer = (char *)malloc(bufSize);
if (readBuffer) {
memset(readBuffer, 0x00, bufSize);
FileReadStream is(fp, readBuffer, bufSize);
Document d;
if (d.ParseStream(is).HasParseError()) {
fprintf(stderr, "\nError(offset %u): %s\n",
(unsigned)d.GetErrorOffset(),
GetParseError_En(d.GetParseError()));
free(readBuffer);
fclose(fp);
return 0;
}
tariff = new parking_tariff_t();
if (d.HasMember(FREE_OF_CHARGE)) {
Value::MemberIterator o = d.FindMember(FREE_OF_CHARGE);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string foc = o->value.GetString();
tariff->free_of_charge = std::stoi(foc);
}
if (d.HasMember(UNIT_SCALE_FACTOR)) {
Value::MemberIterator o = d.FindMember(UNIT_SCALE_FACTOR);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string usf = o->value.GetString();
tariff->unit_scale_factor = std::stof(usf);
}
if (d.HasMember(UNIT_DEFINITION)) {
Value::MemberIterator o = d.FindMember(UNIT_DEFINITION);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string udef = o->value.GetString();
tariff->unit_definition = std::stoi(udef);
}
if (d.HasMember(VAT)) {
Value::MemberIterator o = d.FindMember(VAT);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string vat = o->value.GetString();
tariff->vat = std::stof(vat);
}
if (d.HasMember(MAX_PARKING_PRICE)) {
Value::MemberIterator o = d.FindMember(MAX_PARKING_PRICE);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string mp = o->value.GetString();
if (mp == "unlimited") {
tariff->max_parking_price_units = ~0;
} else {
tariff->max_parking_price_units = (uint32_t)std::stoul(mp);
}
}
if (d.HasMember(MAX_PRICE_FOR_24_HOURS)) {
Value::MemberIterator o = d.FindMember(MAX_PRICE_FOR_24_HOURS);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string mp = o->value.GetString();
if (mp == "unlimited") {
tariff->max_price_for_24_hours = ~0;
} else {
tariff->max_price_for_24_hours = (uint32_t)std::stoul(mp);
}
}
if (d.HasMember(MAX_PARKING_TIME)) {
Value::MemberIterator o = d.FindMember(MAX_PARKING_TIME);
assert(o != d.MemberEnd());
assert(o->value.IsString());
std::string mp = o->value.GetString();
if (mp == "unlimited") {
tariff->max_parking_time = ~0;
} else {
tariff->max_parking_time = (uint32_t)std::stoul(mp);
}
}
QDate today = QDate::currentDate();
int const todayWeekDay = today.dayOfWeek(); // qt: 1 (mon) - 7 (sun)
if (todayWeekDay > Qt::Monday) {
int day = today.day();
day -= (todayWeekDay - Qt::Monday);
if (!today.setDate(today.year(), today.month(), day)) {
qFatal("Setting today failed");
}
}
assert(today.dayOfWeek() == Qt::Monday);
QDate monday = today;
// "week1" : {
for (int w = 0; w < 3; ++w) {
assert(d.HasMember(weekStr[w]));
// "Monday": {
for (int j = Qt::Monday - 1; j < Qt::Sunday; ++j) {
QDateTime startMinute(monday.addDays(w*7+j), QTime( 0, 0));
Value::MemberIterator wObj = d.FindMember(weekStr[w]);
assert(wObj != d.MemberEnd());
assert(wObj->value.IsObject());
Value::MemberIterator stepsForDay = wObj->value.FindMember(weekDayStr[j]);
assert(stepsForDay != wObj->value.MemberEnd());
assert(stepsForDay->value.IsObject());
// name : time, price, next-tariff-step
// "000000" : [ "00:00", "800000", "000001" ],
// "000001" : [ "07:00", "350000", "000002" ],
// ...
// "000014" : [ "20:00", "800000", "000011" ]
// },
int k = 0;
for (Value::ConstMemberIterator step = stepsForDay->value.MemberBegin();
step != stepsForDay->value.MemberEnd(); ++step) {
assert(step->name.IsString());
assert(step->value.IsArray());
QString name(step->name.GetString());
int const week = name.midRef(0, 1).toInt();
int const weekDay = name.midRef(1, 1).toInt();
int const stepIndex = name.midRef(2).toInt();
assert(w == week);
assert(j == weekDay);
assert(k == stepIndex);
uint32_t price_units = QString(step->value[STEP_PRICE].GetString()).toUInt();
QString next = QString(step->value[STEP_NEXT].GetString());
int const nextWeek = next.midRef(0, 1).toInt();
int const nextWeekDay = next.midRef(1, 1).toInt();
int const nextStepIndex = next.midRef(2).toInt();
//qDebug() << startMinute.addSecs(stepIndex*60)
// << "(" << week << weekDay << stepIndex << ")"
// << "(" << nextWeek << nextWeekDay << nextStepIndex << ")";
tariff->m_tariffSteps[week][weekDay][stepIndex] =
TariffStep(startMinute.addSecs(stepIndex*60),
price_units,
&tariff->m_tariffSteps[nextWeek][nextWeekDay][nextStepIndex]);
++k;
}
}
}
free(readBuffer);
#if 0
for (int w = 0; w < 3; ++w) {
for (int j = Qt::Monday - 1; j < Qt::Sunday; ++j) {
for (int k = 0; k < MIN_PER_DAY; ++k) {
//if (tariff->m_tariffSteps[w][j][k].next()) {
TariffStep const *s = &tariff->m_tariffSteps[w][j][k];
qDebug() << s->dateTime() << s->price() << "next:" << s->next()->dateTime();
//}
}
}
}
#endif
}
fclose(fp);
}
return tariff;
}

View File

@ -0,0 +1,218 @@
#ifndef CALCULATE_PARKING_TICKETS_TARIFF_H_INCLUDED
#define CALCULATE_PARKING_TICKETS_TARIFF_H_INCLUDED
#include "calculate_parking_tickets_global.h"
#include "calculate_parking_tickets_tariff_step.h"
#include <QDateTime>
#include <QVector>
#include <QSet>
#include <QPair>
#include <QList>
struct parking_tariff_t {
// parking_tariff_t();
static parking_tariff_t *parseTariff(const char *confFile);
/// \brief Express computational units in cent.
///
/// The internal computations do not use the unit "cent" \n
/// directly. Rather virtual integer value <b>unit_definition</b> is used, expressing \n
/// how many cents correspond to <b>unit_definition</b> units.
uint32_t unit_definition;
/// \brief Scale units to cent.
///
double unit_scale_factor;
/// \brief VAT (Mehrwertsteuer) in percent.
///
double vat;
QSet<QDate> holidays;
///
/// \brief m_tariffSteps
///
TariffStep m_tariffSteps[3][7][MIN_PER_DAY];
///
/// \brief waiting_period
/// @note Also called "Karenzzeit". Allowed values: [0, 3]
// minute_t waiting_period;
///
/// \brief free_of_charge
///
minute_t free_of_charge;
///
/// \brief max_parking_time
///
minute_t max_parking_time = -1;
///
/// \brief max_parking_price_units
///
uint32_t max_parking_price_units;
///
/// \brief max_price_for_24_hours
///
uint32_t max_price_for_24_hours; // 24h limit (default -1)
#if 0
/// Minimal amount of money for buying a ticket.
///
/// The minimal amount of money a user has to provide \n
/// to get a valid (parking) ticket.
uint32_t money_min;
///
/// \brief Minimal parking time.
///
/// Minimal parking time. The full parking time must be \n
/// a multiple of @see parking_time_min.
minute_t parking_time_min;
///
/// \brief Maximal parking time. Must be a multiple of @see parking_time_min.
///
minute_t parking_time_max;
///
/// \brief integration_time_max
/// Maximal possible integration time, i.e. the time after which all tickets
/// will be closed.
/// \note parking_time_max <= integration_time_max.
minute_t integration_time_max;
///
/// \brief tages_ticket_uebertrag
///
bool tages_ticket_uebertrag;
///
/// \brief free_of_charge_uebertrag
/// Carry FOC (usually at midnight) or not.
/// The default setting is true.
bool free_of_charge_uebertrag;
/// \brief Time for optionally changing tariff-table.
///
/// Depending on the configuration, a table in the tariff can be swapped
/// in, typically at midnight. But it is also possible that this event happens
/// during the day.
/// @note 0 &le; tariff_deadline $lt; 1440
minute_t tages_ticket_offset;
///
/// \brief vorkauf
///
/// Maximal time in minutes before business hours where a presales
/// ("vorkauf") operation is possible.
minute_t vorkauf;
/// \brief Memory consumption of calculate price algorithm
uint32_t memory_consumption;
///
/// Time-range which is free of charge.
///
struct free_of_charge_range_t free_of_charge;
///
/// \brief business_hours
///
struct business_hours_range_t business_hours;
/// Array of possible days: DEFAULT, SUN - SAT plus HOLIDAY.
///
day_t *day[DAYS];
/// Pointer to current day in tariff-table.
///
day_t *current_day;
/// Array of holiday dates. Format: YYYY:MM:DD
///
holiday_date_t *holiday_date;
///
/// \brief algorithm_features
///
uint16_t algorithm_features;
///
/// \brief tariff_features
///
/// @todo: add comment
uint64_t tariff_features;
///
/// \brief _tariff_features
///
/// @todo: add comment
uint64_t _tariff_features[64];
///
/// @brief closed_tickets_local_end_times
///
/// @note The end times of all closed tickets: the possible values are
/// 0 <= end_time <= 168h.
///
bool closed_tickets_sorted;
///
/// \brief closed_tickets_count
///
/// @note Used internally for optimizations.
int closed_tickets_count;
///
/// \brief closed_tickets
/// @todo: add comment
ticket_t *closed_tickets[NUMBER_OF_TICKETS];
///
/// \brief tariff_step_min
///
/// @todo: add comment
time_t tariff_step_min;
///
/// \brief tariff_step_max
///
/// @todo: add comment
time_t tariff_step_max;
///
/// \brief tariff_version
/// Version for a given config-file, associated to a given tariff.
char tariff_version[64];
///
/// \brief free_of_charge_at_start;
///
/// Free-of-charge minutes at beginning of tariff computation
///
uint16_t free_of_charge_at_start;
///
/// \brief repeated_default_without_carryover
///
/// Setting describing a special tariff:
/// - All days are equal
/// - 24:00 is a "tariff-schnitt" (=without_carryover)
/// (i.e. computation is carried out
/// on a per day basis. Total price is the sum of all days.)
bool repeated_default_without_carryover;
///
/// \brief waiting_period
/// @note Also called "Karenzzeit". Allowed values: [0, 3]
minute_t waiting_period;
#endif
};
#endif // CALCULATE_PARKING_TICKETS_TARIFF_H_INCLUDED

View File

@ -0,0 +1,3 @@
#include "calculate_parking_tickets_tariff_step.h"
int TariffStep::m_offsetInDays = 0;

View File

@ -0,0 +1,78 @@
#ifndef CALCULATE_PARKING_TICKET_TARIFF_STEP_H_INCLUDED
#define CALCULATE_PARKING_TICKET_TARIFF_STEP_H_INCLUDED
#include <cinttypes>
#include <QDateTime>
#include <QDebug>
#include <assert.h>
///
/// \brief The TariffStep class
///
/// Ein Berechnungsschritt kann alles sein zwischen einer Minute und einem Tag.
/// Jeder Tag wird zerlegt in 1440 Berechnungsschritte.
class TariffStep {
QDateTime m_datetime; // minute since start of tariff calculation
int m_dayOfWeek;
uint32_t m_price;
TariffStep const *m_next;
static int m_offsetInDays;
public:
// static setOffsetinDays(int offsetInDays) { m_offsetInDays = offsetInDays; }
TariffStep()
: m_datetime(QDateTime())
, m_dayOfWeek(-1)
, m_price(0)
, m_next(nullptr) {
}
TariffStep(QDateTime const &datetime,
uint32_t price,
TariffStep const *next)
: m_datetime(datetime)
, m_dayOfWeek(m_datetime.isValid() ? m_datetime.date().dayOfWeek() : -1)
, m_price(price)
, m_next(next) {
}
TariffStep const *next() const { return m_next; }
//TariffStep *next() { return m_next; }
int dayOfWeek() const { return m_dayOfWeek; }
bool contains(QTime const &minute) const {
if (dateTime().isValid()
&& minute.isValid()
&& m_next && m_next->dateTime().isValid()) {
if (dayOfWeek() == m_next->dayOfWeek()) {
return
(dateTime().time() <= minute
&& minute < m_next->dateTime().time());
}
return (dateTime().time() <= minute);
}
return false;
}
uint16_t startHour() {
return m_datetime.time().hour();
}
uint32_t price() const { return m_price; }
bool isValid() { return m_datetime.isValid(); }
TariffStep const *address() { return this; }
void setPrice(uint32_t price) { m_price = price; }
void setDateTime(QDateTime const &datetime) { m_datetime = datetime; }
void setNextTariffStep(TariffStep *const next) { m_next = next; }
QDateTime &dateTime() { return m_datetime; }
QDateTime const &dateTime() const { return m_datetime; }
};
#endif // CALCULATE_PARKING_TICKET_TARIFF_STEP_H_INCLUDED

View File

@ -0,0 +1,158 @@
#include "calculate_parking_tickets_utils.h"
#include "calculate_parking_tickets_tariff.h"
#include <QTimeZone>
#include <QDebug>
namespace TUtils {
bool isHoliday(parking_tariff_t const *tariff, QDate const &qd) {
for (int s = 0; s < tariff->holidays.size(); ++s) {
if (tariff->holidays.contains(qd)) {
qDebug() << "Holiday";
return true;
}
}
qDebug() << "No Holiday";
return false;
}
QDateTime const fromSecs(quint64 secs) {
QDateTime dateTime;
dateTime.setSecsSinceEpoch(0);
return dateTime.addSecs(secs);
}
QDateTime const fromMinutes(quint64 minutes) {
return fromSecs(minutes*60);
}
quint64 toSecs(QDateTime const &dt) {
return dt.toSecsSinceEpoch();
}
quint64 toMinutes(QDateTime const &dt) {
return dt.toSecsSinceEpoch()/60;
}
// Monday
bool isMon(quint64 secs) {
return (fromSecs(secs).date().dayOfWeek() == Qt::Monday);
}
bool isMon(QDate const &date) {
return (date.dayOfWeek() == Qt::Monday);
}
bool isMonUTC(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::UTC).date().dayOfWeek() == Qt::Monday);
}
bool isMonCET(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::LocalTime).date().dayOfWeek() == Qt::Monday);
}
bool isMonUTC(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Monday);
}
bool isMonCET(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Monday);
}
// Tuesday
bool isTue(QDate const &date) {
return (date.dayOfWeek() == Qt::Tuesday);
}
bool isTueUTC(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::UTC).date().dayOfWeek() == Qt::Tuesday);
}
bool isTueCET(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::LocalTime).date().dayOfWeek() == Qt::Tuesday);
}
bool isTueUTC(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Tuesday);
}
bool isTueCET(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Tuesday);
}
// Wednesday
bool isWed(QDate const &date) {
return (date.dayOfWeek() == Qt::Wednesday);
}
bool isWedUTC(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::UTC).date().dayOfWeek() == Qt::Wednesday);
}
bool isWedCET(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::LocalTime).date().dayOfWeek() == Qt::Wednesday);
}
bool isWedUTC(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Wednesday);
}
bool isWedCET(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Wednesday);
}
// Thursday
bool isThu(QDate const &date) {
return (date.dayOfWeek() == Qt::Thursday);
}
bool isThuUTC(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::UTC).date().dayOfWeek() == Qt::Thursday);
}
bool isThuCET(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::LocalTime).date().dayOfWeek() == Qt::Thursday);
}
bool isThuUTC(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Thursday);
}
bool isThuCET(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Thursday);
}
// Friday
bool isFri(QDate const &date) {
return (date.dayOfWeek() == Qt::Friday);
}
bool isFriUTC(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::UTC).date().dayOfWeek() == Qt::Friday);
}
bool isFriCET(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::LocalTime).date().dayOfWeek() == Qt::Friday);
}
bool isFriUTC(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Friday);
}
bool isFriCET(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Friday);
}
// Saturday
bool isSat(QDate const &date) {
return (date.dayOfWeek() == Qt::Saturday);
}
bool isSatUTC(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::UTC).date().dayOfWeek() == Qt::Saturday);
}
bool isSatCET(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::LocalTime).date().dayOfWeek() == Qt::Saturday);
}
bool isSatUTC(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Saturday);
}
bool isSatCET(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Saturday);
}
// Sunday
bool isSun(QDate const &date) {
return (date.dayOfWeek() == Qt::Sunday);
}
bool isSunUTC(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::UTC).date().dayOfWeek() == Qt::Sunday);
}
bool isSunCET(quint64 secsSinceEpoch) {
return (QDateTime::fromSecsSinceEpoch(secsSinceEpoch, Qt::LocalTime).date().dayOfWeek() == Qt::Sunday);
}
bool isSunUTC(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Sunday);
}
bool isSunCET(QDate const &dateSinceEpoch) {
return (dateSinceEpoch.dayOfWeek() == Qt::Sunday);
}
}

View File

@ -0,0 +1,64 @@
#ifndef CALCULATE_PARKING_TICKETS_UTILS_H_INCLUDED
#define CALCULATE_PARKING_TICKETS_UTILS_H_INCLUDED
#include <QDateTime>
#include <QDate>
#include <QTime>
#include <QTimeZone>
struct parking_tariff_t;
namespace TUtils {
QDateTime const fromSecs(quint64 secs);
QDateTime const fromMinutes(quint64 minutes);
quint64 toSecs(QDateTime const &dt);
quint64 toMinutes(QDateTime const &dt);
bool isHoliday(parking_tariff_t const *tariff, QDate const &qdt);
bool isMon(quint64 secs);
bool isMon(QDate const &date);
bool isMonUTC(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isMonUTC(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch(), Qt::UTC).date());
bool isMonCET(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isMonCET(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch()).date());
bool isTue(QDate const &date);
bool isTueUTC(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isTueUTC(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch(), Qt::UTC).date());
bool isTueCET(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isTueCET(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch()).date());
bool isWed(QDate const &date);
bool isWedUTC(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isWedUTC(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch(), Qt::UTC).date());
bool isWedCET(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isWedCET(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch()).date());
bool isThu(QDate const &date);
bool isThuUTC(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isThuUTC(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch(), Qt::UTC).date());
bool isThuCET(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isThuCET(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch()).date());
bool isFri(QDate const &date);
bool isFriUTC(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isFriUTC(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch(), Qt::UTC).date());
bool isFriCET(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isFriCET(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch()).date());
bool isSat(QDate const &date);
bool isSatUTC(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isSatUTC(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch(), Qt::UTC).date());
bool isSatCET(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isSatCET(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch()).date());
bool isSun(QDate const &date);
bool isSunUTC(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isSunUTC(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch(), Qt::UTC).date());
bool isSunCET(quint64 secsSinceEpoch = QDateTime::currentSecsSinceEpoch());
bool isSunCET(QDate const &dateSinceEpoch = QDateTime::fromSecsSinceEpoch(QDateTime::currentSecsSinceEpoch()).date());
}
#endif // CALCULATE_PARKING_TICKETS_UTILS_H_INCLUDED

View File

@ -0,0 +1,562 @@
{
"name" : "Tarif Erlangen",
"description" : [
"erste 90 Min = 0 Euro",
"jede weitere 60 Min = 1,20 Euro",
"tagesmax: 7,20 Euro"
],
"properties": [
],
"week1" : {
"Monday": {
"TariffStep000" : [ "00:00", "120000", "TariffStep001" ],
"TariffStep001" : [ "01:00", "120000", "TariffStep002" ],
"TariffStep002" : [ "02:00", "120000", "TariffStep003" ],
"TariffStep003" : [ "03:00", "120000", "TariffStep004" ],
"TariffStep004" : [ "04:00", "120000", "TariffStep005" ],
"TariffStep005" : [ "05:00", "120000", "TariffStep006" ],
"TariffStep006" : [ "06:00", "120000", "TariffStep007" ],
"TariffStep007" : [ "07:00", "120000", "TariffStep008" ],
"TariffStep008" : [ "08:00", "120000", "TariffStep009" ],
"TariffStep009" : [ "09:00", "120000", "TariffStep0010"],
"TariffStep0010" : [ "10:00", "120000", "TariffStep0011"],
"TariffStep0011" : [ "11:00", "120000", "TariffStep0012"],
"TariffStep0012" : [ "12:00", "120000", "TariffStep0013"],
"TariffStep0013" : [ "13:00", "120000", "TariffStep0014"],
"TariffStep0014" : [ "14:00", "120000", "TariffStep0015"],
"TariffStep0015" : [ "15:00", "120000", "TariffStep0016"],
"TariffStep0016" : [ "16:00", "120000", "TariffStep0017"],
"TariffStep0017" : [ "17:00", "120000", "TariffStep0018"],
"TariffStep0018" : [ "18:00", "120000", "TariffStep0019"],
"TariffStep0019" : [ "19:00", "120000", "TariffStep0020"],
"TariffStep0020" : [ "20:00", "120000", "TariffStep0021"],
"TariffStep0021" : [ "21:00", "120000", "TariffStep0022"],
"TariffStep0022" : [ "22:00", "120000", "TariffStep0023"],
"TariffStep0023" : [ "23:00", "120000", "TariffStep010" ]
},
"Tuesday": {
"TariffStep010" : [ "00:00", "120000", "TariffStep011" ],
"TariffStep011" : [ "01:00", "120000", "TariffStep012" ],
"TariffStep012" : [ "02:00", "120000", "TariffStep013" ],
"TariffStep013" : [ "03:00", "120000", "TariffStep014" ],
"TariffStep014" : [ "04:00", "120000", "TariffStep015" ],
"TariffStep015" : [ "05:00", "120000", "TariffStep016" ],
"TariffStep016" : [ "06:00", "120000", "TariffStep017" ],
"TariffStep017" : [ "07:00", "120000", "TariffStep018" ],
"TariffStep018" : [ "08:00", "120000", "TariffStep019" ],
"TariffStep019" : [ "09:00", "120000", "TariffStep0110"],
"TariffStep0110" : [ "10:00", "120000", "TariffStep0111"],
"TariffStep0111" : [ "11:00", "120000", "TariffStep0112"],
"TariffStep0112" : [ "12:00", "120000", "TariffStep0113"],
"TariffStep0113" : [ "13:00", "120000", "TariffStep0114"],
"TariffStep0114" : [ "14:00", "120000", "TariffStep0115"],
"TariffStep0115" : [ "15:00", "120000", "TariffStep0116"],
"TariffStep0116" : [ "16:00", "120000", "TariffStep0117"],
"TariffStep0117" : [ "17:00", "120000", "TariffStep0118"],
"TariffStep0118" : [ "18:00", "120000", "TariffStep0119"],
"TariffStep0119" : [ "19:00", "120000", "TariffStep0120"],
"TariffStep0120" : [ "20:00", "120000", "TariffStep0121"],
"TariffStep0121" : [ "21:00", "120000", "TariffStep0122"],
"TariffStep0122" : [ "22:00", "120000", "TariffStep0123"],
"TariffStep0123" : [ "23:00", "120000", "TariffStep020" ]
},
"Wednesday": {
"TariffStep020" : [ "00:00", "120000", "TariffStep021" ],
"TariffStep021" : [ "01:00", "120000", "TariffStep022" ],
"TariffStep022" : [ "02:00", "120000", "TariffStep023" ],
"TariffStep023" : [ "03:00", "120000", "TariffStep024" ],
"TariffStep024" : [ "04:00", "120000", "TariffStep025" ],
"TariffStep025" : [ "05:00", "120000", "TariffStep026" ],
"TariffStep026" : [ "06:00", "120000", "TariffStep027" ],
"TariffStep027" : [ "07:00", "120000", "TariffStep028" ],
"TariffStep028" : [ "08:00", "120000", "TariffStep029" ],
"TariffStep029" : [ "09:00", "120000", "TariffStep0210"],
"TariffStep0210" : [ "10:00", "120000", "TariffStep0211"],
"TariffStep0211" : [ "11:00", "120000", "TariffStep0212"],
"TariffStep0212" : [ "12:00", "120000", "TariffStep0213"],
"TariffStep0213" : [ "13:00", "120000", "TariffStep0214"],
"TariffStep0214" : [ "14:00", "120000", "TariffStep0215"],
"TariffStep0215" : [ "15:00", "120000", "TariffStep0216"],
"TariffStep0216" : [ "16:00", "120000", "TariffStep0217"],
"TariffStep0217" : [ "17:00", "120000", "TariffStep0218"],
"TariffStep0218" : [ "18:00", "120000", "TariffStep0219"],
"TariffStep0219" : [ "19:00", "120000", "TariffStep0220"],
"TariffStep0220" : [ "20:00", "120000", "TariffStep0221"],
"TariffStep0221" : [ "21:00", "120000", "TariffStep0222"],
"TariffStep0222" : [ "22:00", "120000", "TariffStep0223"],
"TariffStep0223" : [ "23:00", "120000", "TariffStep030" ]
},
"Thursday": {
"TariffStep030" : [ "00:00", "120000", "TariffStep031" ],
"TariffStep031" : [ "01:00", "120000", "TariffStep032" ],
"TariffStep032" : [ "02:00", "120000", "TariffStep033" ],
"TariffStep033" : [ "03:00", "120000", "TariffStep034" ],
"TariffStep034" : [ "04:00", "120000", "TariffStep035" ],
"TariffStep035" : [ "05:00", "120000", "TariffStep036" ],
"TariffStep036" : [ "06:00", "120000", "TariffStep037" ],
"TariffStep037" : [ "07:00", "120000", "TariffStep038" ],
"TariffStep038" : [ "08:00", "120000", "TariffStep039" ],
"TariffStep039" : [ "09:00", "120000", "TariffStep0310"],
"TariffStep0310" : [ "10:00", "120000", "TariffStep0311"],
"TariffStep0311" : [ "11:00", "120000", "TariffStep0312"],
"TariffStep0312" : [ "12:00", "120000", "TariffStep0313"],
"TariffStep0313" : [ "13:00", "120000", "TariffStep0314"],
"TariffStep0314" : [ "14:00", "120000", "TariffStep0315"],
"TariffStep0315" : [ "15:00", "120000", "TariffStep0316"],
"TariffStep0316" : [ "16:00", "120000", "TariffStep0317"],
"TariffStep0317" : [ "17:00", "120000", "TariffStep0318"],
"TariffStep0318" : [ "18:00", "120000", "TariffStep0319"],
"TariffStep0319" : [ "19:00", "120000", "TariffStep0320"],
"TariffStep0320" : [ "20:00", "120000", "TariffStep0321"],
"TariffStep0321" : [ "21:00", "120000", "TariffStep0322"],
"TariffStep0322" : [ "22:00", "120000", "TariffStep0323"],
"TariffStep0323" : [ "23:00", "120000", "TariffStep040" ]
},
"Friday": {
"TariffStep040" : [ "00:00", "120000", "TariffStep041" ],
"TariffStep041" : [ "01:00", "120000", "TariffStep042" ],
"TariffStep042" : [ "02:00", "120000", "TariffStep043" ],
"TariffStep043" : [ "03:00", "120000", "TariffStep044" ],
"TariffStep044" : [ "04:00", "120000", "TariffStep045" ],
"TariffStep045" : [ "05:00", "120000", "TariffStep046" ],
"TariffStep046" : [ "06:00", "120000", "TariffStep047" ],
"TariffStep047" : [ "07:00", "120000", "TariffStep048" ],
"TariffStep048" : [ "08:00", "120000", "TariffStep049" ],
"TariffStep049" : [ "09:00", "120000", "TariffStep0410"],
"TariffStep0410" : [ "10:00", "120000", "TariffStep0411"],
"TariffStep0411" : [ "11:00", "120000", "TariffStep0412"],
"TariffStep0412" : [ "12:00", "120000", "TariffStep0413"],
"TariffStep0413" : [ "13:00", "120000", "TariffStep0414"],
"TariffStep0414" : [ "14:00", "120000", "TariffStep0415"],
"TariffStep0415" : [ "15:00", "120000", "TariffStep0416"],
"TariffStep0416" : [ "16:00", "120000", "TariffStep0417"],
"TariffStep0417" : [ "17:00", "120000", "TariffStep0418"],
"TariffStep0418" : [ "18:00", "120000", "TariffStep0419"],
"TariffStep0419" : [ "19:00", "120000", "TariffStep0420"],
"TariffStep0420" : [ "20:00", "120000", "TariffStep0421"],
"TariffStep0421" : [ "21:00", "120000", "TariffStep0422"],
"TariffStep0422" : [ "22:00", "120000", "TariffStep0423"],
"TariffStep0423" : [ "23:00", "120000", "TariffStep050" ]
},
"Saturday": {
"TariffStep050" : [ "00:00", "120000", "TariffStep051" ],
"TariffStep051" : [ "01:00", "120000", "TariffStep052" ],
"TariffStep052" : [ "02:00", "120000", "TariffStep053" ],
"TariffStep053" : [ "03:00", "120000", "TariffStep054" ],
"TariffStep054" : [ "04:00", "120000", "TariffStep055" ],
"TariffStep055" : [ "05:00", "120000", "TariffStep056" ],
"TariffStep056" : [ "06:00", "120000", "TariffStep057" ],
"TariffStep057" : [ "07:00", "120000", "TariffStep058" ],
"TariffStep058" : [ "08:00", "120000", "TariffStep059" ],
"TariffStep059" : [ "09:00", "120000", "TariffStep0510"],
"TariffStep0510" : [ "10:00", "120000", "TariffStep0511"],
"TariffStep0511" : [ "11:00", "120000", "TariffStep0512"],
"TariffStep0512" : [ "12:00", "120000", "TariffStep0513"],
"TariffStep0513" : [ "13:00", "120000", "TariffStep0514"],
"TariffStep0514" : [ "14:00", "120000", "TariffStep0515"],
"TariffStep0515" : [ "15:00", "120000", "TariffStep0516"],
"TariffStep0516" : [ "16:00", "120000", "TariffStep0517"],
"TariffStep0517" : [ "17:00", "120000", "TariffStep0518"],
"TariffStep0518" : [ "18:00", "120000", "TariffStep0519"],
"TariffStep0519" : [ "19:00", "120000", "TariffStep0520"],
"TariffStep0520" : [ "20:00", "120000", "TariffStep0521"],
"TariffStep0521" : [ "21:00", "120000", "TariffStep0522"],
"TariffStep0522" : [ "22:00", "120000", "TariffStep0523"],
"TariffStep0523" : [ "23:00", "120000", "TariffStep060" ]
},
"Sunday": {
"TariffStep060" : [ "00:00", "120000", "TariffStep061" ],
"TariffStep061" : [ "01:00", "120000", "TariffStep062" ],
"TariffStep062" : [ "02:00", "120000", "TariffStep063" ],
"TariffStep063" : [ "03:00", "120000", "TariffStep064" ],
"TariffStep064" : [ "04:00", "120000", "TariffStep065" ],
"TariffStep065" : [ "05:00", "120000", "TariffStep066" ],
"TariffStep066" : [ "06:00", "120000", "TariffStep067" ],
"TariffStep067" : [ "07:00", "120000", "TariffStep068" ],
"TariffStep068" : [ "08:00", "120000", "TariffStep069" ],
"TariffStep069" : [ "09:00", "120000", "TariffStep0610"],
"TariffStep0610" : [ "10:00", "120000", "TariffStep0611"],
"TariffStep0611" : [ "11:00", "120000", "TariffStep0612"],
"TariffStep0612" : [ "12:00", "120000", "TariffStep0613"],
"TariffStep0613" : [ "13:00", "120000", "TariffStep0614"],
"TariffStep0614" : [ "14:00", "120000", "TariffStep0615"],
"TariffStep0615" : [ "15:00", "120000", "TariffStep0616"],
"TariffStep0616" : [ "16:00", "120000", "TariffStep0617"],
"TariffStep0617" : [ "17:00", "120000", "TariffStep0618"],
"TariffStep0618" : [ "18:00", "120000", "TariffStep0619"],
"TariffStep0619" : [ "19:00", "120000", "TariffStep0620"],
"TariffStep0620" : [ "20:00", "120000", "TariffStep0621"],
"TariffStep0621" : [ "21:00", "120000", "TariffStep0622"],
"TariffStep0622" : [ "22:00", "120000", "TariffStep0623"],
"TariffStep0623" : [ "23:00", "120000", "TariffStep100" ]
}
},
"week2" : {
"Monday": {
"TariffStep100" : [ "00:00", "120000", "TariffStep101" ],
"TariffStep101" : [ "01:00", "120000", "TariffStep102" ],
"TariffStep102" : [ "02:00", "120000", "TariffStep103" ],
"TariffStep103" : [ "03:00", "120000", "TariffStep104" ],
"TariffStep104" : [ "04:00", "120000", "TariffStep105" ],
"TariffStep105" : [ "05:00", "120000", "TariffStep106" ],
"TariffStep106" : [ "06:00", "120000", "TariffStep107" ],
"TariffStep107" : [ "07:00", "120000", "TariffStep108" ],
"TariffStep108" : [ "08:00", "120000", "TariffStep109" ],
"TariffStep109" : [ "09:00", "120000", "TariffStep1010"],
"TariffStep1010" : [ "10:00", "120000", "TariffStep1011"],
"TariffStep1011" : [ "11:00", "120000", "TariffStep1012"],
"TariffStep1012" : [ "12:00", "120000", "TariffStep1013"],
"TariffStep1013" : [ "13:00", "120000", "TariffStep1014"],
"TariffStep1014" : [ "14:00", "120000", "TariffStep1015"],
"TariffStep1015" : [ "15:00", "120000", "TariffStep1016"],
"TariffStep1016" : [ "16:00", "120000", "TariffStep1017"],
"TariffStep1017" : [ "17:00", "120000", "TariffStep1018"],
"TariffStep1018" : [ "18:00", "120000", "TariffStep1019"],
"TariffStep1019" : [ "19:00", "120000", "TariffStep1020"],
"TariffStep1020" : [ "20:00", "120000", "TariffStep1021"],
"TariffStep1021" : [ "21:00", "120000", "TariffStep1022"],
"TariffStep1022" : [ "22:00", "120000", "TariffStep1023"],
"TariffStep1023" : [ "23:00", "120000", "TariffStep110" ]
},
"Tuesday": {
"TariffStep110" : [ "00:00", "120000", "TariffStep111" ],
"TariffStep111" : [ "01:00", "120000", "TariffStep112" ],
"TariffStep112" : [ "02:00", "120000", "TariffStep113" ],
"TariffStep113" : [ "03:00", "120000", "TariffStep114" ],
"TariffStep114" : [ "04:00", "120000", "TariffStep115" ],
"TariffStep115" : [ "05:00", "120000", "TariffStep116" ],
"TariffStep116" : [ "06:00", "120000", "TariffStep117" ],
"TariffStep117" : [ "07:00", "120000", "TariffStep118" ],
"TariffStep118" : [ "08:00", "120000", "TariffStep119" ],
"TariffStep119" : [ "09:00", "120000", "TariffStep1110"],
"TariffStep1110" : [ "10:00", "120000", "TariffStep1111"],
"TariffStep1111" : [ "11:00", "120000", "TariffStep1112"],
"TariffStep1112" : [ "12:00", "120000", "TariffStep1113"],
"TariffStep1113" : [ "13:00", "120000", "TariffStep1114"],
"TariffStep1114" : [ "14:00", "120000", "TariffStep1115"],
"TariffStep1115" : [ "15:00", "120000", "TariffStep1116"],
"TariffStep1116" : [ "16:00", "120000", "TariffStep1117"],
"TariffStep1117" : [ "17:00", "120000", "TariffStep1118"],
"TariffStep1118" : [ "18:00", "120000", "TariffStep1119"],
"TariffStep1119" : [ "19:00", "120000", "TariffStep1120"],
"TariffStep1120" : [ "20:00", "120000", "TariffStep1121"],
"TariffStep1121" : [ "21:00", "120000", "TariffStep1122"],
"TariffStep1122" : [ "22:00", "120000", "TariffStep1123"],
"TariffStep1123" : [ "23:00", "120000", "TariffStep120" ]
},
"Wednesday": {
"TariffStep120" : [ "00:00", "120000", "TariffStep121" ],
"TariffStep121" : [ "01:00", "120000", "TariffStep122" ],
"TariffStep122" : [ "02:00", "120000", "TariffStep123" ],
"TariffStep123" : [ "03:00", "120000", "TariffStep124" ],
"TariffStep124" : [ "04:00", "120000", "TariffStep125" ],
"TariffStep125" : [ "05:00", "120000", "TariffStep126" ],
"TariffStep126" : [ "06:00", "120000", "TariffStep127" ],
"TariffStep127" : [ "07:00", "120000", "TariffStep128" ],
"TariffStep128" : [ "08:00", "120000", "TariffStep129" ],
"TariffStep129" : [ "09:00", "120000", "TariffStep1210"],
"TariffStep1210" : [ "10:00", "120000", "TariffStep1211"],
"TariffStep1211" : [ "11:00", "120000", "TariffStep1212"],
"TariffStep1212" : [ "12:00", "120000", "TariffStep1213"],
"TariffStep1213" : [ "13:00", "120000", "TariffStep1214"],
"TariffStep1214" : [ "14:00", "120000", "TariffStep1215"],
"TariffStep1215" : [ "15:00", "120000", "TariffStep1216"],
"TariffStep1216" : [ "16:00", "120000", "TariffStep1217"],
"TariffStep1217" : [ "17:00", "120000", "TariffStep1218"],
"TariffStep1218" : [ "18:00", "120000", "TariffStep1219"],
"TariffStep1219" : [ "19:00", "120000", "TariffStep1220"],
"TariffStep1220" : [ "20:00", "120000", "TariffStep1221"],
"TariffStep1221" : [ "21:00", "120000", "TariffStep1222"],
"TariffStep1222" : [ "22:00", "120000", "TariffStep1223"],
"TariffStep1223" : [ "23:00", "120000", "TariffStep130" ]
},
"Thursday": {
"TariffStep130" : [ "00:00", "120000", "TariffStep131" ],
"TariffStep131" : [ "01:00", "120000", "TariffStep132" ],
"TariffStep132" : [ "02:00", "120000", "TariffStep133" ],
"TariffStep133" : [ "03:00", "120000", "TariffStep134" ],
"TariffStep134" : [ "04:00", "120000", "TariffStep135" ],
"TariffStep135" : [ "05:00", "120000", "TariffStep136" ],
"TariffStep136" : [ "06:00", "120000", "TariffStep137" ],
"TariffStep137" : [ "07:00", "120000", "TariffStep138" ],
"TariffStep138" : [ "08:00", "120000", "TariffStep139" ],
"TariffStep139" : [ "09:00", "120000", "TariffStep1310"],
"TariffStep1310" : [ "10:00", "120000", "TariffStep1311"],
"TariffStep1311" : [ "11:00", "120000", "TariffStep1312"],
"TariffStep1312" : [ "12:00", "120000", "TariffStep1313"],
"TariffStep1313" : [ "13:00", "120000", "TariffStep1314"],
"TariffStep1314" : [ "14:00", "120000", "TariffStep1315"],
"TariffStep1315" : [ "15:00", "120000", "TariffStep1316"],
"TariffStep1316" : [ "16:00", "120000", "TariffStep1317"],
"TariffStep1317" : [ "17:00", "120000", "TariffStep1318"],
"TariffStep1318" : [ "18:00", "120000", "TariffStep1319"],
"TariffStep1319" : [ "19:00", "120000", "TariffStep1320"],
"TariffStep1320" : [ "20:00", "120000", "TariffStep1321"],
"TariffStep1321" : [ "21:00", "120000", "TariffStep1322"],
"TariffStep1322" : [ "22:00", "120000", "TariffStep1323"],
"TariffStep1323" : [ "23:00", "120000", "TariffStep140" ]
},
"Friday": {
"TariffStep140" : [ "00:00", "120000", "TariffStep141" ],
"TariffStep141" : [ "01:00", "120000", "TariffStep142" ],
"TariffStep142" : [ "02:00", "120000", "TariffStep143" ],
"TariffStep143" : [ "03:00", "120000", "TariffStep144" ],
"TariffStep144" : [ "04:00", "120000", "TariffStep145" ],
"TariffStep145" : [ "05:00", "120000", "TariffStep146" ],
"TariffStep146" : [ "06:00", "120000", "TariffStep147" ],
"TariffStep147" : [ "07:00", "120000", "TariffStep148" ],
"TariffStep148" : [ "08:00", "120000", "TariffStep149" ],
"TariffStep149" : [ "09:00", "120000", "TariffStep1410" ],
"TariffStep1410" : [ "10:00", "120000", "TariffStep1411" ],
"TariffStep1411" : [ "11:00", "120000", "TariffStep1412" ],
"TariffStep1412" : [ "12:00", "120000", "TariffStep1413" ],
"TariffStep1413" : [ "13:00", "120000", "TariffStep1414" ],
"TariffStep1414" : [ "14:00", "120000", "TariffStep1415" ],
"TariffStep1415" : [ "15:00", "120000", "TariffStep1416"],
"TariffStep1416" : [ "16:00", "120000", "TariffStep1417"],
"TariffStep1417" : [ "17:00", "120000", "TariffStep1418"],
"TariffStep1418" : [ "18:00", "120000", "TariffStep1419"],
"TariffStep1419" : [ "19:00", "120000", "TariffStep1420"],
"TariffStep1420" : [ "20:00", "120000", "TariffStep1421" ],
"TariffStep1421" : [ "21:00", "120000", "TariffStep1422" ],
"TariffStep1422" : [ "22:00", "120000", "TariffStep1423" ],
"TariffStep1423" : [ "23:00", "120000", "TariffStep150" ]
},
"Saturday": {
"TariffStep150" : [ "00:00", "120000", "TariffStep151" ],
"TariffStep151" : [ "01:00", "120000", "TariffStep152" ],
"TariffStep152" : [ "02:00", "120000", "TariffStep153" ],
"TariffStep153" : [ "03:00", "120000", "TariffStep154" ],
"TariffStep154" : [ "04:00", "120000", "TariffStep155" ],
"TariffStep155" : [ "05:00", "120000", "TariffStep156" ],
"TariffStep156" : [ "06:00", "120000", "TariffStep157" ],
"TariffStep157" : [ "07:00", "120000", "TariffStep158" ],
"TariffStep158" : [ "08:00", "120000", "TariffStep159" ],
"TariffStep159" : [ "09:00", "120000", "TariffStep1510"],
"TariffStep1510" : [ "10:00", "120000", "TariffStep1511"],
"TariffStep1511" : [ "11:00", "120000", "TariffStep1512"],
"TariffStep1512" : [ "12:00", "120000", "TariffStep1513"],
"TariffStep1513" : [ "13:00", "120000", "TariffStep1514"],
"TariffStep1514" : [ "14:00", "120000", "TariffStep1515"],
"TariffStep1515" : [ "15:00", "120000", "TariffStep1516"],
"TariffStep1516" : [ "16:00", "120000", "TariffStep1517"],
"TariffStep1517" : [ "17:00", "120000", "TariffStep1518"],
"TariffStep1518" : [ "18:00", "120000", "TariffStep1519"],
"TariffStep1519" : [ "19:00", "120000", "TariffStep1520"],
"TariffStep1520" : [ "20:00", "120000", "TariffStep1521"],
"TariffStep1521" : [ "21:00", "120000", "TariffStep1522"],
"TariffStep1522" : [ "22:00", "120000", "TariffStep1523"],
"TariffStep1523" : [ "23:00", "120000", "TariffStep160" ]
},
"Sunday": {
"TariffStep160" : [ "00:00", "120000", "TariffStep161" ],
"TariffStep161" : [ "01:00", "120000", "TariffStep162" ],
"TariffStep162" : [ "02:00", "120000", "TariffStep163" ],
"TariffStep163" : [ "03:00", "120000", "TariffStep164" ],
"TariffStep164" : [ "04:00", "120000", "TariffStep165" ],
"TariffStep165" : [ "05:00", "120000", "TariffStep166" ],
"TariffStep166" : [ "06:00", "120000", "TariffStep167" ],
"TariffStep167" : [ "07:00", "120000", "TariffStep168" ],
"TariffStep168" : [ "08:00", "120000", "TariffStep169" ],
"TariffStep169" : [ "09:00", "120000", "TariffStep1610"],
"TariffStep1610" : [ "10:00", "120000", "TariffStep1611"],
"TariffStep1611" : [ "11:00", "120000", "TariffStep1612"],
"TariffStep1612" : [ "12:00", "120000", "TariffStep1613"],
"TariffStep1613" : [ "13:00", "120000", "TariffStep1614"],
"TariffStep1614" : [ "14:00", "120000", "TariffStep1615"],
"TariffStep1615" : [ "15:00", "120000", "TariffStep1616"],
"TariffStep1616" : [ "16:00", "120000", "TariffStep1617"],
"TariffStep1617" : [ "17:00", "120000", "TariffStep1618"],
"TariffStep1618" : [ "18:00", "120000", "TariffStep1619"],
"TariffStep1619" : [ "19:00", "120000", "TariffStep1620"],
"TariffStep1620" : [ "20:00", "120000", "TariffStep1621"],
"TariffStep1621" : [ "21:00", "120000", "TariffStep1622"],
"TariffStep1622" : [ "22:00", "120000", "TariffStep1623"],
"TariffStep1623" : [ "23:00", "120000", "TariffStep200" ]
}
},
"week3" : {
"Monday": {
"TariffStep200" : [ "00:00", "120000", "TariffStep201" ],
"TariffStep201" : [ "01:00", "120000", "TariffStep202" ],
"TariffStep202" : [ "02:00", "120000", "TariffStep203" ],
"TariffStep203" : [ "03:00", "120000", "TariffStep204" ],
"TariffStep204" : [ "04:00", "120000", "TariffStep205" ],
"TariffStep205" : [ "05:00", "120000", "TariffStep206" ],
"TariffStep206" : [ "06:00", "120000", "TariffStep207" ],
"TariffStep207" : [ "07:00", "120000", "TariffStep208" ],
"TariffStep208" : [ "08:00", "120000", "TariffStep209" ],
"TariffStep209" : [ "09:00", "120000", "TariffStep2010"],
"TariffStep2010" : [ "10:00", "120000", "TariffStep2011"],
"TariffStep2011" : [ "11:00", "120000", "TariffStep2012"],
"TariffStep2012" : [ "12:00", "120000", "TariffStep2013"],
"TariffStep2013" : [ "13:00", "120000", "TariffStep2014"],
"TariffStep2014" : [ "14:00", "120000", "TariffStep2015"],
"TariffStep2015" : [ "15:00", "120000", "TariffStep2016"],
"TariffStep2016" : [ "16:00", "120000", "TariffStep2017"],
"TariffStep2017" : [ "17:00", "120000", "TariffStep2018"],
"TariffStep2018" : [ "18:00", "120000", "TariffStep2019"],
"TariffStep2019" : [ "19:00", "120000", "TariffStep2020"],
"TariffStep2020" : [ "20:00", "120000", "TariffStep2021"],
"TariffStep2021" : [ "21:00", "120000", "TariffStep2022"],
"TariffStep2022" : [ "22:00", "120000", "TariffStep2023"],
"TariffStep2023" : [ "23:00", "120000", "TariffStep210" ]
},
"Tuesday": {
"TariffStep210" : [ "00:00", "120000", "TariffStep211" ],
"TariffStep211" : [ "01:00", "120000", "TariffStep212" ],
"TariffStep212" : [ "02:00", "120000", "TariffStep213" ],
"TariffStep213" : [ "03:00", "120000", "TariffStep214" ],
"TariffStep214" : [ "04:00", "120000", "TariffStep215" ],
"TariffStep215" : [ "05:00", "120000", "TariffStep216" ],
"TariffStep216" : [ "06:00", "120000", "TariffStep217" ],
"TariffStep217" : [ "07:00", "120000", "TariffStep218" ],
"TariffStep218" : [ "08:00", "120000", "TariffStep219" ],
"TariffStep219" : [ "09:00", "120000", "TariffStep2110"],
"TariffStep2110" : [ "10:00", "120000", "TariffStep2111"],
"TariffStep2111" : [ "11:00", "120000", "TariffStep2112"],
"TariffStep2112" : [ "12:00", "120000", "TariffStep2113"],
"TariffStep2113" : [ "13:00", "120000", "TariffStep2114"],
"TariffStep2114" : [ "14:00", "120000", "TariffStep2115"],
"TariffStep2115" : [ "15:00", "120000", "TariffStep2116"],
"TariffStep2116" : [ "16:00", "120000", "TariffStep2117"],
"TariffStep2117" : [ "17:00", "120000", "TariffStep2118"],
"TariffStep2118" : [ "18:00", "120000", "TariffStep2119"],
"TariffStep2119" : [ "19:00", "120000", "TariffStep2120"],
"TariffStep2120" : [ "20:00", "120000", "TariffStep2121"],
"TariffStep2121" : [ "21:00", "120000", "TariffStep2122"],
"TariffStep2122" : [ "22:00", "120000", "TariffStep2123"],
"TariffStep2123" : [ "23:00", "120000", "TariffStep220" ]
},
"Wednesday": {
"TariffStep220" : [ "00:00", "120000", "TariffStep221" ],
"TariffStep221" : [ "01:00", "120000", "TariffStep222" ],
"TariffStep222" : [ "02:00", "120000", "TariffStep223" ],
"TariffStep223" : [ "03:00", "120000", "TariffStep224" ],
"TariffStep224" : [ "04:00", "120000", "TariffStep225" ],
"TariffStep225" : [ "05:00", "120000", "TariffStep226" ],
"TariffStep226" : [ "06:00", "120000", "TariffStep227" ],
"TariffStep227" : [ "07:00", "120000", "TariffStep228" ],
"TariffStep228" : [ "08:00", "120000", "TariffStep229" ],
"TariffStep229" : [ "09:00", "120000", "TariffStep2210"],
"TariffStep2210" : [ "10:00", "120000", "TariffStep2211"],
"TariffStep2211" : [ "11:00", "120000", "TariffStep2212"],
"TariffStep2212" : [ "12:00", "120000", "TariffStep2213"],
"TariffStep2213" : [ "13:00", "120000", "TariffStep2214"],
"TariffStep2214" : [ "14:00", "120000", "TariffStep2215"],
"TariffStep2215" : [ "15:00", "120000", "TariffStep2216"],
"TariffStep2216" : [ "16:00", "120000", "TariffStep2217"],
"TariffStep2217" : [ "17:00", "120000", "TariffStep2218"],
"TariffStep2218" : [ "18:00", "120000", "TariffStep2219"],
"TariffStep2219" : [ "19:00", "120000", "TariffStep2220"],
"TariffStep2220" : [ "20:00", "120000", "TariffStep2221"],
"TariffStep2221" : [ "21:00", "120000", "TariffStep2222"],
"TariffStep2222" : [ "22:00", "120000", "TariffStep2223"],
"TariffStep2223" : [ "23:00", "120000", "TariffStep230" ]
},
"Thursday": {
"TariffStep230" : [ "00:00", "120000", "TariffStep231" ],
"TariffStep231" : [ "01:00", "120000", "TariffStep232" ],
"TariffStep232" : [ "02:00", "120000", "TariffStep233" ],
"TariffStep233" : [ "03:00", "120000", "TariffStep234" ],
"TariffStep234" : [ "04:00", "120000", "TariffStep235" ],
"TariffStep235" : [ "05:00", "120000", "TariffStep236" ],
"TariffStep236" : [ "06:00", "120000", "TariffStep237" ],
"TariffStep237" : [ "07:00", "120000", "TariffStep238" ],
"TariffStep238" : [ "08:00", "120000", "TariffStep239" ],
"TariffStep239" : [ "09:00", "120000", "TariffStep2310"],
"TariffStep2310" : [ "10:00", "120000", "TariffStep2311"],
"TariffStep2311" : [ "11:00", "120000", "TariffStep2312"],
"TariffStep2312" : [ "12:00", "120000", "TariffStep2313"],
"TariffStep2313" : [ "13:00", "120000", "TariffStep2314"],
"TariffStep2314" : [ "14:00", "120000", "TariffStep2315"],
"TariffStep2315" : [ "15:00", "120000", "TariffStep2316"],
"TariffStep2316" : [ "16:00", "120000", "TariffStep2317"],
"TariffStep2317" : [ "17:00", "120000", "TariffStep2318"],
"TariffStep2318" : [ "18:00", "120000", "TariffStep2319"],
"TariffStep2319" : [ "19:00", "120000", "TariffStep2320"],
"TariffStep2320" : [ "20:00", "120000", "TariffStep2321"],
"TariffStep2321" : [ "21:00", "120000", "TariffStep2322"],
"TariffStep2322" : [ "22:00", "120000", "TariffStep2323"],
"TariffStep2323" : [ "23:00", "120000", "TariffStep240" ]
},
"Friday": {
"TariffStep240" : [ "00:00", "120000", "TariffStep241" ],
"TariffStep241" : [ "01:00", "120000", "TariffStep242" ],
"TariffStep242" : [ "02:00", "120000", "TariffStep243" ],
"TariffStep243" : [ "03:00", "120000", "TariffStep244" ],
"TariffStep244" : [ "04:00", "120000", "TariffStep245" ],
"TariffStep245" : [ "05:00", "120000", "TariffStep246" ],
"TariffStep246" : [ "06:00", "120000", "TariffStep247" ],
"TariffStep247" : [ "07:00", "120000", "TariffStep248" ],
"TariffStep248" : [ "08:00", "120000", "TariffStep249" ],
"TariffStep249" : [ "09:00", "120000", "TariffStep2410"],
"TariffStep2410" : [ "10:00", "120000", "TariffStep2411"],
"TariffStep2411" : [ "11:00", "120000", "TariffStep2412"],
"TariffStep2412" : [ "12:00", "120000", "TariffStep2413"],
"TariffStep2413" : [ "13:00", "120000", "TariffStep2414"],
"TariffStep2414" : [ "14:00", "120000", "TariffStep2415"],
"TariffStep2415" : [ "15:00", "120000", "TariffStep2416"],
"TariffStep2416" : [ "16:00", "120000", "TariffStep2417"],
"TariffStep2417" : [ "17:00", "120000", "TariffStep2418"],
"TariffStep2418" : [ "18:00", "120000", "TariffStep2419"],
"TariffStep2419" : [ "19:00", "120000", "TariffStep2420"],
"TariffStep2420" : [ "20:00", "120000", "TariffStep2421"],
"TariffStep2421" : [ "21:00", "120000", "TariffStep2422"],
"TariffStep2422" : [ "22:00", "120000", "TariffStep2423"],
"TariffStep2423" : [ "23:00", "120000", "TariffStep250" ]
},
"Saturday": {
"TariffStep250" : [ "00:00", "120000", "TariffStep251" ],
"TariffStep251" : [ "01:00", "120000", "TariffStep252" ],
"TariffStep252" : [ "02:00", "120000", "TariffStep253" ],
"TariffStep253" : [ "03:00", "120000", "TariffStep254" ],
"TariffStep254" : [ "04:00", "120000", "TariffStep255" ],
"TariffStep255" : [ "05:00", "120000", "TariffStep256" ],
"TariffStep256" : [ "06:00", "120000", "TariffStep257" ],
"TariffStep257" : [ "07:00", "120000", "TariffStep258" ],
"TariffStep258" : [ "08:00", "120000", "TariffStep259" ],
"TariffStep259" : [ "09:00", "120000", "TariffStep2510"],
"TariffStep2510" : [ "10:00", "120000", "TariffStep2511"],
"TariffStep2511" : [ "11:00", "120000", "TariffStep2512"],
"TariffStep2512" : [ "12:00", "120000", "TariffStep2513"],
"TariffStep2513" : [ "13:00", "120000", "TariffStep2514"],
"TariffStep2514" : [ "14:00", "120000", "TariffStep2515"],
"TariffStep2515" : [ "15:00", "120000", "TariffStep2516"],
"TariffStep2516" : [ "16:00", "120000", "TariffStep2517"],
"TariffStep2517" : [ "17:00", "120000", "TariffStep2518"],
"TariffStep2518" : [ "18:00", "120000", "TariffStep2519"],
"TariffStep2519" : [ "19:00", "120000", "TariffStep2520"],
"TariffStep2520" : [ "20:00", "120000", "TariffStep2521"],
"TariffStep2521" : [ "21:00", "120000", "TariffStep2522"],
"TariffStep2522" : [ "22:00", "120000", "TariffStep2523"],
"TariffStep2523" : [ "23:00", "120000", "TariffStep260" ]
},
"Sunday": {
"TariffStep260" : [ "00:00", "120000", "TariffStep261" ],
"TariffStep261" : [ "01:00", "120000", "TariffStep262" ],
"TariffStep262" : [ "02:00", "120000", "TariffStep263" ],
"TariffStep263" : [ "03:00", "120000", "TariffStep264" ],
"TariffStep264" : [ "04:00", "120000", "TariffStep265" ],
"TariffStep265" : [ "05:00", "120000", "TariffStep266" ],
"TariffStep266" : [ "06:00", "120000", "TariffStep267" ],
"TariffStep267" : [ "07:00", "120000", "TariffStep268" ],
"TariffStep268" : [ "08:00", "120000", "TariffStep269" ],
"TariffStep269" : [ "09:00", "120000", "TariffStep2610"],
"TariffStep2610" : [ "10:00", "120000", "TariffStep2611"],
"TariffStep2611" : [ "11:00", "120000", "TariffStep2612"],
"TariffStep2612" : [ "12:00", "120000", "TariffStep2613"],
"TariffStep2613" : [ "13:00", "120000", "TariffStep2614"],
"TariffStep2614" : [ "14:00", "120000", "TariffStep2615"],
"TariffStep2615" : [ "15:00", "120000", "TariffStep2616"],
"TariffStep2616" : [ "16:00", "120000", "TariffStep2617"],
"TariffStep2617" : [ "17:00", "120000", "TariffStep2618"],
"TariffStep2618" : [ "18:00", "120000", "TariffStep2619"],
"TariffStep2619" : [ "19:00", "120000", "TariffStep2620"],
"TariffStep2620" : [ "20:00", "120000", "TariffStep2621"],
"TariffStep2621" : [ "21:00", "120000", "TariffStep2622"],
"TariffStep2622" : [ "22:00", "120000", "TariffStep2623"],
"TariffStep2623" : [ "23:00", "120000", "TariffStep000" ]
}
}
}

View File

@ -0,0 +1,557 @@
{
"name":"test",
"properties": [
],
"week1" : {
"Monday": {
"TariffStep000" : [ "00:00", "120000", "TariffStep001" ],
"TariffStep001" : [ "01:00", "120000", "TariffStep002" ],
"TariffStep002" : [ "02:00", "120000", "TariffStep003" ],
"TariffStep003" : [ "03:00", "120000", "TariffStep004" ],
"TariffStep004" : [ "04:00", "120000", "TariffStep005" ],
"TariffStep005" : [ "05:00", "120000", "TariffStep006" ],
"TariffStep006" : [ "06:00", "120000", "TariffStep007" ],
"TariffStep007" : [ "07:00", "120000", "TariffStep008" ],
"TariffStep008" : [ "08:00", "120000", "TariffStep009" ],
"TariffStep009" : [ "09:00", "120000", "TariffStep0010" ],
"TariffStep0010" : [ "10:00", "120000", "TariffStep0011" ],
"TariffStep0011" : [ "11:00", "120000", "TariffStep0012" ],
"TariffStep0012" : [ "12:00", "120000", "TariffStep0013" ],
"TariffStep0013" : [ "13:00", "120000", "TariffStep0014" ],
"TariffStep0014" : [ "14:00", "120000", "TariffStep0015" ],
"TariffStep0015" : [ "15:00", "120000", "TariffStep0016"],
"TariffStep0016" : [ "16:00", "120000", "TariffStep0017"],
"TariffStep0017" : [ "17:00", "120000", "TariffStep0018"],
"TariffStep0018" : [ "18:00", "120000", "TariffStep0019"],
"TariffStep0019" : [ "19:00", "120000", "TariffStep0020"],
"TariffStep0020" : [ "20:00", "120000", "TariffStep0021" ]
"TariffStep0021" : [ "21:00", "120000", "TariffStep0022" ]
"TariffStep0022" : [ "22:00", "120000", "TariffStep0023" ]
"TariffStep0023" : [ "23:00", "120000", "TariffStep010" ]
},
"Tuesday": {
"TariffStep010" : [ "00:00", "120000", "TariffStep011" ],
"TariffStep011" : [ "01:00", "120000", "TariffStep012" ],
"TariffStep012" : [ "02:00", "120000", "TariffStep013" ],
"TariffStep013" : [ "03:00", "120000", "TariffStep014" ],
"TariffStep014" : [ "04:00", "120000", "TariffStep015" ],
"TariffStep015" : [ "05:00", "120000", "TariffStep016" ],
"TariffStep016" : [ "06:00", "120000", "TariffStep017" ],
"TariffStep017" : [ "07:00", "120000", "TariffStep018" ],
"TariffStep018" : [ "08:00", "120000", "TariffStep019" ],
"TariffStep019" : [ "09:00", "120000", "TariffStep0110" ],
"TariffStep0110" : [ "10:00", "120000", "TariffStep0111" ],
"TariffStep0111" : [ "11:00", "120000", "TariffStep0112" ],
"TariffStep0112" : [ "12:00", "120000", "TariffStep0113" ],
"TariffStep0113" : [ "13:00", "120000", "TariffStep0114" ],
"TariffStep0114" : [ "14:00", "120000", "TariffStep0115" ],
"TariffStep0115" : [ "15:00", "120000", "TariffStep0116"],
"TariffStep0116" : [ "16:00", "120000", "TariffStep0117"],
"TariffStep0117" : [ "17:00", "120000", "TariffStep0118"],
"TariffStep0118" : [ "18:00", "120000", "TariffStep0119"],
"TariffStep0119" : [ "19:00", "120000", "TariffStep0120"],
"TariffStep0120" : [ "20:00", "120000", "TariffStep0121" ]
"TariffStep0121" : [ "21:00", "120000", "TariffStep0122" ]
"TariffStep0122" : [ "22:00", "120000", "TariffStep0123" ]
"TariffStep0123" : [ "23:00", "120000", "TariffStep020" ]
},
"Wednesday": {
"TariffStep020" : [ "00:00", "120000", "TariffStep021" ],
"TariffStep021" : [ "01:00", "120000", "TariffStep022" ],
"TariffStep022" : [ "02:00", "120000", "TariffStep023" ],
"TariffStep023" : [ "03:00", "120000", "TariffStep024" ],
"TariffStep024" : [ "04:00", "120000", "TariffStep025" ],
"TariffStep025" : [ "05:00", "120000", "TariffStep026" ],
"TariffStep026" : [ "06:00", "120000", "TariffStep027" ],
"TariffStep027" : [ "07:00", "120000", "TariffStep028" ],
"TariffStep028" : [ "08:00", "120000", "TariffStep029" ],
"TariffStep029" : [ "09:00", "120000", "TariffStep0210"],
"TariffStep0210" : [ "10:00", "120000", "TariffStep0211"],
"TariffStep0211" : [ "11:00", "120000", "TariffStep0212"],
"TariffStep0212" : [ "12:00", "120000", "TariffStep0213"],
"TariffStep0213" : [ "13:00", "120000", "TariffStep0214"],
"TariffStep0214" : [ "14:00", "120000", "TariffStep0215"],
"TariffStep0215" : [ "15:00", "120000", "TariffStep0216"],
"TariffStep0216" : [ "16:00", "120000", "TariffStep0217"],
"TariffStep0217" : [ "17:00", "120000", "TariffStep0218"],
"TariffStep0218" : [ "18:00", "120000", "TariffStep0219"],
"TariffStep0219" : [ "19:00", "120000", "TariffStep0220"],
"TariffStep0220" : [ "20:00", "120000", "TariffStep0221"]
"TariffStep0221" : [ "21:00", "120000", "TariffStep0222"]
"TariffStep0222" : [ "22:00", "120000", "TariffStep0223"]
"TariffStep0223" : [ "23:00", "120000", "TariffStep030" ]
},
"Thursday": {
"TariffStep030" : [ "00:00", "120000", "TariffStep031" ],
"TariffStep031" : [ "01:00", "120000", "TariffStep032" ],
"TariffStep032" : [ "02:00", "120000", "TariffStep033" ],
"TariffStep033" : [ "03:00", "120000", "TariffStep034" ],
"TariffStep034" : [ "04:00", "120000", "TariffStep035" ],
"TariffStep035" : [ "05:00", "120000", "TariffStep036" ],
"TariffStep036" : [ "06:00", "120000", "TariffStep037" ],
"TariffStep037" : [ "07:00", "120000", "TariffStep038" ],
"TariffStep038" : [ "08:00", "120000", "TariffStep039" ],
"TariffStep039" : [ "09:00", "120000", "TariffStep0310"],
"TariffStep0310" : [ "10:00", "120000", "TariffStep0311"],
"TariffStep0311" : [ "11:00", "120000", "TariffStep0312"],
"TariffStep0312" : [ "12:00", "120000", "TariffStep0313"],
"TariffStep0313" : [ "13:00", "120000", "TariffStep0314"],
"TariffStep0314" : [ "14:00", "120000", "TariffStep0315"],
"TariffStep0315" : [ "15:00", "120000", "TariffStep0316"],
"TariffStep0316" : [ "16:00", "120000", "TariffStep0317"],
"TariffStep0317" : [ "17:00", "120000", "TariffStep0318"],
"TariffStep0318" : [ "18:00", "120000", "TariffStep0319"],
"TariffStep0319" : [ "19:00", "120000", "TariffStep0320"],
"TariffStep0320" : [ "20:00", "120000", "TariffStep0321"]
"TariffStep0321" : [ "21:00", "120000", "TariffStep0322"]
"TariffStep0322" : [ "22:00", "120000", "TariffStep0323"]
"TariffStep0323" : [ "23:00", "120000", "TariffStep040" ]
},
"Friday": {
"TariffStep040" : [ "00:00", "120000", "TariffStep041" ],
"TariffStep041" : [ "01:00", "120000", "TariffStep042" ],
"TariffStep042" : [ "02:00", "120000", "TariffStep043" ],
"TariffStep043" : [ "03:00", "120000", "TariffStep044" ],
"TariffStep044" : [ "04:00", "120000", "TariffStep045" ],
"TariffStep045" : [ "05:00", "120000", "TariffStep046" ],
"TariffStep046" : [ "06:00", "120000", "TariffStep047" ],
"TariffStep047" : [ "07:00", "120000", "TariffStep048" ],
"TariffStep048" : [ "08:00", "120000", "TariffStep049" ],
"TariffStep049" : [ "09:00", "120000", "TariffStep0410" ],
"TariffStep0410" : [ "10:00", "120000", "TariffStep0411" ],
"TariffStep0411" : [ "11:00", "120000", "TariffStep0412" ],
"TariffStep0412" : [ "12:00", "120000", "TariffStep0413" ],
"TariffStep0413" : [ "13:00", "120000", "TariffStep0414" ],
"TariffStep0414" : [ "14:00", "120000", "TariffStep0415" ],
"TariffStep0415" : [ "15:00", "120000", "TariffStep0416"],
"TariffStep0416" : [ "16:00", "120000", "TariffStep0417"],
"TariffStep0417" : [ "17:00", "120000", "TariffStep0418"],
"TariffStep0418" : [ "18:00", "120000", "TariffStep0419"],
"TariffStep0419" : [ "19:00", "120000", "TariffStep0420"],
"TariffStep0420" : [ "20:00", "120000", "TariffStep0421" ]
"TariffStep0421" : [ "21:00", "120000", "TariffStep0422" ]
"TariffStep0422" : [ "22:00", "120000", "TariffStep0423" ]
"TariffStep0423" : [ "23:00", "120000", "TariffStep050" ]
},
"Saturday": {
"TariffStep050" : [ "00:00", "120000", "TariffStep051" ],
"TariffStep051" : [ "01:00", "120000", "TariffStep052" ],
"TariffStep052" : [ "02:00", "120000", "TariffStep053" ],
"TariffStep053" : [ "03:00", "120000", "TariffStep054" ],
"TariffStep054" : [ "04:00", "120000", "TariffStep055" ],
"TariffStep055" : [ "05:00", "120000", "TariffStep056" ],
"TariffStep056" : [ "06:00", "120000", "TariffStep057" ],
"TariffStep057" : [ "07:00", "120000", "TariffStep058" ],
"TariffStep058" : [ "08:00", "120000", "TariffStep059" ],
"TariffStep059" : [ "09:00", "120000", "TariffStep0510"],
"TariffStep0510" : [ "10:00", "120000", "TariffStep0511"],
"TariffStep0511" : [ "11:00", "120000", "TariffStep0512"],
"TariffStep0512" : [ "12:00", "120000", "TariffStep0513"],
"TariffStep0513" : [ "13:00", "120000", "TariffStep0514"],
"TariffStep0514" : [ "14:00", "120000", "TariffStep0515"],
"TariffStep0515" : [ "15:00", "120000", "TariffStep0516"],
"TariffStep0516" : [ "16:00", "120000", "TariffStep0517"],
"TariffStep0517" : [ "17:00", "120000", "TariffStep0518"],
"TariffStep0518" : [ "18:00", "120000", "TariffStep0519"],
"TariffStep0519" : [ "19:00", "120000", "TariffStep0520"],
"TariffStep0520" : [ "20:00", "120000", "TariffStep0521"]
"TariffStep0521" : [ "21:00", "120000", "TariffStep0522"]
"TariffStep0522" : [ "22:00", "120000", "TariffStep0523"]
"TariffStep0523" : [ "23:00", "120000", "TariffStep060" ]
},
"Sunday": {
"TariffStep060" : [ "00:00", "120000", "TariffStep061" ],
"TariffStep061" : [ "01:00", "120000", "TariffStep062" ],
"TariffStep062" : [ "02:00", "120000", "TariffStep063" ],
"TariffStep063" : [ "03:00", "120000", "TariffStep064" ],
"TariffStep064" : [ "04:00", "120000", "TariffStep065" ],
"TariffStep065" : [ "05:00", "120000", "TariffStep066" ],
"TariffStep066" : [ "06:00", "120000", "TariffStep067" ],
"TariffStep067" : [ "07:00", "120000", "TariffStep068" ],
"TariffStep068" : [ "08:00", "120000", "TariffStep069" ],
"TariffStep069" : [ "09:00", "120000", "TariffStep0610"],
"TariffStep0610" : [ "10:00", "120000", "TariffStep0611"],
"TariffStep0611" : [ "11:00", "120000", "TariffStep0612"],
"TariffStep0612" : [ "12:00", "120000", "TariffStep0613"],
"TariffStep0613" : [ "13:00", "120000", "TariffStep0614"],
"TariffStep0614" : [ "14:00", "120000", "TariffStep0615"],
"TariffStep0615" : [ "15:00", "120000", "TariffStep0616"],
"TariffStep0616" : [ "16:00", "120000", "TariffStep0617"],
"TariffStep0617" : [ "17:00", "120000", "TariffStep0618"],
"TariffStep0618" : [ "18:00", "120000", "TariffStep0619"],
"TariffStep0619" : [ "19:00", "120000", "TariffStep0620"],
"TariffStep0620" : [ "20:00", "120000", "TariffStep0621"]
"TariffStep0621" : [ "21:00", "120000", "TariffStep0622"]
"TariffStep0622" : [ "22:00", "120000", "TariffStep0623"]
"TariffStep0623" : [ "23:00", "120000", "TariffStep100" ]
}
},
"week2" : {
"Monday": {
"TariffStep100" : [ "00:00", "120000", "TariffStep101" ],
"TariffStep101" : [ "01:00", "120000", "TariffStep102" ],
"TariffStep102" : [ "02:00", "120000", "TariffStep103" ],
"TariffStep103" : [ "03:00", "120000", "TariffStep104" ],
"TariffStep104" : [ "04:00", "120000", "TariffStep105" ],
"TariffStep105" : [ "05:00", "120000", "TariffStep106" ],
"TariffStep106" : [ "06:00", "120000", "TariffStep107" ],
"TariffStep107" : [ "07:00", "120000", "TariffStep108" ],
"TariffStep108" : [ "08:00", "120000", "TariffStep109" ],
"TariffStep109" : [ "09:00", "120000", "TariffStep1010" ],
"TariffStep1010" : [ "10:00", "120000", "TariffStep1011" ],
"TariffStep1011" : [ "11:00", "120000", "TariffStep1012" ],
"TariffStep1012" : [ "12:00", "120000", "TariffStep1013" ],
"TariffStep1013" : [ "13:00", "120000", "TariffStep1014" ],
"TariffStep1014" : [ "14:00", "120000", "TariffStep1015" ],
"TariffStep1015" : [ "15:00", "120000", "TariffStep1016"],
"TariffStep1016" : [ "16:00", "120000", "TariffStep1017"],
"TariffStep1017" : [ "17:00", "120000", "TariffStep1018"],
"TariffStep1018" : [ "18:00", "120000", "TariffStep1019"],
"TariffStep1019" : [ "19:00", "120000", "TariffStep1020"],
"TariffStep1020" : [ "20:00", "120000", "TariffStep1021" ]
"TariffStep1021" : [ "21:00", "120000", "TariffStep1022" ]
"TariffStep1022" : [ "22:00", "120000", "TariffStep1023" ]
"TariffStep1023" : [ "23:00", "120000", "TariffStep110" ]
},
"Tuesday": {
"TariffStep110" : [ "00:00", "120000", "TariffStep111" ],
"TariffStep111" : [ "01:00", "120000", "TariffStep112" ],
"TariffStep112" : [ "02:00", "120000", "TariffStep113" ],
"TariffStep113" : [ "03:00", "120000", "TariffStep114" ],
"TariffStep114" : [ "04:00", "120000", "TariffStep115" ],
"TariffStep115" : [ "05:00", "120000", "TariffStep116" ],
"TariffStep116" : [ "06:00", "120000", "TariffStep117" ],
"TariffStep117" : [ "07:00", "120000", "TariffStep118" ],
"TariffStep118" : [ "08:00", "120000", "TariffStep119" ],
"TariffStep119" : [ "09:00", "120000", "TariffStep1110" ],
"TariffStep1110" : [ "10:00", "120000", "TariffStep1111" ],
"TariffStep1111" : [ "11:00", "120000", "TariffStep1112" ],
"TariffStep1112" : [ "12:00", "120000", "TariffStep1113" ],
"TariffStep1113" : [ "13:00", "120000", "TariffStep1114" ],
"TariffStep1114" : [ "14:00", "120000", "TariffStep1115" ],
"TariffStep1115" : [ "15:00", "120000", "TariffStep1116"],
"TariffStep1116" : [ "16:00", "120000", "TariffStep1117"],
"TariffStep1117" : [ "17:00", "120000", "TariffStep1118"],
"TariffStep1118" : [ "18:00", "120000", "TariffStep1119"],
"TariffStep1119" : [ "19:00", "120000", "TariffStep1120"],
"TariffStep1120" : [ "20:00", "120000", "TariffStep1121" ]
"TariffStep1121" : [ "21:00", "120000", "TariffStep1122" ]
"TariffStep1122" : [ "22:00", "120000", "TariffStep1123" ]
"TariffStep1123" : [ "23:00", "120000", "TariffStep120" ]
},
"Wednesday": {
"TariffStep120" : [ "00:00", "120000", "TariffStep121" ],
"TariffStep121" : [ "01:00", "120000", "TariffStep122" ],
"TariffStep122" : [ "02:00", "120000", "TariffStep123" ],
"TariffStep123" : [ "03:00", "120000", "TariffStep124" ],
"TariffStep124" : [ "04:00", "120000", "TariffStep125" ],
"TariffStep125" : [ "05:00", "120000", "TariffStep126" ],
"TariffStep126" : [ "06:00", "120000", "TariffStep127" ],
"TariffStep127" : [ "07:00", "120000", "TariffStep128" ],
"TariffStep128" : [ "08:00", "120000", "TariffStep129" ],
"TariffStep129" : [ "09:00", "120000", "TariffStep1210"],
"TariffStep1210" : [ "10:00", "120000", "TariffStep1211"],
"TariffStep1211" : [ "11:00", "120000", "TariffStep1212"],
"TariffStep1212" : [ "12:00", "120000", "TariffStep1213"],
"TariffStep1213" : [ "13:00", "120000", "TariffStep1214"],
"TariffStep1214" : [ "14:00", "120000", "TariffStep1215"],
"TariffStep1215" : [ "15:00", "120000", "TariffStep1216"],
"TariffStep1216" : [ "16:00", "120000", "TariffStep1217"],
"TariffStep1217" : [ "17:00", "120000", "TariffStep1218"],
"TariffStep1218" : [ "18:00", "120000", "TariffStep1219"],
"TariffStep1219" : [ "19:00", "120000", "TariffStep1220"],
"TariffStep1220" : [ "20:00", "120000", "TariffStep1221"]
"TariffStep1221" : [ "21:00", "120000", "TariffStep1222"]
"TariffStep1222" : [ "22:00", "120000", "TariffStep1223"]
"TariffStep1223" : [ "23:00", "120000", "TariffStep130" ]
},
"Thursday": {
"TariffStep130" : [ "00:00", "120000", "TariffStep131" ],
"TariffStep131" : [ "01:00", "120000", "TariffStep132" ],
"TariffStep132" : [ "02:00", "120000", "TariffStep133" ],
"TariffStep133" : [ "03:00", "120000", "TariffStep134" ],
"TariffStep134" : [ "04:00", "120000", "TariffStep135" ],
"TariffStep135" : [ "05:00", "120000", "TariffStep136" ],
"TariffStep136" : [ "06:00", "120000", "TariffStep137" ],
"TariffStep137" : [ "07:00", "120000", "TariffStep138" ],
"TariffStep138" : [ "08:00", "120000", "TariffStep139" ],
"TariffStep139" : [ "09:00", "120000", "TariffStep1310"],
"TariffStep1310" : [ "10:00", "120000", "TariffStep1311"],
"TariffStep1311" : [ "11:00", "120000", "TariffStep1312"],
"TariffStep1312" : [ "12:00", "120000", "TariffStep1313"],
"TariffStep1313" : [ "13:00", "120000", "TariffStep1314"],
"TariffStep1314" : [ "14:00", "120000", "TariffStep1315"],
"TariffStep1315" : [ "15:00", "120000", "TariffStep1316"],
"TariffStep1316" : [ "16:00", "120000", "TariffStep1317"],
"TariffStep1317" : [ "17:00", "120000", "TariffStep1318"],
"TariffStep1318" : [ "18:00", "120000", "TariffStep1319"],
"TariffStep1319" : [ "19:00", "120000", "TariffStep1320"],
"TariffStep1320" : [ "20:00", "120000", "TariffStep1321"]
"TariffStep1321" : [ "21:00", "120000", "TariffStep1322"]
"TariffStep1322" : [ "22:00", "120000", "TariffStep1323"]
"TariffStep1323" : [ "23:00", "120000", "TariffStep140" ]
},
"Friday": {
"TariffStep140" : [ "00:00", "120000", "TariffStep141" ],
"TariffStep141" : [ "01:00", "120000", "TariffStep142" ],
"TariffStep142" : [ "02:00", "120000", "TariffStep143" ],
"TariffStep143" : [ "03:00", "120000", "TariffStep144" ],
"TariffStep144" : [ "04:00", "120000", "TariffStep145" ],
"TariffStep145" : [ "05:00", "120000", "TariffStep146" ],
"TariffStep146" : [ "06:00", "120000", "TariffStep147" ],
"TariffStep147" : [ "07:00", "120000", "TariffStep148" ],
"TariffStep148" : [ "08:00", "120000", "TariffStep149" ],
"TariffStep149" : [ "09:00", "120000", "TariffStep1410" ],
"TariffStep1410" : [ "10:00", "120000", "TariffStep1411" ],
"TariffStep1411" : [ "11:00", "120000", "TariffStep1412" ],
"TariffStep1412" : [ "12:00", "120000", "TariffStep1413" ],
"TariffStep1413" : [ "13:00", "120000", "TariffStep1414" ],
"TariffStep1414" : [ "14:00", "120000", "TariffStep1415" ],
"TariffStep1415" : [ "15:00", "120000", "TariffStep1416"],
"TariffStep1416" : [ "16:00", "120000", "TariffStep1417"],
"TariffStep1417" : [ "17:00", "120000", "TariffStep1418"],
"TariffStep1418" : [ "18:00", "120000", "TariffStep1419"],
"TariffStep1419" : [ "19:00", "120000", "TariffStep1420"],
"TariffStep1420" : [ "20:00", "120000", "TariffStep1421" ]
"TariffStep1421" : [ "21:00", "120000", "TariffStep1422" ]
"TariffStep1422" : [ "22:00", "120000", "TariffStep1423" ]
"TariffStep1423" : [ "23:00", "120000", "TariffStep150" ]
},
"Saturday": {
"TariffStep150" : [ "00:00", "120000", "TariffStep151" ],
"TariffStep151" : [ "01:00", "120000", "TariffStep152" ],
"TariffStep152" : [ "02:00", "120000", "TariffStep153" ],
"TariffStep153" : [ "03:00", "120000", "TariffStep154" ],
"TariffStep154" : [ "04:00", "120000", "TariffStep155" ],
"TariffStep155" : [ "05:00", "120000", "TariffStep156" ],
"TariffStep156" : [ "06:00", "120000", "TariffStep157" ],
"TariffStep157" : [ "07:00", "120000", "TariffStep158" ],
"TariffStep158" : [ "08:00", "120000", "TariffStep159" ],
"TariffStep159" : [ "09:00", "120000", "TariffStep1510"],
"TariffStep1510" : [ "10:00", "120000", "TariffStep1511"],
"TariffStep1511" : [ "11:00", "120000", "TariffStep1512"],
"TariffStep1512" : [ "12:00", "120000", "TariffStep1513"],
"TariffStep1513" : [ "13:00", "120000", "TariffStep1514"],
"TariffStep1514" : [ "14:00", "120000", "TariffStep1515"],
"TariffStep1515" : [ "15:00", "120000", "TariffStep1516"],
"TariffStep1516" : [ "16:00", "120000", "TariffStep1517"],
"TariffStep1517" : [ "17:00", "120000", "TariffStep1518"],
"TariffStep1518" : [ "18:00", "120000", "TariffStep1519"],
"TariffStep1519" : [ "19:00", "120000", "TariffStep1520"],
"TariffStep1520" : [ "20:00", "120000", "TariffStep1521"]
"TariffStep1521" : [ "21:00", "120000", "TariffStep1522"]
"TariffStep1522" : [ "22:00", "120000", "TariffStep1523"]
"TariffStep1523" : [ "23:00", "120000", "TariffStep160" ]
},
"Sunday": {
"TariffStep160" : [ "00:00", "120000", "TariffStep161" ],
"TariffStep161" : [ "01:00", "120000", "TariffStep162" ],
"TariffStep162" : [ "02:00", "120000", "TariffStep163" ],
"TariffStep163" : [ "03:00", "120000", "TariffStep164" ],
"TariffStep164" : [ "04:00", "120000", "TariffStep165" ],
"TariffStep165" : [ "05:00", "120000", "TariffStep166" ],
"TariffStep166" : [ "06:00", "120000", "TariffStep167" ],
"TariffStep167" : [ "07:00", "120000", "TariffStep168" ],
"TariffStep168" : [ "08:00", "120000", "TariffStep169" ],
"TariffStep169" : [ "09:00", "120000", "TariffStep1610"],
"TariffStep1610" : [ "10:00", "120000", "TariffStep1611"],
"TariffStep1611" : [ "11:00", "120000", "TariffStep1612"],
"TariffStep1612" : [ "12:00", "120000", "TariffStep1613"],
"TariffStep1613" : [ "13:00", "120000", "TariffStep1614"],
"TariffStep1614" : [ "14:00", "120000", "TariffStep1615"],
"TariffStep1615" : [ "15:00", "120000", "TariffStep1616"],
"TariffStep1616" : [ "16:00", "120000", "TariffStep1617"],
"TariffStep1617" : [ "17:00", "120000", "TariffStep1618"],
"TariffStep1618" : [ "18:00", "120000", "TariffStep1619"],
"TariffStep1619" : [ "19:00", "120000", "TariffStep1620"],
"TariffStep1620" : [ "20:00", "120000", "TariffStep1621"]
"TariffStep1621" : [ "21:00", "120000", "TariffStep1622"]
"TariffStep1622" : [ "22:00", "120000", "TariffStep1623"]
"TariffStep1623" : [ "23:00", "120000", "TariffStep200" ]
}
},
"week3" : {
"Monday": {
"TariffStep200" : [ "00:00", "120000", "TariffStep201" ],
"TariffStep201" : [ "01:00", "120000", "TariffStep202" ],
"TariffStep202" : [ "02:00", "120000", "TariffStep203" ],
"TariffStep203" : [ "03:00", "120000", "TariffStep204" ],
"TariffStep204" : [ "04:00", "120000", "TariffStep205" ],
"TariffStep205" : [ "05:00", "120000", "TariffStep206" ],
"TariffStep206" : [ "06:00", "120000", "TariffStep207" ],
"TariffStep207" : [ "07:00", "120000", "TariffStep208" ],
"TariffStep208" : [ "08:00", "120000", "TariffStep209" ],
"TariffStep209" : [ "09:00", "120000", "TariffStep2010" ],
"TariffStep2010" : [ "10:00", "120000", "TariffStep2011" ],
"TariffStep2011" : [ "11:00", "120000", "TariffStep2012" ],
"TariffStep2012" : [ "12:00", "120000", "TariffStep2013" ],
"TariffStep2013" : [ "13:00", "120000", "TariffStep2014" ],
"TariffStep2014" : [ "14:00", "120000", "TariffStep2015" ],
"TariffStep2015" : [ "15:00", "120000", "TariffStep2016"],
"TariffStep2016" : [ "16:00", "120000", "TariffStep2017"],
"TariffStep2017" : [ "17:00", "120000", "TariffStep2018"],
"TariffStep2018" : [ "18:00", "120000", "TariffStep2019"],
"TariffStep2019" : [ "19:00", "120000", "TariffStep2020"],
"TariffStep2020" : [ "20:00", "120000", "TariffStep2021" ]
"TariffStep2021" : [ "21:00", "120000", "TariffStep2022" ]
"TariffStep2022" : [ "22:00", "120000", "TariffStep2023" ]
"TariffStep2023" : [ "23:00", "120000", "TariffStep210" ]
},
"Tuesday": {
"TariffStep210" : [ "00:00", "120000", "TariffStep211" ],
"TariffStep211" : [ "01:00", "120000", "TariffStep212" ],
"TariffStep212" : [ "02:00", "120000", "TariffStep213" ],
"TariffStep213" : [ "03:00", "120000", "TariffStep214" ],
"TariffStep214" : [ "04:00", "120000", "TariffStep215" ],
"TariffStep215" : [ "05:00", "120000", "TariffStep216" ],
"TariffStep216" : [ "06:00", "120000", "TariffStep217" ],
"TariffStep217" : [ "07:00", "120000", "TariffStep218" ],
"TariffStep218" : [ "08:00", "120000", "TariffStep219" ],
"TariffStep219" : [ "09:00", "120000", "TariffStep2110" ],
"TariffStep2110" : [ "10:00", "120000", "TariffStep2111" ],
"TariffStep2111" : [ "11:00", "120000", "TariffStep2112" ],
"TariffStep2112" : [ "12:00", "120000", "TariffStep2113" ],
"TariffStep2113" : [ "13:00", "120000", "TariffStep2114" ],
"TariffStep2114" : [ "14:00", "120000", "TariffStep2115" ],
"TariffStep2115" : [ "15:00", "120000", "TariffStep2116"],
"TariffStep2116" : [ "16:00", "120000", "TariffStep2117"],
"TariffStep2117" : [ "17:00", "120000", "TariffStep2118"],
"TariffStep2118" : [ "18:00", "120000", "TariffStep2119"],
"TariffStep2119" : [ "19:00", "120000", "TariffStep2120"],
"TariffStep2120" : [ "20:00", "120000", "TariffStep2121" ]
"TariffStep2121" : [ "21:00", "120000", "TariffStep2122" ]
"TariffStep2122" : [ "22:00", "120000", "TariffStep2123" ]
"TariffStep2123" : [ "23:00", "120000", "TariffStep220" ]
},
"Wednesday": {
"TariffStep220" : [ "00:00", "120000", "TariffStep221" ],
"TariffStep221" : [ "01:00", "120000", "TariffStep222" ],
"TariffStep222" : [ "02:00", "120000", "TariffStep223" ],
"TariffStep223" : [ "03:00", "120000", "TariffStep224" ],
"TariffStep224" : [ "04:00", "120000", "TariffStep225" ],
"TariffStep225" : [ "05:00", "120000", "TariffStep226" ],
"TariffStep226" : [ "06:00", "120000", "TariffStep227" ],
"TariffStep227" : [ "07:00", "120000", "TariffStep228" ],
"TariffStep228" : [ "08:00", "120000", "TariffStep229" ],
"TariffStep229" : [ "09:00", "120000", "TariffStep2210"],
"TariffStep2210" : [ "10:00", "120000", "TariffStep2211"],
"TariffStep2211" : [ "11:00", "120000", "TariffStep2212"],
"TariffStep2212" : [ "12:00", "120000", "TariffStep2213"],
"TariffStep2213" : [ "13:00", "120000", "TariffStep2214"],
"TariffStep2214" : [ "14:00", "120000", "TariffStep2215"],
"TariffStep2215" : [ "15:00", "120000", "TariffStep2216"],
"TariffStep2216" : [ "16:00", "120000", "TariffStep2217"],
"TariffStep2217" : [ "17:00", "120000", "TariffStep2218"],
"TariffStep2218" : [ "18:00", "120000", "TariffStep2219"],
"TariffStep2219" : [ "19:00", "120000", "TariffStep2220"],
"TariffStep2220" : [ "20:00", "120000", "TariffStep2221"]
"TariffStep2221" : [ "21:00", "120000", "TariffStep2222"]
"TariffStep2222" : [ "22:00", "120000", "TariffStep2223"]
"TariffStep2223" : [ "23:00", "120000", "TariffStep230" ]
},
"Thursday": {
"TariffStep230" : [ "00:00", "120000", "TariffStep231" ],
"TariffStep231" : [ "01:00", "120000", "TariffStep232" ],
"TariffStep232" : [ "02:00", "120000", "TariffStep233" ],
"TariffStep233" : [ "03:00", "120000", "TariffStep234" ],
"TariffStep234" : [ "04:00", "120000", "TariffStep235" ],
"TariffStep235" : [ "05:00", "120000", "TariffStep236" ],
"TariffStep236" : [ "06:00", "120000", "TariffStep237" ],
"TariffStep237" : [ "07:00", "120000", "TariffStep238" ],
"TariffStep238" : [ "08:00", "120000", "TariffStep239" ],
"TariffStep239" : [ "09:00", "120000", "TariffStep2310"],
"TariffStep2310" : [ "10:00", "120000", "TariffStep2311"],
"TariffStep2311" : [ "11:00", "120000", "TariffStep2312"],
"TariffStep2312" : [ "12:00", "120000", "TariffStep2313"],
"TariffStep2313" : [ "13:00", "120000", "TariffStep2314"],
"TariffStep2314" : [ "14:00", "120000", "TariffStep2315"],
"TariffStep2315" : [ "15:00", "120000", "TariffStep2316"],
"TariffStep2316" : [ "16:00", "120000", "TariffStep2317"],
"TariffStep2317" : [ "17:00", "120000", "TariffStep2318"],
"TariffStep2318" : [ "18:00", "120000", "TariffStep2319"],
"TariffStep2319" : [ "19:00", "120000", "TariffStep2320"],
"TariffStep2320" : [ "20:00", "120000", "TariffStep2321"]
"TariffStep2321" : [ "21:00", "120000", "TariffStep2322"]
"TariffStep2322" : [ "22:00", "120000", "TariffStep2323"]
"TariffStep2323" : [ "23:00", "120000", "TariffStep240" ]
},
"Friday": {
"TariffStep240" : [ "00:00", "120000", "TariffStep241" ],
"TariffStep241" : [ "01:00", "120000", "TariffStep242" ],
"TariffStep242" : [ "02:00", "120000", "TariffStep243" ],
"TariffStep243" : [ "03:00", "120000", "TariffStep244" ],
"TariffStep244" : [ "04:00", "120000", "TariffStep245" ],
"TariffStep245" : [ "05:00", "120000", "TariffStep246" ],
"TariffStep246" : [ "06:00", "120000", "TariffStep247" ],
"TariffStep247" : [ "07:00", "120000", "TariffStep248" ],
"TariffStep248" : [ "08:00", "120000", "TariffStep249" ],
"TariffStep249" : [ "09:00", "120000", "TariffStep2410" ],
"TariffStep2410" : [ "10:00", "120000", "TariffStep2411" ],
"TariffStep2411" : [ "11:00", "120000", "TariffStep2412" ],
"TariffStep2412" : [ "12:00", "120000", "TariffStep2413" ],
"TariffStep2413" : [ "13:00", "120000", "TariffStep2414" ],
"TariffStep2414" : [ "14:00", "120000", "TariffStep2415" ],
"TariffStep2415" : [ "15:00", "120000", "TariffStep2416"],
"TariffStep2416" : [ "16:00", "120000", "TariffStep2417"],
"TariffStep2417" : [ "17:00", "120000", "TariffStep2418"],
"TariffStep2418" : [ "18:00", "120000", "TariffStep2419"],
"TariffStep2419" : [ "19:00", "120000", "TariffStep2420"],
"TariffStep2420" : [ "20:00", "120000", "TariffStep2421" ]
"TariffStep2421" : [ "21:00", "120000", "TariffStep2422" ]
"TariffStep2422" : [ "22:00", "120000", "TariffStep2423" ]
"TariffStep2423" : [ "23:00", "120000", "TariffStep250" ]
},
"Saturday": {
"TariffStep250" : [ "00:00", "120000", "TariffStep251" ],
"TariffStep251" : [ "01:00", "120000", "TariffStep252" ],
"TariffStep252" : [ "02:00", "120000", "TariffStep253" ],
"TariffStep253" : [ "03:00", "120000", "TariffStep254" ],
"TariffStep254" : [ "04:00", "120000", "TariffStep255" ],
"TariffStep255" : [ "05:00", "120000", "TariffStep256" ],
"TariffStep256" : [ "06:00", "120000", "TariffStep257" ],
"TariffStep257" : [ "07:00", "120000", "TariffStep258" ],
"TariffStep258" : [ "08:00", "120000", "TariffStep259" ],
"TariffStep259" : [ "09:00", "120000", "TariffStep2510"],
"TariffStep2510" : [ "10:00", "120000", "TariffStep2511"],
"TariffStep2511" : [ "11:00", "120000", "TariffStep2512"],
"TariffStep2512" : [ "12:00", "120000", "TariffStep2513"],
"TariffStep2513" : [ "13:00", "120000", "TariffStep2514"],
"TariffStep2514" : [ "14:00", "120000", "TariffStep2515"],
"TariffStep2515" : [ "15:00", "120000", "TariffStep2516"],
"TariffStep2516" : [ "16:00", "120000", "TariffStep2517"],
"TariffStep2517" : [ "17:00", "120000", "TariffStep2518"],
"TariffStep2518" : [ "18:00", "120000", "TariffStep2519"],
"TariffStep2519" : [ "19:00", "120000", "TariffStep2520"],
"TariffStep2520" : [ "20:00", "120000", "TariffStep2521"]
"TariffStep2521" : [ "21:00", "120000", "TariffStep2522"]
"TariffStep2522" : [ "22:00", "120000", "TariffStep2523"]
"TariffStep2523" : [ "23:00", "120000", "TariffStep260" ]
},
"Sunday": {
"TariffStep260" : [ "00:00", "120000", "TariffStep261" ],
"TariffStep261" : [ "01:00", "120000", "TariffStep262" ],
"TariffStep262" : [ "02:00", "120000", "TariffStep263" ],
"TariffStep263" : [ "03:00", "120000", "TariffStep264" ],
"TariffStep264" : [ "04:00", "120000", "TariffStep265" ],
"TariffStep265" : [ "05:00", "120000", "TariffStep266" ],
"TariffStep266" : [ "06:00", "120000", "TariffStep267" ],
"TariffStep267" : [ "07:00", "120000", "TariffStep268" ],
"TariffStep268" : [ "08:00", "120000", "TariffStep269" ],
"TariffStep269" : [ "09:00", "120000", "TariffStep2610"],
"TariffStep2610" : [ "10:00", "120000", "TariffStep2611"],
"TariffStep2611" : [ "11:00", "120000", "TariffStep2612"],
"TariffStep2612" : [ "12:00", "120000", "TariffStep2613"],
"TariffStep2613" : [ "13:00", "120000", "TariffStep2614"],
"TariffStep2614" : [ "14:00", "120000", "TariffStep2615"],
"TariffStep2615" : [ "15:00", "120000", "TariffStep2616"],
"TariffStep2616" : [ "16:00", "120000", "TariffStep2617"],
"TariffStep2617" : [ "17:00", "120000", "TariffStep2618"],
"TariffStep2618" : [ "18:00", "120000", "TariffStep2619"],
"TariffStep2619" : [ "19:00", "120000", "TariffStep2620"],
"TariffStep2620" : [ "20:00", "120000", "TariffStep2621"]
"TariffStep2621" : [ "21:00", "120000", "TariffStep2622"]
"TariffStep2622" : [ "22:00", "120000", "TariffStep2623"]
"TariffStep2623" : [ "23:00", "120000", "TariffStep000" ]
}
},
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,368 @@
{
"name":"test",
"properties": [
],
"week1" : {
"Monday": {
"TariffStep000" : [ "00:00", "800000", "TariffStep001" ],
"TariffStep001" : [ "07:00", "350000", "TariffStep002" ],
"TariffStep002" : [ "08:00", "350000", "TariffStep003" ],
"TariffStep003" : [ "09:00", "350000", "TariffStep004" ],
"TariffStep004" : [ "10:00", "350000", "TariffStep005" ],
"TariffStep005" : [ "11:00", "350000", "TariffStep006" ],
"TariffStep006" : [ "12:00", "350000", "TariffStep007" ],
"TariffStep007" : [ "13:00", "350000", "TariffStep008" ],
"TariffStep008" : [ "14:00", "350000", "TariffStep009" ],
"TariffStep009" : [ "15:00", "350000", "TariffStep0010"],
"TariffStep0010": [ "16:00", "350000", "TariffStep0011"],
"TariffStep0011": [ "17:00", "350000", "TariffStep0012"],
"TariffStep0012": [ "18:00", "350000", "TariffStep0013"],
"TariffStep0013": [ "19:00", "350000", "TariffStep0014"],
"TariffStep0014": [ "20:00", "800000", "TariffStep011" ]
},
"Tuesday": {
"TariffStep010" : [ "00:00", "800000", "TariffStep011" ],
"TariffStep011" : [ "07:00", "350000", "TariffStep012" ],
"TariffStep012" : [ "08:00", "350000", "TariffStep013" ],
"TariffStep013" : [ "09:00", "350000", "TariffStep014" ],
"TariffStep014" : [ "10:00", "350000", "TariffStep015" ],
"TariffStep015" : [ "11:00", "350000", "TariffStep016" ],
"TariffStep016" : [ "12:00", "350000", "TariffStep017" ],
"TariffStep017" : [ "13:00", "350000", "TariffStep018" ],
"TariffStep018" : [ "14:00", "350000", "TariffStep019" ],
"TariffStep019" : [ "15:00", "350000", "TariffStep0110"],
"TariffStep0110": [ "16:00", "350000", "TariffStep0111"],
"TariffStep0111": [ "17:00", "350000", "TariffStep0112"],
"TariffStep0112": [ "18:00", "350000", "TariffStep0113"],
"TariffStep0113": [ "19:00", "350000", "TariffStep0114"],
"TariffStep0114": [ "20:00", "800000", "TariffStep021" ]
},
"Wednesday": {
"TariffStep020" : [ "00:00", "800000", "TariffStep021" ],
"TariffStep021" : [ "07:00", "350000", "TariffStep022" ],
"TariffStep022" : [ "08:00", "350000", "TariffStep023" ],
"TariffStep023" : [ "09:00", "350000", "TariffStep024" ],
"TariffStep024" : [ "10:00", "350000", "TariffStep025" ],
"TariffStep025" : [ "11:00", "350000", "TariffStep026" ],
"TariffStep026" : [ "12:00", "350000", "TariffStep027" ],
"TariffStep027" : [ "13:00", "350000", "TariffStep028" ],
"TariffStep028" : [ "14:00", "350000", "TariffStep029" ],
"TariffStep029" : [ "15:00", "350000", "TariffStep0210"],
"TariffStep0210": [ "16:00", "350000", "TariffStep0211"],
"TariffStep0211": [ "17:00", "350000", "TariffStep0212"],
"TariffStep0212": [ "18:00", "350000", "TariffStep0213"],
"TariffStep0213": [ "19:00", "350000", "TariffStep0214"],
"TariffStep0214": [ "20:00", "800000", "TariffStep031" ]
},
"Thursday": {
"TariffStep030" : [ "00:00", "800000", "TariffStep031" ],
"TariffStep031" : [ "07:00", "350000", "TariffStep032" ],
"TariffStep032" : [ "08:00", "350000", "TariffStep033" ],
"TariffStep033" : [ "09:00", "350000", "TariffStep034" ],
"TariffStep034" : [ "10:00", "350000", "TariffStep035" ],
"TariffStep035" : [ "11:00", "350000", "TariffStep036" ],
"TariffStep036" : [ "12:00", "350000", "TariffStep037" ],
"TariffStep037" : [ "13:00", "350000", "TariffStep038" ],
"TariffStep038" : [ "14:00", "350000", "TariffStep039" ],
"TariffStep039" : [ "15:00", "350000", "TariffStep0310"],
"TariffStep0310": [ "16:00", "350000", "TariffStep0311"],
"TariffStep0311": [ "17:00", "350000", "TariffStep0312"],
"TariffStep0312": [ "18:00", "350000", "TariffStep0313"],
"TariffStep0313": [ "19:00", "350000", "TariffStep0314"],
"TariffStep0314": [ "20:00", "800000", "TariffStep041" ]
},
"Friday": {
"TariffStep040" : [ "00:00", "800000", "TariffStep041" ],
"TariffStep041" : [ "07:00", "350000", "TariffStep042" ],
"TariffStep042" : [ "08:00", "350000", "TariffStep043" ],
"TariffStep043" : [ "09:00", "350000", "TariffStep044" ],
"TariffStep044" : [ "10:00", "350000", "TariffStep045" ],
"TariffStep045" : [ "11:00", "350000", "TariffStep046" ],
"TariffStep046" : [ "12:00", "350000", "TariffStep047" ],
"TariffStep047" : [ "13:00", "350000", "TariffStep048" ],
"TariffStep048" : [ "14:00", "350000", "TariffStep049" ],
"TariffStep049" : [ "15:00", "350000", "TariffStep0410"],
"TariffStep0410": [ "16:00", "350000", "TariffStep0411"],
"TariffStep0411": [ "17:00", "350000", "TariffStep0412"],
"TariffStep0412": [ "18:00", "350000", "TariffStep0413"],
"TariffStep0413": [ "19:00", "350000", "TariffStep0414"],
"TariffStep0414": [ "20:00", "800000", "TariffStep051" ]
},
"Saturday": {
"TariffStep050" : [ "00:00", "800000", "TariffStep051" ],
"TariffStep051" : [ "07:00", "350000", "TariffStep052" ],
"TariffStep052" : [ "08:00", "350000", "TariffStep053" ],
"TariffStep053" : [ "09:00", "350000", "TariffStep054" ],
"TariffStep054" : [ "10:00", "350000", "TariffStep055" ],
"TariffStep055" : [ "11:00", "350000", "TariffStep056" ],
"TariffStep056" : [ "12:00", "350000", "TariffStep057" ],
"TariffStep057" : [ "13:00", "350000", "TariffStep058" ],
"TariffStep058" : [ "14:00", "350000", "TariffStep059" ],
"TariffStep059" : [ "15:00", "350000", "TariffStep0510"],
"TariffStep0510": [ "16:00", "350000", "TariffStep0511"],
"TariffStep0511": [ "17:00", "350000", "TariffStep0512"],
"TariffStep0512": [ "18:00", "350000", "TariffStep0513"],
"TariffStep0513": [ "19:00", "350000", "TariffStep0514"],
"TariffStep0514": [ "20:00", "800000", "TariffStep061" ]
},
"Sunday": {
"TariffStep060" : [ "00:00", "800000", "TariffStep061" ],
"TariffStep061" : [ "07:00", "350000", "TariffStep062" ],
"TariffStep062" : [ "08:00", "350000", "TariffStep063" ],
"TariffStep063" : [ "09:00", "350000", "TariffStep064" ],
"TariffStep064" : [ "10:00", "350000", "TariffStep065" ],
"TariffStep065" : [ "11:00", "350000", "TariffStep066" ],
"TariffStep066" : [ "12:00", "350000", "TariffStep067" ],
"TariffStep067" : [ "13:00", "350000", "TariffStep068" ],
"TariffStep068" : [ "14:00", "350000", "TariffStep069" ],
"TariffStep069" : [ "15:00", "350000", "TariffStep0610"],
"TariffStep0610": [ "16:00", "350000", "TariffStep0611"],
"TariffStep0611": [ "17:00", "350000", "TariffStep0612"],
"TariffStep0612": [ "18:00", "350000", "TariffStep0613"],
"TariffStep0613": [ "19:00", "350000", "TariffStep0614"],
"TariffStep0614": [ "20:00", "800000", "TariffStep101" ]
}
},
"week2" : {
"Monday": {
"TariffStep100" : [ "00:00", "800000", "TariffStep101" ],
"TariffStep101" : [ "07:00", "350000", "TariffStep102" ],
"TariffStep102" : [ "08:00", "350000", "TariffStep103" ],
"TariffStep103" : [ "09:00", "350000", "TariffStep104" ],
"TariffStep104" : [ "10:00", "350000", "TariffStep105" ],
"TariffStep105" : [ "11:00", "350000", "TariffStep106" ],
"TariffStep106" : [ "12:00", "350000", "TariffStep107" ],
"TariffStep107" : [ "13:00", "350000", "TariffStep108" ],
"TariffStep108" : [ "14:00", "350000", "TariffStep109" ],
"TariffStep109" : [ "15:00", "350000", "TariffStep1010"],
"TariffStep1010": [ "16:00", "350000", "TariffStep1011"],
"TariffStep1011": [ "17:00", "350000", "TariffStep1012"],
"TariffStep1012": [ "18:00", "350000", "TariffStep1013"],
"TariffStep1013": [ "19:00", "350000", "TariffStep1014"],
"TariffStep1014": [ "20:00", "800000", "TariffStep111" ]
},
"Tuesday": {
"TariffStep110" : [ "00:00", "800000", "TariffStep111" ],
"TariffStep111" : [ "07:00", "350000", "TariffStep112" ],
"TariffStep112" : [ "08:00", "350000", "TariffStep113" ],
"TariffStep113" : [ "09:00", "350000", "TariffStep114" ],
"TariffStep114" : [ "10:00", "350000", "TariffStep115" ],
"TariffStep115" : [ "11:00", "350000", "TariffStep116" ],
"TariffStep116" : [ "12:00", "350000", "TariffStep117" ],
"TariffStep117" : [ "13:00", "350000", "TariffStep118" ],
"TariffStep118" : [ "14:00", "350000", "TariffStep119" ],
"TariffStep119" : [ "15:00", "350000", "TariffStep1110"],
"TariffStep1110": [ "16:00", "350000", "TariffStep1111"],
"TariffStep1111": [ "17:00", "350000", "TariffStep1112"],
"TariffStep1112": [ "18:00", "350000", "TariffStep1113"],
"TariffStep1113": [ "19:00", "350000", "TariffStep1114"],
"TariffStep1114": [ "20:00", "800000", "TariffStep121" ]
},
"Wednesday": {
"TariffStep120" : [ "00:00", "800000", "TariffStep121" ],
"TariffStep121" : [ "07:00", "350000", "TariffStep122" ],
"TariffStep122" : [ "08:00", "350000", "TariffStep123" ],
"TariffStep123" : [ "09:00", "350000", "TariffStep124" ],
"TariffStep124" : [ "10:00", "350000", "TariffStep125" ],
"TariffStep125" : [ "11:00", "350000", "TariffStep126" ],
"TariffStep126" : [ "12:00", "350000", "TariffStep127" ],
"TariffStep127" : [ "13:00", "350000", "TariffStep128" ],
"TariffStep128" : [ "14:00", "350000", "TariffStep129" ],
"TariffStep129" : [ "15:00", "350000", "TariffStep1210"],
"TariffStep1210": [ "16:00", "350000", "TariffStep1211"],
"TariffStep1211": [ "17:00", "350000", "TariffStep1212"],
"TariffStep1212": [ "18:00", "350000", "TariffStep1213"],
"TariffStep1213": [ "19:00", "350000", "TariffStep1214"],
"TariffStep1214": [ "20:00", "800000", "TariffStep131" ]
},
"Thursday": {
"TariffStep130" : [ "00:00", "800000", "TariffStep131" ],
"TariffStep131" : [ "07:00", "350000", "TariffStep132" ],
"TariffStep132" : [ "08:00", "350000", "TariffStep133" ],
"TariffStep133" : [ "09:00", "350000", "TariffStep134" ],
"TariffStep134" : [ "10:00", "350000", "TariffStep135" ],
"TariffStep135" : [ "11:00", "350000", "TariffStep136" ],
"TariffStep136" : [ "12:00", "350000", "TariffStep137" ],
"TariffStep137" : [ "13:00", "350000", "TariffStep138" ],
"TariffStep138" : [ "14:00", "350000", "TariffStep139" ],
"TariffStep139" : [ "15:00", "350000", "TariffStep1310"],
"TariffStep1310": [ "16:00", "350000", "TariffStep1311"],
"TariffStep1311": [ "17:00", "350000", "TariffStep1312"],
"TariffStep1312": [ "18:00", "350000", "TariffStep1313"],
"TariffStep1313": [ "19:00", "350000", "TariffStep1314"],
"TariffStep1314": [ "20:00", "800000", "TariffStep141" ]
},
"Friday": {
"TariffStep140" : [ "00:00", "800000", "TariffStep141" ],
"TariffStep141" : [ "07:00", "350000", "TariffStep142" ],
"TariffStep142" : [ "08:00", "350000", "TariffStep143" ],
"TariffStep143" : [ "09:00", "350000", "TariffStep144" ],
"TariffStep144" : [ "10:00", "350000", "TariffStep145" ],
"TariffStep145" : [ "11:00", "350000", "TariffStep146" ],
"TariffStep146" : [ "12:00", "350000", "TariffStep147" ],
"TariffStep147" : [ "13:00", "350000", "TariffStep148" ],
"TariffStep148" : [ "14:00", "350000", "TariffStep149" ],
"TariffStep149" : [ "15:00", "350000", "TariffStep1410"],
"TariffStep1410": [ "16:00", "350000", "TariffStep1411"],
"TariffStep1411": [ "17:00", "350000", "TariffStep1412"],
"TariffStep1412": [ "18:00", "350000", "TariffStep1413"],
"TariffStep1413": [ "19:00", "350000", "TariffStep1414"],
"TariffStep1414": [ "20:00", "800000", "TariffStep151" ]
},
"Saturday": {
"TariffStep150" : [ "00:00", "800000", "TariffStep151" ],
"TariffStep151" : [ "07:00", "350000", "TariffStep152" ],
"TariffStep152" : [ "08:00", "350000", "TariffStep153" ],
"TariffStep153" : [ "09:00", "350000", "TariffStep154" ],
"TariffStep154" : [ "10:00", "350000", "TariffStep155" ],
"TariffStep155" : [ "11:00", "350000", "TariffStep156" ],
"TariffStep156" : [ "12:00", "350000", "TariffStep157" ],
"TariffStep157" : [ "13:00", "350000", "TariffStep158" ],
"TariffStep158" : [ "14:00", "350000", "TariffStep159" ],
"TariffStep159" : [ "15:00", "350000", "TariffStep1510"],
"TariffStep1510": [ "16:00", "350000", "TariffStep1511"],
"TariffStep1511": [ "17:00", "350000", "TariffStep1512"],
"TariffStep1512": [ "18:00", "350000", "TariffStep1513"],
"TariffStep1513": [ "19:00", "350000", "TariffStep1514"],
"TariffStep1514": [ "20:00", "800000", "TariffStep161" ]
},
"Sunday": {
"TariffStep160" : [ "00:00", "800000", "TariffStep161" ],
"TariffStep161" : [ "07:00", "350000", "TariffStep162" ],
"TariffStep162" : [ "08:00", "350000", "TariffStep163" ],
"TariffStep163" : [ "09:00", "350000", "TariffStep164" ],
"TariffStep164" : [ "10:00", "350000", "TariffStep165" ],
"TariffStep165" : [ "11:00", "350000", "TariffStep166" ],
"TariffStep166" : [ "12:00", "350000", "TariffStep167" ],
"TariffStep167" : [ "13:00", "350000", "TariffStep168" ],
"TariffStep168" : [ "14:00", "350000", "TariffStep169" ],
"TariffStep169" : [ "15:00", "350000", "TariffStep1610"],
"TariffStep1610": [ "16:00", "350000", "TariffStep1611"],
"TariffStep1611": [ "17:00", "350000", "TariffStep1612"],
"TariffStep1612": [ "18:00", "350000", "TariffStep1613"],
"TariffStep1613": [ "19:00", "350000", "TariffStep1614"],
"TariffStep1614": [ "20:00", "800000", "TariffStep201" ]
}
},
"week3" : {
"Monday": {
"TariffStep200" : [ "00:00", "800000", "TariffStep201" ],
"TariffStep201" : [ "07:00", "350000", "TariffStep202" ],
"TariffStep202" : [ "08:00", "350000", "TariffStep203" ],
"TariffStep203" : [ "09:00", "350000", "TariffStep204" ],
"TariffStep204" : [ "10:00", "350000", "TariffStep205" ],
"TariffStep205" : [ "11:00", "350000", "TariffStep206" ],
"TariffStep206" : [ "12:00", "350000", "TariffStep207" ],
"TariffStep207" : [ "13:00", "350000", "TariffStep208" ],
"TariffStep208" : [ "14:00", "350000", "TariffStep209" ],
"TariffStep209" : [ "15:00", "350000", "TariffStep2010"],
"TariffStep2010": [ "16:00", "350000", "TariffStep2011"],
"TariffStep2011": [ "17:00", "350000", "TariffStep2012"],
"TariffStep2012": [ "18:00", "350000", "TariffStep2013"],
"TariffStep2013": [ "19:00", "350000", "TariffStep2014"],
"TariffStep2014": [ "20:00", "800000", "TariffStep211" ]
},
"Tuesday": {
"TariffStep210" : [ "00:00", "800000", "TariffStep211" ],
"TariffStep211" : [ "07:00", "350000", "TariffStep212" ],
"TariffStep212" : [ "08:00", "350000", "TariffStep213" ],
"TariffStep213" : [ "09:00", "350000", "TariffStep214" ],
"TariffStep214" : [ "10:00", "350000", "TariffStep215" ],
"TariffStep215" : [ "11:00", "350000", "TariffStep216" ],
"TariffStep216" : [ "12:00", "350000", "TariffStep217" ],
"TariffStep217" : [ "13:00", "350000", "TariffStep218" ],
"TariffStep218" : [ "14:00", "350000", "TariffStep219" ],
"TariffStep219" : [ "15:00", "350000", "TariffStep2110"],
"TariffStep2110": [ "16:00", "350000", "TariffStep2111"],
"TariffStep2111": [ "17:00", "350000", "TariffStep2112"],
"TariffStep2112": [ "18:00", "350000", "TariffStep2113"],
"TariffStep2113": [ "19:00", "350000", "TariffStep2114"],
"TariffStep2114": [ "20:00", "800000", "TariffStep221" ]
},
"Wednesday": {
"TariffStep220" : [ "00:00", "800000", "TariffStep221" ],
"TariffStep221" : [ "07:00", "350000", "TariffStep222" ],
"TariffStep222" : [ "08:00", "350000", "TariffStep223" ],
"TariffStep223" : [ "09:00", "350000", "TariffStep224" ],
"TariffStep224" : [ "10:00", "350000", "TariffStep225" ],
"TariffStep225" : [ "11:00", "350000", "TariffStep226" ],
"TariffStep226" : [ "12:00", "350000", "TariffStep227" ],
"TariffStep227" : [ "13:00", "350000", "TariffStep228" ],
"TariffStep228" : [ "14:00", "350000", "TariffStep229" ],
"TariffStep229" : [ "15:00", "350000", "TariffStep2210"],
"TariffStep2210": [ "16:00", "350000", "TariffStep2211"],
"TariffStep2211": [ "17:00", "350000", "TariffStep2212"],
"TariffStep2212": [ "18:00", "350000", "TariffStep2213"],
"TariffStep2213": [ "19:00", "350000", "TariffStep2214"],
"TariffStep2214": [ "20:00", "800000", "TariffStep231" ]
},
"Thursday": {
"TariffStep230" : [ "00:00", "800000", "TariffStep231" ],
"TariffStep231" : [ "07:00", "350000", "TariffStep232" ],
"TariffStep232" : [ "08:00", "350000", "TariffStep233" ],
"TariffStep233" : [ "09:00", "350000", "TariffStep234" ],
"TariffStep234" : [ "10:00", "350000", "TariffStep235" ],
"TariffStep235" : [ "11:00", "350000", "TariffStep236" ],
"TariffStep236" : [ "12:00", "350000", "TariffStep237" ],
"TariffStep237" : [ "13:00", "350000", "TariffStep238" ],
"TariffStep238" : [ "14:00", "350000", "TariffStep239" ],
"TariffStep239" : [ "15:00", "350000", "TariffStep2310"],
"TariffStep2310": [ "16:00", "350000", "TariffStep2311"],
"TariffStep2311": [ "17:00", "350000", "TariffStep2312"],
"TariffStep2312": [ "18:00", "350000", "TariffStep2313"],
"TariffStep2313": [ "19:00", "350000", "TariffStep2314"],
"TariffStep2314": [ "20:00", "800000", "TariffStep241" ]
},
"Friday": {
"TariffStep240" : [ "00:00", "800000", "TariffStep241" ],
"TariffStep241" : [ "07:00", "350000", "TariffStep242" ],
"TariffStep242" : [ "08:00", "350000", "TariffStep243" ],
"TariffStep243" : [ "09:00", "350000", "TariffStep244" ],
"TariffStep244" : [ "10:00", "350000", "TariffStep245" ],
"TariffStep245" : [ "11:00", "350000", "TariffStep246" ],
"TariffStep246" : [ "12:00", "350000", "TariffStep247" ],
"TariffStep247" : [ "13:00", "350000", "TariffStep248" ],
"TariffStep248" : [ "14:00", "350000", "TariffStep249" ],
"TariffStep249" : [ "15:00", "350000", "TariffStep2410"],
"TariffStep2410": [ "16:00", "350000", "TariffStep2411"],
"TariffStep2411": [ "17:00", "350000", "TariffStep2412"],
"TariffStep2412": [ "18:00", "350000", "TariffStep2413"],
"TariffStep2413": [ "19:00", "350000", "TariffStep2414"],
"TariffStep2414": [ "20:00", "800000", "TariffStep251" ]
},
"Saturday": {
"TariffStep250" : [ "00:00", "800000", "TariffStep251" ],
"TariffStep251" : [ "07:00", "350000", "TariffStep252" ],
"TariffStep252" : [ "08:00", "350000", "TariffStep253" ],
"TariffStep253" : [ "09:00", "350000", "TariffStep254" ],
"TariffStep254" : [ "10:00", "350000", "TariffStep255" ],
"TariffStep255" : [ "11:00", "350000", "TariffStep256" ],
"TariffStep256" : [ "12:00", "350000", "TariffStep257" ],
"TariffStep257" : [ "13:00", "350000", "TariffStep258" ],
"TariffStep258" : [ "14:00", "350000", "TariffStep259" ],
"TariffStep259" : [ "15:00", "350000", "TariffStep2510"],
"TariffStep2510": [ "16:00", "350000", "TariffStep2511"],
"TariffStep2511": [ "17:00", "350000", "TariffStep2512"],
"TariffStep2512": [ "18:00", "350000", "TariffStep2513"],
"TariffStep2513": [ "19:00", "350000", "TariffStep2514"],
"TariffStep2514": [ "20:00", "800000", "TariffStep261" ]
},
"Sunday": {
"TariffStep260" : [ "00:00", "800000", "TariffStep261" ],
"TariffStep261" : [ "07:00", "350000", "TariffStep262" ],
"TariffStep262" : [ "08:00", "350000", "TariffStep263" ],
"TariffStep263" : [ "09:00", "350000", "TariffStep264" ],
"TariffStep264" : [ "10:00", "350000", "TariffStep265" ],
"TariffStep265" : [ "11:00", "350000", "TariffStep266" ],
"TariffStep266" : [ "12:00", "350000", "TariffStep267" ],
"TariffStep267" : [ "13:00", "350000", "TariffStep268" ],
"TariffStep268" : [ "14:00", "350000", "TariffStep269" ],
"TariffStep269" : [ "15:00", "350000", "TariffStep2610"],
"TariffStep2610": [ "16:00", "350000", "TariffStep2611"],
"TariffStep2611": [ "17:00", "350000", "TariffStep2612"],
"TariffStep2612": [ "18:00", "350000", "TariffStep2613"],
"TariffStep2613": [ "19:00", "350000", "TariffStep2614"],
"TariffStep2614": [ "20:00", "800000", "TariffStep001" ]
}
}
}

View File

@ -0,0 +1,368 @@
{
"name":"test",
"properties": [
],
"week1" : {
"Monday": [
{ "TariffStep000" : [ "00:00", "800000", "TariffStep001" ]},
{ "TariffStep001" : [ "07:00", "350000", "TariffStep002" ]},
{ "TariffStep002" : [ "08:00", "350000", "TariffStep003" ]},
{ "TariffStep003" : [ "09:00", "350000", "TariffStep004" ]},
{ "TariffStep004" : [ "10:00", "350000", "TariffStep005" ]},
{ "TariffStep005" : [ "11:00", "350000", "TariffStep006" ]},
{ "TariffStep006" : [ "12:00", "350000", "TariffStep007" ]},
{ "TariffStep007" : [ "13:00", "350000", "TariffStep008" ]},
{ "TariffStep008" : [ "14:00", "350000", "TariffStep009" ]},
{ "TariffStep009" : [ "15:00", "350000", "TariffStep0010"]},
{ "TariffStep0010": [ "16:00", "350000", "TariffStep0011"]},
{ "TariffStep0011": [ "17:00", "350000", "TariffStep0012"]},
{ "TariffStep0012": [ "18:00", "350000", "TariffStep0013"]},
{ "TariffStep0013": [ "19:00", "350000", "TariffStep0014"]},
{ "TariffStep0014": [ "20:00", "800000", "TariffStep011" ]}
],
"Tuesday": [
{ "TariffStep010" : [ "00:00", "800000", "TariffStep011" ]},
{ "TariffStep011" : [ "07:00", "350000", "TariffStep012" ]},
{ "TariffStep012" : [ "08:00", "350000", "TariffStep013" ]},
{ "TariffStep013" : [ "09:00", "350000", "TariffStep014" ]},
{ "TariffStep014" : [ "10:00", "350000", "TariffStep015" ]},
{ "TariffStep015" : [ "11:00", "350000", "TariffStep016" ]},
{ "TariffStep016" : [ "12:00", "350000", "TariffStep017" ]},
{ "TariffStep017" : [ "13:00", "350000", "TariffStep018" ]},
{ "TariffStep018" : [ "14:00", "350000", "TariffStep019" ]},
{ "TariffStep019" : [ "15:00", "350000", "TariffStep0110"]},
{ "TariffStep0110": [ "16:00", "350000", "TariffStep0111"]},
{ "TariffStep0111": [ "17:00", "350000", "TariffStep0112"]},
{ "TariffStep0112": [ "18:00", "350000", "TariffStep0113"]},
{ "TariffStep0113": [ "19:00", "350000", "TariffStep0114"]},
{ "TariffStep0114": [ "20:00", "800000", "TariffStep021" ]}
],
"Wednesday": [
{ "TariffStep020" : [ "00:00", "800000", "TariffStep021" ]},
{ "TariffStep021" : [ "07:00", "350000", "TariffStep022" ]},
{ "TariffStep022" : [ "08:00", "350000", "TariffStep023" ]},
{ "TariffStep023" : [ "09:00", "350000", "TariffStep024" ]},
{ "TariffStep024" : [ "10:00", "350000", "TariffStep025" ]},
{ "TariffStep025" : [ "11:00", "350000", "TariffStep026" ]},
{ "TariffStep026" : [ "12:00", "350000", "TariffStep027" ]},
{ "TariffStep027" : [ "13:00", "350000", "TariffStep028" ]},
{ "TariffStep028" : [ "14:00", "350000", "TariffStep029" ]},
{ "TariffStep029" : [ "15:00", "350000", "TariffStep0210"]},
{ "TariffStep0210": [ "16:00", "350000", "TariffStep0211"]},
{ "TariffStep0211": [ "17:00", "350000", "TariffStep0212"]},
{ "TariffStep0212": [ "18:00", "350000", "TariffStep0213"]},
{ "TariffStep0213": [ "19:00", "350000", "TariffStep0214"]},
{ "TariffStep0214": [ "20:00", "800000", "TariffStep031" ]}
],
"Thursday": [
{ "TariffStep030" : [ "00:00", "800000", "TariffStep031" ]},
{ "TariffStep031" : [ "07:00", "350000", "TariffStep032" ]},
{ "TariffStep032" : [ "08:00", "350000", "TariffStep033" ]},
{ "TariffStep033" : [ "09:00", "350000", "TariffStep034" ]},
{ "TariffStep034" : [ "10:00", "350000", "TariffStep035" ]},
{ "TariffStep035" : [ "11:00", "350000", "TariffStep036" ]},
{ "TariffStep036" : [ "12:00", "350000", "TariffStep037" ]},
{ "TariffStep037" : [ "13:00", "350000", "TariffStep038" ]},
{ "TariffStep038" : [ "14:00", "350000", "TariffStep039" ]},
{ "TariffStep039" : [ "15:00", "350000", "TariffStep0310"]},
{ "TariffStep0310": [ "16:00", "350000", "TariffStep0311"]},
{ "TariffStep0311": [ "17:00", "350000", "TariffStep0312"]},
{ "TariffStep0312": [ "18:00", "350000", "TariffStep0313"]},
{ "TariffStep0313": [ "19:00", "350000", "TariffStep0314"]},
{ "TariffStep0314": [ "20:00", "800000", "TariffStep041" ]}
],
"Friday": [
{ "TariffStep040" : [ "00:00", "800000", "TariffStep041" ]},
{ "TariffStep041" : [ "07:00", "350000", "TariffStep042" ]},
{ "TariffStep042" : [ "08:00", "350000", "TariffStep043" ]},
{ "TariffStep043" : [ "09:00", "350000", "TariffStep044" ]},
{ "TariffStep044" : [ "10:00", "350000", "TariffStep045" ]},
{ "TariffStep045" : [ "11:00", "350000", "TariffStep046" ]},
{ "TariffStep046" : [ "12:00", "350000", "TariffStep047" ]},
{ "TariffStep047" : [ "13:00", "350000", "TariffStep048" ]},
{ "TariffStep048" : [ "14:00", "350000", "TariffStep049" ]},
{ "TariffStep049" : [ "15:00", "350000", "TariffStep0410"]},
{ "TariffStep0410": [ "16:00", "350000", "TariffStep0411"]},
{ "TariffStep0411": [ "17:00", "350000", "TariffStep0412"]},
{ "TariffStep0412": [ "18:00", "350000", "TariffStep0413"]},
{ "TariffStep0413": [ "19:00", "350000", "TariffStep0414"]},
{ "TariffStep0414": [ "20:00", "800000", "TariffStep051" ]}
],
"Saturday": [
{ "TariffStep050" : [ "00:00", "800000", "TariffStep051" ]},
{ "TariffStep051" : [ "07:00", "350000", "TariffStep052" ]},
{ "TariffStep052" : [ "08:00", "350000", "TariffStep053" ]},
{ "TariffStep053" : [ "09:00", "350000", "TariffStep054" ]},
{ "TariffStep054" : [ "10:00", "350000", "TariffStep055" ]},
{ "TariffStep055" : [ "11:00", "350000", "TariffStep056" ]},
{ "TariffStep056" : [ "12:00", "350000", "TariffStep057" ]},
{ "TariffStep057" : [ "13:00", "350000", "TariffStep058" ]},
{ "TariffStep058" : [ "14:00", "350000", "TariffStep059" ]},
{ "TariffStep059" : [ "15:00", "350000", "TariffStep0510"]},
{ "TariffStep0510": [ "16:00", "350000", "TariffStep0511"]},
{ "TariffStep0511": [ "17:00", "350000", "TariffStep0512"]},
{ "TariffStep0512": [ "18:00", "350000", "TariffStep0513"]},
{ "TariffStep0513": [ "19:00", "350000", "TariffStep0514"]},
{ "TariffStep0514": [ "20:00", "800000", "TariffStep061" ]}
],
"Sunday": [
{ "TariffStep060" : [ "00:00", "800000", "TariffStep061" ]},
{ "TariffStep061" : [ "07:00", "350000", "TariffStep062" ]},
{ "TariffStep062" : [ "08:00", "350000", "TariffStep063" ]},
{ "TariffStep063" : [ "09:00", "350000", "TariffStep064" ]},
{ "TariffStep064" : [ "10:00", "350000", "TariffStep065" ]},
{ "TariffStep065" : [ "11:00", "350000", "TariffStep066" ]},
{ "TariffStep066" : [ "12:00", "350000", "TariffStep067" ]},
{ "TariffStep067" : [ "13:00", "350000", "TariffStep068" ]},
{ "TariffStep068" : [ "14:00", "350000", "TariffStep069" ]},
{ "TariffStep069" : [ "15:00", "350000", "TariffStep0610"]},
{ "TariffStep0610": [ "16:00", "350000", "TariffStep0611"]},
{ "TariffStep0611": [ "17:00", "350000", "TariffStep0612"]},
{ "TariffStep0612": [ "18:00", "350000", "TariffStep0613"]},
{ "TariffStep0613": [ "19:00", "350000", "TariffStep0614"]},
{ "TariffStep0614": [ "20:00", "800000", "TariffStep101" ]}
]
},
"week2" : {
"Monday": [
{ "TariffStep100" : [ "00:00", "800000", "TariffStep101" ]},
{ "TariffStep101" : [ "07:00", "350000", "TariffStep102" ]},
{ "TariffStep102" : [ "08:00", "350000", "TariffStep103" ]},
{ "TariffStep103" : [ "09:00", "350000", "TariffStep104" ]},
{ "TariffStep104" : [ "10:00", "350000", "TariffStep105" ]},
{ "TariffStep105" : [ "11:00", "350000", "TariffStep106" ]},
{ "TariffStep106" : [ "12:00", "350000", "TariffStep107" ]},
{ "TariffStep107" : [ "13:00", "350000", "TariffStep108" ]},
{ "TariffStep108" : [ "14:00", "350000", "TariffStep109" ]},
{ "TariffStep109" : [ "15:00", "350000", "TariffStep1010"]},
{ "TariffStep1010": [ "16:00", "350000", "TariffStep1011"]},
{ "TariffStep1011": [ "17:00", "350000", "TariffStep1012"]},
{ "TariffStep1012": [ "18:00", "350000", "TariffStep1013"]},
{ "TariffStep1013": [ "19:00", "350000", "TariffStep1014"]},
{ "TariffStep1014": [ "20:00", "800000", "TariffStep111" ]}
],
"Tuesday": [
{ "TariffStep110" : [ "00:00", "800000", "TariffStep111" ]},
{ "TariffStep111" : [ "07:00", "350000", "TariffStep112" ]},
{ "TariffStep112" : [ "08:00", "350000", "TariffStep113" ]},
{ "TariffStep113" : [ "09:00", "350000", "TariffStep114" ]},
{ "TariffStep114" : [ "10:00", "350000", "TariffStep115" ]},
{ "TariffStep115" : [ "11:00", "350000", "TariffStep116" ]},
{ "TariffStep116" : [ "12:00", "350000", "TariffStep117" ]},
{ "TariffStep117" : [ "13:00", "350000", "TariffStep118" ]},
{ "TariffStep118" : [ "14:00", "350000", "TariffStep119" ]},
{ "TariffStep119" : [ "15:00", "350000", "TariffStep1110"]},
{ "TariffStep1110": [ "16:00", "350000", "TariffStep1111"]},
{ "TariffStep1111": [ "17:00", "350000", "TariffStep1112"]},
{ "TariffStep1112": [ "18:00", "350000", "TariffStep1113"]},
{ "TariffStep1113": [ "19:00", "350000", "TariffStep1114"]},
{ "TariffStep1114": [ "20:00", "800000", "TariffStep121" ]}
],
"Wednesday": [
{ "TariffStep120" : [ "00:00", "800000", "TariffStep121" ]},
{ "TariffStep121" : [ "07:00", "350000", "TariffStep122" ]},
{ "TariffStep122" : [ "08:00", "350000", "TariffStep123" ]},
{ "TariffStep123" : [ "09:00", "350000", "TariffStep124" ]},
{ "TariffStep124" : [ "10:00", "350000", "TariffStep125" ]},
{ "TariffStep125" : [ "11:00", "350000", "TariffStep126" ]},
{ "TariffStep126" : [ "12:00", "350000", "TariffStep127" ]},
{ "TariffStep127" : [ "13:00", "350000", "TariffStep128" ]},
{ "TariffStep128" : [ "14:00", "350000", "TariffStep129" ]},
{ "TariffStep129" : [ "15:00", "350000", "TariffStep1210"]},
{ "TariffStep1210": [ "16:00", "350000", "TariffStep1211"]},
{ "TariffStep1211": [ "17:00", "350000", "TariffStep1212"]},
{ "TariffStep1212": [ "18:00", "350000", "TariffStep1213"]},
{ "TariffStep1213": [ "19:00", "350000", "TariffStep1214"]},
{ "TariffStep1214": [ "20:00", "800000", "TariffStep131" ]}
],
"Thursday": [
{ "TariffStep130" : [ "00:00", "800000", "TariffStep131" ]},
{ "TariffStep131" : [ "07:00", "350000", "TariffStep132" ]},
{ "TariffStep132" : [ "08:00", "350000", "TariffStep133" ]},
{ "TariffStep133" : [ "09:00", "350000", "TariffStep134" ]},
{ "TariffStep134" : [ "10:00", "350000", "TariffStep135" ]},
{ "TariffStep135" : [ "11:00", "350000", "TariffStep136" ]},
{ "TariffStep136" : [ "12:00", "350000", "TariffStep137" ]},
{ "TariffStep137" : [ "13:00", "350000", "TariffStep138" ]},
{ "TariffStep138" : [ "14:00", "350000", "TariffStep139" ]},
{ "TariffStep139" : [ "15:00", "350000", "TariffStep1310"]},
{ "TariffStep1310": [ "16:00", "350000", "TariffStep1311"]},
{ "TariffStep1311": [ "17:00", "350000", "TariffStep1312"]},
{ "TariffStep1312": [ "18:00", "350000", "TariffStep1313"]},
{ "TariffStep1313": [ "19:00", "350000", "TariffStep1314"]},
{ "TariffStep1314": [ "20:00", "800000", "TariffStep141" ]}
],
"Friday": [
{ "TariffStep140" : [ "00:00", "800000", "TariffStep141" ]},
{ "TariffStep141" : [ "07:00", "350000", "TariffStep142" ]},
{ "TariffStep142" : [ "08:00", "350000", "TariffStep143" ]},
{ "TariffStep143" : [ "09:00", "350000", "TariffStep144" ]},
{ "TariffStep144" : [ "10:00", "350000", "TariffStep145" ]},
{ "TariffStep145" : [ "11:00", "350000", "TariffStep146" ]},
{ "TariffStep146" : [ "12:00", "350000", "TariffStep147" ]},
{ "TariffStep147" : [ "13:00", "350000", "TariffStep148" ]},
{ "TariffStep148" : [ "14:00", "350000", "TariffStep149" ]},
{ "TariffStep149" : [ "15:00", "350000", "TariffStep1410"]},
{ "TariffStep1410": [ "16:00", "350000", "TariffStep1411"]},
{ "TariffStep1411": [ "17:00", "350000", "TariffStep1412"]},
{ "TariffStep1412": [ "18:00", "350000", "TariffStep1413"]},
{ "TariffStep1413": [ "19:00", "350000", "TariffStep1414"]},
{ "TariffStep1414": [ "20:00", "800000", "TariffStep151" ]}
],
"Saturday": [
{ "TariffStep150" : [ "00:00", "800000", "TariffStep151" ]},
{ "TariffStep151" : [ "07:00", "350000", "TariffStep152" ]},
{ "TariffStep152" : [ "08:00", "350000", "TariffStep153" ]},
{ "TariffStep153" : [ "09:00", "350000", "TariffStep154" ]},
{ "TariffStep154" : [ "10:00", "350000", "TariffStep155" ]},
{ "TariffStep155" : [ "11:00", "350000", "TariffStep156" ]},
{ "TariffStep156" : [ "12:00", "350000", "TariffStep157" ]},
{ "TariffStep157" : [ "13:00", "350000", "TariffStep158" ]},
{ "TariffStep158" : [ "14:00", "350000", "TariffStep159" ]},
{ "TariffStep159" : [ "15:00", "350000", "TariffStep1510"]},
{ "TariffStep1510": [ "16:00", "350000", "TariffStep1511"]},
{ "TariffStep1511": [ "17:00", "350000", "TariffStep1512"]},
{ "TariffStep1512": [ "18:00", "350000", "TariffStep1513"]},
{ "TariffStep1513": [ "19:00", "350000", "TariffStep1514"]},
{ "TariffStep1514": [ "20:00", "800000", "TariffStep161" ]}
],
"Sunday": [
{ "TariffStep160" : [ "00:00", "800000", "TariffStep161" ]},
{ "TariffStep161" : [ "07:00", "350000", "TariffStep162" ]},
{ "TariffStep162" : [ "08:00", "350000", "TariffStep163" ]},
{ "TariffStep163" : [ "09:00", "350000", "TariffStep164" ]},
{ "TariffStep164" : [ "10:00", "350000", "TariffStep165" ]},
{ "TariffStep165" : [ "11:00", "350000", "TariffStep166" ]},
{ "TariffStep166" : [ "12:00", "350000", "TariffStep167" ]},
{ "TariffStep167" : [ "13:00", "350000", "TariffStep168" ]},
{ "TariffStep168" : [ "14:00", "350000", "TariffStep169" ]},
{ "TariffStep169" : [ "15:00", "350000", "TariffStep1610"]},
{ "TariffStep1610": [ "16:00", "350000", "TariffStep1611"]},
{ "TariffStep1611": [ "17:00", "350000", "TariffStep1612"]},
{ "TariffStep1612": [ "18:00", "350000", "TariffStep1613"]},
{ "TariffStep1613": [ "19:00", "350000", "TariffStep1614"]},
{ "TariffStep1614": [ "20:00", "800000", "TariffStep201" ]}
]
},
"week3" : {
"Monday": [
{ "TariffStep200" : [ "00:00", "800000", "TariffStep201" ]},
{ "TariffStep201" : [ "07:00", "350000", "TariffStep202" ]},
{ "TariffStep202" : [ "08:00", "350000", "TariffStep203" ]},
{ "TariffStep203" : [ "09:00", "350000", "TariffStep204" ]},
{ "TariffStep204" : [ "10:00", "350000", "TariffStep205" ]},
{ "TariffStep205" : [ "11:00", "350000", "TariffStep206" ]},
{ "TariffStep206" : [ "12:00", "350000", "TariffStep207" ]},
{ "TariffStep207" : [ "13:00", "350000", "TariffStep208" ]},
{ "TariffStep208" : [ "14:00", "350000", "TariffStep209" ]},
{ "TariffStep209" : [ "15:00", "350000", "TariffStep2010"]},
{ "TariffStep2010": [ "16:00", "350000", "TariffStep2011"]},
{ "TariffStep2011": [ "17:00", "350000", "TariffStep2012"]},
{ "TariffStep2012": [ "18:00", "350000", "TariffStep2013"]},
{ "TariffStep2013": [ "19:00", "350000", "TariffStep2014"]},
{ "TariffStep2014": [ "20:00", "800000", "TariffStep211" ]}
],
"Tuesday": [
{ "TariffStep210" : [ "00:00", "800000", "TariffStep211" ]},
{ "TariffStep211" : [ "07:00", "350000", "TariffStep212" ]},
{ "TariffStep212" : [ "08:00", "350000", "TariffStep213" ]},
{ "TariffStep213" : [ "09:00", "350000", "TariffStep214" ]},
{ "TariffStep214" : [ "10:00", "350000", "TariffStep215" ]},
{ "TariffStep215" : [ "11:00", "350000", "TariffStep216" ]},
{ "TariffStep216" : [ "12:00", "350000", "TariffStep217" ]},
{ "TariffStep217" : [ "13:00", "350000", "TariffStep218" ]},
{ "TariffStep218" : [ "14:00", "350000", "TariffStep219" ]},
{ "TariffStep219" : [ "15:00", "350000", "TariffStep2110"]},
{ "TariffStep2110": [ "16:00", "350000", "TariffStep2111"]},
{ "TariffStep2111": [ "17:00", "350000", "TariffStep2112"]},
{ "TariffStep2112": [ "18:00", "350000", "TariffStep2113"]},
{ "TariffStep2113": [ "19:00", "350000", "TariffStep2114"]},
{ "TariffStep2114": [ "20:00", "800000", "TariffStep221" ]}
],
"Wednesday": [
{ "TariffStep220" : [ "00:00", "800000", "TariffStep221" ]},
{ "TariffStep221" : [ "07:00", "350000", "TariffStep222" ]},
{ "TariffStep222" : [ "08:00", "350000", "TariffStep223" ]},
{ "TariffStep223" : [ "09:00", "350000", "TariffStep224" ]},
{ "TariffStep224" : [ "10:00", "350000", "TariffStep225" ]},
{ "TariffStep225" : [ "11:00", "350000", "TariffStep226" ]},
{ "TariffStep226" : [ "12:00", "350000", "TariffStep227" ]},
{ "TariffStep227" : [ "13:00", "350000", "TariffStep228" ]},
{ "TariffStep228" : [ "14:00", "350000", "TariffStep229" ]},
{ "TariffStep229" : [ "15:00", "350000", "TariffStep2210"]},
{ "TariffStep2210": [ "16:00", "350000", "TariffStep2211"]},
{ "TariffStep2211": [ "17:00", "350000", "TariffStep2212"]},
{ "TariffStep2212": [ "18:00", "350000", "TariffStep2213"]},
{ "TariffStep2213": [ "19:00", "350000", "TariffStep2214"]},
{ "TariffStep2214": [ "20:00", "800000", "TariffStep231" ]}
],
"Thursday": [
{ "TariffStep230" : [ "00:00", "800000", "TariffStep231" ]},
{ "TariffStep231" : [ "07:00", "350000", "TariffStep232" ]},
{ "TariffStep232" : [ "08:00", "350000", "TariffStep233" ]},
{ "TariffStep233" : [ "09:00", "350000", "TariffStep234" ]},
{ "TariffStep234" : [ "10:00", "350000", "TariffStep235" ]},
{ "TariffStep235" : [ "11:00", "350000", "TariffStep236" ]},
{ "TariffStep236" : [ "12:00", "350000", "TariffStep237" ]},
{ "TariffStep237" : [ "13:00", "350000", "TariffStep238" ]},
{ "TariffStep238" : [ "14:00", "350000", "TariffStep239" ]},
{ "TariffStep239" : [ "15:00", "350000", "TariffStep2310"]},
{ "TariffStep2310": [ "16:00", "350000", "TariffStep2311"]},
{ "TariffStep2311": [ "17:00", "350000", "TariffStep2312"]},
{ "TariffStep2312": [ "18:00", "350000", "TariffStep2313"]},
{ "TariffStep2313": [ "19:00", "350000", "TariffStep2314"]},
{ "TariffStep2314": [ "20:00", "800000", "TariffStep241" ]}
],
"Friday": [
{ "TariffStep240" : [ "00:00", "800000", "TariffStep241" ]},
{ "TariffStep241" : [ "07:00", "350000", "TariffStep242" ]},
{ "TariffStep242" : [ "08:00", "350000", "TariffStep243" ]},
{ "TariffStep243" : [ "09:00", "350000", "TariffStep244" ]},
{ "TariffStep244" : [ "10:00", "350000", "TariffStep245" ]},
{ "TariffStep245" : [ "11:00", "350000", "TariffStep246" ]},
{ "TariffStep246" : [ "12:00", "350000", "TariffStep247" ]},
{ "TariffStep247" : [ "13:00", "350000", "TariffStep248" ]},
{ "TariffStep248" : [ "14:00", "350000", "TariffStep249" ]},
{ "TariffStep249" : [ "15:00", "350000", "TariffStep2410"]},
{ "TariffStep2410": [ "16:00", "350000", "TariffStep2411"]},
{ "TariffStep2411": [ "17:00", "350000", "TariffStep2412"]},
{ "TariffStep2412": [ "18:00", "350000", "TariffStep2413"]},
{ "TariffStep2413": [ "19:00", "350000", "TariffStep2414"]},
{ "TariffStep2414": [ "20:00", "800000", "TariffStep251" ]}
],
"Saturday": [
{ "TariffStep250" : [ "00:00", "800000", "TariffStep251" ]},
{ "TariffStep251" : [ "07:00", "350000", "TariffStep252" ]},
{ "TariffStep252" : [ "08:00", "350000", "TariffStep253" ]},
{ "TariffStep253" : [ "09:00", "350000", "TariffStep254" ]},
{ "TariffStep254" : [ "10:00", "350000", "TariffStep255" ]},
{ "TariffStep255" : [ "11:00", "350000", "TariffStep256" ]},
{ "TariffStep256" : [ "12:00", "350000", "TariffStep257" ]},
{ "TariffStep257" : [ "13:00", "350000", "TariffStep258" ]},
{ "TariffStep258" : [ "14:00", "350000", "TariffStep259" ]},
{ "TariffStep259" : [ "15:00", "350000", "TariffStep2510"]},
{ "TariffStep2510": [ "16:00", "350000", "TariffStep2511"]},
{ "TariffStep2511": [ "17:00", "350000", "TariffStep2512"]},
{ "TariffStep2512": [ "18:00", "350000", "TariffStep2513"]},
{ "TariffStep2513": [ "19:00", "350000", "TariffStep2514"]},
{ "TariffStep2514": [ "20:00", "800000", "TariffStep261" ]}
],
"Sunday": [
{ "TariffStep260" : [ "00:00", "800000", "TariffStep261" ]},
{ "TariffStep261" : [ "07:00", "350000", "TariffStep262" ]},
{ "TariffStep262" : [ "08:00", "350000", "TariffStep263" ]},
{ "TariffStep263" : [ "09:00", "350000", "TariffStep264" ]},
{ "TariffStep264" : [ "10:00", "350000", "TariffStep265" ]},
{ "TariffStep265" : [ "11:00", "350000", "TariffStep266" ]},
{ "TariffStep266" : [ "12:00", "350000", "TariffStep267" ]},
{ "TariffStep267" : [ "13:00", "350000", "TariffStep268" ]},
{ "TariffStep268" : [ "14:00", "350000", "TariffStep269" ]},
{ "TariffStep269" : [ "15:00", "350000", "TariffStep2610"]},
{ "TariffStep2610": [ "16:00", "350000", "TariffStep2611"]},
{ "TariffStep2611": [ "17:00", "350000", "TariffStep2612"]},
{ "TariffStep2612": [ "18:00", "350000", "TariffStep2613"]},
{ "TariffStep2613": [ "19:00", "350000", "TariffStep2614"]},
{ "TariffStep2614": [ "20:00", "800000", "TariffStep001" ]}
]
}
}

10100
main/kate.txt Normal file

File diff suppressed because it is too large Load Diff

70
main/main.cpp Normal file
View File

@ -0,0 +1,70 @@
#include <QDebug>
#include <QDateTime>
#include <assert.h>
#include "calculate_parking_tickets.h"
#include "calculate_parking_tickets_global.h"
#include "calculate_parking_tickets_algorithms.h"
#include "calculate_parking_tickets_tariff.h"
#include "calculate_parking_tickets_utils.h"
#include "message_handler.h"
int main() {
if (!messageHandlerInstalled()) { // change internal qt-QDebug-handling
atbInstallMessageHandler(atbDebugOutput);
setDebugLevel(QtMsgType::QtDebugMsg);
}
parking_tariff_t *tariff =
parking_tariff_t::parseTariff("/opt/ptu5/opt/calculate_parking/calculate_parking_tickets/germersheim.conf");
if (tariff) {
price_t price;
memset(&price, 0x00, sizeof(price));
QDateTime start = QDateTime::currentDateTime();
QDateTime end;
start.setTime(QTime());
int d1, d2 = 0;
d1 = start.date().dayOfWeek();
int hour[] = { 2, 5, 10, 20, 30, 40};
for (int h = 0; h < 6; ++h) {
for (int i = 0; i < MIN_PER_DAY; ++i) {
fprintf(stderr, "\n*** %5d *** (parkdauer:%dh)", i*(h+1), hour[h]);
if (d1 != d2) {
qDebug() << ((i==0) ? 0: i/MIN_PER_DAY) << d1 << "***\n";
d2 = d1;
}
//start = start.addSecs(i*60);
//start = start.addSecs(420*60);
minute_t const s = TUtils::toMinutes(start);
end = start.addSecs(hour[h]*60*60);
minute_t const e = TUtils::toMinutes(end);
//minute_t const e = s + 24*60*3 + 123;
fprintf(stderr,
"[EINFAHRT: %s:%02d:%02d, %ld Minuten frei, "
"AUSFAHRT: %s:%02d:%02d]\n",
start.date().toString().toStdString().c_str(),
start.time().hour(), start.time().minute(),
tariff->free_of_charge,
end.date().toString().toStdString().c_str(),
end.time().hour(), end.time().minute());
if (compute_price_for_parking_ticket(tariff, s, e, &price)) {
}
start = start.addSecs(60);
d1 = start.date().dayOfWeek();
}
}
}
return 0;
}

160
main/main.cpp.bck.1 Normal file
View File

@ -0,0 +1,160 @@
#include <QDebug>
#include <QDateTime>
#include "calculate_parking_tickets.h"
#include "calculate_parking_tickets_algorithms.h"
#include "calculate_parking_tickets_tariff.h"
#include "calculate_parking_tickets_utils.h"
#include "message_handler.h"
int main() {
if (!messageHandlerInstalled()) { // change internal qt-QDebug-handling
atbInstallMessageHandler(atbDebugOutput);
setDebugLevel(QtMsgType::QtDebugMsg);
}
/*
Germersheim:
Freiparkzeit: 90 min
Stundentarif: 7:00 - 20:00 3,50 Euro/h
Tagesmaximum: 18 Euro, gueltig 24h ab einfahrt
Nacht-Tarif: 20:00 - 7:00: 8 Euro
Fragen:
1. Fuer die Abrechnung bleiben mehrere Moeglichkeiten.
a: minutengenau: eine Minute kostet 0.0583 Euro (bzw. 0.012 Euro nachts).
b: im Stunden-Raster ausgerichtet an der tatsaechlichen Uhrzeit
wie angeben: jede angefangene Stunde kostet 3.50 Euro bzw.
8 Euro Nacht-Tarif.
Beispiele:
zu b: Einfahrt um 18:24 Uhr. Bis 19:54 Uhr ist dann frei. Die 6 Minuten
bis 20:00 Uhr kosten dann 3.50 Euro. Ausfahrt um 21.00 Uhr: kostet
dann 8 Euro, insgesamt also 11.50 Euro.
zu a: wie vor, nur minutengenaue Abrechnung: 6 Minuten kosten dann
6*0.0583 = 0.35 Euro, plus 1h nachts: 60*0.012 = 0.72 Euro,
insgesamt also 1.07 Euro.
Was (logisch) nicht moeglich ist: ein Stunden-Raster, das nicht an der
tatsaechlichen Uhrzeit ausgerichtet ist.
Beispiel: Einfahrt 18:00 Uhr, frei bis 19:30 Uhr. Wie soll nun die
naechste Stunde berechnet werden? Nach Tag- oder Nacht-Tariff?
2: Tagesmaximum
a: Es gibt also eine maximale Parkzeit von 24h, und der maximale Preis
ist 18 Euro? Oder gibt es kein Maximum fuer die Parkdauer, aber der
Preis ab 24h Parkdauer betraegt einheitlich 18 Euro.
Im zweiten Fall waere dann Folgendes moeglich:
Einfahrt 5:30 Uhr, frei bis 7:00 Uhr.
Kosten von 7:00 - 20:00 Uhr: 13*3.50 = 45.50 Euro.
Kosten von 20:00 - 7:00 Uhr: 8 Euro.
Ausfahrt: 8:00 Uhr: 3.50 Euro, insgesamt eigentlich 57 Euro,
nach obiger Regel aber dann nur 18 Euro.
*/
/*
TODO:
1: Abrechnungsmodus:
a: minutengenau
b: 15-min-Raster, ausgerichtet an der tatseachlichen Uhrzeit
b: 30-min-Raster, ausgerichtet an der tatseachlichen Uhrzeit
b: 60-min-Raster, ausgerichtet an der tatseachlichen Uhrzeit
c: wie im Tarif angegeben mit einer moeglichst groben Aufloesung.
*/
parking_tariff_t *tariff = new parking_tariff_t();
tariff->unit_scale_factor = 1.0;
tariff->unit_definition = 1000;
tariff->waiting_period = 0;
// tariff->waiting_period = 90;
int const si = sizeof(TariffStep);
qDebug() << si;
QDate today = QDate::currentDate();
int todayWeekDay = today.dayOfWeek();
if (todayWeekDay > Qt::Monday) {
int day = today.day() - todayWeekDay;
if (!today.setDate(today.year(), today.month(), day)) {
qFatal("Setting today failed");
}
}
QDate sunday = today;
qDebug() << sunday;
for (int i = Qt::Monday; i <= Qt::Sunday; ++i) {
// days start at midnight
QDateTime startMinute(sunday.addDays(i), QTime( 0, 0));
//qDebug() << "startMinute=" << startMinute << startMinute.date().dayOfWeek();
// first block: 0:00 - 7:00. night-tariff.
TariffStep *current = &tariff->m_tariffSteps[i][0];
TariffStep *next = &tariff->m_tariffSteps[i][7*60];
*current = TariffStep(startMinute, 0, next);
//qDebug() << "current =" << "c=" << current << current->startMinute() << current->price() << "n=" << current->next();
//qDebug() << "offset =" << ((char *)current->next() - (char *)&tariff->m_tariffSteps[i][0])/sizeof(TariffStep);
// from 7:00 on, each hour costs 3.50 euros == 350000 units
startMinute = startMinute.addSecs(7*3600);
current = next;
for (int j = 7; j < 20; ++j) {
next = current + 60;
*current = TariffStep(startMinute, 350000, next);
//qDebug() << "current =" << "c=" << current << current->startMinute() << current->price() << "n=" << current->next();
//qDebug() << "offset =" << ((char *)current->next() - (char *)&tariff->m_tariffSteps[i][0])/sizeof(TariffStep);
startMinute = startMinute.addSecs(3600);
current = next;
}
if (i != Qt::Sunday) {
next = current + 4*60 + 7*60;
} else {
next = &tariff->m_tariffSteps[Qt::Monday][7*60];
}
*current = TariffStep(startMinute, 0, next);
if (i != Qt::Sunday) {
qDebug() << "current =" << "c=" << current << current->startMinute() << current->price() << "n=" << current->next();
qDebug() << "offset =" << ((char *)current->next() - (char *)&tariff->m_tariffSteps[i][0])/sizeof(TariffStep);
} else {
qDebug() << "current =" << "c=" << current << current->startMinute() << current->price() << "n=" << current->next();
if (&tariff->m_tariffSteps[1][420] == current->next()) {
qDebug() << "OK";
qDebug() << "offset =" << ((char *)current->next() - (char *)&tariff->m_tariffSteps[1][0])/sizeof(TariffStep);
}
}
}
return 0;
#if 0
price_t price;
memset(&price, 0x00, sizeof(price));
QDateTime start = QDateTime::currentDateTime();
minute_t const s = TUtils::toMinutes(start);
minute_t const e = s + 60;
qDebug() << "start =" << start << "(" << s << ")";
//start.setTime(QTime()); ruecksetzen des tages auf 0:00
//QTime t = start.time();
for (int i=1; i < (e-s); ++i) {
qDebug() << i << start << start.date().dayOfWeek();
start = start.addSecs(60);
}
#endif
//if (TAlgo::compute_price_for_parking_ticket(tariff, s, e, &price)) {
//}
// Calculate_parking_tickets cpt;
return 0;
}

29
main/main.pro Normal file
View File

@ -0,0 +1,29 @@
QT += core
TARGET = main
TEMPLATE = app
CONFIG += c++17
QMAKE_CXXFLAGS += -Wno-deprecated-copy
INCLUDEPATH += ../calculate_parking_tickets/
INCLUDEPATH += ../rapidjson/include
LIBS += -L$$OUT_PWD/../calculate_parking_tickets -lcalculate_parking_tickets
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
message_handler.cpp
HEADERS += \
message_handler.h
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

140
main/message_handler.cpp Normal file
View File

@ -0,0 +1,140 @@
#include "message_handler.h"
#include <QDateTime>
#include <cstring>
#define OUTPUT_LEN (20)
static bool installedMsgHandler = false;
static QtMsgType debugLevel = QtInfoMsg;
QtMsgType getDebugLevel() { return debugLevel; }
void setDebugLevel(QtMsgType newDebugLevel) {
debugLevel = newDebugLevel;
}
bool messageHandlerInstalled() {
return installedMsgHandler;
}
QtMessageHandler atbInstallMessageHandler(QtMessageHandler handler) {
installedMsgHandler = (handler != 0);
static QtMessageHandler prevHandler = nullptr;
if (handler) {
prevHandler = qInstallMessageHandler(handler);
return prevHandler;
} else {
return qInstallMessageHandler(prevHandler);
}
}
///
/// \brief Print message according to given debug level.
///
/// \note Install this function using qInstallMsgHandler().
///
/// int main(int argc, char **argv) {
/// installMsgHandler(atbDebugOutput);
/// QApplication app(argc, argv);
/// ...
/// return app.exec();
/// }
///
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
void atbDebugOutput(QtMsgType type, const char *msg) {
switch (type) {
case QtDebugMsg: {
if (debugLevel <= QtDebugMsg) {
fprintf(stderr, "%*.*s Debug: %s\n", OUTPUT_LEN, OUTPUT_LEN,
QDateTime::currentDateTime().toString(Qt::ISODate).toStdString().c_str(), msg);
}
} break;
case QtInfoMsg: {
if (debugLevel <= QtInfoMsg) {
fprintf(stderr, "%*.*s Info: %s\n", OUTPUT_LEN, OUTPUT_LEN,
QDateTime::currentDateTime().toString(Qt::ISODate).toStdString().c_str(), msg);
}
} break;
case QtWarningMsg: {
if (debugLevel <= QtWarningMsg) {
fprintf(stderr, "%*.*s Warning: %s\n", OUTPUT_LEN, OUTPUT_LEN,
QDateTime::currentDateTime().toString(Qt::ISODate).toStdString().c_str(), msg);
}
} break;
case QtCriticalMsg: {
if (debugLevel <= QtCriticalMsg) {
fprintf(stderr, "%*.*s Critical: %s\n", OUTPUT_LEN, OUTPUT_LEN,
QDateTime::currentDateTime().toString(Qt::ISODate).toStdString().c_str(), msg);
}
} break;
case QtFatalMsg: {
if (debugLevel <= QtFatalMsg) {
fprintf(stderr, "%*.*s Fatal: %s\n", OUTPUT_LEN, OUTPUT_LEN,
QDateTime::currentDateTime().toString(Qt::ISODate).toStdString().c_str(), msg);
}
// abort();
} break;
default: {
fprintf(stderr, "%*.*s No ErrorLevel defined! %s\n", OUTPUT_LEN, OUTPUT_LEN,
QDateTime::currentDateTime().toString(Qt::ISODate).toStdString().c_str(), msg);
}
}
}
#elif QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) {
static constexpr const char *format = "dd.MM.yyyy hh:mm:ss";
QByteArray localMsg = msg.toLocal8Bit();
const char *file = context.file ? context.file : "";
char const* output = std::strrchr(file, '/');
if (output) {
file = output + 1;
}
qint64 const currentMSecsSinceEpoch = QDateTime::currentMSecsSinceEpoch();
int const fractional_part = currentMSecsSinceEpoch % 1000;
QDateTime const datetime = QDateTime::fromMSecsSinceEpoch(currentMSecsSinceEpoch);
switch (type) {
case QtDebugMsg: {
if (debugLevel <= QtDebugMsg) {
fprintf(stderr, "%*.*s.%03d DEBG %s (%s:%u)\n", OUTPUT_LEN, OUTPUT_LEN,
datetime.toString(format).toStdString().c_str(), fractional_part,
localMsg.constData(), file, context.line);
}
} break;
case QtInfoMsg: {
if (debugLevel <= QtInfoMsg) {
fprintf(stderr, "%*.*s.%03d INFO %s (%s:%u)\n", OUTPUT_LEN, OUTPUT_LEN,
datetime.toString(format).toStdString().c_str(), fractional_part,
localMsg.constData(), file, context.line);
}
} break;
case QtWarningMsg: {
if (debugLevel <= QtWarningMsg) {
fprintf(stderr, "%*.*s.%03d WARN %s (%s:%u)\n", OUTPUT_LEN, OUTPUT_LEN,
datetime.toString(format).toStdString().c_str(), fractional_part,
localMsg.constData(), file, context.line);
}
} break;
case QtCriticalMsg: {
if (debugLevel <= QtCriticalMsg) {
fprintf(stderr, "%*.*s.%03d CRIT %s (%s:%u)\n", OUTPUT_LEN, OUTPUT_LEN,
datetime.toString(format).toStdString().c_str(), fractional_part,
localMsg.constData(), file, context.line);
}
} break;
case QtFatalMsg: {
if (debugLevel <= QtFatalMsg) {
fprintf(stderr, "%*.*s.%03d FATAL %s (%s:%u)\n", OUTPUT_LEN, OUTPUT_LEN,
datetime.toString(format).toStdString().c_str(), fractional_part,
localMsg.constData(), file, context.line);
}
} break;
default: {
fprintf(stderr, "%*.*s.%03d No ErrorLevel defined! %s\n", OUTPUT_LEN, OUTPUT_LEN,
datetime.toString(format).toStdString().c_str(), fractional_part,
msg.toStdString().c_str());
}
}
}
#endif

20
main/message_handler.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef MESSAGE_HANDLER_H_INCLUDED
#define MESSAGE_HANDLER_H_INCLUDED
#include <QtGlobal>
QtMsgType getDebugLevel();
void setDebugLevel(QtMsgType newDebugLevel);
bool messageHandlerInstalled();
QtMessageHandler atbInstallMessageHandler(QtMessageHandler handler);
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
// typedef void (*QtMessageHandler)(QtMsgType, const char *);
void atbDebugOutput(QtMsgType type, const char *msg);
#elif QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// typedef void (*QtMessageHandler)(QtMsgType, const QMessageLogContext &, const QString &);
void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg);
#endif
#endif // MESSAGE_HANDLER_H_INCLUDED