Skip to content

CurveCompetitivenessModel

Bumsuk Seo edited this page Sep 28, 2020 · 15 revisions

Overview

A more complex model of competitiveness allowing the applications of functions. Note that the function is applied to the per-cell residual demand before the result is multiplied by the cell's production!

Code Example

<competition class="org.volante.abm.example.CurveCompetitivenessModel">
    <curve service="Meat">
        <curve class="com.moseph.modelutils.curve.LinearFunction" a="3.0" b="3.0" />
    </curve>
    <curve service="Cereal">
        <curve class="com.moseph.modelutils.curve.LinearFunction" a="3.0" b="3.0" />
    </curve>
    <curve service="Recreation">
        <curve class="com.moseph.modelutils.curve.ExponentialFunction" A="0.0" B="1.0" C="1.0"/>
    </curve>
</competition>

Parameters

Name Type Default Description
removeCurrentLevel boolean false If set to true, then the current supply will be added back to the residual demand, so competitiveness is calculated as if the cell is currently empty.
removeNegative boolean false If set to true, all negative demand (i.e. oversupply) is removed from the dot product.
curve Curve - A set of curves which are loaded in. The attribute "service" is required as key.
linearCSV String null If this points to a csv file with the columns serviceColumn, interceptColumn, slopeColumn this will be loaded as a set of linear functions with the given parameters.
serviceColumn String Service Service the row is applied to
interceptColumn String Intercept IIntercept of linear function
slopeColumn String Slope Slope of linear function

Curves

Defined in https://github.com/CRAFTY-ABM/modelling-utilities/tree/master/src/com/moseph/modelutils/curve

Parameter Default Description
A 1 Asymptote
H 1 x-value when 0.5a is reached
P 2 Controls steepness (see figure). Note that even numbers result in values all >= 0

SigmoidFunction

<curve service="Cereal">
    <curve class="com.moseph.modelutils.curve.SigmoidFunction" A="1.0" H="1.0" P="3"/>
</curve>
Parameter Default Description
K 0 The ending value
A 0 The starting value (defaults to 0)
Q 0.5
B Growth rate
M Time of maximum growth
v 0.5 Together with Q shifts the asymptote, but don't have good guidance at the moment.
Clone this wiki locally