in today’s world advertising has become very important for...

67
Boğaziçi University Department of Management Information Systems MIS 463 Decision Support Systems for Business PROJECT FINAL REPORT A DSS FOR MEDIA PLANNING IN INSURANCE ADVERTISING Project Team No: 7 Beria Merve Dokumacı Duygu Kayğısız Özlem Öncü Melis Yakan Instructor: Aslı Sencer Erdem 1

Upload: others

Post on 10-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Boğaziçi UniversityDepartment of Management Information Systems

MIS 463 Decision Support Systems for Business

PROJECT FINAL REPORT

A DSS FOR MEDIA PLANNING IN INSURANCE ADVERTISING

Project Team No: 7

Beria Merve DokumacıDuygu Kayğısız

Özlem ÖncüMelis Yakan

Instructor: Aslı Sencer Erdem

İstanbul - December, 2011

1

Page 2: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Table of ContentsA DSS FOR MEDIA PLANNING IN INSURANCE ADVERTISING...........................3

I. INTRODUCTION...........................................................................................................3I.1. The Decision Environment.......................................................................................3I.2. Mission of Project.....................................................................................................3I.3. Scope of Project........................................................................................................4I.4. Methodology.............................................................................................................4

II. LITERATURE SURVEY..............................................................................................5IV. DEVELOPMENT OF THE DSS................................................................................10

IV.1. DSS Architecture..................................................................................................10IV.2. Technical Issues...................................................................................................11IV.3. Data Source and Flow Mechanisms.....................................................................11IV.4. Model and Algorithms..........................................................................................14IV.5. User Interface and Reports..................................................................................19

V. ASSESSMENT............................................................................................................27VI. CONCLUSION...........................................................................................................29REFERENCES..................................................................................................................30Appendix...........................................................................................................................31

2

Page 3: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

A DSS FOR MEDIA PLANNING IN INSURANCE ADVERTISINGI. INTRODUCTION

I.1. The Decision Environment

The major aim of this project is to provide an effective Decision Support System for Media Selection in advertising.

Media Planning is the process for mainly deciding where and when to advertise, and what media mix to use. In this project, we are only interested in selecting the media mix. Given a budget constraint, the decision is to select the best combination of media categories that provides the highest exposure rate.

Usually the advertising agencies decide which media mix to use for the companies’ products, or simply the marketing department could involve in this decision process. The decision period depends on the corporate needs; the company may choose to renew the media mix that is used for a product in certain periods, or it may choose to use the same media mix throughout the life of a product. Corporate needs again determine the frequency of decisions.

The decision to be made on which media categories to use is comprehensive in nature because of the complexity of advertising phenomena, the subjectivity of some required inputs and variety of choices available. There could be no single best media mix, considering market preferences are crucial for the decision to be made. Because of the market’s nature, measuring the effectiveness of the media mix that has been chosen is also not easy in the real life. Competitor’s behaviors, seasonal effects and some other factors may alter our decision on the media mix and decrease its effectiveness.

Today almost all of the companies use some systems for their media selection decisions, but because of the nature of the decision, it always needs improvements. A computerized decision support system is needed in order to decrease the errors and make effective decisions. Although advertising costs is really high for companies, reaching target audiences by advertising is one of the most important sources for profit. That is to say, using right media mix to increase exposure rate increases the profit margin of a company, thus an effective computerized DSS that decreases the erroneous decisions is essential to remain competitive and to survive.

I.2. Mission of Project

The mission of this project is to develop a beneficial system that aids decision makers who deal with the complex media selection problem.

3

Page 4: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Our mission is to choose the most effective media planning that provides the highest exposure rate of target audience.

Our goal is to maximize overall awareness of consumers for any product via effective media scheduling with specified budget.

Our target is to reach maximum number of target auedience and increase the profit. Our goal is to increase exposure rate of consumers with limited budget.

Sub-goals:

Right decision at the right time with the less effort increases competitive advantage of companies.

If the significant exposure rate is reached with acceptable cost; the media selection promotes business.Actually,it increases sales rate to maximize exposure rate of mass audience.

Effective media selection differentiates the product from wide variety of products in the market.

I.3. Scope of Project

The scope of the project is very crucial in order to progress on known and specified tasks and reach the most effective solution without being interfered by any other factors. Therefore, to specify the scope of the project:

The users will be able to conclude the best media mix with the highest exposure with a limited budget. They will specify their budget and will get the best media mix.

We are not going to give the best solution as the minimized costs with the highest exposure rates or not to reach the minimized cost accordingly with how many exposures should be reached at that cost.

It will be an information technology that helps the users to reach the best media mix with determining their limited budget. This computerized decision support system will increase their market competition.

I.4. Methodology

Selecting the right methodology is crucial for decision support system projects and therefore we have agreed on Linear Programming (LP) as our methodology. Linear programming models have been used in the advertising field as a decision aid in selecting an effective media mix. We have chosen it due to its being convenience on our project’s decision variables and constraints. We do not have qualitative decision variables in our project. Therefore, for media mix planning with no data of qualitative decision variables the most appropriate methodology is Linear Programming as an Operations Research modeling for our DSS project.

4

Page 5: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

The system will list various alternatives based on decision maker’s preferences. System inputs will be different media tools such as television, radio, magazine, newspapers, etc. There will be a database that holds which media selection reaches how many consumers, their cost and their time of reaching the consumer. These data is updated every month according to the related information we obtain.

Our objective function is to maximize the audience exposure for advertising. The users will be able to conclude the best media mix with the highest exposure with a limited budget.

Cost is a constraint and cost per advertisement, audience reached per month, and their time of reaching the audience will be gathered from a detailed research on Internet sites, media companies, literature surveys, academic researches and published magazines’ quantitative numbers on these Medias’ exposure numbers on consumers.

II. LITERATURE SURVEYIn today’s world advertising has become very important for the companies to survive. In other words companies should be able to generate enough revenues and nowadays the earned revenue is almost thanks to advertising. However, when advertising is considered there are various versions of it. It can be by television, radio, social media or such many tools. The important point is to determine which media mix should be used with the budget you can invest in to get the maximum exposure rate, thus taking the attention of the customers to your product.

As the technology have entered to our lives, almost everything in other words the traditional ways followed in business has changed. Thanks to computerized systems, decision support systems have been improved to help the people while making decisions on something.

One of the important DSS step is the selection of the right methodology. While it is the media selection most widely used methodology is linear programming as an Operations research modeling.

The Sixties: The Beginning

The first mathematical approaches to marketing problems can be found in the micro-economics literature by Dorfman and Steiner paper (1954), with their theorem for marketing mix optimization is the most famous one. Later in the sixties, the application of OR techniques to marketing problems became in vogue. Optimization methods (for example linear programming and goal programming), Markov models, simulation techniques, and game theory were applied to marketing problems.

The Seventies: The Golden Decade of Marketing Models

If there has ever been a ‘‘Golden Decade’’ for marketing decision models, these were the seventies of the previous century. In this decade, the field of marketing models grew exponentially and, what is perhaps more important, developed an identity of its own. The

5

Page 6: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

modeling of marketing phenomena and marketing problems became interesting in itself, irrespective of whether or not they could be solved with a known OR technique. In the sixties it was often a matter of a technique seeking for a task, whereas now the marketing problems as such became the point of departure.

Researchers started to realize that OR algorithms can be too much of a straightjacket for real world marketing problems. Sometimes marketing problems had to be ‘‘mutilated’’ in order to fit them to an existing OR technique (Montgomery and Weinberg 1973). The most conspicuous example is the application of linear programming to media planning (Engel and Warshaw 1964). Media-planning problems are not really linear, but were forced to be so, in order to solve them with linear programming. The development of marketing models as an independent field from OR has continued since then.

Operational LP-models: LP I

The first linear programming model intended for practical use in media planning was presented and discussed in November 1961. This model, referred to as LP I by Charnes et al. essentially optimized an appropriate unit of measurement. The model was observed budget restrictions for the entire media plan as well as for different media categories and restrictions for given limits of purchasing the different media.

This type of model has been criticized, because there was no consideration of:

Cumulative and duplication effects of contacts, Frequencies and distributions of contacts, Discounts for multiple purchases of media, and Timing of the advertisements.

Moreover, Brown and Warshaw (1965) have stated that “PhilipKotler [18] summarized the five most important limitations.1. Linear programming assumes repeat exposures have the same effect.2. It assumes constant media costs (no discounts).3. It cannot handle the problem of audience duplication4. It says nothing about when ads should be scheduled.5. It often requires poor or nonexistent data.”

They also indicate that recent articles have recognized these limitations and tried to suggest alternative ways of solving these problem areas.

Possible constraints that are used in Media Planning LP:

According to Stasch (1967), in the article of Linear Programming and Media Selection: A Comment he has stated these possible constraints used in Media Planning LP:

• Minimum requirements for gross audience per period and per media class• Minimum requirements for the cumulative gross audience per period and media class• Minimum requirements for net audience or reach per period and class

6

Page 7: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

• Minimum requirements for combined reach per period and class• Minimum requirements for average gross audience per reached person per period and class• Minimum requirements for purchases per media class and period• Maximum requirements for purchases per media class and period• Maximum budgetary requirements for the entire planning horizon T• Maximum requirements for allocation of funds per media class in period t

He has also added that there are three developments which are important in order for linear programming to attain a high level of practical utility:

1. Improved readership data will have to be available for various media.2. Media selection objectives which are translated into restraint constants should be based on more supplementary research to reduce subjectiveness.3. Complex restraints, which more accurately reflect the real world, should be developed.

MURDRAPLAN

Goal of the project is to design and build a decision support system (DSS) that would be a useful system for media planners. Mudra Communications Limited (MCL) that is a young firm among the three largest advertising agencies in India has adopted the system as a basis for their media-planning operations. In 1989, it had billings in excess of $20 million. The organization has several branches across the country, all of which do media planning.

The computing facilities available to MCL's media planners include many IBM compatible PC-AT's. At MCL, most media planners have graduate degrees and are familiar with such media planning models as MEDIAC [Little and Lodish 1969]. However, they do not use formal quantitative methodologies like those proposed by Chames et al. [1968] nor computer-based DSSs, extensively. MEDIAC is constructed as an online computerized system for the purpose of scheduling advertising media. It is a market response model and MEDIAC had focused on exposure levels.MEDIAC was designed while concentrating on limitations and reaching target audience.

The Modeling Approach and the Data Sources

To evaluate a media plan, it is necessary to collect data about the reading, listening, and viewing habits of people across various media. Media planners consider the cost, reach, frequency, and total opportunity to see to be achieved by the media plan.

REACH : Reach is the number of people in a given target segment who are reached by an advertisement.

FREQUENCY : Frequency is the average num ber of times that a person in the target seg ment is exposed to a particular advertise ment. This is also referred to as the average OTS.

7

Page 8: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

OBJECTIVE FUNCTION

Minimize costs subject to constraints on both reach and frequency.

The objective function is equivalent to maximizing reach and frequency subject to constraints on cost; where a budget is established first and a media plan is then developed. In other words ; the project is constructed to be able to “get the most bang for the buck."

DATA COLLECTION

The National Readership Survey (NRS) makes available data on the readership of magazines and newspapers. Most advertising agencies in India, including MCL, make extensive use of this survey. The survey is carried out every four years; in 1983 and 1987, over 55,000 respondents were sampled. NRS has collected data on the entire reading habits of each individual surveyed. Using the raw data would take too long to compute the reach data. Therefore , Summary of the collected data was used in these surveys in study.

Implementation: Computational Aspects of MUDRAPLAN:

MURDRAPLAN is implemented on PCs. MCL already used several PCs in their operations, and media planners were used quantitative tools like spreadsheets and data bases resident on PCs.

To use MUDRAPLAN a media planner would typically choose:

The number and set of media vehicles; The target audience(s) and their num ber; The minimum number of insertions in each vehicle; The maximum number of insertions in each vehicle; Minimum level of reach desired for each audience group; and The minimum frequency desired for each group.

OUTPUT FORMS OF MURDRAPLAN

The net cost of the plan; For each media vehicle, the cost per insertion, the solution vector indicating if any

insertion(s) must be made, the number of insertions required, and the possible range for the number of insertions;

For each audience group, the desired and achieved total OTS, the desired and achieved reach, and the desired and achieved frequency.

As suggested by Schilling, McGarity, and ReVelle [1982]; Output of the project was presented in terms of the decision variables and the objective function. This helps the media planner to visualize the stability of the media plan over different solutions. Every time the

8

Page 9: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

system generates output, it updates the solution database. The solution database thus contains a record of the creation of the media plan and provides a tracking mechanism that can be used for new campaigns. The system always shows the cost of the plan and the costs of plans for similar campaigns in the past and their solution vectors. The planner can proceed iteratively until he or she finds a reasonable media plan. We found that the iterative process always leads quickly to an "optimal" solution.

Other Approaches for Media Selection

In “A Practical Procedure for Media Selection” article Brown(1967) has discussed some other approaches for media selection; however, he has emphasized that the linear programming is the one that is widely used in media selection. Brown (1967) has pointed out that “There is a growing literature dealing with mathematical methods for media selection, but so far the emphasis has been mainly on mathematical programming, in particular, linear programming and its extensions.” (p.262).

In the earlier times according to Brown and Warshaw (1965) linear programming has become an inevitable part of advertising industry. They stated that “Indeed, linear programming seems to have become an advertising industry fashion to the extent that late in 1962 full-page ads in the Wall Street Journal.” (p.83). They have shown the use of linear programming in the media selection and bring some solutions to the problematic parts of it in their article.

For the problematic parts of it they have suggested that “It might be useful to engage in a sensitivity analysis by changing the weights used in the effectiveness rating, especially those based on subjective evaluation.” (p.88). This is an effective way of decreasing the problematic parts one can encounter while using linear programming, because sensitivity analysis can give reasonable ideas and results by showing how the output is effected by the change in any of the inputs.

One of the other important points while talking about media selection is the one that is related with the exposure rates. In choosing the advertising media mix, one should take into account of that which media mix reaches how many customers. Because a company has a limited budget for advertising, it should optimize the media selection with their limited budget as a constraint to reach the maximum number of customers in other words to maximize their advertising exposure rates. In the report named as “Media Planning by Optimizing Contact Frequencies” by Piersma, Kapsenberg, Kloprogge and Wagelmans (1998); the importance of contact frequency of an advertisement is emphasized. They have defined that “Contact frequency is the number of exposures that the target group of an advertising campaign receives for a given media schedule.” (p.2). They have discussed in their report that one of the most important part of determining the media mix is to increase the contact frequency as much as possible with the limited budget, because what makes your product known is due to the contact frequency.

9

Page 10: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

IV. DEVELOPMENT OF THE DSS

IV.1. DSS Architecture

Figure 1:DSS Architecture

10

Page 11: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

IV.2. Technical Issues

We plan to support our system with a properly designed database. The tools, platform and programming language we are going to use are as follows:

We will create our user interfaces with Microsoft Visual C# 2008 Express Edition.

We will use Microsoft Solver Foundation for the Linear Programming calculations.

For database, we will use Microsoft SQL Server 2008. We will use C# programming language. In order to access database we will

have to use SQL statements. For documentation purposes, we use Microsoft Word 2007.

We plan to begin coding phase after we complete the mid-report, in the 10th week.

IV.3. Data Source and Flow Mechanisms

Figure 2: Companies

To apply media planning formulation properly and give optimum solution depends on accuracy of the information. It is very important to obtain raw data to evaluate the user preferences and match them with most recent data. To build our project; we have collected the most updated data by communicating media agencies and media research companies. Therefore; we need to get cost-related data and exposure rates for media vehicles in order to build our database and calculate necessary formulas. We have searched media agencies and other research companies on the internet and then :

11

Page 12: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Firstly; we have interviewed Gülen ATAKBEK working in TNSGLOBAL to be able to decide how a media planning system can be applied . She gave detailed information about advertising media and how any media scheduling can be formulated properly. During interview ; all of us have decided that our project has to focus on any sector that is insurance. In other words ; it is clear which sector will be implemented to maximize exposure rate for advertising campaign.

