====== Hekate Case Telco ======
Paweł Grzesiak, [[p2grzesiak@gmail.com]]
:!: Find, analyze, reverse engineer some telco billing/services systems. Model rules using the HeKatE process.
Examples:
* Plus
====== Meetings ======
===== 20090305 ====
* Research PlusGSM
* [[hekate:hekate_case_thermostat]]
====== Problems ======
:?: :!: How to describe (**ARD** chart as well as **original rules**) services management - __dependency__ between time, duration, payment and **packets**?
:?: :!: Concept of **ARD** diagram
====== Project ======
===== VARDA / ARD+ Research =====
Read available materials and documentation about VARDA and ARD+ which are to be found here:
* ARD+ syntax [[hekate:bib:hekate_bibliography#gjn2008flairs-ardformal]]
* Varda description [[hekate:bib:hekate_bibliography#gjn2008flairs-ardprolog]]
===== VARDA Installation =====
Installation according to the instructions available [[hekate:varda|here]] was successfully conducted on a machine running Microsoft® Windows Vista™ Business 64-bit.
The only problem to overcome was that the Windows installer available on the official **Graphviz** website [[http://www.graphviz.org/]] does not add the folder where these tools are installed (e.g. C:\Program Files\Graphviz 2.21\bin) to the Windows **%PATH%** environmental variable so I could not run **dot.exe** directly from the command line.
The solution was as follows:
* Right-click on My Computer | Properties | Advanced | Environment Variables
* Find and edit the **Path** environmental variable in that dialog
* Add the full path of the //Graphviz\bin// folder (should be appended to the value of the Path variable, preceded by a semicolon (;))
===== HQEd Installation =====
Compillation according to the instructions available [[hekate:hqed|here]] was successfully conducted under Kubuntu 9.04 32-bit.
===== HJEd =====
Use HJEd tool to build **ARD+** and **TPH** diagrams for **PlusGSM Case**
===== Conceptualization =====
==== Attributes ====
=== Day ===
*Type: **symbolic**
*Description: **Respresents day of week**
*Acceptable values:
* **mon** for monday
* **tue** for tuesday
* **wed** for wednesday
* **thu** for thurstday
* **fri** for friday
* **sat** for saturday
* **sun** for sunday
=== Hour ===
*Type: **decimal**
*Description: **Respresents full hour of start time of the service**
*Acceptable values:
* **0** to **23** for 24h time format
=== Today ===
*Type: **symbolic**
*Description: **Respresents type of the day**
*Possible values:
* **weekend**
* **workday**
=== Daytime ===
*Type: **symbolic**
*Description: **Respresents part of the day**
*Possible values:
* **day**
* **night**
=== Operator ===
*Type: **symbolic**
*Description: **Respresents operator of the receiver of the service**
*Possible values:
* **PLUS**
* **P4**
* **ERA**
* **ORANGE**
=== ServiceType ===
*Type: **symbolic**
*Description: **Respresents type of the service**
*Possible values:
* **SMS**
* **MMS**
* **CALL**
=== Duration ===
*Type: **decimal**
*Description: **Respresents duration of the service (seconds for CALL / amount for MMS or SMS)**
*Possible values:
* **decimal >= 0** values
=== Tariff ===
*Type: **symbolic**
*Description: **Respresents the tariff**
*Possible values:
* **TS25** for Taryfa Syberyjska 25
* **TS40** for Taryfa Syberyjska 40
* **TS55** for Taryfa Syberyjska 55
* **TS75** for Taryfa Syberyjska 75
* **TS90** for Taryfa Syberyjska 90
* **TS120** for Taryfa Syberyjska 120
=== Packets ===
*Type: **symbolic**
*Description: **Respresents set of packets used to cover the service**
*Possible values:
* **FreeSMS** for Free SMS Packet
* **FA** for Free to All Packet
* **FWP** for Free to All in Plus on Weekends and Evenings Packet
* **FP** for Free to All in Plus Packet
* **None** for no packet
* any combinantion like **FP+FA** or **FWP+FP+FA** which indicates that more than one packet is capable of covering service cost
=== DurationToCover ===
*Type: **decimal**
*Description: **Respresents part of the service that packets cannot cover and for which charge will be calculated**
*Possible values:
* **decimal >= 0** values
=== Charge ===
*Type: **decimal**
*Description: **Respresents calcualted charge for the service**
*Possible values:
* **decimal >= 0** values
=== FA ===
*Type: **decimal**
*Description: **Respresents amount of free calls (in seconds) for Free to All Packet**
*Possible values:
* **decimal >= 0** values
=== FS ===
*Type: **decimal**
*Description: **Respresents amount of free messages for Free SMS Packet**
*Possible values:
* **decimal >= 0** values
=== FWP ===
*Type: **decimal**
*Description: **Respresents amount of free calls (in seconds) for Free to All in Plus on Weekends and Evenings Packet**
*Possible values:
* **decimal >= 0** values
=== FP ===
*Type: **decimal**
*Description: **Respresents amount of free calls (in seconds) for Free to All in Plus Packet**
*Possible values:
* **decimal >= 0** values
==== Rules ====
Rule: 1
if Hour is between 18 and 23
or Hour is between 0 and 5
then Daytime is night
Rule: 2
if Hour is between 6 and 17
then Daytime is day
Rule: 3
if Day is mon
or Day is tue
or Day is wed
or Day is thu
or Day is fri
then Today is workday
Rule: 4
if Day is sat
or Day is sun
then Today is weekend
Rule: 5
if ServiceType is MMS
then Packets is None
Rule: 6
if ServiceType is SMS
then Packets is FreeSMS
Rule: 7
if ServiceType is CALL and Operator is not PLUS
then Packets is FA
Rule: 8
if ServiceType is CALL and Operator is PLUS and Today is weekend
then Packets is FWP;FP;FA
Rule: 9
if ServiceType is CALL and Operator is PLUS and Daytime is night
then Packets is FWP;FP;FA
Rule: 10
if ServiceType is CALL and Operator is PLUS and Today is not weekend and Daytime is not night
then Packets is FP;FA
Rule: 11
if Packets is None and Duration > 0
then DurationToCover is Duration
Rule: 12
if Packets is FreeSMS and Duration > 0 and FS >= 0
then DurationToCover is ((FS – Duration) * -1)
Rule: 13
if Packets is FA and Duration > 0 and FA >= 0
then DurationToCover is ((FA – Duration) * -1)
Rule: 14
if Packets is FP;FA and Duration > 0 and FA >= 0 and FP >= 0
then DurationToCover is (((FA+FP) – Duration) * -1)
Rule: 15
if Packets is FWP;FP;FA and Duration > 0 and FA >= 0 and FP >= 0 and FWP >= 0
then DurationToCover is (((FWP+FA+FP) – Duration) * -1)
Rule: 16
if ServiceType is MMS
then Charge is (DurationToCover * 0.4)
Rule: 17
if ServiceType is SMS and DurationToCover > 0
then Charge is (DurationToCover * 0.18)
Rule: 18
if ServiceType is CALL and DurationToCover > 0 and Operator is P4
then Charge is (DurationToCover * (0.72 / 60))
Rule: 19
if ServiceType is CALL and DurationToCover > 0 and Operator is not P4 and (Tariff is TS25 or Tariff is TS40)
then Charge is (DurationToCover * (0.58 / 60)
Rule: 20
if ServiceType is CALL and DurationToCover > 0 and Operator is not P4 and (Tariff is TS55 or Tariff is TS75 or Tariff is TS90 or Tariff is TS120)
then Charge is (DurationToCover * (0.48 / 60)
===== Design =====
==== ARD+ Diagram ====
{{:pl:miw:2009:hekate_case_telco:gsm2-ard.png|}}
==== TPH Diagram ====
{{:pl:miw:2009:hekate_case_telco:gsm2-tph.png|}}
==== XTT Diagram ====
{{:pl:miw:2009:hekate_case_telco:gsm2-xtt.png|}}
==== Logical Design ====
{{:pl:miw:2009:hekate_case_telco:xtt.png|}}
====== Project Files ======
* [[hekate:hjed]] project {{:pl:miw:2009:hekate_case_telco:gsm2.xml|XML file}}
* Generated by [[hekate:hjed]] {{:pl:miw:2009:hekate_case_telco:gsm2.pl|PL file}} for [[hekate:varda]] usage
* Generated by [[hekate:varda]] {{:pl:miw:2009:hekate_case_telco:gsm2.xttml|XTTML file}} for [[hekate:hqed]] usage
* [[hekate:hqed]] project {{:pl:miw:2009:hekate_case_telco:gsm2u.xttml|HML file}} - due to wiki file restrictions please change the extension to **HML** after downloading the file
====== Materials ======
* Official Graphviz website http://www.graphviz.org/
* PlusGSM Taryfy Syberyjskie http://www.plus.pl/oferta_indywidualna/plus_abonament/taryfy/taryfy_syberyjskie/