Learn R Programming

WordOfMouth (version 1.2.0)

computeOptimalPrice: Computes the profit-maximizing price

Description

Computes the profit-maximizing for a given Word-of-Mouth campaign.

Usage

computeOptimalPrice(campaign)

Value

Profit-maximizing price in [0; 1] where 0 is the lowest possible and 1 is the highest possible price.

Arguments

campaign

Word-of-Mouth campaign as instance of class WoMCampaign.

See Also

computeDemand computeProfit computeConsumerSurplus

Examples

Run this code

network <- new("WoMNetwork", size = 1000, avgConnections = 5)
campaign <- new("WoMCampaign", network = network, seedingSize = 10, forwardProbability = 0.2)
price <- computeOptimalPrice(campaign)
profit <- computeProfit(campaign, price)
print(price)
print(profit)

Run the code above in your browser using DataLab