Then; we communicated with Gizem Bakırtaş working in MAXUSGLOBAL in order to get insurance sector-related data needed for our project. We have explained decision support system of media scheduling in detailed way and then we have specified which data we have to collect for insurance sector and how collected data will be used to maximize expsure rate. We have examined important media tools and programs used in Maxus Global to obtain and also analyse data related to insurance sector. She emphasized that most of data were extracted from NIELSEN media research company. After interview ; we have obtained following data:

Which media vehicles are used to prepare an advertising campaign for insurance-related services.

What sub categories of insurance services are such as life insurance , home insurance,agricultural insurance and so on.

Which measurement is used to calculate cost for each media. Some measurements are count of ads, duration of ad, col/cm of ad and so on.

How total cost are calculated by taking “unit cost” into consideration for each media channel and for each sub category.

What total number of people exposed to each media channel is. What rate of significant people exposed to each media channel for insurance sector

is. ( Total number of people * rate of significant people = Exposure rates for insurance sector)

12

Page 13: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Figure 3: Media Types and Their Costs

Figure 4: Example With Exposure Rates

Firstly, we ask the user to enter company name, password, contact e-mail and country in order to be a user. Then, after being a user he enters the system. The first step is sub-category. This input is obtained from the decision maker via the user interface. The user chooses the sub-category of the insurance from the combo box. This sub-category list is obtained from the media agencies and media research companies that we have interviewed. The second step is budget constraint. It is obtained from the decision maker via the user interface. The third step is the selection of media types. The decision maker checks the boxes of media types that he wants to include via the user interface. We have categorized

13

Page 14: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

the media types by deep research such as internet web sites, related articles, and interview with media agencies. In addition, there is constraints part at the following step. These are also taken by the decision maker via the user interface. The last step is the unit of measurement. It is also taken by the decision maker via the user interface. If the user selects “number of spots” for tv, radio, newspaper or newspaper supplements. Then, the system will use the default units of measurement values for the calculation. These units of measurement for the media types are obtained from the media agencies and media research companies that we have interviewed. Within the data in order to arrange and upgrade the quality of it, we have determined the costs for each of media types mentioned.If the user selects duration or col/cm to the related media type then there are unit of cost for all of them, which we have obtained from the media agencies and media research companies. These are at the database of the system.

Figure 5: Database Structure

IV.4. Model and Algorithms

IV.4.1. Model

The function of the system is to allocate advertising budget (given by user) between mediums such as TV, radio, newspaper and so on. Our media planning system focuses on “insurance” sector. That is; given budget is allocated between media vehicles by taking advertising campaigns for insurance sector into consideration. In other words; media scheduling system includes data related to cost and number of people reached of media

14

Page 15: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

channels only for some insurance companies. The system is valid for insurance sector and therefore maximum exposure rate can be provided only for insurance-related advertising campaigns.

Objective: Maximizing the audience exposure for advertising campaigns in insurance industry.

Our goal is to decide on the number of ads (for outdoor and magazine supplements), total durations (for TV and radio), total col/cm (for papers and paper supplements) and total number of pages (for magazine), so that the highest exposure rate could be reached. Our decision variable in general is:

Xa: “the number of ads in medium a” where a represents the type of media.

We have TV, Radio, Outdoor, Newspaper, Newspaper Supplement, Magazine, and Magazine Supplement as advertising media types.

So, our decision variables are:

Xtv: total durations of TV spotsXr: total durations of radio spotsXo: # of outdoor ads Xn: total col/cm in papers Xns: total col/cm in paper supplementsXm: total # of pages in magazine adsXms: # of ads in magazine supplements in period N

Objective Function:

Max Total Exposure= (Xtv * audience exposure for tv * percentage exposed to insurance ads for tvs) + (Xr * audience exposure for radio * percentage exposed to insurance ads for radios) + (Xo * audience exposure for outdoor ads * percentage exposed to insurance ads for outdoor ads) + (Xn * audience exposure for newspaper * percentage exposed to insurance ads for papers) + (Xns * audience exposure for paper supplements * percentage exposed to insurance ads for paper supplements) + …

Subject to:

1. Budget constraint:

( Xtv * cost per sec) + (Xr * cost per sec) + (Xo * cost per ad) + (Xn * cost per col/cm) + (Xns * cost per col/cm) + (Xm * cost per page) + (Xms * cost per page) <= Given Budget

15

Page 16: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

2. User defined constraints. The user will be provided with an interface in which he can add some specific constraints. For example, the user may want the minimum newspaper ads to be 5 in period N:

Xn + Xns >= 5Or, the user may want the tv ads not to exceed the radio ads:Xtv <= Xr

The user will be able to add all the constraints that are required by the company as long as they are feasible.

3. Some default constraints such as;

All the variables should be greater than or equal to 0:

Xtv, Xr, Xo, Xn, Xns, Xm, Xms >=0These constraints will be provided by the system itself in code behind.

Here is an example for the problem formulated and solved in Excel Solver:

Figure 6: Excel Solver of The System

IV.4.2. Algorithm

Some of the algorithms are shown below:

When the user of the program goes into the system he can directly sign in by entering his username or password. Or he can sign up to the system if he is not the regular user.

16

Page 17: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Figure 7: Sign In – Sign Up Page

When signed in, the user enters his subcategory selection from the comboboxes that is in the program, and then states the budget that he wants to use for advertising for his product to the textbox near the budget selection. Lastly, he selects the media types from the list. There will be checkboxes that he can either select a one type or more according to his criteria.

Figure 8: Decision Variables’ Page

17

Page 18: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Moreover, after deciding on the subcategory of the product, the budget that will be invested on advertising and the media types appropriate for the advertising, the user will be able to specify his constraints. He can either state the constraints for each media type or he can state that X media type plus Y media type should be equal to or at least Z number. This is another user-friendly option for the user to enter his constraints.

Figure 9: Constraints’ Page

Finally, when these steps are completed, the system will show the optimized solution to his media selection problem. The system will give him the optimized solution by showing the maximized exposure rates in accordance with the constraints of the user and his limited specified budget.

18

Page 19: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

IV.5. User Interface and Reports

Login Form

Figure 10: Login Page

The first form that appears to user is the Login Form. Each user must register in order to use the program because the solutions are kept in the users’ own accounts. If the user has already registered before, he can start to use the program with his username and password.

Start Form

Figure 11: Start Page

19

Page 20: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

After the user logins, this form appears. The user can select and view the details of the past problems that he solved from a combo box. Three tabs appear: Solutions, Constraints and Report. The details include the information taken from the user when defining the problem, the user defined constraints, and solutions to variables. The report that the system generates is also shown to the user. The user clicks the “Start a new problem” button if he wants to solve a new media selection problem.

Problem Form

Figure 12: Problem Form

In this form, the user selects the basic information about its problem: The subcategory of the advertisement, the available budget that will be used as constraint and the media types that will be considered in this problem. At the top of the page, instructions appear for the user. In this page, all the sections are required, so if the user fails to provide any, warnings appear. The user has to choose at least two media types.

Figure 13: Error messages on Problem Form

Measurement Form

20

Page 21: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Figure 14: Measurement Page

In the Measurement Form, the user chooses the unit of measurement for each media type that he considers in the current problem. In the database, cost information for both units, i.e duration or col/cm, and number of ads, i.e. number of TV spots or number of Newspaper ads, exists. The user should provide this information for calculation purposes. If the user does not specify a unit of measurement for a media type, it will be considered as number of ads by default. This information is given to the user in the instruction panel. The user can cancel the problem by clicking the “Cancel Problem” link button, or logout.

Constraints Form

Figure 15: Constraint Page

21

Page 22: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

The Constraints Form is for the user to define his constraints. The user can define either TL or Unit constraint and has to choose the type from the Choose Type combo box. If the type is TL, it means the user is defining a cost constraint and will define the righthandside of equation in TL. If the constraint is of type cost, all the variables can be added to the lefthandside of equation because they will be considered in terms of cost and the calculation will be made accordingly. However, is the constraint type is selected as “Unit”, only the variables that have the same unit of measurement can be added together.

