Skip to content

Instantly share code, notes, and snippets.

Last active May 28, 2024 10:28
Show Gist options
  • Save calaveraInfo/7e70a1a5201c43f36488344ecf2e0071 to your computer and use it in GitHub Desktop.
Save calaveraInfo/7e70a1a5201c43f36488344ecf2e0071 to your computer and use it in GitHub Desktop.
Analysis of business proposal strategies in situation of nonlinear relation between price and quality


Since the process of public procurement has to be transaparent, assessment of proposals is in most cases clearly defined beforehand, strictly evaluated and it is often complicated mathematical combination of multiple factors like price and quality. This opens a room for speculation about different strategies for winning a contract, for example low price and low quality vs higher price and higher quality. This is an example of analysis of such possibilities using mathematical software Octave.

I'm keeping these notes mainly as personal notes on how to use Octave.


Alternatively it is possible to use free online tool Wolfram Alpha. For example full solution can be drawn by command plot (x^2)/(48*y - x) from y = 1000000 to 30000000 x = 1000000 to 30000000.


sudo apt-get install octave


octave analysis.m
# full solution (not practical)
tx = linspace(our_lowest_offer, our_highest_offer);
ta = linspace(others_lowest_offer, others_highest_offer);
[xx, aa] = meshgrid(tx, ta);
tz = quality_point_price(xx, aa);
mesh(tx, ta, tz);
xlabel("Our price");
ylabel("Lowest offered price");
zlabel("Price of one quality point");
zlim([0, 1000000]);
# simplified calculation of important bounds based on practical assumptions
# max quality point price if our offer is the lowest offer
min = [];
# max quality point price if our offer is not more than 10% higher
# than the lowest offer
max = [];
# lowest offered price - xaxis
xaxis = others_lowest_offer:100000:others_highest_offer;
for current = xaxis
min(end+1) = quality_point_price(current, current);
max(end+1) = quality_point_price(current, current*1.1);
plot(xaxis, min, '-', xaxis, max, '-')
# pause so that the plot won't close immediately when this script is invoked from command line
# a: lowest price offered
# x: our price
function retval = price_assessment(a, x)
retval = (45*a)/x;
# x: number of fullfiled optional requirements
function retval = quality_assessment(x)
retval = (30*x)/32;
# this formula is derived from assessment rules by hand aside
# a: lowest price offered
# x: our price
# retval: price that could be added to the project
# in case of increasing number of fullfiled requirements by one
# such that the overal assessment remains the same.
# In other words maximum price of increasing an optional quality assessment
# by additional paid work so that the overal
# assessment is better or at least same
function retval = quality_point_price(a, x)
retval = (x.^2)./(48*a - x);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment