games project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… ·...

24
GAMES Project Business Arena Game Engine Technical Documentation

Upload: others

Post on 01-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

GAMES Project

Business Arena Game Engine Technical Documentation

Page 2: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

2

Technology

Business Arena Game Engine (BizArena Engine in short) is based on the following technology:

Database layer – MySQL

Business logic layer – PHP

Presentation layer, server side – Smarty

Presentation layer, client side – HTML, CSS, Javascript, AngularJS

Database

The database for the BizArena Engine consists of 70 tables. The tables are documented in the

following subsections.

TABLE: AD_CHANNEL

The table stores data on ad channels:

`id` – id of an ad channel

`name` – a name of the ad channel; e.g., newspaper, TV, radio

`cost_per_ad` – the price per round for a single usage

`cancel_cost` – the cost of cancelling the ad channel before the round scheduled while

purchasing it

Advertising based on ad channels is applied independently to each service and influences sales of that

service only.

TABLE: AREA

The table stores data on market areas (locations):

`id` – id of a market area

`name` – a name of the market area; depending on a scenario, the market area can be a city, a

region, or a country

`lon` – longitude

‘lat` – latitude

TABLE: AREA_GROUP

The table stores data defining groups of market areas for specific scenarios:

`id` – id of a group of market areas

`name` – a name of the group of market areas

TABLE: AREA_GROUP_AREA

The table stores data specifying which market areas (`area_id`) are included within a specific group of

market areas (`area_group_id`).

Page 3: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

3

TABLE: BENEFIT

The table stores data on employee’s benefits:

`id` – id of a benefit

`name` – a name of the benefit; e.g., multisport card, sandwich bar, etc.

`productivity_increase` – the increase of employees’ productivity per round; the increase is

expressed by units of 10%; i.e., the value of 1 results in the productivity growth by 10%

`cost` – a cost per employee per round

TABLE: CONSUMER_GROUP_CHANGEABILITY

The table stores data on the extent of a customer group’s change (increase or decrease) when a specific

range of a demand generated by this group is satisfied. The table column’s names correspond to the

percentage ranges of the satisfied demand; the values in the columns specify the percentage of the

change. For example, the column named `10_20` corresponds to the case when the 10%–20% of a

demand is satisfied; than customer groups for which this range of the demand has been satisfied

become subject to the change by the percentage of the value stored in the `10_20` column.

TABLE: CURRENCY

The table stores data on currencies used in scenarios:

`ISO_code` – the tree-letter ISO code of a currency

`name` – a name of the currency

`html_code` – html escape symbol for proper displaying in web pages

`top_position` – the position of a currency in front of or behind the amount of money

TABLE: DEVELOPMENT_COSTS

The table stores data on development costs for services and service points:

`id` – id of a set of development costs

`name` – a unique name for the set of development costs; it is possible to create various sets of

cost for one scenario

`prd_new_base_cost` – the fixed cost of creating a new service

`prd_dev_base_cost` –the fixed cost of developing a service; i.e., increasing values of its

attributes

`prd_tech` – the unit cost of the `tech` attribute while creating or developing a service

`prd_eco` – as above but for the `eco` attribute

`prd_quality` – as above but for the `quality` attribute

`service_point_tech` – the unit cost of the `tech` attribute while creating or developing a

service point

`service_point_eco` – as above but for the `eco` attribute

TABLE: EMPLOYEE_SEGMENT

The table stores data on employee segments:

`id` – id of an employee segment

`name` – a unique name of the employee segment

Page 4: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

4

`prd_tech` – level of skills for the `tech` attribute; specifies employee’s abilities to provide a

service with the values of service attributes equal or lower to the values specified in this

column

`prd_eco` – as above but for the `eco` attribute

`prd_quality` – as above but for the `quality` attribute

`min_salary` – the lowest level of remuneration required by the employees of the segment; if a

player offers a salary below the lowest level, employees of the segment do not accept the offer

`description` – optional supplementary description

TABLE: EMPLOYEE_SEGMENT_AREA

The table stores data on a size (`employee_size`) of an employee segment (`employee_segment_id`) in

a market area (`area_id`) in a specific game (`game_id`).

TABLE: FINAL_STOCK_AND_SALES

The table stores data on the quantity of stock (`qty`) and the volume of sales (`sales`) in a market area

(`area_id`) for a service (`product_id`) at the end of a round (`round_id`) for a team (`team_id`).

TABLE: GAME

The table stores data on game instances (games in short):

`id` – id of a game, generated automatically while the game is created by a game master

`name` – a name of the game, setting by a game master while the game is created

`summary` – game’s objectives for players; copied from a scenario the game is based on

`creator` – id of a game master who created the game

`prd_attribute_1` – a name of the first service attribute; referred in other table as the `tech`

attribute

`prd_attribute_2` – a name of the second service attribute; referred in other table as the `eco`

attribute

`prd_attribute_3` – a name of the third service attribute; referred in other table as the `quality`

attribute

`basic_language` – the primary language of the game and user’s interface

`scenario_id` – id of a scenario the game is based on

`optimization_parameters_set_id` – id of the parameter set used to evaluate player’s

achievements after each round

`currency_code` – a code of currency used in the game, copied from a scenario the game is

based on

`consumer_group_changeability_id` – id of the parameter set used to change a size of

customer groups while a specific level of a demand is satisfied

`rounds_qty` – the total number of rounds in the game, copied from a scenario

`teams_qty` – the total number of teams which can take part in the game, copied from a

scenario

`max_players_per_team` – the max number of players within one team, copied from a

scenario

`initial_money_amount` – the initial amount of money, copied from a scenario

`max_emergency_loan` – the max value of emergency loan, copied from a scenario

`initial_tech_max` – the initial max value for the `tech` attribute, copied from a scenario

Page 5: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

5

`initial_eco_max` – as above but for the `eco` attribute

`initial_quality_max` – as above but for the `quality` attribute

`area_group_id` – id of the group of market areas the game operates at

`hq_area` – id of the market area where headquarters is located

`predictions_bonus_id` – id of the parameter set specifying values for calculating the amount

of financial bonus players can be granted for correct predictions

`sales_office_capacity` – id of the parameter set specifying capacities of sales offices in

respect to their sizes (small, medium, large)

`std_sales_effectiveness` – the number of services an employee is able to provide if working

with 100% effectiveness

`dev_costs` – id of the parameter set defining development costs for services and service

points, copied from a scenario

`starting_supplier_id` – id of the default supplier

`step` – the sequence number of the current round; changed on round-based routine

`engine_version` – the version of a game engine used to conduct the game

TABLE: GAME_AD_CHANNEL

The table stores data on advertising channels (`ad_channel_id`) available in a game (`game_id`).

TABLE: GAME_AREA

The table stores data detailing market areas available in a game:

`game_id` – id of a game

`area_id` – id of a market area

`on_start` – true if the market area is available from the very beginning of the game

`initial_customers_amount` – the aggregated level of a demand generated by all customer

groups in the market area

`basic_warehousing_cost` – the unit fixed cost associated with offering a service; covers all

fixed elements associated with the provision of a service; e.g., electricity, running water, etc.

`basic_upkeep_cost` – the fixed cost associated with running a service point; e.g.,

maintenance cost, property taxes, etc.

`setup1_cost` – the cost of establishing a service point of a small size

`setup2_cost` – as above but for a medium size

`setup3_cost` – as above but for a large size

`dev1_cost` – the cost of increasing the size of a service point from small to medium

`dev2_cost` – the cost of increasing the size of a service point from small to large

`dev3_cost` – the cost of increasing the size of a service point from medium to large

`salary` – the average salary in the market area

TABLE: GAME_AREA_GROUP

The table stores data defining the percentage size (`initial_percentage`) of a customer group

(`group_id`) in a market area (`area_id`) in a game (`game_id`).

TABLE: GAME_BENETIF

The table stores data defining a benefit (`benefit_id`) available in a game (`game_id’) and if it is