After selecting the type of constraint, the user should select the variable type and then click add item in order to add the variable to the equation. Then he should select the sign(<,<=,>,>=, =) and define the righthandside of equation in terms of TL or Units, according to his preference of type. When the user clicks ADD button, the constraint is added to the problem and appears in the below grid view.

Figure 16: Constraint Page

The user can go back and change his preferences. Or the user can cancel the problem by clicking the “Cancel Problem” link button. Or the users can simply logout. When he clicks the Submit button, the problem is submitted and the solution form appears.

Solution Form

22

Page 23: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Figure 17: Solution Page

Figure 18: Report Page

The solution form is the last form that appears to the user. It shows the solution and the report in a tab view. The user can save the problem to his account by clicking the save solution button. He should provide a specific name to his solution in order to be able to refer it later on. After the user saves the solution, he won’t be able to go back and change preferences. He can click the “See My Past Data” button to return the start page. Or he can logout.

23

Page 24: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Figure 19: Save Message

During design of graphical user interface; it is very important to pay attention to straightforwardness, clarity, user friendliness and consistency points. Because of the fact that an interface is a communication between the users and the application; it is possible to say that functionality of the application is related to design of user interfaces.

CLARITY

Clear instructions at the top of each spreadsheet and each form

We have specified the functionalities of user interfaces by giving clear instructions. Thus system users can understand which purpose interface is used for and how system is used. Instructions direct users to be able to enter variables, click buttons and so on. Users can use the decision support system confidently and effectively.

Buttons are clearly separated into navigation and calculation groups

User can return to the back to be able to change his/her preferences by clicking “Back” button . Flexibility is very important point that influences system usage of users because users want to navigate among screens to be able change his decision or correct the variables maybe.In addition ; buttons should be placed on proper areas depending on their functionalities. For example ; “ADD” button and “Back” button should be seperated clearly in order to clarify button functionalities.

Label controls clearly so that their functionality is understood

24

Page 25: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Labels enable users to enter correct inputs to the system. Of course; correct output depends on correct and logical inputs entered by the users. Therefore; effectiveness and correctness of the system are related to entered variables. Users prefer to make use of label explanations in order not to make mistake. User should be aware of what they will enter to the system.

CONSISTENCY

Consistency is important in helping the user move quickly through the user interface. Thus the user thinks that it is an easy-to-use interface.

Keep sheet titles and instructions in the same location

As you can see; sheet titles and instructions are kept at the top of each form. Each form has a title placed at the top left. Thus users can see which form is used in the system such as system constraints, login, and output and so on. That is, users can follow the order/level of the system when they continue to use the system.

Keep navigational buttons in the same location per sheet

We have paid attention to location of buttons on the interfaces. Users should be familiar with location of navigation buttons on the form to be able move quickly among the forms. For example we have placed “Back” button and “Add Constraints” button in the same location per sheet. That is; we have put the buttons together and consistent in shape, color. Also; grouped textboxes should be of the same size and therefore we have designed all textboxes by taking size and location into account.

We have designed all buttons by taking size and shape into account. We have selected same color for buttons on the interface. If necessary; we have used combo box in order to facilitate user inputs, reduce

memorization requirements of users and also reduce possibility of errors. For example user can select a sub category easily and quickly and users will not be confused about what sub category is and how subcategory is written correctly.

We have used option buttons instead of checkboxes in order to reduce errors related to unit of measurement. In the following interface; if we use checkbox for units; user can select two units of measurement for any media channel and then system will not give an optimum solution properly. Because user is expected to select only one of unit of measurement.

Error messages and default values

25

Page 26: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

In addition; we have aimed to reduce input-related errors in our system. When system user enters any incorrect input to the system; error messages warn the user to enter correct inputs to the system. Thus users will not be confused about what they should do. Also default values direct the users not to make mistakes related to input values. Thus users can use the system quickly and properly. For example we have used default value for budget field on the interface. In addition, when users select two different unit of measurement for any media channel system warns the user about inconsistency of units of measurement.

System Outputs

Using LP, the system will give the user the optimal solution for his advertising planning. The decision variables will be given as the number of ads (for outdoor and magazine supplements), total durations (for TV and radio), total col/cm (for papers and paper supplements) and total number of pages (for magazine). Then, a pie chart will be generated showing the percentages: considering the solution, what percentage is given to a specific media.

Most importantly, the system will output the audience exposure, which is maximized with the optimal solution. The information about how many people will be exposed to the user company’s ads if they use this solution will be given.

The system will also give the budget utilization, it will show whether the budget is fully utilized or not.

Finally, the system will give a report about sensitivity analysis of the solved problem. Therefore, the user will be able to see how a minor change can affects his solution and what if he changes his constraints or the values of the constraints. Thanks to this sensitivity analysis report he will be able to evaluate other alternatives and see how the solution differs according to his minor different decisions. Also the user can reach the limits report of the excel solver from the system.

26

Page 27: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Figure 20: Sensitivity Report

V. ASSESSMENT At the beginning, we listed several ideas for our DSS project subject and then we decided to design and develop a decision support system for media planning in insurance industry. We determined the aim of the project. Then, we made literature survey about media planning and linear programming before building the system.We decided to use linear programming (LP) model for our project.

We have assigned each group member to specific activities since beginning of the project. We have realized that each of us has more capacity than others related to some topics and thus we could perform appropriate tasks effectively and properly. In our group, togetherness and collaboration has increased effective and errorless completion of our decision support system. More importantly , we have planned what we should do , when we should complete , who can perform which tasks in the most efficient and effective way. Therefore we can say that planning enables the group members to perform their tasks sucessfully.Of course; we have taken previous projects and other implemented similar decision support systems into account. As a group ; we have given importance to thoughts and creativity of each member in order to reach common idea or structure related to important project parts such as project topic , formulation , interfaces , etc. Communication among the group members has played an important role in terms of creating logical and proper system. As a result ; it is clear to notice importance of planning of project activities ,

27

Page 28: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

interactivity between group members , and responsibility of each member throughout project implementation.

There is no doubt that developing the project for DSS is difficult, but we overcame it as studying effectively because we want to point out that we are a good team. We have organized meetings and allocated the tasks. We have almost totally kept up with the master plan that we have scheduled. Each team member has contributed to the project’s process and tasks as much as the others. We can say that our team power was very high and we have managed it so far thanks to our team power and communication. These are all our strengths. If we had another project, we would act almost same as this. You can see the details of our master plan:

Table 1:Master Plan

Master Plan

Project Code: 7Project Title: A DSS For Media Planning In Insurance AdvertisingTeam Members: Beria Merve Dokumacı, Duygu Kayğısız, Özlem Öncü, Melis Yakan

Phase Planned Actual Complete % ProblemsStart Finish Start Finish

Team Formation 7 Oct 100% NoneProject Proposal 12 Oct 16 Oct 12 Oct 17 Oct 100% NonePresentation 14 Oct 16 Oct 17 Oct 17-19 Oct 100% NoneLiterature Review (Library, Web, former studies) 10 Oct 31 Oct 10 Oct 31 Oct 100% NoneInterviews with experts, decision makers in the related area 20 Oct 10 Nov 20 Oct 11 Nov %100 NoneDevelopment of the model 25 Oct 15 Nov 30 Oct 15 Nov %100 NoneMidreport 15 Nov 20 Nov 15 Nov 21 Nov %100 NonePresentation 19 Nov 20 Nov 19 Nov 21-23 Nov %100 NoneData Collection and Organization 01 Nov 30 Nov 01 Nov 19 Nov %100 NoneCoding interfaces 15 Nov 20 Dec 15 Nov 20 Dec %100 NoneValidation (Optional) 10 Dec 24 Dec 10 Dec 24 Dec %100 NoneFinal Report 17 Dec 25 Dec 17 Dec 26-Dec %100 NonePresentation 22 Dec 25 Dec 22 Dec 26-28 Dec %100 None

28

Page 29: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

