113 | | |
| 113 | == Create a profile |
| 114 | A profile (a.k.a utilityspace) looks like this |
| 115 | {{{ |
| 116 | { |
| 117 | "LinearAdditiveUtilitySpace": { |
| 118 | "issueUtilities": { |
| 119 | "salary": { |
| 120 | "discreteutils": { |
| 121 | "valueUtilities": { |
| 122 | "2000": 0, |
| 123 | "2500": 0.25, |
| 124 | "3000": 0.3, |
| 125 | "3500": 0.75, |
| 126 | "4000": 1.0 |
| 127 | } |
| 128 | } |
| 129 | }, |
| 130 | "fte": { |
| 131 | "discreteutils": { |
| 132 | "valueUtilities": { |
| 133 | "0.6": 0.25, |
| 134 | "0.8": 0.5, |
| 135 | "1.0": 0.75 |
| 136 | } |
| 137 | } |
| 138 | }, |
| 139 | "work from home": { |
| 140 | ..... |
| 141 | } |
| 142 | } |
| 143 | } |
| 144 | }, |
| 145 | "issueWeights": { |
| 146 | "salary": 0.24, |
| 147 | "fte": 0.32, |
| 148 | "work from home": 0.18, |
| 149 | "lease car": 0.06, |
| 150 | "permanent contract": 0.16, |
| 151 | "career development opportunities": 0.04 |
| 152 | }, |
| 153 | "domain": { |
| 154 | "name": "jobs", ..... |
| 155 | }, |
| 156 | "name": "jobs1" |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | }}} |
| 161 | |
| 162 | The domain description is identical to above, and we removed some issueValues. |
| 163 | This is an "LinearAdditiveYtilitySpace", other utilityspaces would have different contents. It contains a number of components: |
| 164 | * issueUtilities. Here, each issue value from the domain gets a utility assigned. The two types of issue values each having their matching utility function: |
| 165 | |
| 166 | ||= Issue Value class =||= Utility class =||= json serialization example =|| |
| 167 | {{{#!td |
| 168 | DiscreteValue |
| 169 | }}} |
| 170 | {{{#!td |
| 171 | DiscreteValueSetUtilities |
| 172 | }}} |
| 173 | {{{#!td |
| 174 | "discreteutils": { |
| 175 | "valueUtilities": { |
| 176 | "2000": 0, |
| 177 | "2500": 0.25, |
| 178 | "3000": 0.3, |
| 179 | "3500": 0.75, |
| 180 | "4000": 1.0 |
| 181 | } |
| 182 | } |
| 183 | }}} |
| 184 | |---------------------------- |
| 185 | {{{#!td |
| 186 | NumberValue |
| 187 | }}} |
| 188 | {{{#!td |
| 189 | NumberValueSetUtilities |
| 190 | }}} |
| 191 | {{{#!td |
| 192 | {\"numberutils\":{\"lowValue\":12,\"lowUtility\":0.3,\"highValue\":18,\"highUtility\":0.6}} |
| 193 | }}} |
| 194 | |---------------------------- |