blake = objects.Person(name='Blake', believability=0.3)
meeting.participants.append(blake)

natalie = objects.Person(name='Natalie', believability=0.25)
meeting.participants.append(natalie)

will = objects.Person(name='Will', believability=0.3)
meeting.participants.append(will)

chintan = objects.Person(name='Chintan', believability=0)
meeting.participants.append(chintan)

sophia = objects.Person(name='Sophia', believability=0)
meeting.participants.append(sophia)

question = objects.Question(title='How should we move forward with this project?',
                            question_type=objects.QuestionType.CATEGORICAL)
meeting.questions.append(question)

for question in meeting.questions:
    question.question_type = objects.QuestionType.CATEGORICAL

for question in meeting.questions:
    blake_response = objects.Response(source=blake, target='How is this project going?', value='Delay')
    question.responses.append(blake_response)
    natalie_response = objects.Response(source=natalie, target='How is this project going?', value='Give up')
    question.responses.append(natalie_response)
    will_response = objects.Response(source=will, target='How is this project going?',
                                     value='Push Ahead and see what happens')
    question.responses.append(will_response)
    chintan_response = objects.Response(source=chintan, target='How is this project going?',
                                        value='Do whatever it takes to make it work')
Exemplo n.º 2
0
# Question: 1 Yes/No Question
# Participants: Two Meeting Participants who both have believability
# Responses: 2 (1 yes, 1 no)
# Believability: Total of 0.95 Believability in the meeting

from prios_api.domain_objects import objects

meeting = objects.Meeting(name='Test Meeting')

blake = objects.Person(name='Blake', believability=0.9)
meeting.participants.append(blake)

natalie = objects.Person(name='Natalie', believability=0.05)
meeting.participants.append(natalie)

question = objects.Question(title='Does this work?')
meeting.questions.append(question)

for question in meeting.questions:
    question.question_type = objects.QuestionType.BINARY

for question in meeting.questions:
    blake_response = objects.Response(source=blake,
                                      target='Does this work?',
                                      value='No')
    question.responses.append(blake_response)
    natalie_response = objects.Response(source=natalie,
                                        target='Does this work?',
                                        value='Yes')
    question.responses.append(natalie_response)
Exemplo n.º 3
0
# Believability: Total of 0.85 Believability in the meeting

from prios_api.domain_objects import objects

meeting = objects.Meeting(name='Test Meeting')

blake = objects.Person(name='Blake', believability=0.3)
meeting.participants.append(blake)

natalie = objects.Person(name='Natalie', believability=0.25)
meeting.participants.append(natalie)

will = objects.Person(name='Will', believability=0.3)
meeting.participants.append(will)

question = objects.Question(title='How is this project going?')
meeting.questions.append(question)

for question in meeting.questions:
    question.question_type = objects.QuestionType.SCALE

for question in meeting.questions:
    natalie_response = objects.Response(source=natalie, target='How is this project going?', value=7)
    question.responses.append(natalie_response)
    blake_response = objects.Response(source=blake, target='How is this project going?', value=7)
    question.responses.append(blake_response)
    will_response = objects.Response(source=will, target='How is this project going?', value=7)
    question.responses.append(will_response)

values_and_weights = [(response.value, response.source.believability) for response in question.responses]
Exemplo n.º 4
0
blake = objects.Person(name='Blake', believability=0.2)
meeting.participants.append(blake)

natalie = objects.Person(name='Natalie', believability=0.01)
meeting.participants.append(natalie)

will = objects.Person(name='Will', believability=0.3)
meeting.participants.append(will)

chintan = objects.Person(name='Chintan', believability=0)
meeting.participants.append(chintan)

sophia = objects.Person(name='Sophia', believability=0)
meeting.participants.append(sophia)

question = objects.Question(title='How is this project going?',
                            question_type=objects.QuestionType.LIKERT)
meeting.questions.append(question)

for question in meeting.questions:
    question.question_type = objects.QuestionType.LIKERT

for question in meeting.questions:
    blake_response = objects.Response(source=blake,
                                      target='How is this project going?',
                                      value=2)
    question.responses.append(blake_response)
    natalie_response = objects.Response(source=natalie,
                                        target='How is this project going?',
                                        value=1)
    question.responses.append(natalie_response)
    will_response = objects.Response(source=will,