VI. CONCLUSIONNowadays, companies need a system that simplifies to make their decisions. Finding the right media tool is a really hard process for companies. Therefore, we prepared a system that works automatically to find the most suitable tool for media planning.To make our system more efficient LP (Linear Programming) that is one of the most popular models is used to obtain a right decision. According to our project plan, we completed all tasks and these are;

Project Proposal (Decision Environment, Mission and Scope of The Project, Methodology)

Mid Report (Literature Review, Development of The Model and Algorithm, User Interface, Formulation, etc.)

Final Report (Coding and Testing)

After the presentation of the mid report, we followed same master plan that is stated earlier. In final report, we coded our interfaces and tested this program with real data and we know that our system works as a real LP model. We strongly believe that the system provide appropriate tools for companies with percentages. There is no doubt that this project enables more experience for team members in terms of working collaboratively and effectively.

29

Page 30: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

REFERENCES1. Brown, D.B., and Warshaw, M.R., (1965), “Media Selection by Linear

Programming”, Journal of Marketing Research, Vol: 2, No: 1, pp. 83-88.2. Brown, D.B., (1967), “A Practical Procedure for Media Selection”, Journal of

Marketing Research, Vol: 4, No: 3, pp. 262-269.3. Piersma, N., Kapsenberg, S., Kloprogge, P. and Wagelmans, A.P.M., (1998),

“Media Planning by Optimizing Contact Frequencies”, Econometric Institute Report EI 9856/A, pp. 1-20.

4. Wiedey, G. and Zimmermann, H. J., (1978), “Media Selection and Fuzzy Linear Programming”, The Journal of the Operational Research Society, Vol: 29, No: 11, pp.1071-1084.

5. Gensch, D. H., (1968), “Models in Advertising Media Selection”, Journal of Marketing Research, Vol: 5, No: 4, pp. 414-424.

6. Stasch, S. F., (1967), “Linear Programming and Media Selection: A Comment”, Journal of Marketing Research, Vol: 4, No: 2, pp. 205-207.

7. Little, J. and Lodish, L. (1969), "A Media Planning Calculus", Journal of Operations Research, Vol: 17, No: 1, pp. 1-35.

8. Jain, A. K., (1974), "A Quantitative Approach To Media Planning” FPM Thesis, Indian Institute of Management Ahmedabad, Ahmedabad, India.

9. Dorfman, R., and Steiner, O.P., (1954), “Optimal Advertising and Optimal Quality”, American Economic Review, No: 44 , pp.826–836.

10. Montgomery, D.B., Weinberg, C.B.,(1973), “Modeling Marketing Phenomena: A Managerial Perspective”, Journal of Contemporary Business, Autumn, pp. 17–43.

11. Engel, J.F., Warshaw, M.R., (1964), “Allocating Advertising Dollars by Linear Programming”, Journal of Advertising Research, Vol: 4, pp.42–48.

12. Little, J. and Lodish, L.,(1969), "A media plan- ning calculus," Operations Research, Vol:17, No:1, pp. 1-35.

13. Charnes, A.,Cooper, W.W., Devoe, J. K., Learner, D. B., and Reinecke,W.,(1968), "A goal programming model for media planning," Management Science, Vol: 14, No:8, pp. B-423-B-430.

14. Schilling, D.A., McGarity, A., and Revelle, C., (1982), "Hidden attributes and the display of information in multi-objective analysis," Management Science, Vol: 28, No: 3, pp. 236-242.

30

Page 31: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Appendix

Form Start

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;

namespace LpSolve{ public partial class FormStart : Form { DataClasses1DataContext dataCon = new DataClasses1DataContext(); int _userid;

public FormStart(int userid) { InitializeComponent(); _userid = userid; }

private void FormStart_Load(object sender, EventArgs e) { var prevProblems = from problem in dataCon.Problems where problem.UserID == _userid select problem;

foreach (var prob in prevProblems) { comboBox1.Items.Add(prob.ProblemID); } }

private void button1_Click(object sender, EventArgs e) { String selectedProb = comboBox1.SelectedItem.ToString();

var curProb = from problem in dataCon.Problems where problem.UserID == _userid && problem.ProblemID == (int)selectedProb select problem;

var myProb = curProb.First(); richTextBox1.Text += "ProblemID:" + myProb.ProblemID; richTextBox1.Text += "\nDecision Variables" + myProb.MediaTypes; richTextBox1.Text += "\nBudget" + myProb.Budget; }

private void btnStart_Click(object sender, EventArgs e) {

31

Page 32: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

this.Visible = false; FormProblem probForm = new FormProblem(); probForm.ShowDialog(); probForm.Activate(); } }}

Form Login

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Web;

namespace LpSolve{ public partial class FormLogin : Form { DataClasses1DataContext dataCon = new DataClasses1DataContext();

public FormLogin() { InitializeComponent(); }

public void clearTextBox() { txtCompName.Clear(); txtPassword.Clear(); txtUserName.Clear(); txtEmail.Clear(); }

private void bttnSubmit_Click(object sender, EventArgs e) { /* Check the accuracy of the information provided by the applicant. * Check whether there exists any other user with the same username, email, or company name. * If there is a problem, give information to the applicant. */ lblLogonInfo.Text = ""; var allUsers = from user in dataCon.Users select user;

foreach (var user in allUsers)

32

Page 33: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

{ if (user.Username == txtUserName.Text) lblLogonInfo.Text += "\nThere is an account with this user name."; if (user.CompanyName == txtCompName.Text) lblLogonInfo.Text += "\nThis company has already registered before."; if (user.Email == txtEmail.Text) lblLogonInfo.Text += "\nThis email has already registered before."; }

if (txtEmail.Text == "" || txtCompName.Text == "" || txtPassword.Text == "" || txtUserName.Text == "") lblLogonInfo.Text = "*All fields are required.";

/* If there is no problem with the application, register the user to the database. */ else { User newUser = new User();

newUser.CompanyName = txtCompName.Text; newUser.Email = txtEmail.Text; newUser.Password = txtPassword.Text; newUser.Username = txtUserName.Text;

dataCon.Users.InsertOnSubmit(newUser); dataCon.SubmitChanges();

lblLogonInfo.Text = "Thank you. You can login now and start to use the program.";

clearTextBox(); } }

private void bttnLogin_Click(object sender, EventArgs e) { String userName = txtUserLogin.Text; String password = txtPasswLogin.Text;

var qCheck = from user in dataCon.Users select user;

/* * Check whether the username and password matches. If not, give information to the user. * If the information are accurate, navigate to the next form. */

foreach (var user in qCheck) {

33

Page 34: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

if (user.Username == userName && user.Password == password) { lblWrong.Text = ""; this.Visible = false; FormStart startForm = new FormStart(user.UserID); startForm.ShowDialog(); startForm.Activate(); } else lblWrong.Text = "Wrong username or password."; } } }}

Form Constraints

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Microsoft.SolverFoundation.Services;using Microsoft.SolverFoundation.Common;using Microsoft.SolverFoundation.Solvers;

