Changes between Version 233 and Version 234 of WikiStart


Ignore:
Timestamp:
08/19/19 14:51:22 (5 years ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v233 v234  
    5959
    6060== issuevalue
    61 This module contains the basic objects that make up a bid: issues, values, domains, and bids. The issues are just String objects. There are 2 types of values: numeric and discrete. DiscreteValueSet contains the list of DiscreteValue which is a basically a possible (string) values for the issue. NumberValueSet contains a Range which is a set of numbers defined by the minimum, maximum and stepsize (upwards from the minimum). A Domain contains a map, with each key the issue (string) and the value a ValueSet. Finally, a Bid is a Map where the key is the issue and the value either a DiscreteValue or NumberValue that is valid for that issue. DiscreteValues are serialized to json inside double quotes, NumberValues are just the numbers (no double quotes).
     61This module contains the basic objects that make up a bid: issues, values, domains, and bids.
     62
     63The issues are just String objects.
     64
     65A ValueSet indicates the possible values for an issue. There are 2 types of valuesets: numeric and discrete. DiscreteValueSet contains the list of DiscreteValue which is a basically a possible (string) values for the issue. NumberValueSet contains a Range which is a set of numbers defined by the minimum, maximum and stepsize (upwards from the minimum).
     66  * a DiscreteValueSet contains a set of possible discrete values. It looks like "values", a column and then a list of discrete values (all strings) Form example,  {{{ "values":["yes","no"] }}}. Discrete values are always strings. So "1" is a good discrete value.
     67  * a number valueset contains a range of numbers and looks like {{{ {"range":[12.2,12.6,0.3]} }}} so "range:" followed by a list of 3 values. The first value is the minimum value in the range, the second the maximum value in the range, and the third the step value. This example range thus contains 12.2 and 12.5 (the next one would be 12.8 but that is already outside the range). Numbers are without quotes.
     68
     69A Domain contains a map, with each key the issue (string) and the value a ValueSet.
     70
    6271
    6372Your party can create any bid that it likes but the protocol will check if your bid fits in the current negotiation and may kick you out of the negotiation if you don't behave properly.
     
    6574In GeniusWeb, all number values are processed as BigDecimal to avoid rounding errors.
    6675
    67 Here is an example of a bid in JSON format. issue 2 and issue 3 are number values, issue 1 is a discrete issue. All values in quotes are discrete values, while values without quotes are number values. 
    68 
    69 {{{
    70 {"issuevalues":{
    71   "issue3":9012345678901234567.89,
    72   "issue2":1,
    73   "issue1":"b"
    74 }}
    75 }}}
    76 
    77 * The issueValues contains a dictionary with issues. Each issue is indicated by a name (a string), followed by a column (:) and then a dictionary. The dictionary can contain either a discrete valueset or a number valueset
    78   * a discrete valueset looks like "values", a column and then a list of discrete values (all strings)
    79   * a number valueset contains a range of numbers and looks like {{{ {"range":[12.2,12.6,0.3]} }}} so "range:" followed by a list of 3 values. The first value is the minimum value in the range, the second the maximum value in the range, and the third the step value. This example range thus contains 12.2 and 12.5 (the next one would be 12.8 but that is already outside the range).
    8076
    8177When describing the domain, the set of allowed values has to be given. A domain looks like this
     
    9490
    9591* The name is just a string. Our reference implementation of the profiles server additionally requires that the name must match the filename and directory name when placed on the profiles server. So your directory must be domainsrepo/jobs and the filename must be jobs.json.
     92
     93* The issueValues contains a dictionary with issues. Each issue is indicated by a name (a string), followed by a column (:) and then a dictionary. The dictionary can contain either a discrete valueset or a number valueset as discussed above.
     94
     95Finally, a Bid is a Map where the key is the issue and the value either a DiscreteValue or NumberValue that is valid for that issue. DiscreteValues are serialized to json inside double quotes, NumberValues are just the numbers (no double quotes).
     96
     97Here is an example of a bid in JSON format. issue 2 and issue 3 are number values, issue 1 is a discrete issue. All values in quotes are discrete values, while values without quotes are number values. 
     98
     99{{{
     100{"issuevalues":{
     101  "issue3":9012345678901234567.89,
     102  "issue2":1,
     103  "issue1":"b"
     104}}
     105}}}
     106
    96107
    97108