accessible for players at the very beginning of the game (`on_start`).

Page 6: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

6

TABLE: GAME_GLOBAL_AD

The table stores data detailing a global advertising (`global_ad_id`) available in a game (`game_id’)

and if it is active at the very beginning of the game (`active`).

TABLE: GAME_GROUP_AD_CHANNEL_INFLUENCE

The table stores data defining the impact (`influence_value`) and duration in rounds

(`influence_duration`) of an ad channel (`ad_channel_id`) for a customer group (`group_id`) in a game

(`game_id`).

TABLE: GAME_GROUP_GLOBAL_AD_INFLUENCE

The table stores data defining the impact (`influence_value`) of a global advertising (`global_ad_id`)

for a customer group (`group_id`) in a game (`game_id`).

TABLE: GAME_ROUND

The table stores data on rounds in a game:

`id` - id of the round

`game_id` – id of the game

`round` – the round sequence number

`actual_endtime` – date and time of closing the round by a game master; the value of “zero”

means current round

`max_tech` – the max value for the `tech` attribute in the round

`max_eco` – as above but for the `eco` attribute

`max_quality` – as above but for the `quality` attribute

TABLE: GAME_SALES_OFFICE

The table stores data defining a service point (`sales_office_id`) available at the very beginning of a

game (`game_id`); i.e., the service point predefined by a game master while creating the game.

TABLE: GAME_SUPPLIER

The table stores data defining suppliers (`supplier_id`) available in a game (`game_id`) and if the

specific supplier is accessible for players at the very beginning of the game (`on_start`).

TABLE: GAME_TEAM

The table stores data on teams of players (`team_id`) assigned to a game (`game_id`).

TABLE: GAME_TRAINING

The table stores data defining training sessions (`training_id`) available in a game (`game_id`) and if

the specific training is accessible for players at the very beginning of the game (`on_start`).

TABLE: GAME_TURN_EVENT

The table stores data defining the moment—the round sequence number (`after_round`)—an event

(`turn_event_id`) is supposed to be triggered in a game (`game_id`).

TABLE: GLOBAL_AD

The table stores data on global advertising:

Page 7: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

7

`id` – id of the global ad

`name` – a name of the global ad

`description` – optional supplementary description

`initial_cost` – the price for initiating the global ad

`cost_per_round` – the price paid each round for the global ad

TABLE: GROUP

The table stores data on customer groups:

`id` – id of a customer group

`name` – a name of the customer group

`description` – optional supplementary description of the customer group

`preferred_tech` – the optimal level of the `tech` attribute being the most favorable for the

customer group

`preferred_eco` – as above but for the `eco` attribute

`preferred_quality` – as above but for the `quality` attribute

`preferred_price` – the price for a service the customer group is the most willing to pay

`min_tech` – the floor limit for the `tech` attribute of a service below which the customer

group does not accept the service

`min_eco` – as above but for the `eco` attribute

`min_quality` – as above but for the `quality` attribute

`max_price` – the max price for a service the customer group is willing to pay

`preferred_marketing` – the optimal value for the intensity of marketing activities directed to

the customer group; any intensity above the preferred value is recognized as too intrusive and

develops an antipathy to a service resulting in lower demand and lower sales.

`min_marketing` – the floor limit for the intensity of marketing activities, below which there

is no influence for the customer group

TABLE: LANGUAGE

The table stores data on languages for the user’s interface:

`id` – id of a language

`name` – a name of the language

`shortname` – a short name of the language

`filename` – a name of the file containing translations for phrases included in the user’s

interface

TABLE: OPTIMIZATION_PARAMETER

The table stores data detailing roles of parameters in a set of optimization parameters:

`set_id` – id of the optimization parameter set a parameter is included in

`parameter_id` – id of the parameter

`weight` – the weight of the parameter in the optimization parameter set

The optimization parameter set is used by the algorithm evaluating players’ performance during a

game.

TABLE: OPTIMIZATION_PARAMETERS_SET

Page 8: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

8

The table stores data defining a set of optimization parameters for the evaluation algorithm:

`id` – id of the set of optimization parameters

`name` – a name of the set of optimization parameters

`global_function` – a type of the main functions used in the evaluation algorithm: linear,

exponential, logarithmic

`M_and_S_weight` – a weight of marketing and sales section

`M_and_S_function` – a type of function used in marketing and sales section

`Ops_weight` – a weight of operations section

`Ops_function` – a type of function used in operation section

`HR_weight` – a weight of human resources section

`HR_function` – a type of function used in human resources section

`Finance_weight` – a weight of finance section

`Finance_function` – a type of function used in finance section

`Str_Man_weight` – a weight of strategic management section

`Str_Man_function` – a type of function used in strategic management section

TABLE: PARAMETER

The table stores data defining an index (also named as a parameter) – `id` and `name` – included in a

section of the evaluation algorithm (`section`).

TABLE: PLAYER

The table stores data defining a player—the membership of a user (`user_id`) in a team (`team_id`).

TABLE: PLAYER_GAME

The table stores data detailing roles of a player in a team:

`player_id` – id of the player

`team_id` – id of the team

`CEO` – true if the player has a role of Chief Executive Officer

`CFO` –true if the player has a role of Chief Financial Officer

`COO` – true if the player has a role of Chief Operating Officer

`CMO` – true if the player has a role of Chief Marketing Officer

`CTO` – true if the player has a role of Chief Technology Officer

A single player can be granted more than one role.

TABLE: PLAYER_ROUND

The table stores data defining a player (`player_id`) in a round (`round_id`).

TABLE: PREDICTIONS_BONUS

The table stores data defining details of a financial bonus granted to players for accurate predictions

about sales, profit, and market share:

`id` – id of a prediction bonus

`name` – a name of the prediction bonus

`sales_weight` – a weight of the sales factor

`profit_weight` – a weight of the profit factor

Page 9: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

9

`market_share_weight` – a weight of the market share factor

`accuracy_left` – the min value of the margin for prediction accuracy

`accuracy_right` – the max value of the margin for prediction accuracy

`max_bonus` – the max value of the bonus

`function_type` – a type of the function used to calculate the value of the bonus

TABLE: PRODUCT

The table stores data on services (products in general) developed by a player during a game:

`id` – id of a service

`name` – a name of the service

`tech` – the `tech` attribute value of the service

`eco` – the `eco` attribute value of the service

`quality` – the `quality` attribute value of the service

`active` – true if the service is in use; i.e., can be offered to customers

TABLE: PRODUCT_ADS

The table stores data on ad channels applied to a service:

`product_id` – id of the service

`ad_channel_id` – id of an ad channel

`qty` – the intensity of the ad channel

`rounds_left` – the number of rounds left to the end of ad channel application

`cancel` – true if the ad channel is intended to be immediately completed

TABLE: PRODUCT_ADS_HISTORY

The table stores historical data on applying an ad channel to a service

`round_id` – id of a round

`team_id` –id of a team which applied the ad channel

`product_id` – id of the service the ad channel was applied to

`ad_channel_id` – id of the ad channel

`qty` – the intensity of the ad channel

`rounds_left` – the number of rounds since the round identified by the ‘round_id’, which are

left to the end of ad channel application

TABLE: ROUND_AREA

The table stores data detailing a marekt area in a round:

`round_id` – id of the round

`area_id` – id of the market area

‘customers_amount` – the number of customers in the round in the market area

`salary` – the average salary in the round in the market area

TABLE: ROUND_AREA_GROUP

The table stores data defining the percentage (`percentage`) of a customer group (`group_id`) in a

round area (`round_area_id`).

Page 10: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

10

TABLE: ROUND_BENEFIT

The table stores data defining a benefit (`benefit_id`) available in a round (`round_id`).

TABLE: ROUND_EMPLOYMENT

The table stores data detailing an employment in a round:

`offered_employment` – the number of employees willing to be employed

`offered_salary` – the amount of salary offered to employees

`employee_segment_id` – id of the employee segment to the employment offer is directed to

`round_sales_office_id` – id of the round service point

`final_tech` – the final value of the employees’ `tech` attribute after training sessions applied

to employees of the `employee_segment_id`

`final_eco` – as above but for the ‘eco’ attribute

`final_quality` – as above but for the ‘eco’ attribute

`final_employment` – the final number of employees employed in the `round_sales_office_id`

`final_salary` – the final amount of salary paid to employees employed in the

`round_sales_office_id`

TABLE: ROUND_FINANCE

The table stores data detailing a financial situation in a round:

`round_id` – id of the round

`team_id` – id of a team the financial situation refers to

`beginning_balance` – the amount of money at the beginning of the round

`bonus` – a prediction bonus granted to the team

`so_up` – service points up-keeping expenses

`so_dev` – service points development expenses

`so_set` – service points setting up expanses

`so_sal` – service points salvage value

`ad_ch` – ad channels expanses

`g_ad` – global ads expanses

`prd_dev` – services development expanses

`prd_set` – services setting up expanses

`salaries` – employees’ salaries

`benefits` – employees’ benefits expanses

`trainings` – employees’ training sessions expanses

`sales` – sales income

`predictions` – predictions costs

`loan` – the current value of a loan

`current_balance` – the current balance during the round

`profit` – the final profit (incomes – expanses)

`service_offerings` – service offerings expanses

`service_provisions` – service provisions expanses

TABLE: ROUND_GLOBAL_AD

The table stores data on a global ad in a round:

Page 11: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

11

`round_team_id` – id of the team’s round values

`global_ad_id` – id of the global ad

`active` – true if the global ad is active in the round

`cancel` – true if the global ad was canceled in the round

`init` – true if the global as was initiated in the round

TABLE: ROUND_GROUP_SALES

The table stores data detailing sales to a customer group in a round:

`round_id` – id of the round

`team_id` – id of the team

`area_id` – id of the market area

`group_id` – id of the customer group

`product_id` – id of the service

`offered` – the quantity of services offered by the team in the market area to the customer

group during the round

`sold` – the quantity of services actually sold

`price` – the actual price paid for services

TABLE: ROUND_OPTIMIZATION

The table stores data on the values of optimization sections within the evaluation algorithm:

`round_id` – id of the round

`team_id` – id of the team

`result` – the final result of the team’s performance in the round

`sec1` – the value of Marketing and Sales section

`sec2` – the value of Operations section

`sec3` – the value of Human Resources section

`sec4` – the value of Finance section

`sec5` – the value of Strategic Management section

`sec1N` – the normalized value of Marketing and Sales section

`sec2N` – the normalized value of Operations section

`sec3N` – the normalized value of Human Resources section

`sec4N` – the normalized value of Finance section

`sec5N` – the normalized value of Strategic Management section

`parameters` – values of parameters within each section

TABLE: ROUND_PREDICTION

The table stores data on a player’s prediction in a round:

`round_id` – id of the round the prediction is made in

`team_id` – id of the team

`for_round ` – the sequence number of the round the prediction is made for

`sales` – predicted sales

`profit` – predicted profit

`market_share` – predicted market share

Page 12: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

12

TABLE: ROUND_PRICES

The table stores data on the price established by a player for a service (product in general) in a round:

`round_id` – id of the round

`team_id` – id of the team

`area_id ` – id of the market area; for one service it can be established a different price at each

market area

`product_id` – id of the service (product in general)

`price` – the price

TABLE: ROUND_PRODUCT_BUILD

The table stores data on creating a new service in a round:

`round_id` – id of the round

`team_id` – id of the team

`product_id` – id of the new service (product in general)

`cost` – the cost of creating a new service

TABLE: ROUND_PRODUCT_DEVELOPMENT

The table stores data on developing (upgrading) a service in a round:

`after_round` – the sequence number of a round the service development is finished

`product_id` – id of the service (product in general)

`new_name` – a new name for the service (optional)

`tech` – a new value for the `tech` attribute

`eco` – as above but for the `eco` attribute

`quality` – as above but for the `quality` attribute

`dev_cost` – the cost of developing (upgrading) the service

TABLE: ROUND_SALES_OFFICE

The table stores data detailing a service point in a round:

`round_id` – id of the round

`team_id` – id of the team

`sales_office_id` – id of the service point

`close` – if true the service point is intended to be closed at the end of the round

`close_value` – the cost of closing the service point

TABLE: ROUND_SALES_OFFICE_BUILD

The table stores data on opening a new service point in a round:

`round_id` – id of the round

`team_id` – id of the team

`sales_office_id` – id of the new service point

`cost` – the cost of creating a new service point

TABLE: ROUND_SUPPLIER

The table stores data on a supplier (`supplier_id`) available in a round (`round_id`).

Page 13: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

13

TABLE: ROUND_TEAM_VALS

The table stores data on values referring to a team in a round:

`round_id` – id of the round

`team_id` – id of the team

`money_amount` – the amount of money currently held by the team in the round

`emergency_loan` – the amount of loan remaining to paid back

`supplier_id` – id of the current supplier

`market_share` – the percentage of the market share the team covers across all market areas at

the end of the round

`predictions_accuracy` – the accuracy of team’s predictions about sales, profit, and market

share

`ready_for_next` – if true the team has indicated their readiness for the next round

TABLE: ROUND_TRAINING

The table stores data on a training (`training_id`) available in a round (`round_id`).

TABLE: SALES_OFFICE

The table stores data detailing a service point:

`name` – a name of the service point

`area_id` – a market area the service point is located at

`size` – a size of the service point: small, medium, or large

`employment` – the total number of employees at the end of the round

`current_employees_effectiveness` – the current effectiveness of employees

`salary` – the weighted average salary of employees

`init_crew` – the total number of employees at the beginning of the round

`init_eff` – the effectiveness of employees at the beginning of the round

`final_eff` – the effectiveness of employees at the end of the round

`wrk_powers` – the total number of services possible to be offered by the current number of

employees

`sat_ind` – the employees’ satisfaction index based on the current number of employees

`tech` – the value of the `tech` attribute of the service point

`eco` – the value of the `eco` attribute of the service point

`requested_employment` – the total number of employees requested to be employed

`requested_wrk_powers` – the total number of services possible to be offered by the requested

number of employees

`offered_salary` – the salary offered to the requested employees

`last_round_so_id` – the id of the service point in the last round

TABLE: SALES_OFFICE_BENEFIT

The table stores data on a benefit (`benefit_id`) granted to employees of a service point

(`sales_office_id`).

TABLE: SALES_OFFICE_CAPACITY

The table stores data on a parameter set defining possible capacities of service points:

Page 14: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

14

`name’ – a name of the parameter set

`capacity_small’ – the max number of services the small-sized service point can offer

`capacity_medium’ – as above but for the medium-sized service point

`capacity_large’ – as above but for the large-sized service point

`sales_small’ – the max number of employees (salespeople) the small-sized service point can

hired

`sales_medium’ – as above but for the medium-sized service point

`sales_large` – as above but for the large-sized service point

TABLE: SALES_OFFICE_DEV

The table stores data on a development (upgrade) of a service point:

`sales_office_id` – id of the service point being developed (upgraded)

`new_size` – a new size of the service point

`cost` – the cost of development

`new_tech` – a new value of the `tech` attribute of the service point

`new_eco` – a new value of the `eco` attribute of the service point

`dev_type` – the type of development: size, attributes (tech or eco), or both: size and attributes

`size_cost` – the cost of developing (upgrading) the size of the service point

`tech_eco_cost` – the cost of developing (upgrading) attributes of the service point

TABLE: SALES_OFFICE_SALES

The table stores data on sales of a service conducted in a service point in a round:

`round_id` – id of the round

`team_id` – id of the team

`product_id` – id of the service (product in general)

`SO_id` – id of the service

`qty` – the number of services offered for sales

`sales` – the number of service actually sold

TABLE: SALES_OFFICE_STOCK

The table stores data on the number of services offered for sales in a service point:

`sales_office_id` – id of the service point

`product_id` – id of the service

`qty` – the number of services possible to be offered and sold based on the number of

employees with required min skill’s levels

`qty_srv_offered` – the number of services offered for sales

`qualified_emp` – the number of employees able to provide and sell services due to required

min skill’s levels

TABLE: SALES_OFFICE_TRAINING

The table stores data on a training session scheduled for employees in a service point:

`sales_office_id` – id of the service point

`training_id` – id of the training

`rounds_left` – the number of rounds left to the end of the training session

Page 15: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

15

`cancel` – if true the training session is intended to be finished at the end of the current round

`init` – if true the training session has been initiation during the current roung

`employee_segment_id` – id of the employee segment the training session is intended for

`tech_inc` – the number of points the `tech` attribute is going to be increased due to the

training session

`eco_inc` – as above but for the `eco` attribute

`quality_inc` – as above but for the `quality` attribute

TABLE: SCENARIO

The table stores data on a scenario:

`id` – id of the scenario, generated automatically while the scenario is created by a game

master

`name` – a name of the scenario, setting by a game master while the scenario is created

`summary` – a short description of a business environment the scenario is based on, specifies

the main task and objectives players

`prd_att_1` – a name of the first service attribute; referred in other table as the `tech` attribute

`prd_att_2` – a name of the second service attribute; referred in other table as the `eco`

attribute

`prd_att_3` – a name of the third service attribute; referred in other table as the `quality`

attribute

`basic_lan` – the primary language of the scenario and user’s interface during games based on

the scenario

`currency` – a code of the currency used to express monetary values in the scenario

`opt_par` – id of the parameter set used to evaluate player’s achievements after each round

`consumer_changes` – id of the parameter set used to change a size of customer groups while

a specific level of a demand is satisfied

`rounds` – the default total number of rounds in games based on the scenario

`teams` – the default total number of teams which can take part in a game based on the

scenario

`players` – the max number of players within one team

`init_money` – the initial amount of money a player possesses at the beginning of a game

`max_loan` – the max amount of emergency loan

`init_max_tech` – the initial max value for the `tech` attribute

`init_max_eco` – as above but for the `eco` attribute

`init_max_quality` – as above but for the `quality` attribute

`hq` – id of the market area where headquarters is located

`predictions_bonus` – id of the parameter set specifying values for calculating the amount of

financial bonus players can be granted for correct predictions

`sales_capacity` – id of the parameter set specifying capacities of service points in respect to

their size

`sales_eff` – the number of services an employee is able to provide if working with 100%

effectiveness

`dev_costs` – id of the parameter set defining development costs for services and service

points

`supplier` – id of the default supplier

Page 16: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

16

`areas` – multivalued parameter; includes values detailing all market areas included the

scenario: market area id, initial customer demand, service offering cost, service point upkeep

cost, service point setup costs (small, medium, large), service point development costs (small

to medium, medium to large, small to large)

`consumer_groups` – multivalued parameter; specifies the percentage of each customer group

in particular market areas

`ad_channels` – multivalued parameter; specifies the influence and influence duration of each

ad channel on particular customer groups

`global_ads` – multivalued parameter; specifies the influence of each global advertising on

particular customer groups

`benefits` – multivalued parameter; specifies the productivity increase of each employee

benefit

`trainings` – multivalued parameter; specifies the productivity increase of each training

`suppliers` – multivalued parameter; specifies id of all suppliers included in the scenario

`sales_offices` – multivalued parameter; specifies initial service point and their attributes (the

service points which are already available in the first round)

`events` – multivalued parameter; specifies turn events and their attributes that are included in

the scenario

`employee_segments` – multivalued parameter; specifies the number of employees of each

employee segment in particular market areas

TABLE: SUPPLIER

The table stores data on a supplier:

`id` – id of the supplier

`name` – supplier’s name

`tech_point_cost` – the unit cost of the `tech` attribute for components supplied by the supplier

`eco_point_cost` – as above but for the `eco` attribute

`quality_point_cost` – as above but for the `quality` attribute

TABLE: TEAM

The table stores data on a team of players:

`id` – id of the team

`name` – team’s name established by team’s members

TABLE: TEAM_GAME

The table stores data detailing a team in a game:

` team_id` – id of the team

`game_id` – id of the game

`mission` – the mission statement for the game, established by the team’s members

`goals` – goals assumed to be reached by the team during the game

TABLE: TRAINING

The table stores data on training:

`id` – id of the training

Page 17: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

17

`name` – a name of the training

`training_type` – a type of the training: production or service

`productivity_increase` – the increase of productivity due to the training, expressed by units of

10%; i.e., the value of 1 results in the productivity growth by 10%

`cost` – the unit cost of training; i.e., for one employee through one round

`cancel_cost` – the cost of cancelling the training before the round scheduled while

establishing the training

`tech_cost` – the cost of increasing the `tech` employee’s skill by one unit

`eco_cost` – as above but for the `eco` attribute

`quality_cost` – as above but for the `quality` attribute

TABLE: TURN_EVENT

The table stores data on a turn event—business situations appearing unexpectedly during a game and

influencing its course:

`id` – id of the event

`description` – text explaining the nature of the event and its consequences on a game

`type` – a type of the event: financial bonus, change in available attribute points, new

supplier, supplier unavailable, new location, location unavailable, new benefit, benefit

unavailable, new training session, training session unavailable

`amount` – the amount of money related to financial events

`tech` – the value of the `tech` attribute (if applicable to the event type)

`eco` – as above but for the `eco` attribute

`quality` – as above but for the `eco` attribute

`related_id` – id of an entity related to the event; e.g., market area id, supplier id, etc.

TABLE: USER

The table stores data on a user

`id` – id of the user

`email` – email of the use

`name` – a login name of the user

`password` – a password used to log into the system, encrypted by MD5 algorithm

`group_id` – id of a user group the user belong to

`role` – a role of the user: system admin, game master, or player

`language_id` – id of a language for the user’s game interface

TABLE: USER_GROUP

The table stores data on a user group: `id` and `name`. The user groups are used for organizational

purposes—they enable arranging users with the same origin into clusters.

Page 18: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

18

Business Logic Software Modules

Business Logic layer for the BizArena Engine consists of the set of modules implemented in PHP

framework. The modules are documented in the following subsections.

MODULE: CORE.PHP

The module is responsible for supervising the engine processing logic. All user’s requests incoming to

the engine go to the Core module where they are analyzed and based on the `a` parameter (`a` stands

for `action`) are routed to the appropriate specific module for further processing.

MODULE: NEW_GAME.PHP

The module is responsible for creating a new scenario, or a new game based on the selected scenario.

In case of the new scenario, all input parameters are void and a game master must provide values for

them; in case of the new game, the input parameters are copied from the scenario the game is based on

and the game master can leave them unchanged or can specify new values which are valid for this

specific game only.

The module is divided into 12 subsections (cases in the `switch` command) corresponding to the 12

steps of the creating scenario process:

Case 1: Initial assumptions

Tables employed: game, scenario, currency, language

Interface templets employed: new_game_step_1.tpl

Case 2: General Parameters

Tables employed: game, consumer_group_changeability, predictions_bonus,

sales_office_capacity

Interface templets employed: new_game_step_2.tpl

Case 3: Game Locations

Tables employed: game, area, game_area, game_area_group

Interface templets employed: new_game_step_3.tpl

Case 4: Headquarters

Tables employed: game_area, area_group, area_group_area, area, game

Interface templets employed: new_game_step_4.tpl

Case 5: Customer Groups & Employee Segments

Tables employed: game, game_area, game_area_group, game_group_ad_channel_influence,

game_group_global_ad_influence, group, employee_segment_area, employee_segment

Interface templets employed: new_game_step_5.tpl

Case 6: Advertising

Tables employed: game, game_group_ad_channel_influence, game_initial_product_ads,

game_ad_channel, ad_channel, game_group_global_ad_influence, game_global_ad,

global_ad

Interface templets employed: new_game_step_6.tpl

Case 7: Suppliers, Employee Benefits & Training Sessions

Page 19: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

19

Tables employed: game, game_supplier, supplier, sales_office_benefit, game_benefit, benefit,

sales_office_training, game_training, training

Interface templets employed: new_game_step_7.tpl

Case 8: Development Costs

Tables employed: game, development_costs

Interface templets employed: new_game_step_8.tpl

Case 9: Initial Service Points

Tables employed: game, sales_office, game_sales_office, arena, game_area, product,

game_product

Interface templets employed: new_game_step_9.tpl

Case 10: Turn Events

Tables employed: game, game_turn_event, turn_event, game_supplier, supplier,

game_benefit, benefit, game_training, training, game_area, area

Interface templets employed: new_game_step_10.tpl

Case 11: Evaluation Algorithm Parameters

Tables employed: game, optimization_parameter, optimization_parameters_set, parameter

Interface templets employed: new_game_step_11.tpl

Case 12: Saving

Tables employed: game, game_area, game_area_group, employee_segment_area,

game_ad_channel, game_group_ad_channel_influence, game_global_ad,

game_group_global_ad_influence, game_benefit, game_training, game_supplier,

game_product, game_sales_office, sales_office, sales_office_benefit, sales_office_training,

game_turn_event, scenario

Interface templets employed: new_game_step_12.tpl

MODULE: USERS_GROUPS.PHP

The module is responsible for managing user groups. The modules handles the following tasks:

Creating a new user group

Displaying details on existing user groups: name, owner, and the number of players included

in the group

MODULE: USERS.PHP

The module is responsible for displaying details on users: name, role (game master or regular player),

and the user group the user is assigned to.

MODULE: VG.PHP

The module is responsible for displaying to a game master the status and summary of a specific round

in a specific game: teams, players included in teams, players’ roles in teams, and events scheduled for

the round. The module also enables the game master triggering the process of closing the round.

Page 20: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

20

MODULE: BACK_REP.PHP

The module is responsible for displaying to a game master reports on a game. The report set consists

of 9 reports generated independently for each round within the game. The reports included in the set

are as follows:

Sales (main)

The report indicates the details of all sales offerings and their results in a specific round. The

report provides the following data: company (player team), service name, market area,

customer group, the number of services offered, the number of services actually sold, price.

Sales (general)

The report indicates the ratio of demand satisfied in each market area.

Products

The report indicates the details of all services (products in general) being created and offered

by all companies (player teams) in a specific round.

Service points (Sales office)

The reports indicates the details of all service points in a specific round. The report provides

the following data: company (players team), service point name, location (market area), size,

capacity (the max number of services that can be offered due to the service point’s size), the

number of serviced actually offered, employee’s capacity (the max number of services that

can be provided by the employees due to their number), service point’s up-keeping cost.

HR

The report indicates the details on human resources in a specific round. The reports provides

the following data: company (players team), location (market area), service point name, the

number of employees, effectiveness, salary, the number of benefits granted to employees,

names of training sessions granted to employees, the number of rounds remaining to the end

of a specific training session.

Finance

The reports indicates the details on financial situation of each players team in a specific round.

The report provides the following data: starting balance, service points expanses, advertising

expanses, expanses for research and development of services, human resources expanses

(salaries, benefits, training sessions), operations (service offerings) expanses, sales incomes,

bonus granted for accurate predictions, emergency loan, final balance.

Suppliers

The report indicates data on suppliers selected by each players team in a specific round.

Marketing

The report indicates the details of advertising activities in a specific round. The report

provides the following data: service, company (players team), ad channel, the number of ads

purchased in the ad channel for the service, price per round, the number of rounds remaining

to the end of the ad channel campaign, global ad, starting round of the global ad campaign.

Opt. Algorithm

The report indicates the details of the evaluation algorithm in a specific round. The report

provides the following data: company (players team), the value generated by the evaluation

algorithm for the players team, section of the evaluation algorithm, the value generated by the

algorithm for the section, the normalized value for the section, the parameter within the

section, the value of the parameter.

Page 21: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

21

MODULE: END_TURN.PHP

The module is responsible for closing a round and starting the next one. The processing logic is as

follows:

1. Manage turn events for the next round

If there are turn events scheduled in the next round prepare data for them. Data is prepared

according to the type of an event.

2. Finalize employment in service points

Calculate final skills of employees based on training sessions schedule for specific service

points.

Calculate the number of employees eligible to provide services based on matching service’s

attributes with employee’s final skills.

Calculate final salary for employees based offers submitted by players for specific service

points.

Calculate final employee’s effectiveness, satisfaction index and working power based on

benefits provided and average salaries in a market area.

3. Finalize offers in service points

Calculate the final number of services that can be actually offered in specific service points

based on service point’s attributes and the final number of employees, their effectiveness, and

skills.

4. Manage advertising

Aggregate data on service advertising in particular market areas.

5. Manage service points in market areas

Aggregate data on employees, their effectiveness, working powers, salaries, service offerings,

and service prices in the breakdown for particular market areas.

6. Manage sales

Calculate sales—prices and the number of services actually sold—in the breakdown for

services, service points, and customer groups.

7. Evaluate player teams according to the evaluation algorithm

Construct functions for sections and parameters according to the game’s specification.

Calculate values for parameters.

Aggregate parameter’s values for sections.

Normalize section values.

Calculate final evaluation score for each team based on normalized section values.

Record data in the database.

8. Initiate the next round

Calculate round parameters: the max values for the ``tech`, `eco`, and `quality` attributes.

9. Manage customer groups in the next round

Calculate the distribution of customer groups in particular market areas based on the

customer group changeability parameter.

Apply customer-related turn events if such are scheduled for the next round—data on turn

events for the next round has been prepared at the beginning of the processing logic.

10. Manage suppliers, benefits, and training offers for the next round

Initiate appropriate data in the following tables: round_supplier, round_benefit,

round_training.

Apply related turn events if such are scheduled for the next round—data on turn events for

the next round has been prepared at the beginning of the processing logic.

Page 22: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

22

11. Manage service prices for the next round

Make a copy of prices for services from the current round to the next one—the table

employed: round_prices.

12. Manage service creation and development processes

Create new services in the next round based on the creation processes scheduled in the

current round.

Upgrade attributes of services in the next round based on the development processes

scheduled in the current round.

13. Manage service points for the next round

Insert data on service points—the table `round_sales_office`

Calculate employee’s data in service points: the number of employees, their effectiveness,

and working power.

Insert into the database data on benefits and training sessions in particular service points.

Create new service points scheduled for creation in the current round.

Remove service points scheduled for closing in the current round.

14. Manage player’s predictions

Check accuracy of predictions on sales, profit, and market share.

Grant financial bonuses for accuracy of predictions.

15. Manage loans

Update the value of financial balance for players who requested the emergency loan.

16. Manage finance

Calculate expanses on marketing.

Calculate expanses on service points.

Calculate expanses on service offerings.

Calculate expanses on human resources.

Calculate expanses on service and service point developments.

17. Finish processing logic

Make the next round the current one.

Open the current round for players.

MODULE: MS.PHP

The module is responsible for managing marketing and sales domain based on data submitted by

players. The processing logic of the module is as follows:

1. Mange service points

Close service points indicated by the player.

Revoke closing decisions indicated by the player—the action is possible only for closing

decisions submitted earlier during the current round.

Insert into database data on new service points scheduled for creation.

Update data of new service points scheduled for creation earlier during the current round.

2. Manage advertising

Update date on service ads scheduled during previous rounds.

Insert data on new service ads.

Cancel service ads indicated by the player.

Update data on global ads—activate or cancel.

3. Update financial data for sales and marketing.

4. Prepare current data on service points for displaying in the user interface (a web page).

Page 23: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

23

5. Send data to the MS.tpl template responsible for generating the web page for sales and marketing.

6. Invoke the MS.tpl template.

MODULE: RD.PHP

The module is responsible for managing research and development domain based on data submitted by

players. The processing logic of the module is as follows:

1. Develop selected existing service points

The development can be applied to size, and `tech` and `eco’ attributes.

2. Cancel development of service points

The cancelation can apply only to the developments scheduled earlier during the current

round.

3. Develop selected services

The development can apply to values of `tech`, `eco’ and `quality` attributes.

4. Cancel development of services

The cancelation can apply only to the developments scheduled earlier during the current

round.

5. Update parameters of service developments

The update can apply only to the developments schedule earlier during the current round.

6. Add new services.

7. Update financial data for development.

8. Prepare current data on service points, services, and their developments for displaying in the user

interface (a web page).

9. Send data to the RD.tpl template responsible for generating the web page for research and

development.

10. Invoke the RD.tpl template.

MODULE: HR.PHP

The module is responsible for managing human resources domain based on data submitted by players.

The processing logic of the module is as follows:

1. Update employment in service points

Updating employment involves updating the number of employees, their effectiveness, and

working power.

Check if the current employment is sufficient to provide the number of services indicated in

operations domain; if not adjust the number of services offered accordingly

2. Update employee’s benefits.

3. Update training sessions scheduled for employees.

4. Update data on requested employment for the next round

Requested employment includes the number of employees from specific employee segments

and salary offered for employees of those segments.

5. Update financial data for human resources.

6. Prepare current data on human resources—employment in service points, benefits, training

sessions, employment requested in the previous round, and employment requested for the next

round—for displaying in the user interface (a web page).

7. Send data to the HR.tpl template responsible for generating the web page for human resources.

8. Invoke the HR.tpl template.

Page 24: GAMES Project - ec.europa.euec.europa.eu/programmes/erasmus-plus/project-result-content/9a3df… · Business Arena Game Engine (BizArena Engine in short) is based on the following

24

MODULE: OP.PHP

The module is responsible for managing operations domain based on data submitted by players. The

processing logic of the module is as follows:

1. Update the current supplier.

2. Update service offerings

The service offerings includes specifying the number of services for sales independently in

each service point.

3. Update financial data for operations.

4. Prepare current data on operations for displaying in the user interface (a web page).

5. Send data to the Ops.tpl template responsible for generating the web page for operations.

6. Invoke the Ops.tpl template.

MODULE: FIN.PHP

The module is responsible for managing finance domain. The processing logic of the module is as

follows:

1. Get data from the `round_finance` table

The `round_finance` table contains all financial data for the current round: beginning balance,

prediction bonus, service points up-keeping, service point development, service point

creation, service point salvage, advertising channels, global advertising, service development,

service creation, service offerings, employees’ salaries, employees’ benefits, employees’

training sessions, service provisions, service sales, emergency loan, current balance.

2. Prepare financial data for displaying in the user interface (a web page).

3. Send data to the Fin.tpl template responsible for generating the web page for finance.

4. Invoke the Fin.tpl template.

MODULE: SM.PHP

The module is responsible for managing strategic management domain. The processing logic of the

module is as follows:

1. Update strategic management values: mission statement and goals.

2. Update planning values for future rounds: sales, profit and market share.

3. Prepare current data on strategic management for displaying in the user interface (a web page).

4. Send data to the SM.tpl template responsible for generating the web page for strategic

management.

5. Invoke the SM.tpl template.