namespace LpSolve{ public partial class FormConstraints : Form { DataClasses1DataContext dataCon = new DataClasses1DataContext(); public int counter = 0; int _problemid; Form _prevForm; String[] mediaTypes; String constraintType = ""; String _compName;

public FormConstraints(int problemid, Form form, String compName) { InitializeComponent(); _problemid = problemid; _prevForm = form; _compName = compName; var currentProb = from problems in dataCon.Problems where problems.ProblemID == _problemid select problems;

mediaTypes = currentProb.First().MediaTypes.Split(','); cmbVarTl.Items.Clear();

34

Page 35: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

/* * The combo box that will allow the user to choose the variable subject to constraint, should only include the media types specifically selected for the current problem. */ foreach (var media in mediaTypes) { cmbVarTl.Items.Add(media); }

lblWelcome.Text = "Welcome " + _compName;

var constraints = from cons in dataCon.Constraints where cons.ProblemID == _problemid select new { cons._ConstraintLHS, cons._ConstraintSIGN, cons._ConstraintRHS };

// Bind the data to a dataGridView to show the previously added constraints if (constraints.Count() > 0) { dataGridView1.DataSource = constraints;

} }

private void solveProblem() { /* * Create a solver and model using the Microsoft Solver Foundation Services. */ var solver = SolverContext.GetContext(); solver.ClearModel(); var model = solver.CreateModel(); //SimplexSolverParams solverParams = new SimplexSolverParams(); //solverParams.GetSensitivityReport = true; //solverParams.GetInfeasibilityReport = true; //solver.Solve(solverParams);

// Select the current problem to refer later in the model var myProblem = from problem in dataCon.Problems where problem.ProblemID == _problemid select problem;

// Select all the variables related to the current problem var variables = from variable in dataCon.Variables where variable.ProblemID == _problemid select variable;

// Create a sumtermbuilder for the objective function, using the lenght of variables var objective = new SumTermBuilder(variables.Count());

35

Page 36: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

// For each variable create a Decision that is integer nonnegative. // The name for decision is defined as the name of the variable var decisions = variables.Select(it => new Decision(Domain.IntegerNonnegative, it._Variable)); model.AddDecisions(decisions.ToArray());

foreach (var variable in variables) { // Get the exposure rates for the specific variable var exposures = from exposure in dataCon.Exposures where exposure.MediaType == variable._Variable select exposure;

// Get all information related to this variable var myVar = from vars in dataCon.Variables where vars._Variable == variable._Variable && vars.ProblemID == _problemid select vars;

/* Get the cost information related to the variable * The components of objective function normally formulated as the product of the variable and the exposure rates. * When the unit of measurement is based on units, the variable should be divided by the average unit, because the exposure rates are based on number of spots. */ var myCost = from cost in dataCon.CostDatas where cost.MediaType == variable._Variable && cost.CategoryID == myProblem.First().SubCategory select cost;

var variableDecision = model.Decisions.First(it => it.Name == variable._Variable);

if (myVar.First().UnitOfMeasurement == "unitCost") { objective.Add(variableDecision / Convert.ToInt32(myCost.First().AverageUnit) * exposures.First().ExposureRate * Convert.ToDouble(exposures.First().ERforInsurance) / 100); } else if (myVar.First().UnitOfMeasurement == "average") { objective.Add(variableDecision * exposures.First().ExposureRate * Convert.ToDouble(exposures.First().ERforInsurance) / 100); } }

// Add the goal to the model model.AddGoal("MaximizeExposure", GoalKind.Maximize, objective.ToTerm());

// Create variable components for budget constraint

36

Page 37: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

var budgetComponents = new SumTermBuilder(variables.Count());

foreach (var variable in variables) { var costs = from cost in dataCon.CostDatas where cost.MediaType == variable._Variable && myProblem.First().SubCategory == cost.CategoryID select cost;

var variableDecision = model.Decisions.First(it => it.Name == variable._Variable);

/* * Add different budget components for different units of measurements */ if (variable.UnitOfMeasurement == "unitCost") { budgetComponents.Add(variableDecision * Convert.ToDouble(costs.First().UnitCost)); } else budgetComponents.Add(variableDecision * Convert.ToDouble(costs.First().AverageCostperAd)); }

var budgetConstraint = budgetComponents.ToTerm() <= Convert.ToDouble(myProblem.First().Budget); model.AddConstraint("Budget", budgetConstraint);

/* * For each user defined constraint recorded in the constraint table, create a model constraint. * Consider the constraint's type, item or cost, for calculation purposes. * If the constraint type is item * add only the variable itself. * If the constraint type is cost * obtain the relevant cost and add the product of variable and cost. */

var constraints = from constraint in dataCon.Constraints where constraint.ProblemID == myProblem.First().ProblemID select constraint; int c = 0; foreach (var constraint in constraints) { String[] constrLHS = constraint._ConstraintLHS.Split('+'); if (constrLHS.Count() > 1) { var constraintComponents = new SumTermBuilder(constrLHS.Count()); foreach (var cons in constrLHS) {

37

Page 38: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

var constraintDecision = model.Decisions.First(it => it.Name == cons.ToString().Trim()); if (constraint.Type == "item") constraintComponents.Add(constraintDecision); if (constraint.Type == "cost") { var cost = from _cost in dataCon.CostDatas where _cost.MediaType == cons.ToString().Trim() && myProblem.First().SubCategory == _cost.CategoryID select _cost; var var = from variable in dataCon.Variables where variable._Variable == cons.ToString().Trim() && variable.ProblemID == _problemid select variable.UnitOfMeasurement; if (var.First() == "unitCost") { constraintComponents.Add(constraintDecision * Convert.ToDouble(cost.First().UnitCost)); } else { constraintComponents.Add(constraintDecision * Convert.ToDouble(cost.First().AverageCostperAd)); } } } var myConstraint = constraintComponents.ToTerm() <= Convert.ToDouble(constraint._ConstraintRHS); if (constraint._ConstraintSIGN.Equals("<=")) { myConstraint = constraintComponents.ToTerm() <= Convert.ToDouble(constraint._ConstraintRHS); } else if (constraint._ConstraintSIGN.Equals(">=")) { myConstraint = constraintComponents.ToTerm() >= Convert.ToDouble(constraint._ConstraintRHS); } else if (constraint._ConstraintSIGN.Equals("<")) { myConstraint = constraintComponents.ToTerm() < Convert.ToDouble(constraint._ConstraintRHS); } else if (constraint._ConstraintSIGN.Equals(">")) { myConstraint = constraintComponents.ToTerm() > Convert.ToDouble(constraint._ConstraintRHS); } model.AddConstraint("const" + c, myConstraint); c++; } if (constrLHS.Count() == 1) { var constraintDecision = model.Decisions.First(it => it.Name == constrLHS[0].Trim()); model.AddConstraint("const" + c, constraintDecision <= Convert.ToDouble(constraint._ConstraintRHS)); c++; } }

//Solution solution = solver.Solve(new SimplexDirective { GetSensitivity = true }); //LinearReport report = ((LinearReport)solution.GetReport()); //foreach (var constraint in model.Constraints)

38

Page 39: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

//{ // foreach (var dual in report.GetShadowPrices(constraint)) // { // lblWarning.Text += (dual.Key + " = " + dual.Value.ToDouble()); // } //} //lblWarning.Text = ""; //foreach (var variable in variables) //{ // lblWarning.Text += model.Decisions.First(dec => dec.Name == variable._Variable).GetDouble() + " "; // var vars = from var in dataCon.Variables // where var.ProblemID == _problemid && var._Variable == variable._Variable // select var; // vars.First().Solution = model.Decisions.First(dec => dec.Name == variable._Variable).GetDouble(); //} //lblWarning.Text += "\n" + model.Goals.First().ToDouble(); //lblWarning.Text += "\n" + report; this.Visible = false; FormSolution solutionForm = new FormSolution(this, _problemid, solver, model, _compName); solutionForm.ShowDialog(); solutionForm.Activate(); }

private void lnkAddItem1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { // Provide checks for adding items to the lefthandside of the user defined constraints.

// If the user did not specify the constraint type, give a warning and do not add the item. if (constraintType == "") { lblWarning.Text = "Please first specify the type of your constraint."; } // If the constraint type is defined as item, check for the units of measurement // Do not add items that have different units of measurement, it's not appropriate for calculation. // Give warnings else if (constraintType == "item") { var current = from var in dataCon.Variables where var._Variable == cmbVarTl.SelectedItem.ToString() && var.ProblemID == _problemid select var; var old = from var in dataCon.Variables where var._Variable == lblUnitConstr.Text.Trim() && var.ProblemID == _problemid

39

Page 40: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

select var;

if (lblUnitConstr.Text == " ") lblUnitConstr.Text += cmbVarTl.SelectedItem.ToString(); else { old = from var in dataCon.Variables where var._Variable == lblUnitConstr.Text.Split('+').Last().Trim() && var.ProblemID == _problemid select var;

if (current.First().UnitOfMeasurement == old.First().UnitOfMeasurement) lblUnitConstr.Text += "+" + cmbVarTl.SelectedItem.ToString(); else lblWarning.Text = "You cannot add this item because the unit of measurement does not match with the previous item/items."; } } // If the constraint type is not item, it is TL. // For cost constraints, all items can be added. The calculation will be made in terms of cost. else { if (lblUnitConstr.Text == " ") lblUnitConstr.Text += cmbVarTl.SelectedItem.ToString(); else lblUnitConstr.Text += "+" + cmbVarTl.SelectedItem.ToString(); }

cmbVarTl.ResetText(); }

private void btnAdd1_Click(object sender, EventArgs e) { // Add new constraint to the Constraints table.

Constraint newConstraint = new Constraint(); newConstraint.ProblemID = _problemid; newConstraint._ConstraintLHS = lblUnitConstr.Text; newConstraint._ConstraintSIGN = comboBox1.SelectedItem.ToString(); newConstraint._ConstraintRHS = textBox1.Text; dataCon.Constraints.InsertOnSubmit(newConstraint); newConstraint.Type = constraintType; dataCon.SubmitChanges(); lblUnitConstr.Text += " " + comboBox1.SelectedItem.ToString(); lblUnitConstr.Text += " " + textBox1.Text; comboBox1.ResetText(); textBox1.Text = ""; lblUnitConstr.Text = " ";

var constraints = from cons in dataCon.Constraints where cons.ProblemID == _problemid

40

Page 41: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

select new { cons._ConstraintLHS, cons._ConstraintSIGN, cons._ConstraintRHS };

// Bind the data to a dataGridView to show the previously added constraints dataGridView1.DataSource = constraints; cmbType.ResetText(); }

private void btnBack_Click(object sender, EventArgs e) { this.Visible = false; _prevForm.Visible = true; }

private void button2_Click(object sender, EventArgs e) { solveProblem(); }

private void lnkAddItem1_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e) { // Provide checks for adding items to the lefthandside of the user defined constraints.

// If the user did not specify the constraint type, give a warning and do not add the item. if (constraintType == "") { lblWarning.Text = "Please first specify the type of your constraint."; } // If the constraint type is defined as item, check for the units of measurement // Do not add items that have different units of measurement, it's not appropriate for calculation. // Give warnings else if (constraintType == "item") { var current = from var in dataCon.Variables where var._Variable == cmbVarTl.SelectedItem.ToString() && var.ProblemID == _problemid select var; var old = from var in dataCon.Variables where var._Variable == lblUnitConstr.Text.Trim() && var.ProblemID == _problemid select var;

if (lblUnitConstr.Text == " ") lblUnitConstr.Text += cmbVarTl.SelectedItem.ToString(); else { old = from var in dataCon.Variables where var._Variable == lblUnitConstr.Text.Split('+').Last().Trim() && var.ProblemID == _problemid

41

Page 42: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

select var;

if (current.First().UnitOfMeasurement == old.First().UnitOfMeasurement) lblUnitConstr.Text += "+" + cmbVarTl.SelectedItem.ToString(); else lblWarning.Text = "You cannot add this item because the unit of measurement does not match with the previous item/items."; } } // If the constraint type is not item, it is TL. // For cost constraints, all items can be added. The calculation will be made in terms of cost. else { if (lblUnitConstr.Text == " ") lblUnitConstr.Text += cmbVarTl.SelectedItem.ToString(); else lblUnitConstr.Text += "+" + cmbVarTl.SelectedItem.ToString(); }

cmbVarTl.ResetText(); }

private void cmbType_SelectedIndexChanged(object sender, EventArgs e) { if (cmbType.SelectedItem.ToString() == "Unit") constraintType = "item"; if (cmbType.SelectedItem.ToString() == "TL") constraintType = "cost"; }

}}

Form Measurement

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Microsoft.SolverFoundation.Services;

namespace LpSolve{ public partial class FormMeasurement : Form { DataClasses1DataContext dataCon = new DataClasses1DataContext();

private String[] mediaTypes;

42

Page 43: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

Form _prevForm; int _problemid; String _compName;

public FormMeasurement(Form form, int problemid, String companyName) { InitializeComponent(); _prevForm = form; _problemid = problemid; _compName = companyName; showOptions(); lblWelcome.Text = "Welcome " + _compName; }

private void showOptions() { /* * Only the options that are related to media types selected by the user for this specific problem should be enabled for selection. * Get the comma seperated list in an array through the use of split function. */

var query = from problem in dataCon.Problems where problem.ProblemID == _problemid select problem;

mediaTypes = query.First().MediaTypes.Split(','); _problemid = query.First().ProblemID;

for (int i = 0; i < mediaTypes.Length; i++) { if (mediaTypes[i] == "TV") { lblTv.Enabled = true; grpboxTv.Enabled = true; continue; } if (mediaTypes[i] == "Radio") { lblRadio.Enabled = true; grpbxRad.Enabled = true; continue; } if (mediaTypes[i] == "Newspaper") { lblNews.Enabled = true; grpbxNews.Enabled = true; continue; } if (mediaTypes[i] == "Newspaper_Supp") { lblNewsSup.Enabled = true; grpbxNewsSup.Enabled = true; continue; } if (mediaTypes[i] == "Magazine") { lblMag.Enabled = true; grpbxMag.Enabled = true; continue; } if (mediaTypes[i] == "Magazine_Supp") { lblMagSup.Enabled = true; grpbxMagSup.Enabled = true; continue; } if (mediaTypes[i] == "Outdoor") { lblOut.Enabled = true; grpbxOut.Enabled = true; continue; } } }

private void addMeasures() { /* * Foreach mediatype previously selected, record the unit of measurement selected by the user in this form.

43

Page 44: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

* If the unit is checked, record the unit of measurement as "unitCost", otherwise record it as "average". * Create a variable record in variables table for each selected media type. */ var qCheck = from variables in dataCon.Variables where variables.ProblemID == _problemid select variables;

if (qCheck.Count() == 0) { foreach (var media in mediaTypes) { Variable newVariable = new Variable(); newVariable.ProblemID = _problemid; newVariable._Variable = media;

if (media == "TV") { if (rdbtnTvDur.Checked) newVariable.UnitOfMeasurement = "unitCost"; else newVariable.UnitOfMeasurement = "average"; }

else if (media == "Radio") { if (rdbtnRadDur.Checked) newVariable.UnitOfMeasurement = "unitCost"; else newVariable.UnitOfMeasurement = "average"; }

else if (media == "Newspaper") { if (rdbtnNewsCol.Checked) newVariable.UnitOfMeasurement = "unitCost"; else newVariable.UnitOfMeasurement = "average"; }

else if (media == "Newspaper_Supp") { if (rdbtnNewSpCol.Checked) newVariable.UnitOfMeasurement = "unitCost"; else newVariable.UnitOfMeasurement = "average"; }

/* * For media types other than TV, Radio, Newspaper and Newspaper Supplement, record unit of measurment as average by default. */

else newVariable.UnitOfMeasurement = "average";

// Add variable to the table

dataCon.Variables.InsertOnSubmit(newVariable); dataCon.SubmitChanges();

44

Page 45: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

} } else { foreach (var variable in qCheck) { if (variable._Variable == "TV") { if (rdbtnTvDur.Checked) variable.UnitOfMeasurement = "unitCost"; else variable.UnitOfMeasurement = "average"; dataCon.SubmitChanges(); } else if (variable._Variable == "Radio") { if (rdbtnRadDur.Checked) variable.UnitOfMeasurement = "unitCost"; else variable.UnitOfMeasurement = "average"; dataCon.SubmitChanges(); }

else if (variable._Variable == "Newspaper") { if (rdbtnNewsCol.Checked) variable.UnitOfMeasurement = "unitCost"; else variable.UnitOfMeasurement = "average"; dataCon.SubmitChanges(); }

else if (variable._Variable == "Newspaper_Supp") { if (rdbtnNewSpCol.Checked) variable.UnitOfMeasurement = "unitCost"; else variable.UnitOfMeasurement = "average"; dataCon.SubmitChanges(); } } } }

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { FormLogin loginForm = new FormLogin(); this.Visible = false; loginForm.ShowDialog(); loginForm.Activate(); }

private void btnBack_Click(object sender, EventArgs e) { //Navigate to the previous form this.Visible = false; _prevForm.Visible = true; }

private void btnAddCons_Click(object sender, EventArgs e)

45

Page 46: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

{ // Save the records in this table in the addMeasures method and navigate to the next form addMeasures(); this.Visible = false; FormConstraints constraintsForm = new FormConstraints(_problemid, this, _compName); constraintsForm.ShowDialog(); constraintsForm.Activate(); } }}

Form Problem

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;

namespace LpSolve{ public partial class FormProblem : Form { DataClasses1DataContext dataCon = new DataClasses1DataContext(); private int _userid = 0; String companyName;

public FormProblem() { InitializeComponent(); }

public FormProblem(int userid) { InitializeComponent(); _userid = userid; var userName = from user in dataCon.Users where user.UserID == _userid select user; companyName = userName.First().CompanyName; lblWelcome.Text = "Welcome " + companyName; }

private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { FormLogin loginForm = new FormLogin(); this.Visible = false; loginForm.ShowDialog(); loginForm.Activate(); }

46

Page 47: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

private void button1_Click(object sender, EventArgs e) { /* * The user has to check at least 2 media types. Provide a check for this. * Add the checked media types to a string seperated with commas, to keep records of the preferred media types for the current problem created. * The user should provide information for all sections. Provide a check. */

String mediaTypes = ""; int counter = 0; if (chckTv.Checked) { mediaTypes += "TV"; counter++; } if (chckRadio.Checked) { if (counter == 0) mediaTypes += "Radio"; else mediaTypes += ",Radio"; counter++; } if (chckNews.Checked) { if (counter == 0) mediaTypes += "Newspaper"; else mediaTypes += ",Newspaper"; counter++; } if (chckNewsSup.Checked) { if (counter == 0) mediaTypes += "Newspaper_Supp"; else mediaTypes += ",Newspaper_Supp"; counter++; } if (chckMagn.Checked) { if (counter == 0) mediaTypes += "Magazine"; else mediaTypes += ",Magazine"; counter++; } if (chckMagnSup.Checked) { if (counter == 0) mediaTypes += "Magazine_Supp"; else mediaTypes += ",Magazine_Supp"; counter++; } if (chckOutdoor.Checked) { if (counter == 0) mediaTypes += "Outdoor"; else mediaTypes += ",Outdoor"; counter++; }

if (txtBudget.Text == "" || cmbCategory.SelectedItem.ToString() == "" || counter == 0) { lblReq.Text = "You should provide appropriate information for all 3 sections above."; }

else if (counter < 2) { lblReq.Text = ""; lblChoose.Font = new Font(lblChoose.Font, FontStyle.Bold); lblChoose.ForeColor = Color.DarkRed; }

/* * If all the information is provided accurately, create a new problem record in Problem table. * Add subcategory, budget, mediatypes to this problem. * Navigate to the next form. */

else { int categoryid = cmbCategory.SelectedIndex; decimal budget = Convert.ToDecimal(txtBudget.Text); Problem newProblem = new Problem(); newProblem.SubCategory = categoryid; newProblem.UserID = _userid; newProblem.MediaTypes = mediaTypes;

47

Page 48: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

newProblem.Budget = budget;

dataCon.Problems.InsertOnSubmit(newProblem); dataCon.SubmitChanges();

this.Visible = false; FormMeasurement measurementPage = new FormMeasurement(this, newProblem.ProblemID, companyName); measurementPage.ShowDialog(); measurementPage.Activate(); } } }}

Form Solution

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Microsoft.SolverFoundation.Solvers;using Microsoft.SolverFoundation.Common;using Microsoft.SolverFoundation.Services;

namespace LpSolve{ public partial class FormSolution : Form { DataClasses1DataContext dataCon = new DataClasses1DataContext(); private int _problemid; Form _prevForm; SolverContext _solver; Model _model; Solution solution;

public FormSolution(Form form, int problemid, SolverContext solver, Model model, String compName) { InitializeComponent(); _prevForm = form; _problemid = problemid; _solver = solver; _model = model; solverSolution(); lblWelcome.Text = "Welcome " + compName; }

private void solverSolution() {

solution = _solver.Solve(new SimplexDirective { GetSensitivity = true });

48

Page 49: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

var variables = from variable in dataCon.Variables where variable.ProblemID == _problemid select variable;

foreach (var variable in variables) { if (variable._Variable == "TV") txtTv.Text = _model.Decisions.First(dec => dec.Name == variable._Variable).GetDouble().ToString(); if (variable._Variable == "Radio") txtRadio.Text = _model.Decisions.First(dec => dec.Name == variable._Variable).GetDouble().ToString(); if (variable._Variable == "Newspaper") txtNews.Text = _model.Decisions.First(dec => dec.Name == variable._Variable).GetDouble().ToString(); if (variable._Variable == "Newspaper_Supp") txtNewsSup.Text = _model.Decisions.First(dec => dec.Name == variable._Variable).GetDouble().ToString(); if (variable._Variable == "Magazine") txtMag.Text = _model.Decisions.First(dec => dec.Name == variable._Variable).GetDouble().ToString(); if (variable._Variable == "Magazine_Supp") txtMagSup.Text = _model.Decisions.First(dec => dec.Name == variable._Variable).GetDouble().ToString(); if (variable._Variable == "Outdoor") txtOut.Text = _model.Decisions.First(dec => dec.Name == variable._Variable).GetDouble().ToString();

var vars = from var in dataCon.Variables where var.ProblemID == _problemid && var._Variable == variable._Variable select var;

vars.First().Solution = _model.Decisions.First(dec => dec.Name == variable._Variable).GetDouble().ToString(); dataCon.SubmitChanges(); } txtExposure.Text = _model.Goals.First().ToDouble().ToString();

var costs = from cost in dataCon.CostDatas select cost;

Report report = solution.GetReport(); richTextBox1.Text += report;

LinearReport lpReport = report as LinearReport; //richTextBox2.Text += lpReport; ILinearSolverSensitivityReport sensRep = report as ILinearSolverSensitivityReport; richTextBox2.Text += sensRep; foreach (var constraint in _model.Constraints) { foreach (var dual in lpReport.GetShadowPrices(constraint)) {

49

Page 50: In today’s world advertising has become very important for ...misprivate.boun.edu.tr/.../mis463/PreviousProjects/... · Web viewPROJECT FINAL REPORT . A DSS FOR MEDIA PLANNING

//if(constraint.Name == "Budget") txtBudget.Text = (dual.Key + " = " + dual.Value.ToDouble()); richTextBox2.Text += (dual.Key + " = " + dual.Value.ToDouble()); } } object ShadowPrices = lpReport.GetAllShadowPrices(); object ConstraintBoundsSensitivity = lpReport.GetAllConstraintBoundsSensitivity();

foreach (KeyValuePair<string, Rational> o in lpReport.GetAllShadowPrices()) richTextBox2.Text += ("Key: " + o.Key + ", Value: " + o.Value.ToDouble().ToString()); foreach (KeyValuePair<string, LinearSolverSensitivityRange> o in lpReport.GetAllConstraintBoundsSensitivity()) richTextBox2.Text += ("Key: " + o.Key + ", Current: " + o.Value.Current.ToDouble().ToString() + ", Value.Lower: " + o.Value.Lower.ToDouble().ToString() + ", Value.Upper: " + o.Value.Upper.ToDouble().ToString()); //object[] indexes = new object[0]; //richTextBox1.Text += ("GetGoalCoefficientSensitivity:"); //foreach (Decision d in solution.Decisions) //{ // LinearSolverSensitivityRange? o = lpReport.GetGoalCoefficientSensitivity(d, indexes); // richTextBox2.Text += ("Name: " + d.Name + ", Current: " + o.Value.Current.ToDouble().ToString() + ", Lower: " + o.Value.Lower.ToDouble().ToString() + ", Upper: " + o.Value.Upper.ToDouble().ToString()); //} }

private void btnChangePref_Click(object sender, EventArgs e) { this.Visible = false; _prevForm.Visible = true; }

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { FormLogin loginForm = new FormLogin(); this.Visible = false; loginForm.ShowDialog(); loginForm.Activate(); } }}

50