<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nvenugo2</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nvenugo2"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Nvenugo2"/>
	<updated>2026-06-02T16:39:24Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114772</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114772"/>
		<updated>2017-12-13T12:31:23Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the project E17A7 which is one of the several projects to allow Expertiza support (the currently unsupported) conference. Specifically, it involves adding the ability of conference paper reviewers to bid for what they want to review. The members of this project are: &lt;br /&gt;
&lt;br /&gt;
Leiyang Guo (lguo7@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Bikram Singh (bsingh8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Navin Venugopal (nvenugo2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sathwick Goparapu (sgopara@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project created using Ruby on Rails. This project is a software primarily to create reusable learning objects through peer review and also supports team projects. Expertiza allows the creation of instructors and student accounts. This allows the instructors to post projects (student learning objects) which can be viewed and worked upon by students. These can also be peer reviewed by students later.&lt;br /&gt;
&lt;br /&gt;
====Background of the project====&lt;br /&gt;
In the existing Expertiza functionality, the bidding ability is only for bidding for a project topic for students in a course. This involves the instructor posting a list of project topics, and each student (or all students together as a team, if some students have already formed a team) then post a preference list, listing topics (s)he wants to work on. Then the bidding algorithm assigns the topics, particularly with the following features: &lt;br /&gt;
* Students (not in a team) with close preferences are assigned to a project team, and the common preference is the project topic assigned to the team. Alternatively, for existing teams, the project topic is assigned as per the common project topic preference list&lt;br /&gt;
* Each team is assigned only one topic&lt;br /&gt;
* Each topic (if assigned) is assigned to a maximum of one team&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
This project is not responsible for adding code so as to support a conference. Rather, we are interested in the bidding algorithm used in the conference, which is significantly different from the project bidding algorithm as explained above.&lt;br /&gt;
&lt;br /&gt;
For the purposes of the project, we assume that there are several reviewers in a conference who review papers which are proposed to be presented in the conference. Also, the entire list of papers proposed to be presented in the conference is also available.&lt;br /&gt;
&lt;br /&gt;
Then the basic working of the project assumes: &lt;br /&gt;
* Before the bidding close deadline, reviewers submit a list of papers they wish to review.&lt;br /&gt;
* After the bidding deadline, the algorithm assigns papers to reviewers to review, such that:&lt;br /&gt;
** Each paper (if assigned) is assigned to a maximum of R reviewers (here R represents some constant)&lt;br /&gt;
** Each reviewer is assigned a maximum of P papers to review (here P represents some constant)&lt;br /&gt;
** Assignment of papers is individual&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
&lt;br /&gt;
In this section, we discuss the problem statement, then discuss the existing code and possible changes required. &lt;br /&gt;
&lt;br /&gt;
====Problem Statement====&lt;br /&gt;
* To take the existing bidding code in Expertiza (which is meant for students bidding for project topics) and make it callable either for bidding for topics or bidding for submissions to review. &lt;br /&gt;
* A possible extension is to add other methods, like a &amp;quot;late reviewer registration&amp;quot; method, in which each new reviewer is assigned one of the least-reviewed submissions so far. Methods like these require an extension of the basic working of the project.&lt;br /&gt;
* The matching algorithm is currently not very sophisticated.  Top trading cycles is implemented in the web service (though it is currently not used by bidding assignment) and could be adapted to this use. &lt;br /&gt;
&lt;br /&gt;
In the subsequent discussion with the mentor, it was concluded that the two bidding situations are very different hence it was decided to keep the two separate, at least initially. Also, the third requirement was modified to first make the bidding for a conference using any algorithm and if time permits, to use a better algorithm like top trading cycles.&lt;br /&gt;
&lt;br /&gt;
====Current Project Aims====&lt;br /&gt;
* To develop code such that both applications (bidding for project teams and bidding for conference paper reviews) use the same code&lt;br /&gt;
* To improve the algorithm for calculating the score for a particular project topic/conference paper review assigned to a project team/conference reviewer&lt;br /&gt;
&lt;br /&gt;
We want to state here that we are not responsible for developing any conference features. Specifically, this means that we are not changing any UI features. We will be primarily relying on UI changes done by E17A5&lt;br /&gt;
&lt;br /&gt;
== Existing Algorithm ==&lt;br /&gt;
&lt;br /&gt;
==== Problem ====&lt;br /&gt;
The existing algorithm solves the following problem: &lt;br /&gt;
&lt;br /&gt;
To form teams of students of Maximum size M and then assign topics (there are N topics) based on preference lists submitted either by individual students or teams (complete or otherwise). Preference Lists can have minimum 1 topic and a maximum of L topics. &lt;br /&gt;
Then the topics are allocated to teams such that each team gets a unique topic and each topic is assigned only to one team. &lt;br /&gt;
&lt;br /&gt;
==== Functionality ====&lt;br /&gt;
The topics are assigned to project teams in 2 steps:&lt;br /&gt;
&lt;br /&gt;
* Making teams: This is done using a k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
** The basic cost function used in the algorithm is:      C(i,j) = 1/N * &amp;amp;sum; [ M -S(i) ] where i varies from 1 to N&lt;br /&gt;
** The Algorithm calculates the weights for every user, not a team or part of an incomplete team. It then assigns teams using the weights, by plotting graphs for each topic. It is as follows:&lt;br /&gt;
*** Draw a graph for every topic j with X-axis as the priority position i and the Y axis as the Weights.&lt;br /&gt;
*** Hierarchical K means to select teams such that all students in a team are close to each other in the graph above, hopefully, more towards the left of the graph, and also such that there are a minimum of 1 and a maximum of M students per team; &lt;br /&gt;
** The Algorithm is as follows: &lt;br /&gt;
   &amp;lt;nowiki&amp;gt;&lt;br /&gt;
      For every topic j :&lt;br /&gt;
         For every position i that topic j can be placed in (any) preference list:&lt;br /&gt;
              Let S(i) = number of students who selected topic j at position i of their (individual) preference list&lt;br /&gt;
              B(i) = 1/S(i)&lt;br /&gt;
              Calculate C(i,j)                &lt;br /&gt;
              Weight(i,j) = B(i) / C(i,j)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Assigning topics to teams: This is implemented as a one line, comparing bid preferences to allot topics.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
In the following subsections, we discuss the problem, proposed design and code. We are trying to combine the code so that it can be used for both the project topic bidding as well as the conference paper review bidding.&lt;br /&gt;
&lt;br /&gt;
====The Combined Problem====&lt;br /&gt;
The combined problem statement is as follows: Given a list of people (students or reviewers) and also a list of N items to bid on (project topics or conference paper reviews), we require the following: &lt;br /&gt;
* To form teams of Maximum size M &lt;br /&gt;
* Based on preference lists submitted by people/teams having a minimum of 1 item and a maximum of L topics, to allot topics to teams such that each team gets P items and each item (to be bid on) is assigned to R teams. &lt;br /&gt;
&lt;br /&gt;
==== Points of Discussion====&lt;br /&gt;
&lt;br /&gt;
We note the differences:&lt;br /&gt;
* For Bidding for Assignment Topics, M is generally greater then 1, but P = 1 and R = 1. The item to be bid on is the project topics.&lt;br /&gt;
* For Bidding for Conference Paper Reviews, M = 1 but P and R are generally greater then 1. The item to be bid on is the conference paper reviews.&lt;br /&gt;
&lt;br /&gt;
We note that a team of 1 person makes little sense, but we still implement it to be so that the code is compatible for both the applications.&lt;br /&gt;
&lt;br /&gt;
====Proposed Design====&lt;br /&gt;
Keeping the existing algorithm and the project requirements in mind, we decided to divide the code into 2 parts:&lt;br /&gt;
* Part A: Make teams for people not in a team (and if applicable, complete incomplete teams)&lt;br /&gt;
* Part B: Assign topics to teams&lt;br /&gt;
&lt;br /&gt;
We note that Part A has been implemented on a web service independent of Expertiza. We also note that the algorithm explained above applies only to Part A, and that it is pretty sophisticated. Hence we choose to keep the existing code as is for this part. We will simply call the webservice, provide the list of people, their bidding preference and also the max_team_size.&lt;br /&gt;
&lt;br /&gt;
Part B is implemented as one line. It is pretty simple. We also note that it simply cannot be used for conference paper review assignemnt. Hence we completely change this section and implement it using a new algorithm. &lt;br /&gt;
&lt;br /&gt;
====Proposed Algorithm for Part B====&lt;br /&gt;
Let N = Number of topics&lt;br /&gt;
    B = Base score&lt;br /&gt;
    t = Total number of topics an user prefers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For every topic i:&lt;br /&gt;
     den = find_den&lt;br /&gt;
     for every user j:&lt;br /&gt;
         if(user has preferred this topic)&lt;br /&gt;
              r = priority(topic)&lt;br /&gt;
              num = (N + 1 - r) * B * N&lt;br /&gt;
              score[topic][user] = num/den + B&lt;br /&gt;
         if(user has preferred no topic)&lt;br /&gt;
              score[topic][user] = B&lt;br /&gt;
         if(user has not preferred this topic)&lt;br /&gt;
              num = B * N&lt;br /&gt;
              score[topic][user] = B - num/den&lt;br /&gt;
&lt;br /&gt;
Now find_den =  &amp;amp;sum; [ N + 1 ] - &amp;amp;sum; [k] where the iterating variable k varies from 1 to t&lt;br /&gt;
&lt;br /&gt;
==== Methodology ====&lt;br /&gt;
We will implement this new algorithm such that the code is DRY, proper naming conventions are used&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
Actors: &lt;br /&gt;
* Conference Reviewer: Submits a preference list of papers and reviews assigned papers&lt;br /&gt;
* Conference Administrator: Responsible for the assignment of topics to the reviewers&lt;br /&gt;
&lt;br /&gt;
Scenario&lt;br /&gt;
The case of reviewers submitting a list of preferred topics and the administrator running the assignment process. For our project, the main modification would be concentrating on Use Case 4 and 5.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Choose and submit preference to be reviewed====&lt;br /&gt;
* Use Case Id: 1&lt;br /&gt;
* Use Case Description: Participants choose the preference for conference review topics and submit it&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
* Pre Conditions: Conference papers are presented and submitted, and the participants are eligible for reviewing&lt;br /&gt;
* Post Conditions: Conference committee members can view participants preference and run bidding algorithm on it&lt;br /&gt;
&lt;br /&gt;
====Saving topic and participant information into database====&lt;br /&gt;
* Use Case Id: 2&lt;br /&gt;
* Use Case Description: bidding preferences and related participants information are processed and saved to database&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by Use Case 1&lt;br /&gt;
* Pre Conditions: participants preferences are submitted&lt;br /&gt;
* Post Conditions: information can be retrieved and used by bidding algorithm&lt;br /&gt;
&lt;br /&gt;
====View list of topics and bid====&lt;br /&gt;
* Use Case Id: 3&lt;br /&gt;
* Use Case Description: participants can view list of topic available for conference paper topic&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
&lt;br /&gt;
====Run bidding Algorithm====&lt;br /&gt;
* Use Case Id: 4&lt;br /&gt;
* Use Case Description: Committee members can run bidding algorithm on application to help assigning the conference paper topics to participants&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: preferences must be submitted by participants&lt;br /&gt;
* Post Conditions: the bidding result can be used for paper assignment&lt;br /&gt;
&lt;br /&gt;
====Display assigned paper to bidders====&lt;br /&gt;
* Use Case Id: 5&lt;br /&gt;
* Use Case Description: System assigns participants to conference paper topics according to bidding result&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by Use Case 4&lt;br /&gt;
* Pre Conditions: bidding algorithm has run and result has been returned&lt;br /&gt;
* Post Conditions: Participants can view topics been assigned to them&lt;br /&gt;
&lt;br /&gt;
====Change assignment of review using CRUD actions====&lt;br /&gt;
* Use Case Id: 6&lt;br /&gt;
* Use Case Description: Conference committee members can change assignment result manually&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: topic assignment has been done&lt;br /&gt;
* Post Conditions: changes in bidding result is visible to participants and other committee members&lt;br /&gt;
&lt;br /&gt;
== Data Flow Diagram ==&lt;br /&gt;
Below is the Data Flow Diagram for process flows of the project. The diagram shows the process of bidding algorithm that we proposed to use for conference paper review assignment.&lt;br /&gt;
[[File:Webp.net-resizeimage (1).png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We explain in the terms of the actors: Reviewer and Administrator&lt;br /&gt;
* Before the deadline, all the reviewers have to submit preference list of papers. They can save, modify list as many times as they want, but they can submit once&lt;br /&gt;
* This information is saved in the database&lt;br /&gt;
* When the deadline is passed, stop accepting preference lists&lt;br /&gt;
* The administrator runs the paper assignment algorithm&lt;br /&gt;
** For every topic, calculate the score for each user&lt;br /&gt;
** Make a common scorelist, which keeps score assigned to every topic of every user. There should be a way to find out the topic and user a particular element of the scorelist belongs to&lt;br /&gt;
** Now start assigning topics according to highest score&lt;br /&gt;
** Keep track of the number of topics assigned to each user and the number of users assigned to each topic&lt;br /&gt;
** If the number of topics assigned to one user reaches the maximum value, remove that user from consideration (remove all scores corresponding to that user from scorelist)&lt;br /&gt;
** If the number of users assigned to one topic reaches the maximum value, remove that topic from consideration (remove all scores correspoinding to that topic from scorelist)&lt;br /&gt;
** Continue the above process until the scorelist is empty&lt;br /&gt;
* Save the bidding into the database&lt;br /&gt;
* Inform users about the results of the bidding&lt;br /&gt;
&lt;br /&gt;
== Changing Existing Files ==&lt;br /&gt;
This subsection details what is to be changed in the existing code.&lt;br /&gt;
&lt;br /&gt;
=== Files to be changed === &lt;br /&gt;
*lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Current Code ===&lt;br /&gt;
This is current code for the bidding assignment. The code will basically get target assignment and then get all topics and teams for the assignment. Then it will assign priority of each team-topic pair according to user preference for each user, and append it to priority information list. Afterward, it sends priority information along with maximum team size information to web-server and rearranging the priority order according to top-trading cycle algorithm, and pass returned result to create_new_teams_for_bidding_response function for bidding handling on topics with preferences and run_intelligent_bid function for bidding handling for leftover assignment as well as cleaning up.&lt;br /&gt;
&lt;br /&gt;
  def run_intelligent_assignment&lt;br /&gt;
    priority_info = []&lt;br /&gt;
    assignment = Assignment.find_by(id: params[:id])&lt;br /&gt;
    topics = assignment.sign_up_topics&lt;br /&gt;
    teams = assignment.teams&lt;br /&gt;
    teams.each do |team|&lt;br /&gt;
      # grab student id and list of bids&lt;br /&gt;
      bids = []&lt;br /&gt;
      topics.each do |topic|&lt;br /&gt;
        bid_record = Bid.find_by(team_id: team.id, topic_id: topic.id)&lt;br /&gt;
        bids &amp;lt;&amp;lt; (bid_record.nil? ? 0 : bid_record.priority ||= 0)&lt;br /&gt;
      end&lt;br /&gt;
      team.users.each { |user| priority_info &amp;lt;&amp;lt; { pid: user.id, ranks: bids } if bids.uniq != [0] }&lt;br /&gt;
    end&lt;br /&gt;
    data = { users: priority_info, max_team_size: assignment.max_team_size }&lt;br /&gt;
    url = WEBSERVICE_CONFIG[&amp;quot;topic_bidding_webservice_url&amp;quot;]&lt;br /&gt;
    begin&lt;br /&gt;
      response = RestClient.post url, data.to_json, content_type: :json, accept: :json&lt;br /&gt;
      # store each summary in a hashmap and use the question as the key&lt;br /&gt;
      teams = JSON.parse(response)[&amp;quot;teams&amp;quot;]&lt;br /&gt;
      create_new_teams_for_bidding_response(teams, assignment)&lt;br /&gt;
      run_intelligent_bid(assignment)&lt;br /&gt;
    rescue =&amp;gt; err&lt;br /&gt;
      flash[:error] = err.message&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Proposed Code ===&lt;br /&gt;
&lt;br /&gt;
Then we will change the run_intelligent_assignment function to implementation as shown below:&lt;br /&gt;
The update involves the use of the existing assignment bidding tables since the UI and table entries specific to conference paper bidding has not been created and is out of scope for this project.&lt;br /&gt;
&lt;br /&gt;
Proposal: Allow the instructor to choose whether is it a topic assignment bid or conference paper bid via an update of a flag variable from the UI. For example, the is_assignment variable is used to indicate if it is an assignment bidding. If not the flag is set to false and assumes it is a conference bid. This enables the reuse of existing precondition variables and table entries. The bidding is run by calculating the weighted scores for each team's bidding priority of all the topics. Score calculation is done as explained in the Design section.&lt;br /&gt;
&lt;br /&gt;
Upon score calculation, the topics are used to populate the singed_up table for the corresponding teams and topic id. The resulting assigned topics can be viewed through the sing up sheet view by each participant. Each topic can be assigned to multiple teams as denoted by the max_per_topic variable. A hash map is used to keep track of how many times the same topic has been assigned to a team. Hence we are able to restrict the number of times the same paper/topic can be reviewed.&lt;br /&gt;
&lt;br /&gt;
  def run_conference_bid teams, assignment, topic_per_team, team_per_topic&lt;br /&gt;
    incomplete_teams = Hash.new(0)&lt;br /&gt;
    incomplete_topics = Hash.new(0)&lt;br /&gt;
    all_topics=[]&lt;br /&gt;
    all_topics = assignment.sign_up_topics&lt;br /&gt;
    score_list=Array.new(teams.length*all_topics.length){Array.new(3)}&lt;br /&gt;
    sorted_list=Array.new(teams.length*all_topics.length){Array.new(3)}&lt;br /&gt;
    temp=[]&lt;br /&gt;
    base = 10&lt;br /&gt;
    p = 0&lt;br /&gt;
    #looping through each team to calculate score for each topic in the assignment&lt;br /&gt;
    teams.each do |t|&lt;br /&gt;
      incomplete_teams.store(t.id,0)&lt;br /&gt;
      team_bids = Bid.where(team_id: t.id)&lt;br /&gt;
      denom = 0&lt;br /&gt;
      b_length = team_bids.length&lt;br /&gt;
      (1..b_length).each do |i|&lt;br /&gt;
        denom = denom+all_topics.length - i&lt;br /&gt;
      end&lt;br /&gt;
      #Score calculation based on bid priority&lt;br /&gt;
      all_topics.each do |j|&lt;br /&gt;
        if(team_bids.any?{|tb| tb.topic_id == j.id})&lt;br /&gt;
          bid_priority = Bid.where(team_id:t.id,topic_id:j.id).first.priority&lt;br /&gt;
          score = base+((all_topics.length+1-bid_priority)*base*all_topics.length) / denom&lt;br /&gt;
        elsif(team_bids.length!=0)&lt;br /&gt;
          score = base-(base*all_topics.length)/denom&lt;br /&gt;
        else&lt;br /&gt;
          score = base&lt;br /&gt;
        end&lt;br /&gt;
        score_list[p][0] = score&lt;br /&gt;
        score_list[p][1] = t.id&lt;br /&gt;
        score_list[p][2] = j.id&lt;br /&gt;
        p+=1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    sorted_list = score_list.sort_by{|e| [e[0],e[1],e[2]]}.each{|line| p line}&lt;br /&gt;
    sorted_list.reverse!&lt;br /&gt;
    all_topics.each do |k|&lt;br /&gt;
      incomplete_topics.store(k.id,0)&lt;br /&gt;
    end&lt;br /&gt;
    if(all_topics.length*team_per_topic&amp;lt;teams.length)&lt;br /&gt;
      flash[:error] = 'There are not enough reviews to be assigned'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    #Assigning topics to teams based on highest score&lt;br /&gt;
    sorted_list.each do |s|&lt;br /&gt;
      if((incomplete_topics[s[2]]&amp;lt;team_per_topic) &amp;amp;&amp;amp; (incomplete_teams[s[1]]&amp;lt;topic_per_team))&lt;br /&gt;
        SignedUpTeam.create(team_id: s[1], topic_id: s[2])&lt;br /&gt;
        incomplete_teams[s[1]]+=1&lt;br /&gt;
        incomplete_topics[s[2]]+=1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    assignment.update_attribute(:is_intelligent,false)&lt;br /&gt;
    flash[:notice] = 'The intelligent assignment was successfully completed for ' + assignment.name + '.'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
* UI testing of the implemented functionality to be done.&lt;br /&gt;
* No UI has been created been created for the conference paper review bidding. Hence assignment bidding controller is used to manually test the code on a local host to determine the feasibility of code.&lt;br /&gt;
&lt;br /&gt;
** Log in as a participants/student&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Go to Other's works and check preferred conference paper topics to bid on reviewing&lt;br /&gt;
** Click submit and wait for bidding deadline&lt;br /&gt;
** After deadline reaches, go back to assignment and click on Other's work to view topics assigned for reviewing&lt;br /&gt;
&lt;br /&gt;
===Automated Test Cases===&lt;br /&gt;
* TDD and Feature Test cases to be written. For instance, we will do Rspec test in cases below:&lt;br /&gt;
** Test on score calculation, see if the calculation gives right scoring distribution when no preference is given, when one preference is given, and when multiple preferences are given;&lt;br /&gt;
** Test on preference levels matching, check if the algorithm is matched first, second, third, and so on preferences and evaluating them correctly;&lt;br /&gt;
** Test if teams per topic or topics per team can exceed required number by assigning many teams with same first preference and assigning many teams with multiple preferences (preference number per team &amp;gt; number of topics/2);&lt;br /&gt;
* For the Rspec tests, we will have to create an object of team, assignment, and ranks. A sample team object in JSON format would be:&lt;br /&gt;
  {&amp;quot;users&amp;quot;:[{&amp;quot;ranks&amp;quot;:[1,0,2,3], &amp;quot;pid&amp;quot;:1023}],&amp;quot;max_team_size&amp;quot;:1}&lt;br /&gt;
* The objects would be generated inside the spec file lottery_controller_spec.rb using model object initializer;&lt;br /&gt;
&lt;br /&gt;
===Edge cases===&lt;br /&gt;
&lt;br /&gt;
* Case 1: No reviewer submits a list of preferred topics to review&lt;br /&gt;
&lt;br /&gt;
* Case 2: All reviewers submit exactly the same list of topics to review.&lt;br /&gt;
&lt;br /&gt;
* Case 3: Number of teams exceed the number of topics to review.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114771</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114771"/>
		<updated>2017-12-13T12:26:55Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the project E17A7 which is one of the several projects to allow Expertiza support (the currently unsupported) conference. Specifically, it involves adding the ability of conference paper reviewers to bid for what they want to review. The members of this project are: &lt;br /&gt;
&lt;br /&gt;
Leiyang Guo (lguo7@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Bikram Singh (bsingh8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Navin Venugopal (nvenugo2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sathwick Goparapu (sgopara@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project created using Ruby on Rails. This project is a software primarily to create reusable learning objects through peer review and also supports team projects. Expertiza allows the creation of instructors and student accounts. This allows the instructors to post projects (student learning objects) which can be viewed and worked upon by students. These can also be peer reviewed by students later.&lt;br /&gt;
&lt;br /&gt;
====Background of the project====&lt;br /&gt;
In the existing Expertiza functionality, the bidding ability is only for bidding for a project topic for students in a course. This involves the instructor posting a list of project topics, and each student (or all students together as a team, if some students have already formed a team) then post a preference list, listing topics (s)he wants to work on. Then the bidding algorithm assigns the topics, particularly with the following features: &lt;br /&gt;
* Students (not in a team) with close preferences are assigned to a project team, and the common preference is the project topic assigned to the team. Alternatively, for existing teams, the project topic is assigned as per the common project topic preference list&lt;br /&gt;
* Each team is assigned only one topic&lt;br /&gt;
* Each topic (if assigned) is assigned to a maximum of one team&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
This project is not responsible for adding code so as to support a conference. Rather, we are interested in the bidding algorithm used in the conference, which is significantly different from the project bidding algorithm as explained above.&lt;br /&gt;
&lt;br /&gt;
For the purposes of the project, we assume that there are several reviewers in a conference who review papers which are proposed to be presented in the conference. Also, the entire list of papers proposed to be presented in the conference is also available.&lt;br /&gt;
&lt;br /&gt;
Then the basic working of the project assumes: &lt;br /&gt;
* Before the bidding close deadline, reviewers submit a list of papers they wish to review.&lt;br /&gt;
* After the bidding deadline, the algorithm assigns papers to reviewers to review, such that:&lt;br /&gt;
** Each paper (if assigned) is assigned to a maximum of R reviewers (here R represents some constant)&lt;br /&gt;
** Each reviewer is assigned a maximum of P papers to review (here P represents some constant)&lt;br /&gt;
** Assignment of papers is individual&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
&lt;br /&gt;
In this section, we discuss the problem statement, then discuss the existing code and possible changes required. &lt;br /&gt;
&lt;br /&gt;
====Problem Statement====&lt;br /&gt;
* To take the existing bidding code in Expertiza (which is meant for students bidding for project topics) and make it callable either for bidding for topics or bidding for submissions to review. &lt;br /&gt;
* A possible extension is to add other methods, like a &amp;quot;late reviewer registration&amp;quot; method, in which each new reviewer is assigned one of the least-reviewed submissions so far. Methods like these require an extension of the basic working of the project.&lt;br /&gt;
* The matching algorithm is currently not very sophisticated.  Top trading cycles is implemented in the web service (though it is currently not used by bidding assignment) and could be adapted to this use. &lt;br /&gt;
&lt;br /&gt;
In the subsequent discussion with the mentor, it was concluded that the two bidding situations are very different hence it was decided to keep the two separate, at least initially. Also, the third requirement was modified to first make the bidding for a conference using any algorithm and if time permits, to use a better algorithm like top trading cycles.&lt;br /&gt;
&lt;br /&gt;
====Current Project Aims====&lt;br /&gt;
* To develop code such that both applications (bidding for project teams and bidding for conference paper reviews) use the same code&lt;br /&gt;
* To improve the algorithm for calculating the score for a particular project topic/conference paper review assigned to a project team/conference reviewer&lt;br /&gt;
&lt;br /&gt;
We want to state here that we are not responsible for developing any conference features. Specifically, this means that we are not changing any UI features. We will be primarily relying on UI changes done by E17A5&lt;br /&gt;
&lt;br /&gt;
== Existing Algorithm ==&lt;br /&gt;
&lt;br /&gt;
==== Problem ====&lt;br /&gt;
The existing algorithm solves the following problem: &lt;br /&gt;
&lt;br /&gt;
To form teams of students of Maximum size M and then assign topics (there are N topics) based on preference lists submitted either by individual students or teams (complete or otherwise). Preference Lists can have minimum 1 topic and a maximum of L topics. &lt;br /&gt;
Then the topics are allocated to teams such that each team gets a unique topic and each topic is assigned only to one team. &lt;br /&gt;
&lt;br /&gt;
==== Functionality ====&lt;br /&gt;
The topics are assigned to project teams in 2 steps:&lt;br /&gt;
&lt;br /&gt;
* Making teams: This is done using a k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
** The basic cost function used in the algorithm is:      C(i,j) = 1/N * &amp;amp;sum; [ M -S(i) ] where i varies from 1 to N&lt;br /&gt;
** The Algorithm calculates the weights for every user, not a team or part of an incomplete team. It then assigns teams using the weights, by plotting graphs for each topic. It is as follows:&lt;br /&gt;
*** Draw a graph for every topic j with X-axis as the priority position i and the Y axis as the Weights.&lt;br /&gt;
*** Hierarchical K means to select teams such that all students in a team are close to each other in the graph above, hopefully, more towards the left of the graph, and also such that there are a minimum of 1 and a maximum of M students per team; &lt;br /&gt;
** The Algorithm is as follows: &lt;br /&gt;
   &amp;lt;nowiki&amp;gt;&lt;br /&gt;
      For every topic j :&lt;br /&gt;
         For every position i that topic j can be placed in (any) preference list:&lt;br /&gt;
              Let S(i) = number of students who selected topic j at position i of their (individual) preference list&lt;br /&gt;
              B(i) = 1/S(i)&lt;br /&gt;
              Calculate C(i,j)                &lt;br /&gt;
              Weight(i,j) = B(i) / C(i,j)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Assigning topics to teams: This is implemented as a one line, comparing bid preferences to allot topics.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
In the following subsections, we discuss the problem, proposed design and code. We are trying to combine the code so that it can be used for both the project topic bidding as well as the conference paper review bidding.&lt;br /&gt;
&lt;br /&gt;
====The Combined Problem====&lt;br /&gt;
The combined problem statement is as follows: Given a list of people (students or reviewers) and also a list of N items to bid on (project topics or conference paper reviews), we require the following: &lt;br /&gt;
* To form teams of Maximum size M &lt;br /&gt;
* Based on preference lists submitted by people/teams having a minimum of 1 item and a maximum of L topics, to allot topics to teams such that each team gets P items and each item (to be bid on) is assigned to R teams. &lt;br /&gt;
&lt;br /&gt;
==== Points of Discussion====&lt;br /&gt;
&lt;br /&gt;
We note the differences:&lt;br /&gt;
* For Bidding for Assignment Topics, M is generally greater then 1, but P = 1 and R = 1. The item to be bid on is the project topics.&lt;br /&gt;
* For Bidding for Conference Paper Reviews, M = 1 but P and R are generally greater then 1. The item to be bid on is the conference paper reviews.&lt;br /&gt;
&lt;br /&gt;
We note that a team of 1 person makes little sense, but we still implement it to be so that the code is compatible for both the applications.&lt;br /&gt;
&lt;br /&gt;
====Proposed Design====&lt;br /&gt;
Keeping the existing algorithm and the project requirements in mind, we decided to divide the code into 2 parts:&lt;br /&gt;
* Part A: Make teams for people not in a team (and if applicable, complete incomplete teams)&lt;br /&gt;
* Part B: Assign topics to teams&lt;br /&gt;
&lt;br /&gt;
We note that Part A has been implemented on a web service independent of Expertiza. We also note that the algorithm explained above applies only to Part A, and that it is pretty sophisticated. Hence we choose to keep the existing code as is for this part. We will simply call the webservice, provide the list of people, their bidding preference and also the max_team_size.&lt;br /&gt;
&lt;br /&gt;
Part B is implemented as one line. It is pretty simple. We also note that it simply cannot be used for conference paper review assignemnt. Hence we completely change this section and implement it using a new algorithm. &lt;br /&gt;
&lt;br /&gt;
====Proposed Algorithm for Part B====&lt;br /&gt;
Let N = Number of topics&lt;br /&gt;
    B = Base score&lt;br /&gt;
    t = Total number of topics an user prefers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For every topic i:&lt;br /&gt;
     den = find_den&lt;br /&gt;
     for every user j:&lt;br /&gt;
         if(user has preferred this topic)&lt;br /&gt;
              r = priority(topic)&lt;br /&gt;
              num = (N + 1 - r) * B * N&lt;br /&gt;
              score[topic][user] = num/den + B&lt;br /&gt;
         if(user has preferred no topic)&lt;br /&gt;
              score[topic][user] = B&lt;br /&gt;
         if(user has not preferred this topic)&lt;br /&gt;
              num = B * N&lt;br /&gt;
              score[topic][user] = B - num/den&lt;br /&gt;
&lt;br /&gt;
Now find_den =  &amp;amp;sum; [ N + 1 ] - &amp;amp;sum; [k] where the iterating variable k varies from 1 to t&lt;br /&gt;
&lt;br /&gt;
==== Methodology ====&lt;br /&gt;
We will implement this new algorithm such that the code is DRY, proper naming conventions are used&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
Actors: &lt;br /&gt;
* Conference Reviewer: Submits a preference list of papers and reviews assigned papers&lt;br /&gt;
* Conference Administrator: Responsible for the assignment of topics to the reviewers&lt;br /&gt;
&lt;br /&gt;
Scenario&lt;br /&gt;
The case of reviewers submitting a list of preferred topics and the administrator running the assignment process. For our project, the main modification would be concentrating on Use Case 4 and 5.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Choose and submit preference to be reviewed====&lt;br /&gt;
* Use Case Id: 1&lt;br /&gt;
* Use Case Description: Participants choose the preference for conference review topics and submit it&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
* Pre Conditions: Conference papers are presented and submitted, and the participants are eligible for reviewing&lt;br /&gt;
* Post Conditions: Conference committee members can view participants preference and run bidding algorithm on it&lt;br /&gt;
&lt;br /&gt;
====Saving topic and participant information into database====&lt;br /&gt;
* Use Case Id: 2&lt;br /&gt;
* Use Case Description: bidding preferences and related participants information are processed and saved to database&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by Use Case 1&lt;br /&gt;
* Pre Conditions: participants preferences are submitted&lt;br /&gt;
* Post Conditions: information can be retrieved and used by bidding algorithm&lt;br /&gt;
&lt;br /&gt;
====View list of topics and bid====&lt;br /&gt;
* Use Case Id: 3&lt;br /&gt;
* Use Case Description: participants can view list of topic available for conference paper topic&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
&lt;br /&gt;
====Run bidding Algorithm====&lt;br /&gt;
* Use Case Id: 4&lt;br /&gt;
* Use Case Description: Committee members can run bidding algorithm on application to help assigning the conference paper topics to participants&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: preferences must be submitted by participants&lt;br /&gt;
* Post Conditions: the bidding result can be used for paper assignment&lt;br /&gt;
&lt;br /&gt;
====Display assigned paper to bidders====&lt;br /&gt;
* Use Case Id: 5&lt;br /&gt;
* Use Case Description: System assigns participants to conference paper topics according to bidding result&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by Use Case 4&lt;br /&gt;
* Pre Conditions: bidding algorithm has run and result has been returned&lt;br /&gt;
* Post Conditions: Participants can view topics been assigned to them&lt;br /&gt;
&lt;br /&gt;
====Change assignment of review using CRUD actions====&lt;br /&gt;
* Use Case Id: 6&lt;br /&gt;
* Use Case Description: Conference committee members can change assignment result manually&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: topic assignment has been done&lt;br /&gt;
* Post Conditions: changes in bidding result is visible to participants and other committee members&lt;br /&gt;
&lt;br /&gt;
== Data Flow Diagram ==&lt;br /&gt;
Below is the Data Flow Diagram for process flows of the project. The diagram shows the process of bidding algorithm that we proposed to use for conference paper review assignment.&lt;br /&gt;
[[File:Webp.net-resizeimage (1).png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We explain in the terms of the actors: Reviewer and Administrator&lt;br /&gt;
* Before the deadline, all the reviewers have to submit preference list of papers. They can save, modify list as many times as they want, but they can submit once&lt;br /&gt;
* This information is saved in the database&lt;br /&gt;
* When the deadline is passed, stop accepting preference lists&lt;br /&gt;
* The administrator runs the paper assignment algorithm&lt;br /&gt;
** For every topic, calculate the score for each user&lt;br /&gt;
** Make a common scorelist, which keeps score assigned to every topic of every user. There should be a way to find out the topic and user a particular element of the scorelist belongs to&lt;br /&gt;
** Now start assigning topics according to highest score&lt;br /&gt;
** Keep track of the number of topics assigned to each user and the number of users assigned to each topic&lt;br /&gt;
** If the number of topics assigned to one user reaches the maximum value, remove that user from consideration (remove all scores corresponding to that user from scorelist)&lt;br /&gt;
** If the number of users assigned to one topic reaches the maximum value, remove that topic from consideration (remove all scores correspoinding to that topic from scorelist)&lt;br /&gt;
** Continue the above process until the scorelist is empty&lt;br /&gt;
* Save the bidding into the database&lt;br /&gt;
* Inform users about the results of the bidding&lt;br /&gt;
&lt;br /&gt;
== Changing Existing Files ==&lt;br /&gt;
This subsection details what is to be changed in the existing code.&lt;br /&gt;
&lt;br /&gt;
=== Files to be changed === &lt;br /&gt;
*lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Current Code ===&lt;br /&gt;
This is current code for the bidding assignment. The code will basically get target assignment and then get all topics and teams for the assignment. Then it will assign priority of each team-topic pair according to user preference for each user, and append it to priority information list. Afterward, it sends priority information along with maximum team size information to web-server and rearranging the priority order according to top-trading cycle algorithm, and pass returned result to create_new_teams_for_bidding_response function for bidding handling on topics with preferences and run_intelligent_bid function for bidding handling for leftover assignment as well as cleaning up.&lt;br /&gt;
&lt;br /&gt;
  def run_intelligent_assignment&lt;br /&gt;
    priority_info = []&lt;br /&gt;
    assignment = Assignment.find_by(id: params[:id])&lt;br /&gt;
    topics = assignment.sign_up_topics&lt;br /&gt;
    teams = assignment.teams&lt;br /&gt;
    teams.each do |team|&lt;br /&gt;
      # grab student id and list of bids&lt;br /&gt;
      bids = []&lt;br /&gt;
      topics.each do |topic|&lt;br /&gt;
        bid_record = Bid.find_by(team_id: team.id, topic_id: topic.id)&lt;br /&gt;
        bids &amp;lt;&amp;lt; (bid_record.nil? ? 0 : bid_record.priority ||= 0)&lt;br /&gt;
      end&lt;br /&gt;
      team.users.each { |user| priority_info &amp;lt;&amp;lt; { pid: user.id, ranks: bids } if bids.uniq != [0] }&lt;br /&gt;
    end&lt;br /&gt;
    data = { users: priority_info, max_team_size: assignment.max_team_size }&lt;br /&gt;
    url = WEBSERVICE_CONFIG[&amp;quot;topic_bidding_webservice_url&amp;quot;]&lt;br /&gt;
    begin&lt;br /&gt;
      response = RestClient.post url, data.to_json, content_type: :json, accept: :json&lt;br /&gt;
      # store each summary in a hashmap and use the question as the key&lt;br /&gt;
      teams = JSON.parse(response)[&amp;quot;teams&amp;quot;]&lt;br /&gt;
      create_new_teams_for_bidding_response(teams, assignment)&lt;br /&gt;
      run_intelligent_bid(assignment)&lt;br /&gt;
    rescue =&amp;gt; err&lt;br /&gt;
      flash[:error] = err.message&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Proposed Code ===&lt;br /&gt;
&lt;br /&gt;
Then we will change the run_intelligent_assignment function to implementation as shown below:&lt;br /&gt;
The update involves the use of the existing assignment bidding tables since the UI and table entries specific to conference paper bidding has not been created and is out of scope for this project.&lt;br /&gt;
&lt;br /&gt;
Proposal: Allow the instructor to choose whether is it a topic assignment bid or conference paper bid via an update of a flag variable from the UI. For example, the is_assignment variable is used to indicate if it is an assignment bidding. If not the flag is set to false and assumes it is a conference bid. This enables the reuse of existing precondition variables and table entries. The bidding is run by calculating the weighted scores for each team's bidding priority of all the topics. Score calculation is done as explained in the Design section.&lt;br /&gt;
&lt;br /&gt;
Upon score calculation, the topics are used to populate the singed_up table for the corresponding teams and topic id. The resulting assigned topics can be viewed through the sing up sheet view by each participant. Each topic can be assigned to multiple teams as denoted by the max_per_topic variable. A hash map is used to keep track of how many times the same topic has been assigned to a team. Hence we are able to restrict the number of times the same paper/topic can be reviewed.&lt;br /&gt;
&lt;br /&gt;
  def run_conference_bid teams, assignment, topic_per_team, team_per_topic&lt;br /&gt;
    incomplete_teams = Hash.new(0)&lt;br /&gt;
    incomplete_topics = Hash.new(0)&lt;br /&gt;
    all_topics=[]&lt;br /&gt;
    all_topics = assignment.sign_up_topics&lt;br /&gt;
    score_list=Array.new(teams.length*all_topics.length){Array.new(3)}&lt;br /&gt;
    sorted_list=Array.new(teams.length*all_topics.length){Array.new(3)}&lt;br /&gt;
    temp=[]&lt;br /&gt;
    base = 10&lt;br /&gt;
    p = 0&lt;br /&gt;
    #looping through each team to calculate score for each topic in the assignment&lt;br /&gt;
    teams.each do |t|&lt;br /&gt;
      incomplete_teams.store(t.id,0)&lt;br /&gt;
      team_bids = Bid.where(team_id: t.id)&lt;br /&gt;
      denom = 0&lt;br /&gt;
      b_length = team_bids.length&lt;br /&gt;
      (1..b_length).each do |i|&lt;br /&gt;
        denom = denom+all_topics.length - i&lt;br /&gt;
      end&lt;br /&gt;
      #Score calculation based on bid priority&lt;br /&gt;
      all_topics.each do |j|&lt;br /&gt;
        if(team_bids.any?{|tb| tb.topic_id == j.id})&lt;br /&gt;
          bid_priority = Bid.where(team_id:t.id,topic_id:j.id).first.priority&lt;br /&gt;
          score = base+((all_topics.length+1-bid_priority)*base*all_topics.length) / denom&lt;br /&gt;
        elsif(team_bids.length!=0)&lt;br /&gt;
          score = base-(base*all_topics.length)/denom&lt;br /&gt;
        else&lt;br /&gt;
          score = base&lt;br /&gt;
        end&lt;br /&gt;
        score_list[p][0] = score&lt;br /&gt;
        score_list[p][1] = t.id&lt;br /&gt;
        score_list[p][2] = j.id&lt;br /&gt;
        p+=1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    sorted_list = score_list.sort_by{|e| [e[0],e[1],e[2]]}.each{|line| p line}&lt;br /&gt;
    sorted_list.reverse!&lt;br /&gt;
    all_topics.each do |k|&lt;br /&gt;
      incomplete_topics.store(k.id,0)&lt;br /&gt;
    end&lt;br /&gt;
    if(all_topics.length*team_per_topic&amp;lt;teams.length)&lt;br /&gt;
      flash[:error] = 'There are not enough reviews to be assigned'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    #Assigning topics to teams based on highest score&lt;br /&gt;
    sorted_list.each do |s|&lt;br /&gt;
      if((incomplete_topics[s[2]]&amp;lt;team_per_topic) &amp;amp;&amp;amp; (incomplete_teams[s[1]]&amp;lt;topic_per_team))&lt;br /&gt;
        SignedUpTeam.create(team_id: s[1], topic_id: s[2])&lt;br /&gt;
        incomplete_teams[s[1]]+=1&lt;br /&gt;
        incomplete_topics[s[2]]+=1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    assignment.update_attribute(:is_intelligent,false)&lt;br /&gt;
    flash[:notice] = 'The intelligent assignment was successfully completed for ' + assignment.name + '.'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
* UI testing of the implemented functionality to be done.&lt;br /&gt;
&lt;br /&gt;
** Log in as a participants/student&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Go to Other's works and check preferred conference paper topics to bid on reviewing&lt;br /&gt;
** Click submit and wait for bidding deadline&lt;br /&gt;
** After deadline reaches, go back to assignment and click on Other's work to view topics assigned for reviewing&lt;br /&gt;
&lt;br /&gt;
===Automated Test Cases===&lt;br /&gt;
* TDD and Feature Test cases to be written. For instance, we will do Rspec test on cases below:&lt;br /&gt;
** Test on score calculation, see if the calculation gives right scoring distribution when no preference is given, when one preference is given, and when multiple preferences are given;&lt;br /&gt;
** Test on preference levels matching, check if the algorithm is matched first, second, third, and so on preferences and evaluating them correctly;&lt;br /&gt;
** Test if teams per topic or topics per team can exceed required number by assigning many teams with same first preference and assigning many teams with multiple preferences (preference number per team &amp;gt; number of topics/2);&lt;br /&gt;
* For the Rspec tests, we will have to create an object of team, assignment, and ranks. A sample team object in JSON format would be:&lt;br /&gt;
  {&amp;quot;users&amp;quot;:[{&amp;quot;ranks&amp;quot;:[1,0,2,3], &amp;quot;pid&amp;quot;:1023}],&amp;quot;max_team_size&amp;quot;:1}&lt;br /&gt;
* The objects would be generated inside the spec file lottery_controller_spec.rb using model object initializer;&lt;br /&gt;
&lt;br /&gt;
===Edge cases===&lt;br /&gt;
&lt;br /&gt;
* Case 1: No reviewer submits a list of preferred topics to review&lt;br /&gt;
&lt;br /&gt;
* Case 2: All reviewers submit exactly the same list of topics to review.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114770</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114770"/>
		<updated>2017-12-13T12:19:39Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the project E17A7 which is one of the several projects to allow Expertiza support (the currently unsupported) conference. Specifically, it involves adding the ability of conference paper reviewers to bid for what they want to review. The members of this project are: &lt;br /&gt;
&lt;br /&gt;
Leiyang Guo (lguo7@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Bikram Singh (bsingh8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Navin Venugopal (nvenugo2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sathwick Goparapu (sgopara@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project created using Ruby on Rails. This project is a software primarily to create reusable learning objects through peer review and also supports team projects. Expertiza allows the creation of instructors and student accounts. This allows the instructors to post projects (student learning objects) which can be viewed and worked upon by students. These can also be peer reviewed by students later.&lt;br /&gt;
&lt;br /&gt;
====Background of the project====&lt;br /&gt;
In the existing Expertiza functionality, the bidding ability is only for bidding for a project topic for students in a course. This involves the instructor posting a list of project topics, and each student (or all students together as a team, if some students have already formed a team) then post a preference list, listing topics (s)he wants to work on. Then the bidding algorithm assigns the topics, particularly with the following features: &lt;br /&gt;
* Students (not in a team) with close preferences are assigned to a project team, and the common preference is the project topic assigned to the team. Alternatively, for existing teams, the project topic is assigned as per the common project topic preference list&lt;br /&gt;
* Each team is assigned only one topic&lt;br /&gt;
* Each topic (if assigned) is assigned to a maximum of one team&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
This project is not responsible for adding code so as to support a conference. Rather, we are interested in the bidding algorithm used in the conference, which is significantly different from the project bidding algorithm as explained above.&lt;br /&gt;
&lt;br /&gt;
For the purposes of the project, we assume that there are several reviewers in a conference who review papers which are proposed to be presented in the conference. Also, the entire list of papers proposed to be presented in the conference is also available.&lt;br /&gt;
&lt;br /&gt;
Then the basic working of the project assumes: &lt;br /&gt;
* Before the bidding close deadline, reviewers submit a list of papers they wish to review.&lt;br /&gt;
* After the bidding deadline, the algorithm assigns papers to reviewers to review, such that:&lt;br /&gt;
** Each paper (if assigned) is assigned to a maximum of R reviewers (here R represents some constant)&lt;br /&gt;
** Each reviewer is assigned a maximum of P papers to review (here P represents some constant)&lt;br /&gt;
** Assignment of papers is individual&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
&lt;br /&gt;
In this section, we discuss the problem statement, then discuss the existing code and possible changes required. &lt;br /&gt;
&lt;br /&gt;
====Problem Statement====&lt;br /&gt;
* To take the existing bidding code in Expertiza (which is meant for students bidding for project topics) and make it callable either for bidding for topics or bidding for submissions to review. &lt;br /&gt;
* A possible extension is to add other methods, like a &amp;quot;late reviewer registration&amp;quot; method, in which each new reviewer is assigned one of the least-reviewed submissions so far. Methods like these require an extension of the basic working of the project.&lt;br /&gt;
* The matching algorithm is currently not very sophisticated.  Top trading cycles is implemented in the web service (though it is currently not used by bidding assignment) and could be adapted to this use. &lt;br /&gt;
&lt;br /&gt;
In the subsequent discussion with the mentor, it was concluded that the two bidding situations are very different hence it was decided to keep the two separate, at least initially. Also, the third requirement was modified to first make the bidding for a conference using any algorithm and if time permits, to use a better algorithm like top trading cycles.&lt;br /&gt;
&lt;br /&gt;
====Current Project Aims====&lt;br /&gt;
* To develop code such that both applications (bidding for project teams and bidding for conference paper reviews) use the same code&lt;br /&gt;
* To improve the algorithm for calculating the score for a particular project topic/conference paper review assigned to a project team/conference reviewer&lt;br /&gt;
&lt;br /&gt;
We want to state here that we are not responsible for developing any conference features. Specifically, this means that we are not changing any UI features. We will be primarily relying on UI changes done by E17A5&lt;br /&gt;
&lt;br /&gt;
== Existing Algorithm ==&lt;br /&gt;
&lt;br /&gt;
==== Problem ====&lt;br /&gt;
The existing algorithm solves the following problem: &lt;br /&gt;
&lt;br /&gt;
To form teams of students of Maximum size M and then assign topics (there are N topics) based on preference lists submitted either by individual students or teams (complete or otherwise). Preference Lists can have minimum 1 topic and a maximum of L topics. &lt;br /&gt;
Then the topics are allocated to teams such that each team gets a unique topic and each topic is assigned only to one team. &lt;br /&gt;
&lt;br /&gt;
==== Functionality ====&lt;br /&gt;
The topics are assigned to project teams in 2 steps:&lt;br /&gt;
&lt;br /&gt;
* Making teams: This is done using a k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
** The basic cost function used in the algorithm is:      C(i,j) = 1/N * &amp;amp;sum; [ M -S(i) ] where i varies from 1 to N&lt;br /&gt;
** The Algorithm calculates the weights for every user, not a team or part of an incomplete team. It then assigns teams using the weights, by plotting graphs for each topic. It is as follows:&lt;br /&gt;
*** Draw a graph for every topic j with X-axis as the priority position i and the Y axis as the Weights.&lt;br /&gt;
*** Hierarchical K means to select teams such that all students in a team are close to each other in the graph above, hopefully, more towards the left of the graph, and also such that there are a minimum of 1 and a maximum of M students per team; &lt;br /&gt;
** The Algorithm is as follows: &lt;br /&gt;
   &amp;lt;nowiki&amp;gt;&lt;br /&gt;
      For every topic j :&lt;br /&gt;
         For every position i that topic j can be placed in (any) preference list:&lt;br /&gt;
              Let S(i) = number of students who selected topic j at position i of their (individual) preference list&lt;br /&gt;
              B(i) = 1/S(i)&lt;br /&gt;
              Calculate C(i,j)                &lt;br /&gt;
              Weight(i,j) = B(i) / C(i,j)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Assigning topics to teams: This is implemented as a one line, comparing bid preferences to allot topics.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
In the following subsections, we discuss the problem, proposed design and code. We are trying to combine the code so that it can be used for both the project topic bidding as well as the conference paper review bidding.&lt;br /&gt;
&lt;br /&gt;
====The Combined Problem====&lt;br /&gt;
The combined problem statement is as follows: Given a list of people (students or reviewers) and also a list of N items to bid on (project topics or conference paper reviews), we require the following: &lt;br /&gt;
* To form teams of Maximum size M &lt;br /&gt;
* Based on preference lists submitted by people/teams having a minimum of 1 item and a maximum of L topics, to allot topics to teams such that each team gets P items and each item (to be bid on) is assigned to R teams. &lt;br /&gt;
&lt;br /&gt;
==== Points of Discussion====&lt;br /&gt;
&lt;br /&gt;
We note the differences:&lt;br /&gt;
* For Bidding for Assignment Topics, M is generally greater then 1, but P = 1 and R = 1. The item to be bid on is the project topics.&lt;br /&gt;
* For Bidding for Conference Paper Reviews, M = 1 but P and R are generally greater then 1. The item to be bid on is the conference paper reviews.&lt;br /&gt;
&lt;br /&gt;
We note that a team of 1 person makes little sense, but we still implement it to be so that the code is compatible for both the applications.&lt;br /&gt;
&lt;br /&gt;
====Proposed Design====&lt;br /&gt;
Keeping the existing algorithm and the project requirements in mind, we decided to divide the code into 2 parts:&lt;br /&gt;
* Part A: Make teams for people not in a team (and if applicable, complete incomplete teams)&lt;br /&gt;
* Part B: Assign topics to teams&lt;br /&gt;
&lt;br /&gt;
We note that Part A has been implemented on a web service independent of Expertiza. We also note that the algorithm explained above applies only to Part A, and that it is pretty sophisticated. Hence we choose to keep the existing code as is for this part. We will simply call the webservice, provide the list of people, their bidding preference and also the max_team_size.&lt;br /&gt;
&lt;br /&gt;
Part B is implemented as one line. It is pretty simple. We also note that it simply cannot be used for conference paper review assignemnt. Hence we completely change this section and implement it using a new algorithm. &lt;br /&gt;
&lt;br /&gt;
====Proposed Algorithm for Part B====&lt;br /&gt;
Let N = Number of topics&lt;br /&gt;
    B = Base score&lt;br /&gt;
    t = Total number of topics an user prefers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For every topic i:&lt;br /&gt;
     den = find_den&lt;br /&gt;
     for every user j:&lt;br /&gt;
         if(user has preferred this topic)&lt;br /&gt;
              r = priority(topic)&lt;br /&gt;
              num = (N + 1 - r) * B * N&lt;br /&gt;
              score[topic][user] = num/den + B&lt;br /&gt;
         if(user has preferred no topic)&lt;br /&gt;
              score[topic][user] = B&lt;br /&gt;
         if(user has not preferred this topic)&lt;br /&gt;
              num = B * N&lt;br /&gt;
              score[topic][user] = B - num/den&lt;br /&gt;
&lt;br /&gt;
Now find_den =  &amp;amp;sum; [ N + 1 ] - &amp;amp;sum; [k] where the iterating variable k varies from 1 to t&lt;br /&gt;
&lt;br /&gt;
==== Methodology ====&lt;br /&gt;
We will implement this new algorithm such that the code is DRY, proper naming conventions are used&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
Actors: &lt;br /&gt;
* Conference Reviewer: Submits a preference list of papers and reviews assigned papers&lt;br /&gt;
* Conference Administrator: Responsible for the assignment of topics to the reviewers&lt;br /&gt;
&lt;br /&gt;
Scenario&lt;br /&gt;
The case of reviewers submitting a list of preferred topics and the administrator running the assignment process. For our project, the main modification would be concentrating on Use Case 4 and 5.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Choose and submit preference to be reviewed====&lt;br /&gt;
* Use Case Id: 1&lt;br /&gt;
* Use Case Description: Participants choose the preference for conference review topics and submit it&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
* Pre Conditions: Conference papers are presented and submitted, and the participants are eligible for reviewing&lt;br /&gt;
* Post Conditions: Conference committee members can view participants preference and run bidding algorithm on it&lt;br /&gt;
&lt;br /&gt;
====Saving topic and participant information into database====&lt;br /&gt;
* Use Case Id: 2&lt;br /&gt;
* Use Case Description: bidding preferences and related participants information are processed and saved to database&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by Use Case 1&lt;br /&gt;
* Pre Conditions: participants preferences are submitted&lt;br /&gt;
* Post Conditions: information can be retrieved and used by bidding algorithm&lt;br /&gt;
&lt;br /&gt;
====View list of topics and bid====&lt;br /&gt;
* Use Case Id: 3&lt;br /&gt;
* Use Case Description: participants can view list of topic available for conference paper topic&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
&lt;br /&gt;
====Run bidding Algorithm====&lt;br /&gt;
* Use Case Id: 4&lt;br /&gt;
* Use Case Description: Committee members can run bidding algorithm on application to help assigning the conference paper topics to participants&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: preferences must be submitted by participants&lt;br /&gt;
* Post Conditions: the bidding result can be used for paper assignment&lt;br /&gt;
&lt;br /&gt;
====Display assigned paper to bidders====&lt;br /&gt;
* Use Case Id: 5&lt;br /&gt;
* Use Case Description: System assigns participants to conference paper topics according to bidding result&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by Use Case 4&lt;br /&gt;
* Pre Conditions: bidding algorithm has run and result has been returned&lt;br /&gt;
* Post Conditions: Participants can view topics been assigned to them&lt;br /&gt;
&lt;br /&gt;
====Change assignment of review using CRUD actions====&lt;br /&gt;
* Use Case Id: 6&lt;br /&gt;
* Use Case Description: Conference committee members can change assignment result manually&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: topic assignment has been done&lt;br /&gt;
* Post Conditions: changes in bidding result is visible to participants and other committee members&lt;br /&gt;
&lt;br /&gt;
== Data Flow Diagram ==&lt;br /&gt;
Below is the Data Flow Diagram for process flows of the project. The diagram shows the process of bidding algorithm that we proposed to use for conference paper review assignment.&lt;br /&gt;
[[File:Webp.net-resizeimage (1).png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We explain in the terms of the actors: Reviewer and Administrator&lt;br /&gt;
* Before the deadline, all the reviewers have to submit preference list of papers. They can save, modify list as many times as they want, but they can submit once&lt;br /&gt;
* This information is saved in the database&lt;br /&gt;
* When the deadline is passed, stop accepting preference lists&lt;br /&gt;
* The administrator runs the paper assignment algorithm&lt;br /&gt;
** For every topic, calculate the score for each user&lt;br /&gt;
** Make a common scorelist, which keeps score assigned to every topic of every user. There should be a way to find out the topic and user a particular element of the scorelist belongs to&lt;br /&gt;
** Now start assigning topics according to highest score&lt;br /&gt;
** Keep track of the number of topics assigned to each user and the number of users assigned to each topic&lt;br /&gt;
** If the number of topics assigned to one user reaches the maximum value, remove that user from consideration (remove all scores corresponding to that user from scorelist)&lt;br /&gt;
** If the number of users assigned to one topic reaches the maximum value, remove that topic from consideration (remove all scores correspoinding to that topic from scorelist)&lt;br /&gt;
** Continue the above process until the scorelist is empty&lt;br /&gt;
* Save the bidding into the database&lt;br /&gt;
* Inform users about the results of the bidding&lt;br /&gt;
&lt;br /&gt;
== Changing Existing Files ==&lt;br /&gt;
This subsection details what is to be changed in the existing code.&lt;br /&gt;
&lt;br /&gt;
=== Files to be changed === &lt;br /&gt;
*lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Current Code ===&lt;br /&gt;
This is current code for the bidding assignment. The code will basically get target assignment and then get all topics and teams for the assignment. Then it will assign priority of each team-topic pair according to user preference for each user, and append it to priority information list. Afterward, it sends priority information along with maximum team size information to web-server and rearranging the priority order according to top-trading cycle algorithm, and pass returned result to create_new_teams_for_bidding_response function for bidding handling on topics with preferences and run_intelligent_bid function for bidding handling for leftover assignment as well as cleaning up.&lt;br /&gt;
&lt;br /&gt;
  def run_intelligent_assignment&lt;br /&gt;
    priority_info = []&lt;br /&gt;
    assignment = Assignment.find_by(id: params[:id])&lt;br /&gt;
    topics = assignment.sign_up_topics&lt;br /&gt;
    teams = assignment.teams&lt;br /&gt;
    teams.each do |team|&lt;br /&gt;
      # grab student id and list of bids&lt;br /&gt;
      bids = []&lt;br /&gt;
      topics.each do |topic|&lt;br /&gt;
        bid_record = Bid.find_by(team_id: team.id, topic_id: topic.id)&lt;br /&gt;
        bids &amp;lt;&amp;lt; (bid_record.nil? ? 0 : bid_record.priority ||= 0)&lt;br /&gt;
      end&lt;br /&gt;
      team.users.each { |user| priority_info &amp;lt;&amp;lt; { pid: user.id, ranks: bids } if bids.uniq != [0] }&lt;br /&gt;
    end&lt;br /&gt;
    data = { users: priority_info, max_team_size: assignment.max_team_size }&lt;br /&gt;
    url = WEBSERVICE_CONFIG[&amp;quot;topic_bidding_webservice_url&amp;quot;]&lt;br /&gt;
    begin&lt;br /&gt;
      response = RestClient.post url, data.to_json, content_type: :json, accept: :json&lt;br /&gt;
      # store each summary in a hashmap and use the question as the key&lt;br /&gt;
      teams = JSON.parse(response)[&amp;quot;teams&amp;quot;]&lt;br /&gt;
      create_new_teams_for_bidding_response(teams, assignment)&lt;br /&gt;
      run_intelligent_bid(assignment)&lt;br /&gt;
    rescue =&amp;gt; err&lt;br /&gt;
      flash[:error] = err.message&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Proposed Code ===&lt;br /&gt;
&lt;br /&gt;
Then we will change the run_intelligent_assignment function to implementation as shown below:&lt;br /&gt;
The update involves the use of the existing assignment bidding tables since the UI and table entries specific to conference paper bidding has not been created and is out of scope for this project.&lt;br /&gt;
&lt;br /&gt;
Proposal: Allow the instructor to choose whether is it a topic assignment bid or conference paper bid via an update of a flag variable from the UI. For example, the is_assignment variable is used to indicate if it is an assignment bidding. If not the flag is set to false and assumes it is a conference bid. This enables the reuse of existing precondition variables and table entries. The bidding is run by calculating the weighted scores for each team's bidding priority of all the topics. Score calculation is done as explained in the Design section.&lt;br /&gt;
&lt;br /&gt;
  def run_conference_bid teams, assignment, topic_per_team, team_per_topic&lt;br /&gt;
    incomplete_teams = Hash.new(0)&lt;br /&gt;
    incomplete_topics = Hash.new(0)&lt;br /&gt;
    all_topics=[]&lt;br /&gt;
    all_topics = assignment.sign_up_topics&lt;br /&gt;
    score_list=Array.new(teams.length*all_topics.length){Array.new(3)}&lt;br /&gt;
    sorted_list=Array.new(teams.length*all_topics.length){Array.new(3)}&lt;br /&gt;
    temp=[]&lt;br /&gt;
    base = 10&lt;br /&gt;
    p = 0&lt;br /&gt;
    #looping through each team to calculate score for each topic in the assignment&lt;br /&gt;
    teams.each do |t|&lt;br /&gt;
      incomplete_teams.store(t.id,0)&lt;br /&gt;
      team_bids = Bid.where(team_id: t.id)&lt;br /&gt;
      denom = 0&lt;br /&gt;
      b_length = team_bids.length&lt;br /&gt;
      (1..b_length).each do |i|&lt;br /&gt;
        denom = denom+all_topics.length - i&lt;br /&gt;
      end&lt;br /&gt;
      #Score calculation based on bid priority&lt;br /&gt;
      all_topics.each do |j|&lt;br /&gt;
        if(team_bids.any?{|tb| tb.topic_id == j.id})&lt;br /&gt;
          bid_priority = Bid.where(team_id:t.id,topic_id:j.id).first.priority&lt;br /&gt;
          score = base+((all_topics.length+1-bid_priority)*base*all_topics.length) / denom&lt;br /&gt;
        elsif(team_bids.length!=0)&lt;br /&gt;
          score = base-(base*all_topics.length)/denom&lt;br /&gt;
        else&lt;br /&gt;
          score = base&lt;br /&gt;
        end&lt;br /&gt;
        score_list[p][0] = score&lt;br /&gt;
        score_list[p][1] = t.id&lt;br /&gt;
        score_list[p][2] = j.id&lt;br /&gt;
        p+=1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    sorted_list = score_list.sort_by{|e| [e[0],e[1],e[2]]}.each{|line| p line}&lt;br /&gt;
    sorted_list.reverse!&lt;br /&gt;
    all_topics.each do |k|&lt;br /&gt;
      incomplete_topics.store(k.id,0)&lt;br /&gt;
    end&lt;br /&gt;
    if(all_topics.length*team_per_topic&amp;lt;teams.length)&lt;br /&gt;
      flash[:error] = 'There are not enough reviews to be assigned'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    #Assigning topics to teams based on highest score&lt;br /&gt;
    sorted_list.each do |s|&lt;br /&gt;
      if((incomplete_topics[s[2]]&amp;lt;team_per_topic) &amp;amp;&amp;amp; (incomplete_teams[s[1]]&amp;lt;topic_per_team))&lt;br /&gt;
        SignedUpTeam.create(team_id: s[1], topic_id: s[2])&lt;br /&gt;
        incomplete_teams[s[1]]+=1&lt;br /&gt;
        incomplete_topics[s[2]]+=1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    assignment.update_attribute(:is_intelligent,false)&lt;br /&gt;
    flash[:notice] = 'The intelligent assignment was successfully completed for ' + assignment.name + '.'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
* UI testing of the implemented functionality to be done.&lt;br /&gt;
&lt;br /&gt;
** Log in as a participants/student&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Go to Other's works and check preferred conference paper topics to bid on reviewing&lt;br /&gt;
** Click submit and wait for bidding deadline&lt;br /&gt;
** After deadline reaches, go back to assignment and click on Other's work to view topics assigned for reviewing&lt;br /&gt;
&lt;br /&gt;
===Automated Test Cases===&lt;br /&gt;
* TDD and Feature Test cases to be written. For instance, we will do Rspec test on cases below:&lt;br /&gt;
** Test on score calculation, see if the calculation gives right scoring distribution when no preference is given, when one preference is given, and when multiple preferences are given;&lt;br /&gt;
** Test on preference levels matching, check if the algorithm is matched first, second, third, and so on preferences and evaluating them correctly;&lt;br /&gt;
** Test if teams per topic or topics per team can exceed required number by assigning many teams with same first preference and assigning many teams with multiple preferences (preference number per team &amp;gt; number of topics/2);&lt;br /&gt;
* For the Rspec tests, we will have to create an object of team, assignment, and ranks. A sample team object in JSON format would be:&lt;br /&gt;
  {&amp;quot;users&amp;quot;:[{&amp;quot;ranks&amp;quot;:[1,0,2,3], &amp;quot;pid&amp;quot;:1023}],&amp;quot;max_team_size&amp;quot;:1}&lt;br /&gt;
* The objects would be generated inside the spec file lottery_controller_spec.rb using model object initializer;&lt;br /&gt;
&lt;br /&gt;
===Edge cases===&lt;br /&gt;
&lt;br /&gt;
* Case 1: No reviewer submits a list of preferred topics to review&lt;br /&gt;
&lt;br /&gt;
* Case 2: All reviewers submit exactly the same list of topics to review.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114769</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114769"/>
		<updated>2017-12-13T12:06:46Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the the project E17A7 which is one of the several projects to allow Expertiza support (the currently unsupported) conference. Specifcally, it involves adding the ability of conference paper reviewers to bid for what they want to review. The members of this project are: &lt;br /&gt;
&lt;br /&gt;
Leiyang Guo (lguo7@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Bikram Singh (bsingh8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Navin Venugopal (nvenugo2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sathwick Goparapu (sgopara@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project created using Ruby on Rails. This project is an software primarily to create reusable learning objects through peer review and also supports team projects. Expertiza allows the creation of instructors and student accounts. This allows the instructors to post projects (student learning objects) which can be viewed and worked upon by students. These can also be peer reviewed by students later.&lt;br /&gt;
&lt;br /&gt;
====Background of the project====&lt;br /&gt;
In the existing Expertiza functionality, the bidding ability is only for bidding for a project topic for students in a course. This involves the instructor posting a list of project topics, and each student (or all students together as a team, if some students have already formed a team) then posts a preference list, listing topics (s)he wants to work on. Then the bidding algorithm assigns the topics, particularly with the following features: &lt;br /&gt;
* Students (not in at team) with close preferences are assigned into a project team, and the common preference is the project topic assigned to the team. Alternatively, for existing teams the project topic is assigned as per the common project topic preference list&lt;br /&gt;
* Each team is assigned only one topic&lt;br /&gt;
* Each topic (if assigned) is assigned to a maximum of one team&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
This project is not responsible for adding code so as to support a conference. Rather, we are interested in the bidding algorithm used in the conference, which is significantly different from the project bidding algorithm as explained above.&lt;br /&gt;
&lt;br /&gt;
For the purposes of the project, we assume that there are several reviewers in a conference who review papers which are proposed to be presented in the conference. Also, the entire list of papers proposed to be presented in the conference is also available.&lt;br /&gt;
&lt;br /&gt;
Then the basic working of the project assumes: &lt;br /&gt;
* Before the bidding close deadline, reviewers submit a list of papers they wish to review.&lt;br /&gt;
* After the bidding deadline, the algorithm assigns papers to reviewers to review, such that:&lt;br /&gt;
** Each paper (if assigned) is assigned to a maximum of R reviewers (here R represents some constant)&lt;br /&gt;
** Each reviewer is assigned a maximum of P papers to review (here P represents some constant)&lt;br /&gt;
** Assignment of papers is individual&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
&lt;br /&gt;
In this section we discuss the problem statement, then discuss the existing code and possible changes required. &lt;br /&gt;
&lt;br /&gt;
====Problem Statement====&lt;br /&gt;
* To take the existing bidding code in Expertiza (which is meant for students bidding for project topics) and make it callable either for bidding for topics or bidding for submissions to review. &lt;br /&gt;
* A possible extension is to add other methods, like a &amp;quot;late reviewer registration&amp;quot; method, in which each new reviewer is assigned one of the least-reviewed submissions so far. Methods like these require an extension of the basic working of the project.&lt;br /&gt;
* The matching algorithm is currently not very sophisticated.  Top trading cycles is implemented in the web service (though it is currently not used by bidding assignment), and could be adapted to this use. &lt;br /&gt;
&lt;br /&gt;
In the subsequent discussion with the mentor, it was concluded that the two bidding situations are very different hence it was decided to keep the two separate, at least initially. Also the third requirement was modified to first make the bidding for a conference using any algorithm and if time permits, to use a better algorithm like top trading cycles.&lt;br /&gt;
&lt;br /&gt;
====Current Project Aims====&lt;br /&gt;
* To develop code such that both applications (bidding for project teams and bidding for conference paper reviews) use the same code&lt;br /&gt;
* To improve the algorithm for calculating the score for a particular project topic/conference paper review assigned to a project team/conference reviewer&lt;br /&gt;
&lt;br /&gt;
We want to state here that we are not responsible for developing any conference features. Specifically, this means that we are not changing any UI features. We will be primarily relying on UI changes done by E17A5&lt;br /&gt;
&lt;br /&gt;
== Existing Algorithm ==&lt;br /&gt;
&lt;br /&gt;
==== Problem ====&lt;br /&gt;
The existing algorithm solves the following problem: &lt;br /&gt;
&lt;br /&gt;
To form teams of students of Maximum size M and then assign topics (there are N topics) based on preference lists submitted either by individual students or teams (complete or otherwise). Preference Lists can have minimum 1 topic and a maximum of L topics. &lt;br /&gt;
Then the topics are alloted to teams such that each team gets an unique topic and each topic is assigned only to one team. &lt;br /&gt;
&lt;br /&gt;
==== Functionality ====&lt;br /&gt;
The topics are assigned to project teams in 2 steps:&lt;br /&gt;
&lt;br /&gt;
* Making teams: This is done using a k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
** The basic cost function used in the algorithm is:      C(i,j) = 1/N * &amp;amp;sum; [ M -S(i) ] where i varies from 1 to N&lt;br /&gt;
** The Algorithm calculates the weights for every user not a team or part of an incomplete team. It then assigns teams using the weights, by plotting graphs for each topic. It is as follows:&lt;br /&gt;
*** Draw a graph for every topic j with X axis as the priority position i and the Y axis as the Weights.&lt;br /&gt;
*** Hierarchical K means to select teams such that all students in a team are close to each other in the graph above, hopefully more towards the left of the graph, and also such that there are a minimum of 1 and a maximum of M students per team; &lt;br /&gt;
** The Algorithm is as follows: &lt;br /&gt;
   &amp;lt;nowiki&amp;gt;&lt;br /&gt;
      For every topic j :&lt;br /&gt;
         For every position i that topic j can be placed in (any) preference list:&lt;br /&gt;
              Let S(i) = number of students who selected topic j at position i of their (individual) preference list&lt;br /&gt;
              B(i) = 1/S(i)&lt;br /&gt;
              Calculate C(i,j)                &lt;br /&gt;
              Weight(i,j) = B(i) / C(i,j)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Assigning topics to teams: This is implemented as a one line, comparing bid preferences to allot topics.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
In the following subsections, we discuss the problem, proposed design and code. We are trying to combine the code so that it can be used for both the project topic bidding as well as the conference paper review bidding.&lt;br /&gt;
&lt;br /&gt;
====The Combined Problem====&lt;br /&gt;
The combined problem statement is as follows: Given a list of people (students or reviewers) and also a list of N items to bid on (project topics or conference paper reviews), we require the following: &lt;br /&gt;
* To form teams of Maximum size M &lt;br /&gt;
* Based on preference lists submitted by people/teams having a minimum of 1 item and a maximum of L topics, to allot topics to teams such that each team gets P items and each item (to be bid on) is assigned to R teams. &lt;br /&gt;
&lt;br /&gt;
==== Points of Discussion====&lt;br /&gt;
&lt;br /&gt;
We note the differences:&lt;br /&gt;
* For Bidding for Assignment Topics, M is generally greater then 1, but P = 1 and R = 1. The item to be bid on is the project topics.&lt;br /&gt;
* For Bidding for Conference Paper Reviews, M = 1 but P and R are generally greater then 1. The item to be bid on is the conference paper reviews.&lt;br /&gt;
&lt;br /&gt;
We note that a team of 1 person makes little sense, but we still implement it to be so that the code is compatible for both the applications.&lt;br /&gt;
&lt;br /&gt;
====Proposed Design====&lt;br /&gt;
Keeping the existing algorithm and the project requirements in mind, we decided to divide the code into 2 parts:&lt;br /&gt;
* Part A: Make teams for people not in a team (and if applicable, complete incomplete teams)&lt;br /&gt;
* Part B: Assign topics to teams&lt;br /&gt;
&lt;br /&gt;
We note that Part A has been implemented on a web service independent of Expertiza. We also note that the algorithm explained above applies only to Part A, and that it is pretty sophisticated. Hence we choose to keep the existing code as is for this part. We will simply call the webservice, provide the list of people, their bidding preference and also the max_team_size.&lt;br /&gt;
&lt;br /&gt;
Part B is implemented as one line. It is pretty simple. We also note that it simply cannot be used for conference paper review assignemnt. Hence we completely change this section and implement it using a new algorithm. &lt;br /&gt;
&lt;br /&gt;
====Proposed Algorithm for Part B====&lt;br /&gt;
Let N = Number of topics&lt;br /&gt;
    B = Base score&lt;br /&gt;
    t = Total number of topics an user prefers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For every topic i:&lt;br /&gt;
     den = find_den&lt;br /&gt;
     for every user j:&lt;br /&gt;
         if(user has preferred this topic)&lt;br /&gt;
              r = priority(topic)&lt;br /&gt;
              num = (N + 1 - r) * B * N&lt;br /&gt;
              score[topic][user] = num/den + B&lt;br /&gt;
         if(user has preferred no topic)&lt;br /&gt;
              score[topic][user] = B&lt;br /&gt;
         if(user has not preferred this topic)&lt;br /&gt;
              num = B * N&lt;br /&gt;
              score[topic][user] = B - num/den&lt;br /&gt;
&lt;br /&gt;
Now find_den =  &amp;amp;sum; [ N + 1 ] - &amp;amp;sum; [k] where the iterating variable k varies from 1 to t&lt;br /&gt;
&lt;br /&gt;
==== Methodology ====&lt;br /&gt;
We will implement this new algorithm such that the code is DRY, proper naming conventions are used&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
Actors: &lt;br /&gt;
* Conference Reviewer: Submits a preference list of papers and reviews assigned papers&lt;br /&gt;
* Conference Administrator: Responsible for the assignment of topics to the reviewers&lt;br /&gt;
&lt;br /&gt;
Scenario&lt;br /&gt;
The case of reviewers submitting a list of preferred topics and the administrator running the assignment process. For our project, the main modification would be concentrating on Use Case 4 and 5.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Choose and submit preference to be reviewed====&lt;br /&gt;
* Use Case Id: 1&lt;br /&gt;
* Use Case Description: Participants choose the preference for conference review topics and submit it&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
* Pre Conditions: Conference papers are presented and submitted, and the participants are eligible for reviewing&lt;br /&gt;
* Post Conditions: Conference committee members can view participants preference and run bidding algorithm on it&lt;br /&gt;
&lt;br /&gt;
====Saving topic and participant information into database====&lt;br /&gt;
* Use Case Id: 2&lt;br /&gt;
* Use Case Description: bidding preferences and related participants information are processed and saved to database&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by: Use Case 1&lt;br /&gt;
* Pre Conditions: participants preferences are submitted&lt;br /&gt;
* Post Conditions: information can be retrieved and used by bidding algorithm&lt;br /&gt;
&lt;br /&gt;
====View list of topics and bid====&lt;br /&gt;
* Use Case Id: 3&lt;br /&gt;
* Use Case Description: participants can view list of topic available for conference paper topic&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
&lt;br /&gt;
====Run bidding Algorithm====&lt;br /&gt;
* Use Case Id: 4&lt;br /&gt;
* Use Case Description: Committee members can run bidding algorithm on application to help assigning the conference paper topics to participants&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: preferences must be submitted by participants&lt;br /&gt;
* Post Conditions: the bidding result can be used for paper assignment&lt;br /&gt;
&lt;br /&gt;
====Display assigned paper to bidders====&lt;br /&gt;
* Use Case Id: 5&lt;br /&gt;
* Use Case Description: System assigns participants to conference paper topics according to bidding result&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by: Use Case 4&lt;br /&gt;
* Pre Conditions: bidding algorithm has run and result has been returned&lt;br /&gt;
* Post Conditions: Participants can view topics been assigned to them&lt;br /&gt;
&lt;br /&gt;
====Change assignment of review using CRUD actions====&lt;br /&gt;
* Use Case Id: 6&lt;br /&gt;
* Use Case Description: Conference committee members can change assignment result manually&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: topic assignment has been done&lt;br /&gt;
* Post Conditions: changes on bidding result is visible to participants and other committee members&lt;br /&gt;
&lt;br /&gt;
== Data Flow Diagram ==&lt;br /&gt;
Below is the Data Flow Diagram for process flows of the project. The diagram shows the process of bidding algorithm that we proposed to use for conference paper review assignment.&lt;br /&gt;
[[File:Webp.net-resizeimage (1).png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We explain in the terms of the actors: Reviewer and Administrator&lt;br /&gt;
* Before the deadline all the reviewers have to submit preference list of papers. They can save, modify list as many times as they want, but they can submit once&lt;br /&gt;
* This information is saved in the database&lt;br /&gt;
* When the deadline is passed, stop accepting preference lists&lt;br /&gt;
* The administrator runs the paper assignment algroithm&lt;br /&gt;
** For every topic, calculate the score for each user&lt;br /&gt;
** Make a common scorelist, which keeps score assigned to every topic of every user. There should be a way to find out the topic and user a particular element of the scorelist belongs to&lt;br /&gt;
** Now start assigning topics according to highest score&lt;br /&gt;
** Keep track of the number of topics assigned to each user and the number of users assigned to each topic&lt;br /&gt;
** If the number of topics assigned to one user reaches the maximum value, remove that user from consideration (remove all scores corresponding to that user from scorelist)&lt;br /&gt;
** If the number of users assigned to one topic reaches the maximum value, remove that topic from consideration (remove all scores correspoinding to that topic from scorelist)&lt;br /&gt;
** Continue the above process till the scorelist is empty&lt;br /&gt;
* Save the bidding into the database&lt;br /&gt;
* Inform users about the results of the bidding&lt;br /&gt;
&lt;br /&gt;
== Changing Existing Files ==&lt;br /&gt;
This sub section details what is to be changed in the existing code.&lt;br /&gt;
&lt;br /&gt;
=== Files to be changed === &lt;br /&gt;
*lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Current Code ===&lt;br /&gt;
This is current code for bidding assignment. The code will basically get target assignment and then get all topics and teams for the assignment. Then it will assign priority of each team-topic pair according to user preference  for each user, and append it to priority information list. Afterward it sends priority information along with maximum team size information to web-server and rearranging the priority order according to top-trading cycle algorithm, and pass returned result to create_new_teams_for_bidding_response function for bidding handling on topics with preferences and run_intelligent_bid function for bidding handling for leftover assignment as well as cleaning up.&lt;br /&gt;
&lt;br /&gt;
  def run_intelligent_assignment&lt;br /&gt;
    priority_info = []&lt;br /&gt;
    assignment = Assignment.find_by(id: params[:id])&lt;br /&gt;
    topics = assignment.sign_up_topics&lt;br /&gt;
    teams = assignment.teams&lt;br /&gt;
    teams.each do |team|&lt;br /&gt;
      # grab student id and list of bids&lt;br /&gt;
      bids = []&lt;br /&gt;
      topics.each do |topic|&lt;br /&gt;
        bid_record = Bid.find_by(team_id: team.id, topic_id: topic.id)&lt;br /&gt;
        bids &amp;lt;&amp;lt; (bid_record.nil? ? 0 : bid_record.priority ||= 0)&lt;br /&gt;
      end&lt;br /&gt;
      team.users.each { |user| priority_info &amp;lt;&amp;lt; { pid: user.id, ranks: bids } if bids.uniq != [0] }&lt;br /&gt;
    end&lt;br /&gt;
    data = { users: priority_info, max_team_size: assignment.max_team_size }&lt;br /&gt;
    url = WEBSERVICE_CONFIG[&amp;quot;topic_bidding_webservice_url&amp;quot;]&lt;br /&gt;
    begin&lt;br /&gt;
      response = RestClient.post url, data.to_json, content_type: :json, accept: :json&lt;br /&gt;
      # store each summary in a hashmap and use the question as the key&lt;br /&gt;
      teams = JSON.parse(response)[&amp;quot;teams&amp;quot;]&lt;br /&gt;
      create_new_teams_for_bidding_response(teams, assignment)&lt;br /&gt;
      run_intelligent_bid(assignment)&lt;br /&gt;
    rescue =&amp;gt; err&lt;br /&gt;
      flash[:error] = err.message&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Proposed Code ===&lt;br /&gt;
&lt;br /&gt;
  def run_conference_bid teams, assignment, topic_per_team, team_per_topic&lt;br /&gt;
    incomplete_teams = Hash.new(0)&lt;br /&gt;
    incomplete_topics = Hash.new(0)&lt;br /&gt;
    all_topics=[]&lt;br /&gt;
    all_topics = assignment.sign_up_topics&lt;br /&gt;
    score_list=Array.new(teams.length*all_topics.length){Array.new(3)}&lt;br /&gt;
    sorted_list=Array.new(teams.length*all_topics.length){Array.new(3)}&lt;br /&gt;
    temp=[]&lt;br /&gt;
    base = 10&lt;br /&gt;
    p = 0&lt;br /&gt;
    #looping through each team to calculate score for each topic in the assignment&lt;br /&gt;
    teams.each do |t|&lt;br /&gt;
      incomplete_teams.store(t.id,0)&lt;br /&gt;
      team_bids = Bid.where(team_id: t.id)&lt;br /&gt;
      denom = 0&lt;br /&gt;
      b_length = team_bids.length&lt;br /&gt;
      (1..b_length).each do |i|&lt;br /&gt;
        denom = denom+all_topics.length - i&lt;br /&gt;
      end&lt;br /&gt;
      #Score calculation based on bid priority&lt;br /&gt;
      all_topics.each do |j|&lt;br /&gt;
        if(team_bids.any?{|tb| tb.topic_id == j.id})&lt;br /&gt;
          bid_priority = Bid.where(team_id:t.id,topic_id:j.id).first.priority&lt;br /&gt;
          score = base+((all_topics.length+1-bid_priority)*base*all_topics.length) / denom&lt;br /&gt;
        elsif(team_bids.length!=0)&lt;br /&gt;
          score = base-(base*all_topics.length)/denom&lt;br /&gt;
        else&lt;br /&gt;
          score = base&lt;br /&gt;
        end&lt;br /&gt;
        score_list[p][0] = score&lt;br /&gt;
        score_list[p][1] = t.id&lt;br /&gt;
        score_list[p][2] = j.id&lt;br /&gt;
        p+=1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    sorted_list = score_list.sort_by{|e| [e[0],e[1],e[2]]}.each{|line| p line}&lt;br /&gt;
    sorted_list.reverse!&lt;br /&gt;
    all_topics.each do |k|&lt;br /&gt;
      incomplete_topics.store(k.id,0)&lt;br /&gt;
    end&lt;br /&gt;
    if(all_topics.length*team_per_topic&amp;lt;teams.length)&lt;br /&gt;
      flash[:error] = 'There are not enough reviews to be assigned'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    #Assigning topics to teams based on highest score&lt;br /&gt;
    sorted_list.each do |s|&lt;br /&gt;
      if((incomplete_topics[s[2]]&amp;lt;team_per_topic) &amp;amp;&amp;amp; (incomplete_teams[s[1]]&amp;lt;topic_per_team))&lt;br /&gt;
        SignedUpTeam.create(team_id: s[1], topic_id: s[2])&lt;br /&gt;
        incomplete_teams[s[1]]+=1&lt;br /&gt;
        incomplete_topics[s[2]]+=1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    assignment.update_attribute(:is_intelligent,false)&lt;br /&gt;
    flash[:notice] = 'The intelligent assignment was successfully completed for ' + assignment.name + '.'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then we will change the run_intelligent_assignment function to implementation as below:&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
* UI testing of the implemented functionality to be done.&lt;br /&gt;
&lt;br /&gt;
** Log in as a participants/student&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Go to Other's works and check preferred conference paper topics to bid on reviewing&lt;br /&gt;
** Click submit and wait for bidding deadline&lt;br /&gt;
** After deadline reaches, go back to assignment and click on Other's work to view topics assigned for reviewing&lt;br /&gt;
&lt;br /&gt;
===Automated Test Cases===&lt;br /&gt;
* TDD and Feature Test cases to be written. For instance we will do Rspec test on cases below:&lt;br /&gt;
** Test on score calculation, see if the calculation gives right scoring distribution when no preference is given, when one preference is given, and when multiple preferences are given;&lt;br /&gt;
** Test on preference levels matching, check if the algorithm is match first, second, third, and so on preferences and evaluating them correctly;&lt;br /&gt;
** Test if teams per topic or topics per team can exceed required number by assigning many team with same first preference and assigning many team with multiple preferences (preference number per team &amp;gt; number of topics/2);&lt;br /&gt;
* For the Rspec tests, we will have to create object of team, assignment, and ranks. A sample team object in JSON format would be:&lt;br /&gt;
  {&amp;quot;users&amp;quot;:[{&amp;quot;ranks&amp;quot;:[1,0,2,3], &amp;quot;pid&amp;quot;:1023}],&amp;quot;max_team_size&amp;quot;:1}&lt;br /&gt;
* The objects would be generated inside the spec file lottery_controller_spec.rb using model object initializer;&lt;br /&gt;
&lt;br /&gt;
===Edge cases===&lt;br /&gt;
&lt;br /&gt;
* Case 1: No reviewer submits a list of preferred topics to review&lt;br /&gt;
&lt;br /&gt;
* Case 2: All reviewers submits exactly the same list of topics to review.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114768</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114768"/>
		<updated>2017-12-13T12:05:57Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the the project E17A7 which is one of the several projects to allow Expertiza support (the currently unsupported) conference. Specifcally, it involves adding the ability of conference paper reviewers to bid for what they want to review. The members of this project are: &lt;br /&gt;
&lt;br /&gt;
Leiyang Guo (lguo7@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Bikram Singh (bsingh8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Navin Venugopal (nvenugo2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sathwick Goparapu (sgopara@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project created using Ruby on Rails. This project is an software primarily to create reusable learning objects through peer review and also supports team projects. Expertiza allows the creation of instructors and student accounts. This allows the instructors to post projects (student learning objects) which can be viewed and worked upon by students. These can also be peer reviewed by students later.&lt;br /&gt;
&lt;br /&gt;
====Background of the project====&lt;br /&gt;
In the existing Expertiza functionality, the bidding ability is only for bidding for a project topic for students in a course. This involves the instructor posting a list of project topics, and each student (or all students together as a team, if some students have already formed a team) then posts a preference list, listing topics (s)he wants to work on. Then the bidding algorithm assigns the topics, particularly with the following features: &lt;br /&gt;
* Students (not in at team) with close preferences are assigned into a project team, and the common preference is the project topic assigned to the team. Alternatively, for existing teams the project topic is assigned as per the common project topic preference list&lt;br /&gt;
* Each team is assigned only one topic&lt;br /&gt;
* Each topic (if assigned) is assigned to a maximum of one team&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
This project is not responsible for adding code so as to support a conference. Rather, we are interested in the bidding algorithm used in the conference, which is significantly different from the project bidding algorithm as explained above.&lt;br /&gt;
&lt;br /&gt;
For the purposes of the project, we assume that there are several reviewers in a conference who review papers which are proposed to be presented in the conference. Also, the entire list of papers proposed to be presented in the conference is also available.&lt;br /&gt;
&lt;br /&gt;
Then the basic working of the project assumes: &lt;br /&gt;
* Before the bidding close deadline, reviewers submit a list of papers they wish to review.&lt;br /&gt;
* After the bidding deadline, the algorithm assigns papers to reviewers to review, such that:&lt;br /&gt;
** Each paper (if assigned) is assigned to a maximum of R reviewers (here R represents some constant)&lt;br /&gt;
** Each reviewer is assigned a maximum of P papers to review (here P represents some constant)&lt;br /&gt;
** Assignment of papers is individual&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
&lt;br /&gt;
In this section we discuss the problem statement, then discuss the existing code and possible changes required. &lt;br /&gt;
&lt;br /&gt;
====Problem Statement====&lt;br /&gt;
* To take the existing bidding code in Expertiza (which is meant for students bidding for project topics) and make it callable either for bidding for topics or bidding for submissions to review. &lt;br /&gt;
* A possible extension is to add other methods, like a &amp;quot;late reviewer registration&amp;quot; method, in which each new reviewer is assigned one of the least-reviewed submissions so far. Methods like these require an extension of the basic working of the project.&lt;br /&gt;
* The matching algorithm is currently not very sophisticated.  Top trading cycles is implemented in the web service (though it is currently not used by bidding assignment), and could be adapted to this use. &lt;br /&gt;
&lt;br /&gt;
In the subsequent discussion with the mentor, it was concluded that the two bidding situations are very different hence it was decided to keep the two separate, at least initially. Also the third requirement was modified to first make the bidding for a conference using any algorithm and if time permits, to use a better algorithm like top trading cycles.&lt;br /&gt;
&lt;br /&gt;
====Current Project Aims====&lt;br /&gt;
* To develop code such that both applications (bidding for project teams and bidding for conference paper reviews) use the same code&lt;br /&gt;
* To improve the algorithm for calculating the score for a particular project topic/conference paper review assigned to a project team/conference reviewer&lt;br /&gt;
&lt;br /&gt;
We want to state here that we are not responsible for developing any conference features. Specifically, this means that we are not changing any UI features. We will be primarily relying on UI changes done by E17A5&lt;br /&gt;
&lt;br /&gt;
== Existing Algorithm ==&lt;br /&gt;
&lt;br /&gt;
==== Problem ====&lt;br /&gt;
The existing algorithm solves the following problem: &lt;br /&gt;
&lt;br /&gt;
To form teams of students of Maximum size M and then assign topics (there are N topics) based on preference lists submitted either by individual students or teams (complete or otherwise). Preference Lists can have minimum 1 topic and a maximum of L topics. &lt;br /&gt;
Then the topics are alloted to teams such that each team gets an unique topic and each topic is assigned only to one team. &lt;br /&gt;
&lt;br /&gt;
==== Functionality ====&lt;br /&gt;
The topics are assigned to project teams in 2 steps:&lt;br /&gt;
&lt;br /&gt;
* Making teams: This is done using a k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
** The basic cost function used in the algorithm is:      C(i,j) = 1/N * &amp;amp;sum; [ M -S(i) ] where i varies from 1 to N&lt;br /&gt;
** The Algorithm calculates the weights for every user not a team or part of an incomplete team. It then assigns teams using the weights, by plotting graphs for each topic. It is as follows:&lt;br /&gt;
*** Draw a graph for every topic j with X axis as the priority position i and the Y axis as the Weights.&lt;br /&gt;
*** Hierarchical K means to select teams such that all students in a team are close to each other in the graph above, hopefully more towards the left of the graph, and also such that there are a minimum of 1 and a maximum of M students per team; &lt;br /&gt;
** The Algorithm is as follows: &lt;br /&gt;
   &amp;lt;nowiki&amp;gt;&lt;br /&gt;
      For every topic j :&lt;br /&gt;
         For every position i that topic j can be placed in (any) preference list:&lt;br /&gt;
              Let S(i) = number of students who selected topic j at position i of their (individual) preference list&lt;br /&gt;
              B(i) = 1/S(i)&lt;br /&gt;
              Calculate C(i,j)                &lt;br /&gt;
              Weight(i,j) = B(i) / C(i,j)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Assigning topics to teams: This is implemented as a one line, comparing bid preferences to allot topics.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
In the following subsections, we discuss the problem, proposed design and code. We are trying to combine the code so that it can be used for both the project topic bidding as well as the conference paper review bidding.&lt;br /&gt;
&lt;br /&gt;
====The Combined Problem====&lt;br /&gt;
The combined problem statement is as follows: Given a list of people (students or reviewers) and also a list of N items to bid on (project topics or conference paper reviews), we require the following: &lt;br /&gt;
* To form teams of Maximum size M &lt;br /&gt;
* Based on preference lists submitted by people/teams having a minimum of 1 item and a maximum of L topics, to allot topics to teams such that each team gets P items and each item (to be bid on) is assigned to R teams. &lt;br /&gt;
&lt;br /&gt;
==== Points of Discussion====&lt;br /&gt;
&lt;br /&gt;
We note the differences:&lt;br /&gt;
* For Bidding for Assignment Topics, M is generally greater then 1, but P = 1 and R = 1. The item to be bid on is the project topics.&lt;br /&gt;
* For Bidding for Conference Paper Reviews, M = 1 but P and R are generally greater then 1. The item to be bid on is the conference paper reviews.&lt;br /&gt;
&lt;br /&gt;
We note that a team of 1 person makes little sense, but we still implement it to be so that the code is compatible for both the applications.&lt;br /&gt;
&lt;br /&gt;
====Proposed Design====&lt;br /&gt;
Keeping the existing algorithm and the project requirements in mind, we decided to divide the code into 2 parts:&lt;br /&gt;
* Part A: Make teams for people not in a team (and if applicable, complete incomplete teams)&lt;br /&gt;
* Part B: Assign topics to teams&lt;br /&gt;
&lt;br /&gt;
We note that Part A has been implemented on a web service independent of Expertiza. We also note that the algorithm explained above applies only to Part A, and that it is pretty sophisticated. Hence we choose to keep the existing code as is for this part. We will simply call the webservice, provide the list of people, their bidding preference and also the max_team_size.&lt;br /&gt;
&lt;br /&gt;
Part B is implemented as one line. It is pretty simple. We also note that it simply cannot be used for conference paper review assignemnt. Hence we completely change this section and implement it using a new algorithm. &lt;br /&gt;
&lt;br /&gt;
====Proposed Algorithm for Part B====&lt;br /&gt;
Let N = Number of topics&lt;br /&gt;
    B = Base score&lt;br /&gt;
    t = Total number of topics an user prefers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For every topic i:&lt;br /&gt;
     den = find_den&lt;br /&gt;
     for every user j:&lt;br /&gt;
         if(user has preferred this topic)&lt;br /&gt;
              r = priority(topic)&lt;br /&gt;
              num = (N + 1 - r) * B * N&lt;br /&gt;
              score[topic][user] = num/den + B&lt;br /&gt;
         if(user has preferred no topic)&lt;br /&gt;
              score[topic][user] = B&lt;br /&gt;
         if(user has not preferred this topic)&lt;br /&gt;
              num = B * N&lt;br /&gt;
              score[topic][user] = B - num/den&lt;br /&gt;
&lt;br /&gt;
Now find_den =  &amp;amp;sum; [ N + 1 ] - &amp;amp;sum; [k] where the iterating variable k varies from 1 to t&lt;br /&gt;
&lt;br /&gt;
==== Methodology ====&lt;br /&gt;
We will implement this new algorithm such that the code is DRY, proper naming conventions are used&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
Actors: &lt;br /&gt;
* Conference Reviewer: Submits a preference list of papers and reviews assigned papers&lt;br /&gt;
* Conference Administrator: Responsible for the assignment of topics to the reviewers&lt;br /&gt;
&lt;br /&gt;
Scenario&lt;br /&gt;
The case of reviewers submitting a list of preferred topics and the administrator running the assignment process. For our project, the main modification would be concentrating on Use Case 4 and 5.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Choose and submit preference to be reviewed====&lt;br /&gt;
* Use Case Id: 1&lt;br /&gt;
* Use Case Description: Participants choose the preference for conference review topics and submit it&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
* Pre Conditions: Conference papers are presented and submitted, and the participants are eligible for reviewing&lt;br /&gt;
* Post Conditions: Conference committee members can view participants preference and run bidding algorithm on it&lt;br /&gt;
&lt;br /&gt;
====Saving topic and participant information into database====&lt;br /&gt;
* Use Case Id: 2&lt;br /&gt;
* Use Case Description: bidding preferences and related participants information are processed and saved to database&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by: Use Case 1&lt;br /&gt;
* Pre Conditions: participants preferences are submitted&lt;br /&gt;
* Post Conditions: information can be retrieved and used by bidding algorithm&lt;br /&gt;
&lt;br /&gt;
====View list of topics and bid====&lt;br /&gt;
* Use Case Id: 3&lt;br /&gt;
* Use Case Description: participants can view list of topic available for conference paper topic&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
&lt;br /&gt;
====Run bidding Algorithm====&lt;br /&gt;
* Use Case Id: 4&lt;br /&gt;
* Use Case Description: Committee members can run bidding algorithm on application to help assigning the conference paper topics to participants&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: preferences must be submitted by participants&lt;br /&gt;
* Post Conditions: the bidding result can be used for paper assignment&lt;br /&gt;
&lt;br /&gt;
====Display assigned paper to bidders====&lt;br /&gt;
* Use Case Id: 5&lt;br /&gt;
* Use Case Description: System assigns participants to conference paper topics according to bidding result&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by: Use Case 4&lt;br /&gt;
* Pre Conditions: bidding algorithm has run and result has been returned&lt;br /&gt;
* Post Conditions: Participants can view topics been assigned to them&lt;br /&gt;
&lt;br /&gt;
====Change assignment of review using CRUD actions====&lt;br /&gt;
* Use Case Id: 6&lt;br /&gt;
* Use Case Description: Conference committee members can change assignment result manually&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: topic assignment has been done&lt;br /&gt;
* Post Conditions: changes on bidding result is visible to participants and other committee members&lt;br /&gt;
&lt;br /&gt;
== Data Flow Diagram ==&lt;br /&gt;
Below is the Data Flow Diagram for process flows of the project. The diagram shows the process of bidding algorithm that we proposed to use for conference paper review assignment.&lt;br /&gt;
[[File:Webp.net-resizeimage (1).png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We explain in the terms of the actors: Reviewer and Administrator&lt;br /&gt;
* Before the deadline all the reviewers have to submit preference list of papers. They can save, modify list as many times as they want, but they can submit once&lt;br /&gt;
* This information is saved in the database&lt;br /&gt;
* When the deadline is passed, stop accepting preference lists&lt;br /&gt;
* The administrator runs the paper assignment algroithm&lt;br /&gt;
** For every topic, calculate the score for each user&lt;br /&gt;
** Make a common scorelist, which keeps score assigned to every topic of every user. There should be a way to find out the topic and user a particular element of the scorelist belongs to&lt;br /&gt;
** Now start assigning topics according to highest score&lt;br /&gt;
** Keep track of the number of topics assigned to each user and the number of users assigned to each topic&lt;br /&gt;
** If the number of topics assigned to one user reaches the maximum value, remove that user from consideration (remove all scores corresponding to that user from scorelist)&lt;br /&gt;
** If the number of users assigned to one topic reaches the maximum value, remove that topic from consideration (remove all scores correspoinding to that topic from scorelist)&lt;br /&gt;
** Continue the above process till the scorelist is empty&lt;br /&gt;
* Save the bidding into the database&lt;br /&gt;
* Inform users about the results of the bidding&lt;br /&gt;
&lt;br /&gt;
== Changing Existing Files ==&lt;br /&gt;
This sub section details what is to be changed in the existing code.&lt;br /&gt;
&lt;br /&gt;
=== Files to be changed === &lt;br /&gt;
*lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Current Code ===&lt;br /&gt;
This is current code for bidding assignment. The code will basically get target assignment and then get all topics and teams for the assignment. Then it will assign priority of each team-topic pair according to user preference  for each user, and append it to priority information list. Afterward it sends priority information along with maximum team size information to web-server and rearranging the priority order according to top-trading cycle algorithm, and pass returned result to create_new_teams_for_bidding_response function for bidding handling on topics with preferences and run_intelligent_bid function for bidding handling for leftover assignment as well as cleaning up.&lt;br /&gt;
&lt;br /&gt;
  def run_intelligent_assignment&lt;br /&gt;
    priority_info = []&lt;br /&gt;
    assignment = Assignment.find_by(id: params[:id])&lt;br /&gt;
    topics = assignment.sign_up_topics&lt;br /&gt;
    teams = assignment.teams&lt;br /&gt;
    teams.each do |team|&lt;br /&gt;
      # grab student id and list of bids&lt;br /&gt;
      bids = []&lt;br /&gt;
      topics.each do |topic|&lt;br /&gt;
        bid_record = Bid.find_by(team_id: team.id, topic_id: topic.id)&lt;br /&gt;
        bids &amp;lt;&amp;lt; (bid_record.nil? ? 0 : bid_record.priority ||= 0)&lt;br /&gt;
      end&lt;br /&gt;
      team.users.each { |user| priority_info &amp;lt;&amp;lt; { pid: user.id, ranks: bids } if bids.uniq != [0] }&lt;br /&gt;
    end&lt;br /&gt;
    data = { users: priority_info, max_team_size: assignment.max_team_size }&lt;br /&gt;
    url = WEBSERVICE_CONFIG[&amp;quot;topic_bidding_webservice_url&amp;quot;]&lt;br /&gt;
    begin&lt;br /&gt;
      response = RestClient.post url, data.to_json, content_type: :json, accept: :json&lt;br /&gt;
      # store each summary in a hashmap and use the question as the key&lt;br /&gt;
      teams = JSON.parse(response)[&amp;quot;teams&amp;quot;]&lt;br /&gt;
      create_new_teams_for_bidding_response(teams, assignment)&lt;br /&gt;
      run_intelligent_bid(assignment)&lt;br /&gt;
    rescue =&amp;gt; err&lt;br /&gt;
      flash[:error] = err.message&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Proposed Code ===&lt;br /&gt;
&lt;br /&gt;
def run_conference_bid teams, assignment, topic_per_team, team_per_topic&lt;br /&gt;
    incomplete_teams = Hash.new(0)&lt;br /&gt;
    incomplete_topics = Hash.new(0)&lt;br /&gt;
    all_topics=[]&lt;br /&gt;
    all_topics = assignment.sign_up_topics&lt;br /&gt;
    score_list=Array.new(teams.length*all_topics.length){Array.new(3)}&lt;br /&gt;
    sorted_list=Array.new(teams.length*all_topics.length){Array.new(3)}&lt;br /&gt;
    temp=[]&lt;br /&gt;
    base = 10&lt;br /&gt;
    p = 0&lt;br /&gt;
    #looping through each team to calculate score for each topic in the assignment&lt;br /&gt;
    teams.each do |t|&lt;br /&gt;
      incomplete_teams.store(t.id,0)&lt;br /&gt;
      team_bids = Bid.where(team_id: t.id)&lt;br /&gt;
      denom = 0&lt;br /&gt;
      b_length = team_bids.length&lt;br /&gt;
      (1..b_length).each do |i|&lt;br /&gt;
        denom = denom+all_topics.length - i&lt;br /&gt;
      end&lt;br /&gt;
      #Score calculation based on bid priority&lt;br /&gt;
      all_topics.each do |j|&lt;br /&gt;
        if(team_bids.any?{|tb| tb.topic_id == j.id})&lt;br /&gt;
          bid_priority = Bid.where(team_id:t.id,topic_id:j.id).first.priority&lt;br /&gt;
          score = base+((all_topics.length+1-bid_priority)*base*all_topics.length) / denom&lt;br /&gt;
        elsif(team_bids.length!=0)&lt;br /&gt;
          score = base-(base*all_topics.length)/denom&lt;br /&gt;
        else&lt;br /&gt;
          score = base&lt;br /&gt;
        end&lt;br /&gt;
        score_list[p][0] = score&lt;br /&gt;
        score_list[p][1] = t.id&lt;br /&gt;
        score_list[p][2] = j.id&lt;br /&gt;
        p+=1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    sorted_list = score_list.sort_by{|e| [e[0],e[1],e[2]]}.each{|line| p line}&lt;br /&gt;
    sorted_list.reverse!&lt;br /&gt;
    all_topics.each do |k|&lt;br /&gt;
      incomplete_topics.store(k.id,0)&lt;br /&gt;
    end&lt;br /&gt;
    if(all_topics.length*team_per_topic&amp;lt;teams.length)&lt;br /&gt;
      flash[:error] = 'There are not enough reviews to be assigned'&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    #Assigning topics to teams based on highest score&lt;br /&gt;
    sorted_list.each do |s|&lt;br /&gt;
      if((incomplete_topics[s[2]]&amp;lt;team_per_topic) &amp;amp;&amp;amp; (incomplete_teams[s[1]]&amp;lt;topic_per_team))&lt;br /&gt;
        SignedUpTeam.create(team_id: s[1], topic_id: s[2])&lt;br /&gt;
        incomplete_teams[s[1]]+=1&lt;br /&gt;
        incomplete_topics[s[2]]+=1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    assignment.update_attribute(:is_intelligent,false)&lt;br /&gt;
    flash[:notice] = 'The intelligent assignment was successfully completed for ' + assignment.name + '.'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then we will change the run_intelligent_assignment function to implementation as below:&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
* UI testing of the implemented functionality to be done.&lt;br /&gt;
&lt;br /&gt;
** Log in as a participants/student&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Go to Other's works and check preferred conference paper topics to bid on reviewing&lt;br /&gt;
** Click submit and wait for bidding deadline&lt;br /&gt;
** After deadline reaches, go back to assignment and click on Other's work to view topics assigned for reviewing&lt;br /&gt;
&lt;br /&gt;
===Automated Test Cases===&lt;br /&gt;
* TDD and Feature Test cases to be written. For instance we will do Rspec test on cases below:&lt;br /&gt;
** Test on score calculation, see if the calculation gives right scoring distribution when no preference is given, when one preference is given, and when multiple preferences are given;&lt;br /&gt;
** Test on preference levels matching, check if the algorithm is match first, second, third, and so on preferences and evaluating them correctly;&lt;br /&gt;
** Test if teams per topic or topics per team can exceed required number by assigning many team with same first preference and assigning many team with multiple preferences (preference number per team &amp;gt; number of topics/2);&lt;br /&gt;
* For the Rspec tests, we will have to create object of team, assignment, and ranks. A sample team object in JSON format would be:&lt;br /&gt;
  {&amp;quot;users&amp;quot;:[{&amp;quot;ranks&amp;quot;:[1,0,2,3], &amp;quot;pid&amp;quot;:1023}],&amp;quot;max_team_size&amp;quot;:1}&lt;br /&gt;
* The objects would be generated inside the spec file lottery_controller_spec.rb using model object initializer;&lt;br /&gt;
&lt;br /&gt;
===Edge cases===&lt;br /&gt;
&lt;br /&gt;
* Case 1: No reviewer submits a list of preferred topics to review&lt;br /&gt;
&lt;br /&gt;
* Case 2: All reviewers submits exactly the same list of topics to review.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114714</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114714"/>
		<updated>2017-12-12T22:14:18Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the the project E17A7 which is one of the several projects to allow Expertiza support (the currently unsupported) conference. Specifcally, it involves adding the ability of conference paper reviewers to bid for what they want to review. The members of this project are: &lt;br /&gt;
&lt;br /&gt;
Leiyang Guo (lguo7@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Bikram Singh (bsingh8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Navin Venugopal (nvenugo2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sathwick Goparapu (sgopara@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project created using Ruby on Rails. This project is an software primarily to create reusable learning objects through peer review and also supports team projects. Expertiza allows the creation of instructors and student accounts. This allows the instructors to post projects (student learning objects) which can be viewed and worked upon by students. These can also be peer reviewed by students later.&lt;br /&gt;
&lt;br /&gt;
====Background of the project====&lt;br /&gt;
In the existing Expertiza functionality, the bidding ability is only for bidding for a project topic for students in a course. This involves the instructor posting a list of project topics, and each student (or all students together as a team, if some students have already formed a team) then posts a preference list, listing topics (s)he wants to work on. Then the bidding algorithm assigns the topics, particularly with the following features: &lt;br /&gt;
* Students (not in at team) with close preferences are assigned into a project team, and the common preference is the project topic assigned to the team. Alternatively, for existing teams the project topic is assigned as per the common project topic preference list&lt;br /&gt;
* Each team is assigned only one topic&lt;br /&gt;
* Each topic (if assigned) is assigned to a maximum of one team&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
This project is not responsible for adding code so as to support a conference. Rather, we are interested in the bidding algorithm used in the conference, which is significantly different from the project bidding algorithm as explained above.&lt;br /&gt;
&lt;br /&gt;
For the purposes of the project, we assume that there are several reviewers in a conference who review papers which are proposed to be presented in the conference. Also, the entire list of papers proposed to be presented in the conference is also available.&lt;br /&gt;
&lt;br /&gt;
Then the basic working of the project assumes: &lt;br /&gt;
* Before the bidding close deadline, reviewers submit a list of papers they wish to review.&lt;br /&gt;
* After the bidding deadline, the algorithm assigns papers to reviewers to review, such that:&lt;br /&gt;
** Each paper (if assigned) is assigned to a maximum of R reviewers (here R represents some constant)&lt;br /&gt;
** Each reviewer is assigned a maximum of P papers to review (here P represents some constant)&lt;br /&gt;
** Assignment of papers is individual&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
&lt;br /&gt;
In this section we discuss the problem statement, then discuss the existing code and possible changes required. &lt;br /&gt;
&lt;br /&gt;
====Problem Statement====&lt;br /&gt;
* To take the existing bidding code in Expertiza (which is meant for students bidding for project topics) and make it callable either for bidding for topics or bidding for submissions to review. &lt;br /&gt;
* A possible extension is to add other methods, like a &amp;quot;late reviewer registration&amp;quot; method, in which each new reviewer is assigned one of the least-reviewed submissions so far. Methods like these require an extension of the basic working of the project.&lt;br /&gt;
* The matching algorithm is currently not very sophisticated.  Top trading cycles is implemented in the web service (though it is currently not used by bidding assignment), and could be adapted to this use. &lt;br /&gt;
&lt;br /&gt;
In the subsequent discussion with the mentor, it was concluded that the two bidding situations are very different hence it was decided to keep the two separate, at least initially. Also the third requirement was modified to first make the bidding for a conference using any algorithm and if time permits, to use a better algorithm like top trading cycles.&lt;br /&gt;
&lt;br /&gt;
====Current Project Aims====&lt;br /&gt;
* To develop code such that both applications (bidding for project teams and bidding for conference paper reviews) use the same code&lt;br /&gt;
* To improve the algorithm for calculating the score for a particular project topic/conference paper review assigned to a project team/conference reviewer&lt;br /&gt;
&lt;br /&gt;
We want to state here that we are not responsible for developing any conference features. Specifically, this means that we are not changing any UI features. We will be primarily relying on UI changes done by E17A5&lt;br /&gt;
&lt;br /&gt;
== Existing Algorithm ==&lt;br /&gt;
&lt;br /&gt;
==== Problem ====&lt;br /&gt;
The existing algorithm solves the following problem: &lt;br /&gt;
&lt;br /&gt;
To form teams of students of Maximum size M and then assign topics (there are N topics) based on preference lists submitted either by individual students or teams (complete or otherwise). Preference Lists can have minimum 1 topic and a maximum of L topics. &lt;br /&gt;
Then the topics are alloted to teams such that each team gets an unique topic and each topic is assigned only to one team. &lt;br /&gt;
&lt;br /&gt;
==== Functionality ====&lt;br /&gt;
The topics are assigned to project teams in 2 steps:&lt;br /&gt;
&lt;br /&gt;
* Making teams: This is done using a k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
** The basic cost function used in the algorithm is:      C(i,j) = 1/N * &amp;amp;sum; [ M -S(i) ] where i varies from 1 to N&lt;br /&gt;
** The Algorithm calculates the weights for every user not a team or part of an incomplete team. It then assigns teams using the weights, by plotting graphs for each topic. It is as follows:&lt;br /&gt;
*** Draw a graph for every topic j with X axis as the priority position i and the Y axis as the Weights.&lt;br /&gt;
*** Hierarchical K means to select teams such that all students in a team are close to each other in the graph above, hopefully more towards the left of the graph, and also such that there are a minimum of 1 and a maximum of M students per team; &lt;br /&gt;
** The Algorithm is as follows: &lt;br /&gt;
   &amp;lt;nowiki&amp;gt;&lt;br /&gt;
      For every topic j :&lt;br /&gt;
         For every position i that topic j can be placed in (any) preference list:&lt;br /&gt;
              Let S(i) = number of students who selected topic j at position i of their (individual) preference list&lt;br /&gt;
              B(i) = 1/S(i)&lt;br /&gt;
              Calculate C(i,j)                &lt;br /&gt;
              Weight(i,j) = B(i) / C(i,j)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Assigning topics to teams: This is implemented as a one line, comparing bid preferences to allot topics.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
In the following subsections, we discuss the problem, proposed design and code. We are trying to combine the code so that it can be used for both the project topic bidding as well as the conference paper review bidding.&lt;br /&gt;
&lt;br /&gt;
====The Combined Problem====&lt;br /&gt;
The combined problem statement is as follows: Given a list of people (students or reviewers) and also a list of N items to bid on (project topics or conference paper reviews), we require the following: &lt;br /&gt;
* To form teams of Maximum size M &lt;br /&gt;
* Based on preference lists submitted by people/teams having a minimum of 1 item and a maximum of L topics, to allot topics to teams such that each team gets P items and each item (to be bid on) is assigned to R teams. &lt;br /&gt;
&lt;br /&gt;
==== Points of Discussion====&lt;br /&gt;
&lt;br /&gt;
We note the differences:&lt;br /&gt;
* For Bidding for Assignment Topics, M is generally greater then 1, but P = 1 and R = 1. The item to be bid on is the project topics.&lt;br /&gt;
* For Bidding for Conference Paper Reviews, M = 1 but P and R are generally greater then 1. The item to be bid on is the conference paper reviews.&lt;br /&gt;
&lt;br /&gt;
We note that a team of 1 person makes little sense, but we still implement it to be so that the code is compatible for both the applications.&lt;br /&gt;
&lt;br /&gt;
====Proposed Design====&lt;br /&gt;
Keeping the existing algorithm and the project requirements in mind, we decided to divide the code into 2 parts:&lt;br /&gt;
* Part A: Make teams for people not in a team (and if applicable, complete incomplete teams)&lt;br /&gt;
* Part B: Assign topics to teams&lt;br /&gt;
&lt;br /&gt;
We note that Part A has been implemented on a web service independent of Expertiza. We also note that the algorithm explained above applies only to Part A, and that it is pretty sophisticated. Hence we choose to keep the existing code as is for this part. We will simply call the webservice, provide the list of people, their bidding preference and also the max_team_size.&lt;br /&gt;
&lt;br /&gt;
Part B is implemented as one line. It is pretty simple. We also note that it simply cannot be used for conference paper review assignemnt. Hence we completely change this section and implement it using a new algorithm. &lt;br /&gt;
&lt;br /&gt;
====Proposed Algorithm for Part B====&lt;br /&gt;
Let N = Number of topics&lt;br /&gt;
    B = Base score&lt;br /&gt;
    t = Total number of topics an user prefers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For every topic i:&lt;br /&gt;
     den = find_den&lt;br /&gt;
     for every user j:&lt;br /&gt;
         if(user has preferred this topic)&lt;br /&gt;
              r = priority(topic)&lt;br /&gt;
              num = (N + 1 - r) * B * N&lt;br /&gt;
              score[topic][user] = num/den + B&lt;br /&gt;
         if(user has preferred no topic)&lt;br /&gt;
              score[topic][user] = B&lt;br /&gt;
         if(user has not preferred this topic)&lt;br /&gt;
              num = B * N&lt;br /&gt;
              score[topic][user] = B - num/den&lt;br /&gt;
&lt;br /&gt;
Now find_den =  &amp;amp;sum; [ N + 1 ] - &amp;amp;sum; [k] where the iterating variable k varies from 1 to t&lt;br /&gt;
&lt;br /&gt;
==== Methodology ====&lt;br /&gt;
We will implement this new algorithm such that the code is DRY, proper naming conventions are used&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
Actors: &lt;br /&gt;
* Conference Reviewer: Submits a preference list of papers and reviews assigned papers&lt;br /&gt;
* Conference Administrator: Responsible for the assignment of topics to the reviewers&lt;br /&gt;
&lt;br /&gt;
Scenario&lt;br /&gt;
The case of reviewers submitting a list of preferred topics and the administrator running the assignment process. For our project, the main modification would be concentrating on Use Case 4 and 5.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Choose and submit preference to be reviewed====&lt;br /&gt;
* Use Case Id: 1&lt;br /&gt;
* Use Case Description: Participants choose the preference for conference review topics and submit it&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
* Pre Conditions: Conference papers are presented and submitted, and the participants are eligible for reviewing&lt;br /&gt;
* Post Conditions: Conference committee members can view participants preference and run bidding algorithm on it&lt;br /&gt;
&lt;br /&gt;
====Saving topic and participant information into database====&lt;br /&gt;
* Use Case Id: 2&lt;br /&gt;
* Use Case Description: bidding preferences and related participants information are processed and saved to database&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by: Use Case 1&lt;br /&gt;
* Pre Conditions: participants preferences are submitted&lt;br /&gt;
* Post Conditions: information can be retrieved and used by bidding algorithm&lt;br /&gt;
&lt;br /&gt;
====View list of topics and bid====&lt;br /&gt;
* Use Case Id: 3&lt;br /&gt;
* Use Case Description: participants can view list of topic available for conference paper topic&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
&lt;br /&gt;
====Run bidding Algorithm====&lt;br /&gt;
* Use Case Id: 4&lt;br /&gt;
* Use Case Description: Committee members can run bidding algorithm on application to help assigning the conference paper topics to participants&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: preferences must be submitted by participants&lt;br /&gt;
* Post Conditions: the bidding result can be used for paper assignment&lt;br /&gt;
&lt;br /&gt;
====Display assigned paper to bidders====&lt;br /&gt;
* Use Case Id: 5&lt;br /&gt;
* Use Case Description: System assigns participants to conference paper topics according to bidding result&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by: Use Case 4&lt;br /&gt;
* Pre Conditions: bidding algorithm has run and result has been returned&lt;br /&gt;
* Post Conditions: Participants can view topics been assigned to them&lt;br /&gt;
&lt;br /&gt;
====Change assignment of review using CRUD actions====&lt;br /&gt;
* Use Case Id: 6&lt;br /&gt;
* Use Case Description: Conference committee members can change assignment result manually&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: topic assignment has been done&lt;br /&gt;
* Post Conditions: changes on bidding result is visible to participants and other committee members&lt;br /&gt;
&lt;br /&gt;
== Data Flow Diagram ==&lt;br /&gt;
Below is the Data Flow Diagram for process flows of the project. The diagram shows the process of bidding algorithm that we proposed to use for conference paper review assignment.&lt;br /&gt;
[[File:Webp.net-resizeimage (1).png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We explain in the terms of the actors: Reviewer and Administrator&lt;br /&gt;
* Before the deadline all the reviewers have to submit preference list of papers. They can save, modify list as many times as they want, but they can submit once&lt;br /&gt;
* This information is saved in the database&lt;br /&gt;
* When the deadline is passed, stop accepting preference lists&lt;br /&gt;
* The administrator runs the paper assignment algroithm&lt;br /&gt;
** For every topic, calculate the score for each user&lt;br /&gt;
** Make a common scorelist, which keeps score assigned to every topic of every user. There should be a way to find out the topic and user a particular element of the scorelist belongs to&lt;br /&gt;
** Now start assigning topics according to highest score&lt;br /&gt;
** Keep track of the number of topics assigned to each user and the number of users assigned to each topic&lt;br /&gt;
** If the number of topics assigned to one user reaches the maximum value, remove that user from consideration (remove all scores corresponding to that user from scorelist)&lt;br /&gt;
** If the number of users assigned to one topic reaches the maximum value, remove that topic from consideration (remove all scores correspoinding to that topic from scorelist)&lt;br /&gt;
** Continue the above process till the scorelist is empty&lt;br /&gt;
* Save the bidding into the database&lt;br /&gt;
* Inform users about the results of the bidding&lt;br /&gt;
&lt;br /&gt;
== Changing Existing Files ==&lt;br /&gt;
This sub section details what is to be changed in the existing code.&lt;br /&gt;
&lt;br /&gt;
=== Files to be changed === &lt;br /&gt;
*lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Current Code ===&lt;br /&gt;
This is current code for bidding assignment. The code will basically get target assignment and then get all topics and teams for the assignment. Then it will assign priority of each team-topic pair according to user preference  for each user, and append it to priority information list. Afterward it sends priority information along with maximum team size information to web-server and rearranging the priority order according to top-trading cycle algorithm, and pass returned result to create_new_teams_for_bidding_response function for bidding handling on topics with preferences and run_intelligent_bid function for bidding handling for leftover assignment as well as cleaning up.&lt;br /&gt;
&lt;br /&gt;
  def run_intelligent_assignment&lt;br /&gt;
    priority_info = []&lt;br /&gt;
    assignment = Assignment.find_by(id: params[:id])&lt;br /&gt;
    topics = assignment.sign_up_topics&lt;br /&gt;
    teams = assignment.teams&lt;br /&gt;
    teams.each do |team|&lt;br /&gt;
      # grab student id and list of bids&lt;br /&gt;
      bids = []&lt;br /&gt;
      topics.each do |topic|&lt;br /&gt;
        bid_record = Bid.find_by(team_id: team.id, topic_id: topic.id)&lt;br /&gt;
        bids &amp;lt;&amp;lt; (bid_record.nil? ? 0 : bid_record.priority ||= 0)&lt;br /&gt;
      end&lt;br /&gt;
      team.users.each { |user| priority_info &amp;lt;&amp;lt; { pid: user.id, ranks: bids } if bids.uniq != [0] }&lt;br /&gt;
    end&lt;br /&gt;
    data = { users: priority_info, max_team_size: assignment.max_team_size }&lt;br /&gt;
    url = WEBSERVICE_CONFIG[&amp;quot;topic_bidding_webservice_url&amp;quot;]&lt;br /&gt;
    begin&lt;br /&gt;
      response = RestClient.post url, data.to_json, content_type: :json, accept: :json&lt;br /&gt;
      # store each summary in a hashmap and use the question as the key&lt;br /&gt;
      teams = JSON.parse(response)[&amp;quot;teams&amp;quot;]&lt;br /&gt;
      create_new_teams_for_bidding_response(teams, assignment)&lt;br /&gt;
      run_intelligent_bid(assignment)&lt;br /&gt;
    rescue =&amp;gt; err&lt;br /&gt;
      flash[:error] = err.message&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Proposed Code ===&lt;br /&gt;
&lt;br /&gt;
Then we will change the run_intelligent_assignment function to implementation as below:&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
* UI testing of the implemented functionality to be done.&lt;br /&gt;
&lt;br /&gt;
** Log in as a participants/student&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Go to Other's works and check preferred conference paper topics to bid on reviewing&lt;br /&gt;
** Click submit and wait for bidding deadline&lt;br /&gt;
** After deadline reaches, go back to assignment and click on Other's work to view topics assigned for reviewing&lt;br /&gt;
&lt;br /&gt;
===Automated Test Cases===&lt;br /&gt;
* TDD and Feature Test cases to be written. For instance we will do Rspec test on cases below:&lt;br /&gt;
** Test on score calculation, see if the calculation gives right scoring distribution when no preference is given, when one preference is given, and when multiple preferences are given;&lt;br /&gt;
** Test on preference levels matching, check if the algorithm is match first, second, third, and so on preferences and evaluating them correctly;&lt;br /&gt;
** Test if teams per topic or topics per team can exceed required number by assigning many team with same first preference and assigning many team with multiple preferences (preference number per team &amp;gt; number of topics/2);&lt;br /&gt;
* For the Rspec tests, we will have to create object of team, assignment, and ranks. A sample team object in JSON format would be:&lt;br /&gt;
  {&amp;quot;users&amp;quot;:[{&amp;quot;ranks&amp;quot;:[1,0,2,3], &amp;quot;pid&amp;quot;:1023}],&amp;quot;max_team_size&amp;quot;:1}&lt;br /&gt;
* The objects would be generated inside the spec file lottery_controller_spec.rb using model object initializer;&lt;br /&gt;
&lt;br /&gt;
===Edge cases===&lt;br /&gt;
&lt;br /&gt;
* Case 1: No reviewer submits a list of preferred topics to review&lt;br /&gt;
&lt;br /&gt;
* Case 2: All reviewers submits exactly the same list of topics to review.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114713</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114713"/>
		<updated>2017-12-12T22:11:23Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the the project E17A7 which is one of the several projects to allow Expertiza support (the currently unsupported) conference. Specifcally, it involves adding the ability of conference paper reviewers to bid for what they want to review. The members of this project are: &lt;br /&gt;
&lt;br /&gt;
Leiyang Guo (lguo7@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Bikram Singh (bsingh8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Navin Venugopal (nvenugo2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sathwick Goparapu (sgopara@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project created using Ruby on Rails. This project is an software primarily to create reusable learning objects through peer review and also supports team projects. Expertiza allows the creation of instructors and student accounts. This allows the instructors to post projects (student learning objects) which can be viewed and worked upon by students. These can also be peer reviewed by students later.&lt;br /&gt;
&lt;br /&gt;
====Background of the project====&lt;br /&gt;
In the existing Expertiza functionality, the bidding ability is only for bidding for a project topic for students in a course. This involves the instructor posting a list of project topics, and each student (or all students together as a team, if some students have already formed a team) then posts a preference list, listing topics (s)he wants to work on. Then the bidding algorithm assigns the topics, particularly with the following features: &lt;br /&gt;
* Students (not in at team) with close preferences are assigned into a project team, and the common preference is the project topic assigned to the team. Alternatively, for existing teams the project topic is assigned as per the common project topic preference list&lt;br /&gt;
* Each team is assigned only one topic&lt;br /&gt;
* Each topic (if assigned) is assigned to a maximum of one team&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
This project is not responsible for adding code so as to support a conference. Rather, we are interested in the bidding algorithm used in the conference, which is significantly different from the project bidding algorithm as explained above.&lt;br /&gt;
&lt;br /&gt;
For the purposes of the project, we assume that there are several reviewers in a conference who review papers which are proposed to be presented in the conference. Also, the entire list of papers proposed to be presented in the conference is also available.&lt;br /&gt;
&lt;br /&gt;
Then the basic working of the project assumes: &lt;br /&gt;
* Before the bidding close deadline, reviewers submit a list of papers they wish to review.&lt;br /&gt;
* After the bidding deadline, the algorithm assigns papers to reviewers to review, such that:&lt;br /&gt;
** Each paper (if assigned) is assigned to a maximum of R reviewers (here R represents some constant)&lt;br /&gt;
** Each reviewer is assigned a maximum of P papers to review (here P represents some constant)&lt;br /&gt;
** Assignment of papers is individual&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
&lt;br /&gt;
In this section we discuss the problem statement, then discuss the existing code and possible changes required. &lt;br /&gt;
&lt;br /&gt;
====Problem Statement====&lt;br /&gt;
* To take the existing bidding code in Expertiza (which is meant for students bidding for project topics) and make it callable either for bidding for topics or bidding for submissions to review. &lt;br /&gt;
* A possible extension is to add other methods, like a &amp;quot;late reviewer registration&amp;quot; method, in which each new reviewer is assigned one of the least-reviewed submissions so far. Methods like these require an extension of the basic working of the project.&lt;br /&gt;
* The matching algorithm is currently not very sophisticated.  Top trading cycles is implemented in the web service (though it is currently not used by bidding assignment), and could be adapted to this use. &lt;br /&gt;
&lt;br /&gt;
In the subsequent discussion with the mentor, it was concluded that the two bidding situations are very different hence it was decided to keep the two separate, at least initially. Also the third requirement was modified to first make the bidding for a conference using any algorithm and if time permits, to use a better algorithm like top trading cycles.&lt;br /&gt;
&lt;br /&gt;
====Current Project Aims====&lt;br /&gt;
* To develop code such that both applications (bidding for project teams and bidding for conference paper reviews) use the same code&lt;br /&gt;
* To improve the algorithm for calculating the score for a particular project topic/conference paper review assigned to a project team/conference reviewer&lt;br /&gt;
&lt;br /&gt;
We want to state here that we are not responsible for developing any conference features. Specifically, this means that we are not changing any UI features. We will be primarily relying on UI changes done by E17A5&lt;br /&gt;
&lt;br /&gt;
== Existing Algorithm ==&lt;br /&gt;
&lt;br /&gt;
==== Problem ====&lt;br /&gt;
The existing algorithm solves the following problem: &lt;br /&gt;
&lt;br /&gt;
To form teams of students of Maximum size M and then assign topics (there are N topics) based on preference lists submitted either by individual students or teams (complete or otherwise). Preference Lists can have minimum 1 topic and a maximum of L topics. &lt;br /&gt;
Then the topics are alloted to teams such that each team gets an unique topic and each topic is assigned only to one team. &lt;br /&gt;
&lt;br /&gt;
==== Functionality ====&lt;br /&gt;
The topics are assigned to project teams in 2 steps:&lt;br /&gt;
&lt;br /&gt;
* Making teams: This is done using a k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
** The basic cost function used in the algorithm is:      C(i,j) = 1/N * &amp;amp;sum; [ M -S(i) ] where i varies from 1 to N&lt;br /&gt;
** The Algorithm calculates the weights for every user not a team or part of an incomplete team. It then assigns teams using the weights, by plotting graphs for each topic. It is as follows:&lt;br /&gt;
*** Draw a graph for every topic j with X axis as the priority position i and the Y axis as the Weights.&lt;br /&gt;
*** Hierarchical K means to select teams such that all students in a team are close to each other in the graph above, hopefully more towards the left of the graph, and also such that there are a minimum of 1 and a maximum of M students per team; &lt;br /&gt;
** The Algorithm is as follows: &lt;br /&gt;
   &amp;lt;nowiki&amp;gt;&lt;br /&gt;
      For every topic j :&lt;br /&gt;
         For every position i that topic j can be placed in (any) preference list:&lt;br /&gt;
              Let S(i) = number of students who selected topic j at position i of their (individual) preference list&lt;br /&gt;
              B(i) = 1/S(i)&lt;br /&gt;
              Calculate C(i,j)                &lt;br /&gt;
              Weight(i,j) = B(i) / C(i,j)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Assigning topics to teams: This is implemented as a one line, comparing bid preferences to allot topics.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
In the following subsections, we discuss the problem, proposed design and code. We are trying to combine the code so that it can be used for both the project topic bidding as well as the conference paper review bidding.&lt;br /&gt;
&lt;br /&gt;
====The Combined Problem====&lt;br /&gt;
The combined problem statement is as follows: Given a list of people (students or reviewers) and also a list of N items to bid on (project topics or conference paper reviews), we require the following: &lt;br /&gt;
* To form teams of Maximum size M &lt;br /&gt;
* Based on preference lists submitted by people/teams having a minimum of 1 item and a maximum of L topics, to allot topics to teams such that each team gets P items and each item (to be bid on) is assigned to R teams. &lt;br /&gt;
&lt;br /&gt;
==== Points of Discussion====&lt;br /&gt;
&lt;br /&gt;
We note the differences:&lt;br /&gt;
* For Bidding for Assignment Topics, M is generally greater then 1, but P = 1 and R = 1. The item to be bid on is the project topics.&lt;br /&gt;
* For Bidding for Conference Paper Reviews, M = 1 but P and R are generally greater then 1. The item to be bid on is the conference paper reviews.&lt;br /&gt;
&lt;br /&gt;
We note that a team of 1 person makes little sense, but we still implement it to be so that the code is compatible for both the applications.&lt;br /&gt;
&lt;br /&gt;
====Proposed Design====&lt;br /&gt;
Keeping the existing algorithm and the project requirements in mind, we decided to divide the code into 2 parts:&lt;br /&gt;
* Part A: Make teams for people not in a team (and if applicable, complete incomplete teams)&lt;br /&gt;
* Part B: Assign topics to teams&lt;br /&gt;
&lt;br /&gt;
We note that Part A has been implemented on a web service independent of Expertiza. We also note that the algorithm explained above applies only to Part A, and that it is pretty sophisticated. Hence we choose to keep the existing code as is for this part. We will simply call the webservice, provide the list of people, their bidding preference and also the max_team_size.&lt;br /&gt;
&lt;br /&gt;
Part B is implemented as one line. It is pretty simple. We also note that it simply cannot be used for conference paper review assignemnt. Hence we completely change this section and implement it using a new algorithm. &lt;br /&gt;
&lt;br /&gt;
====Proposed Algorithm for Part B====&lt;br /&gt;
Let N = Number of topics&lt;br /&gt;
    B = Base score&lt;br /&gt;
    t = Total number of topics an user prefers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For every topic i:&lt;br /&gt;
     den = find_den&lt;br /&gt;
     for every user j:&lt;br /&gt;
         if(user has preferred this topic)&lt;br /&gt;
              r = priority(topic)&lt;br /&gt;
              num = (N + 1 - r) * B * N&lt;br /&gt;
              score[topic][user] = num/den + B&lt;br /&gt;
         if(user has preferred no topic)&lt;br /&gt;
              score[topic][user] = B&lt;br /&gt;
         if(user has not preferred this topic)&lt;br /&gt;
              num = B * N&lt;br /&gt;
              score[topic][user] = B - num/den&lt;br /&gt;
&lt;br /&gt;
Now find_den =  &amp;amp;sum; [ N + 1 ] - &amp;amp;sum; [k] where the iterating variable k varies from 1 to t&lt;br /&gt;
&lt;br /&gt;
==== Methodology ====&lt;br /&gt;
We will implement this new algorithm such that the code is DRY, proper naming conventions are used&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
Actors: &lt;br /&gt;
* Conference Reviewer: Submits a preference list of papers and reviews assigned papers&lt;br /&gt;
* Conference Administrator: Responsible for the assignment of topics to the reviewers&lt;br /&gt;
&lt;br /&gt;
Scenario&lt;br /&gt;
The case of reviewers submitting a list of preferred topics and the administrator running the assignment process. For our project, the main modification would be concentrating on Use Case 4 and 5.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Choose and submit preference to be reviewed====&lt;br /&gt;
* Use Case Id: 1&lt;br /&gt;
* Use Case Description: Participants choose the preference for conference review topics and submit it&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
* Pre Conditions: Conference papers are presented and submitted, and the participants are eligible for reviewing&lt;br /&gt;
* Post Conditions: Conference committee members can view participants preference and run bidding algorithm on it&lt;br /&gt;
&lt;br /&gt;
====Saving topic and participant information into database====&lt;br /&gt;
* Use Case Id: 2&lt;br /&gt;
* Use Case Description: bidding preferences and related participants information are processed and saved to database&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by: Use Case 1&lt;br /&gt;
* Pre Conditions: participants preferences are submitted&lt;br /&gt;
* Post Conditions: information can be retrieved and used by bidding algorithm&lt;br /&gt;
&lt;br /&gt;
====View list of topics and bid====&lt;br /&gt;
* Use Case Id: 3&lt;br /&gt;
* Use Case Description: participants can view list of topic available for conference paper topic&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
&lt;br /&gt;
====Run bidding Algorithm====&lt;br /&gt;
* Use Case Id: 4&lt;br /&gt;
* Use Case Description: Committee members can run bidding algorithm on application to help assigning the conference paper topics to participants&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: preferences must be submitted by participants&lt;br /&gt;
* Post Conditions: the bidding result can be used for paper assignment&lt;br /&gt;
&lt;br /&gt;
====Display assigned paper to bidders====&lt;br /&gt;
* Use Case Id: 5&lt;br /&gt;
* Use Case Description: System assigns participants to conference paper topics according to bidding result&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by: Use Case 4&lt;br /&gt;
* Pre Conditions: bidding algorithm has run and result has been returned&lt;br /&gt;
* Post Conditions: Participants can view topics been assigned to them&lt;br /&gt;
&lt;br /&gt;
====Change assignment of review using CRUD actions====&lt;br /&gt;
* Use Case Id: 6&lt;br /&gt;
* Use Case Description: Conference committee members can change assignment result manually&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: topic assignment has been done&lt;br /&gt;
* Post Conditions: changes on bidding result is visible to participants and other committee members&lt;br /&gt;
&lt;br /&gt;
== Data Flow Diagram ==&lt;br /&gt;
Below is the Data Flow Diagram for process flows of the project. The diagram shows the process of bidding algorithm that we proposed to use for conference paper review assignment.&lt;br /&gt;
[[File:Webp.net-resizeimage (1).png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We explain in the terms of the actors: Reviewer and Administrator&lt;br /&gt;
* Before the deadline all the reviewers have to submit preference list of papers. They can save, modify list as many times as they want, but they can submit once&lt;br /&gt;
* This information is saved in the database&lt;br /&gt;
* When the deadline is passed, stop accepting preference lists&lt;br /&gt;
* The administrator runs the paper assignment algroithm&lt;br /&gt;
** For every topic, calculate the score for each user&lt;br /&gt;
** Make a common scorelist, which keeps score assigned to every topic of every user. There should be a way to find out the topic and user a particular element of the scorelist belongs to&lt;br /&gt;
** Now start assigning topics according to highest score&lt;br /&gt;
** Keep track of the number of topics assigned to each user and the number of users assigned to each topic&lt;br /&gt;
** If the number of topics assigned to one user reaches the maximum value, remove that user from consideration (remove all scores corresponding to that user from scorelist)&lt;br /&gt;
** If the number of users assigned to one topic reaches the maximum value, remove that topic from consideration (remove all scores correspoinding to that topic from scorelist)&lt;br /&gt;
** Continue the above process till the scorelist is empty&lt;br /&gt;
* Save the bidding into the database&lt;br /&gt;
* Inform users about the results of the bidding&lt;br /&gt;
&lt;br /&gt;
== Changing Existing Files ==&lt;br /&gt;
This sub section details what is to be changed in the existing code.&lt;br /&gt;
&lt;br /&gt;
=== Files to be changed === &lt;br /&gt;
*lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Current Code ===&lt;br /&gt;
This is current code for bidding assignment. The code will basically get target assignment and then get all topics and teams for the assignment. Then it will assign priority of each team-topic pair according to user preference  for each user, and append it to priority information list. Afterward it sends priority information along with maximum team size information to web-server and rearranging the priority order according to top-trading cycle algorithm, and pass returned result to create_new_teams_for_bidding_response function for bidding handling on topics with preferences and run_intelligent_bid function for bidding handling for leftover assignment as well as cleaning up.&lt;br /&gt;
&lt;br /&gt;
  def run_intelligent_assignment&lt;br /&gt;
    priority_info = []&lt;br /&gt;
    assignment = Assignment.find_by(id: params[:id])&lt;br /&gt;
    topics = assignment.sign_up_topics&lt;br /&gt;
    teams = assignment.teams&lt;br /&gt;
    teams.each do |team|&lt;br /&gt;
      # grab student id and list of bids&lt;br /&gt;
      bids = []&lt;br /&gt;
      topics.each do |topic|&lt;br /&gt;
        bid_record = Bid.find_by(team_id: team.id, topic_id: topic.id)&lt;br /&gt;
        bids &amp;lt;&amp;lt; (bid_record.nil? ? 0 : bid_record.priority ||= 0)&lt;br /&gt;
      end&lt;br /&gt;
      team.users.each { |user| priority_info &amp;lt;&amp;lt; { pid: user.id, ranks: bids } if bids.uniq != [0] }&lt;br /&gt;
    end&lt;br /&gt;
    data = { users: priority_info, max_team_size: assignment.max_team_size }&lt;br /&gt;
    url = WEBSERVICE_CONFIG[&amp;quot;topic_bidding_webservice_url&amp;quot;]&lt;br /&gt;
    begin&lt;br /&gt;
      response = RestClient.post url, data.to_json, content_type: :json, accept: :json&lt;br /&gt;
      # store each summary in a hashmap and use the question as the key&lt;br /&gt;
      teams = JSON.parse(response)[&amp;quot;teams&amp;quot;]&lt;br /&gt;
      create_new_teams_for_bidding_response(teams, assignment)&lt;br /&gt;
      run_intelligent_bid(assignment)&lt;br /&gt;
    rescue =&amp;gt; err&lt;br /&gt;
      flash[:error] = err.message&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Proposed Code ===&lt;br /&gt;
&lt;br /&gt;
Then we will change the run_intelligent_assignment function to implementation as below:&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
* UI testing of the implemented functionality to be done.&lt;br /&gt;
&lt;br /&gt;
** Log in as a participants/student&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Go to Other's works and check preferred conference paper topics to bid on reviewing&lt;br /&gt;
** Click submit and wait for bidding deadline&lt;br /&gt;
** After deadline reaches, go back to assignment and click on Other's work to view topics assigned for reviewing&lt;br /&gt;
&lt;br /&gt;
===Automated Test Cases===&lt;br /&gt;
* TDD and Feature Test cases to be written. For instance we would do Rspec test on cases below:&lt;br /&gt;
** Test on score calculation, see if the calculation gives right scoring distribution when no preference is given, when one preference is given, and when multiple preferences are given;&lt;br /&gt;
** Test on preference levels matching, check if the algorithm is match first, second, third, and so on preferences and evaluating them correctly;&lt;br /&gt;
** Test if teams per topic or topics per team can exceed required number by assigning many team with same first preference and assigning many team with multiple preferences (preference number per team &amp;gt; number of topics/2);&lt;br /&gt;
* For the Rspec tests, we will have to create object of team, assignment, and ranks. A sample team object in JSON format would be:&lt;br /&gt;
  {&amp;quot;users&amp;quot;:[{&amp;quot;ranks&amp;quot;:[1,0,2,3], &amp;quot;pid&amp;quot;:1023}],&amp;quot;max_team_size&amp;quot;:1}&lt;br /&gt;
* The objects would be generated inside the spec file lottery_controller_spec.rb using model object initializer;&lt;br /&gt;
&lt;br /&gt;
===Edge cases===&lt;br /&gt;
&lt;br /&gt;
* Case 1: No reviewer submits a list of preferred topics to review&lt;br /&gt;
&lt;br /&gt;
* Case 2: All reviewers submits exactly the same list of topics to review.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114712</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=114712"/>
		<updated>2017-12-12T22:09:15Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the the project E17A7 which is one of the several projects to allow Expertiza support (the currently unsupported) conference. Specifcally, it involves adding the ability of conference paper reviewers to bid for what they want to review. The members of this project are: &lt;br /&gt;
&lt;br /&gt;
Leiyang Guo (lguo7@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Bikram Singh (bsingh8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Navin Venugopal (nvenugo2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Sathwick Goparapu (sgopara@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project created using Ruby on Rails. This project is an software primarily to create reusable learning objects through peer review and also supports team projects. Expertiza allows the creation of instructors and student accounts. This allows the instructors to post projects (student learning objects) which can be viewed and worked upon by students. These can also be peer reviewed by students later.&lt;br /&gt;
&lt;br /&gt;
====Background of the project====&lt;br /&gt;
In the existing Expertiza functionality, the bidding ability is only for bidding for a project topic for students in a course. This involves the instructor posting a list of project topics, and each student (or all students together as a team, if some students have already formed a team) then posts a preference list, listing topics (s)he wants to work on. Then the bidding algorithm assigns the topics, particularly with the following features: &lt;br /&gt;
* Students (not in at team) with close preferences are assigned into a project team, and the common preference is the project topic assigned to the team. Alternatively, for existing teams the project topic is assigned as per the common project topic preference list&lt;br /&gt;
* Each team is assigned only one topic&lt;br /&gt;
* Each topic (if assigned) is assigned to a maximum of one team&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
This project is not responsible for adding code so as to support a conference. Rather, we are interested in the bidding algorithm used in the conference, which is significantly different from the project bidding algorithm as explained above.&lt;br /&gt;
&lt;br /&gt;
For the purposes of the project, we assume that there are several reviewers in a conference who review papers which are proposed to be presented in the conference. Also, the entire list of papers proposed to be presented in the conference is also available.&lt;br /&gt;
&lt;br /&gt;
Then the basic working of the project assumes: &lt;br /&gt;
* Before the bidding close deadline, reviewers submit a list of papers they wish to review.&lt;br /&gt;
* After the bidding deadline, the algorithm assigns papers to reviewers to review, such that:&lt;br /&gt;
** Each paper (if assigned) is assigned to a maximum of R reviewers (here R represents some constant)&lt;br /&gt;
** Each reviewer is assigned a maximum of P papers to review (here P represents some constant)&lt;br /&gt;
** Assignment of papers is individual&lt;br /&gt;
&lt;br /&gt;
==Project Requirements==&lt;br /&gt;
&lt;br /&gt;
In this section we discuss the problem statement, then discuss the existing code and possible changes required. &lt;br /&gt;
&lt;br /&gt;
====Problem Statement====&lt;br /&gt;
* To take the existing bidding code in Expertiza (which is meant for students bidding for project topics) and make it callable either for bidding for topics or bidding for submissions to review. &lt;br /&gt;
* A possible extension is to add other methods, like a &amp;quot;late reviewer registration&amp;quot; method, in which each new reviewer is assigned one of the least-reviewed submissions so far. Methods like these require an extension of the basic working of the project.&lt;br /&gt;
* The matching algorithm is currently not very sophisticated.  Top trading cycles is implemented in the web service (though it is currently not used by bidding assignment), and could be adapted to this use. &lt;br /&gt;
&lt;br /&gt;
In the subsequent discussion with the mentor, it was concluded that the two bidding situations are very different hence it was decided to keep the two separate, at least initially. Also the third requirement was modified to first make the bidding for a conference using any algorithm and if time permits, to use a better algorithm like top trading cycles.&lt;br /&gt;
&lt;br /&gt;
====Current Project Aims====&lt;br /&gt;
* To develop code such that both applications (bidding for project teams and bidding for conference paper reviews) use the same code&lt;br /&gt;
* To improve the algorithm for calculating the score for a particular project topic/conference paper review assigned to a project team/conference reviewer&lt;br /&gt;
&lt;br /&gt;
We want to state here that we are not responsible for developing any conference features. Specifically, this means that we are not changing any UI features. We will be primarily relying on UI changes done by E17A5&lt;br /&gt;
&lt;br /&gt;
== Existing Algorithm ==&lt;br /&gt;
&lt;br /&gt;
==== Problem ====&lt;br /&gt;
The existing algorithm solves the following problem: &lt;br /&gt;
&lt;br /&gt;
To form teams of students of Maximum size M and then assign topics (there are N topics) based on preference lists submitted either by individual students or teams (complete or otherwise). Preference Lists can have minimum 1 topic and a maximum of L topics. &lt;br /&gt;
Then the topics are alloted to teams such that each team gets an unique topic and each topic is assigned only to one team. &lt;br /&gt;
&lt;br /&gt;
==== Functionality ====&lt;br /&gt;
The topics are assigned to project teams in 2 steps:&lt;br /&gt;
&lt;br /&gt;
* Making teams: This is done using a k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
** The basic cost function used in the algorithm is:      C(i,j) = 1/N * &amp;amp;sum; [ M -S(i) ] where i varies from 1 to N&lt;br /&gt;
** The Algorithm calculates the weights for every user not a team or part of an incomplete team. It then assigns teams using the weights, by plotting graphs for each topic. It is as follows:&lt;br /&gt;
*** Draw a graph for every topic j with X axis as the priority position i and the Y axis as the Weights.&lt;br /&gt;
*** Hierarchical K means to select teams such that all students in a team are close to each other in the graph above, hopefully more towards the left of the graph, and also such that there are a minimum of 1 and a maximum of M students per team; &lt;br /&gt;
** The Algorithm is as follows: &lt;br /&gt;
   &amp;lt;nowiki&amp;gt;&lt;br /&gt;
      For every topic j :&lt;br /&gt;
         For every position i that topic j can be placed in (any) preference list:&lt;br /&gt;
              Let S(i) = number of students who selected topic j at position i of their (individual) preference list&lt;br /&gt;
              B(i) = 1/S(i)&lt;br /&gt;
              Calculate C(i,j)                &lt;br /&gt;
              Weight(i,j) = B(i) / C(i,j)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Assigning topics to teams: This is implemented as a one line, comparing bid preferences to allot topics.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
In the following subsections, we discuss the problem, proposed design and code. We are trying to combine the code so that it can be used for both the project topic bidding as well as the conference paper review bidding.&lt;br /&gt;
&lt;br /&gt;
====The Combined Problem====&lt;br /&gt;
The combined problem statement is as follows: Given a list of people (students or reviewers) and also a list of N items to bid on (project topics or conference paper reviews), we require the following: &lt;br /&gt;
* To form teams of Maximum size M &lt;br /&gt;
* Based on preference lists submitted by people/teams having a minimum of 1 item and a maximum of L topics, to allot topics to teams such that each team gets P items and each item (to be bid on) is assigned to R teams. &lt;br /&gt;
&lt;br /&gt;
==== Points of Discussion====&lt;br /&gt;
&lt;br /&gt;
We note the differences:&lt;br /&gt;
* For Bidding for Assignment Topics, M is generally greater then 1, but P = 1 and R = 1. The item to be bid on is the project topics.&lt;br /&gt;
* For Bidding for Conference Paper Reviews, M = 1 but P and R are generally greater then 1. The item to be bid on is the conference paper reviews.&lt;br /&gt;
&lt;br /&gt;
We note that a team of 1 person makes little sense, but we still implement it to be so that the code is compatible for both the applications.&lt;br /&gt;
&lt;br /&gt;
====Proposed Design====&lt;br /&gt;
Keeping the existing algorithm and the project requirements in mind, we decided to divide the code into 2 parts:&lt;br /&gt;
* Part A: Make teams for people not in a team (and if applicable, complete incomplete teams)&lt;br /&gt;
* Part B: Assign topics to teams&lt;br /&gt;
&lt;br /&gt;
We note that Part A has been implemented on a web service independent of Expertiza. We also note that the algorithm explained above applies only to Part A, and that it is pretty sophisticated. Hence we choose to keep the existing code as is for this part. We will simply call the webservice, provide the list of people, their bidding preference and also the max_team_size.&lt;br /&gt;
&lt;br /&gt;
Part B is implemented as one line. It is pretty simple. We also note that it simply cannot be used for conference paper review assignemnt. Hence we completely change this section and implement it using a new algorithm. &lt;br /&gt;
&lt;br /&gt;
====Proposed Algorithm for Part B====&lt;br /&gt;
Let N = Number of topics&lt;br /&gt;
    B = Base score&lt;br /&gt;
    t = Total number of topics an user prefers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For every topic i:&lt;br /&gt;
     den = find_den&lt;br /&gt;
     for every user j:&lt;br /&gt;
         if(user has preferred this topic)&lt;br /&gt;
              r = priority(topic)&lt;br /&gt;
              num = (N + 1 - r) * B * N&lt;br /&gt;
              score[topic][user] = num/den + B&lt;br /&gt;
         if(user has preferred no topic)&lt;br /&gt;
              score[topic][user] = B&lt;br /&gt;
         if(user has not preferred this topic)&lt;br /&gt;
              num = B * N&lt;br /&gt;
              score[topic][user] = B - num/den&lt;br /&gt;
&lt;br /&gt;
Now find_den =  &amp;amp;sum; [ N + 1 ] - &amp;amp;sum; [k] where the iterating variable k varies from 1 to t&lt;br /&gt;
&lt;br /&gt;
==== Methodology ====&lt;br /&gt;
We will implement this new algorithm such that the code is DRY, proper naming conventions are used&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
Actors: &lt;br /&gt;
* Conference Reviewer: Submits a preference list of papers and reviews assigned papers&lt;br /&gt;
* Conference Administrator: Responsible for the assignment of topics to the reviewers&lt;br /&gt;
&lt;br /&gt;
Scenario&lt;br /&gt;
The case of reviewers submitting a list of preferred topics and the administrator running the assignment process. For our project, the main modification would be concentrating on Use Case 4 and 5.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Choose and submit preference to be reviewed====&lt;br /&gt;
* Use Case Id: 1&lt;br /&gt;
* Use Case Description: Participants choose the preference for conference review topics and submit it&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
* Pre Conditions: Conference papers are presented and submitted, and the participants are eligible for reviewing&lt;br /&gt;
* Post Conditions: Conference committee members can view participants preference and run bidding algorithm on it&lt;br /&gt;
&lt;br /&gt;
====Saving bidder information into database====&lt;br /&gt;
* Use Case Id: 2&lt;br /&gt;
* Use Case Description: bidding preferences and related participants information are processed and saved to database&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by: Use Case 1&lt;br /&gt;
* Pre Conditions: participants preferences are submitted&lt;br /&gt;
* Post Conditions: information can be retrieved and used by bidding algorithm&lt;br /&gt;
&lt;br /&gt;
====View list of topics====&lt;br /&gt;
* Use Case Id: 3&lt;br /&gt;
* Use Case Description: participants can view list of topic available for conference paper topic&lt;br /&gt;
* Actors: Participants&lt;br /&gt;
&lt;br /&gt;
====Run bidding process====&lt;br /&gt;
* Use Case Id: 4&lt;br /&gt;
* Use Case Description: Committee members can run bidding algorithm on application to help assigning the conference paper topics to participants&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: preferences must be submitted by participants&lt;br /&gt;
* Post Conditions: the bidding result can be used for paper assignment&lt;br /&gt;
&lt;br /&gt;
====Choosing and assigning paper to bidders====&lt;br /&gt;
* Use Case Id: 5&lt;br /&gt;
* Use Case Description: System assigns participants to conference paper topics according to bidding result&lt;br /&gt;
* Actors: None&lt;br /&gt;
* Triggered by: Use Case 4&lt;br /&gt;
* Pre Conditions: bidding algorithm has run and result has been returned&lt;br /&gt;
* Post Conditions: Participants can view topics been assigned to them&lt;br /&gt;
&lt;br /&gt;
====Change assignment of review using CRUD actions====&lt;br /&gt;
* Use Case Id: 6&lt;br /&gt;
* Use Case Description: Conference committee members can change assignment result manually&lt;br /&gt;
* Actors: Conference Committee&lt;br /&gt;
* Pre Conditions: topic assignment has been done&lt;br /&gt;
* Post Conditions: changes on bidding result is visible to participants and other committee members&lt;br /&gt;
&lt;br /&gt;
== Data Flow Diagram ==&lt;br /&gt;
Below is the Data Flow Diagram for process flows of the project. The diagram shows the process of bidding algorithm that we proposed to use for conference paper review assignment.&lt;br /&gt;
[[File:Webp.net-resizeimage (1).png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We explain in the terms of the actors: Reviewer and Administrator&lt;br /&gt;
* Before the deadline all the reviewers have to submit preference list of papers. They can save, modify list as many times as they want, but they can submit once&lt;br /&gt;
* This information is saved in the database&lt;br /&gt;
* When the deadline is passed, stop accepting preference lists&lt;br /&gt;
* The administrator runs the paper assignment algroithm&lt;br /&gt;
** For every topic, calculate the score for each user&lt;br /&gt;
** Make a common scorelist, which keeps score assigned to every topic of every user. There should be a way to find out the topic and user a particular element of the scorelist belongs to&lt;br /&gt;
** Now start assigning topics according to highest score&lt;br /&gt;
** Keep track of the number of topics assigned to each user and the number of users assigned to each topic&lt;br /&gt;
** If the number of topics assigned to one user reaches the maximum value, remove that user from consideration (remove all scores corresponding to that user from scorelist)&lt;br /&gt;
** If the number of users assigned to one topic reaches the maximum value, remove that topic from consideration (remove all scores correspoinding to that topic from scorelist)&lt;br /&gt;
** Continue the above process till the scorelist is empty&lt;br /&gt;
* Save the bidding into the database&lt;br /&gt;
* Inform users about the results of the bidding&lt;br /&gt;
&lt;br /&gt;
== Changing Existing Files ==&lt;br /&gt;
This sub section details what is to be changed in the existing code.&lt;br /&gt;
&lt;br /&gt;
=== Files to be changed === &lt;br /&gt;
*lottery_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Current Code ===&lt;br /&gt;
This is current code for bidding assignment. The code will basically get target assignment and then get all topics and teams for the assignment. Then it will assign priority of each team-topic pair according to user preference  for each user, and append it to priority information list. Afterward it sends priority information along with maximum team size information to web-server and rearranging the priority order according to top-trading cycle algorithm, and pass returned result to create_new_teams_for_bidding_response function for bidding handling on topics with preferences and run_intelligent_bid function for bidding handling for leftover assignment as well as cleaning up.&lt;br /&gt;
&lt;br /&gt;
  def run_intelligent_assignment&lt;br /&gt;
    priority_info = []&lt;br /&gt;
    assignment = Assignment.find_by(id: params[:id])&lt;br /&gt;
    topics = assignment.sign_up_topics&lt;br /&gt;
    teams = assignment.teams&lt;br /&gt;
    teams.each do |team|&lt;br /&gt;
      # grab student id and list of bids&lt;br /&gt;
      bids = []&lt;br /&gt;
      topics.each do |topic|&lt;br /&gt;
        bid_record = Bid.find_by(team_id: team.id, topic_id: topic.id)&lt;br /&gt;
        bids &amp;lt;&amp;lt; (bid_record.nil? ? 0 : bid_record.priority ||= 0)&lt;br /&gt;
      end&lt;br /&gt;
      team.users.each { |user| priority_info &amp;lt;&amp;lt; { pid: user.id, ranks: bids } if bids.uniq != [0] }&lt;br /&gt;
    end&lt;br /&gt;
    data = { users: priority_info, max_team_size: assignment.max_team_size }&lt;br /&gt;
    url = WEBSERVICE_CONFIG[&amp;quot;topic_bidding_webservice_url&amp;quot;]&lt;br /&gt;
    begin&lt;br /&gt;
      response = RestClient.post url, data.to_json, content_type: :json, accept: :json&lt;br /&gt;
      # store each summary in a hashmap and use the question as the key&lt;br /&gt;
      teams = JSON.parse(response)[&amp;quot;teams&amp;quot;]&lt;br /&gt;
      create_new_teams_for_bidding_response(teams, assignment)&lt;br /&gt;
      run_intelligent_bid(assignment)&lt;br /&gt;
    rescue =&amp;gt; err&lt;br /&gt;
      flash[:error] = err.message&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'tree_display', action: 'list'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=== Proposed Code ===&lt;br /&gt;
&lt;br /&gt;
Then we will change the run_intelligent_assignment function to implementation as below:&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
===Manual Testing===&lt;br /&gt;
* UI testing of the implemented functionality to be done.&lt;br /&gt;
&lt;br /&gt;
** Log in as a participants/student&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Go to Other's works and check preferred conference paper topics to bid on reviewing&lt;br /&gt;
** Click submit and wait for bidding deadline&lt;br /&gt;
** After deadline reaches, go back to assignment and click on Other's work to view topics assigned for reviewing&lt;br /&gt;
&lt;br /&gt;
===Automated Test Cases===&lt;br /&gt;
* TDD and Feature Test cases to be written. For instance we would do Rspec test on cases below:&lt;br /&gt;
** Test on score calculation, see if the calculation gives right scoring distribution when no preference is given, when one preference is given, and when multiple preferences are given;&lt;br /&gt;
** Test on preference levels matching, check if the algorithm is match first, second, third, and so on preferences and evaluating them correctly;&lt;br /&gt;
** Test if teams per topic or topics per team can exceed required number by assigning many team with same first preference and assigning many team with multiple preferences (preference number per team &amp;gt; number of topics/2);&lt;br /&gt;
* For the Rspec tests, we will have to create object of team, assignment, and ranks. A sample team object in JSON format would be:&lt;br /&gt;
  {&amp;quot;users&amp;quot;:[{&amp;quot;ranks&amp;quot;:[1,0,2,3], &amp;quot;pid&amp;quot;:1023}],&amp;quot;max_team_size&amp;quot;:1}&lt;br /&gt;
* The objects would be generated inside the spec file lottery_controller_spec.rb using model object initializer;&lt;br /&gt;
&lt;br /&gt;
===Edge cases===&lt;br /&gt;
&lt;br /&gt;
* Case 1: No reviewer submits a list of preferred topics to review&lt;br /&gt;
&lt;br /&gt;
* Case 2: All reviewers submits exactly the same list of topics to review.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112670</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112670"/>
		<updated>2017-11-08T04:26:45Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
====Bidding Algorithm Overview====&lt;br /&gt;
&lt;br /&gt;
The Bidding algorithm implementation is based on k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. The approach to meeting these criteria is addressed by mining student preferences for topics with a clustering approach, and then matching them in groups to topics that suit their shared interests. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here is as follows: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
====Manual Testing====&lt;br /&gt;
* UI testing of the implemented functionality to be done.&lt;br /&gt;
&lt;br /&gt;
====Automated Test Cases====&lt;br /&gt;
* TDD and Feature Test cases to be written.&lt;br /&gt;
&lt;br /&gt;
=====Edge cases=====&lt;br /&gt;
&lt;br /&gt;
* Case 1: Users signing up after bidding is done need to be assigned the papers/journals with no or least reviews done.&lt;br /&gt;
&lt;br /&gt;
* Case 2: Extending edge case 1, if somebody doesn't provide a list of topics s(he) wants to review, the topic with the least number of bids is assigned.&lt;br /&gt;
&lt;br /&gt;
* Case 3: If a participant is assigned to review a paper in the (topics) preference list but decides to drop the review after the bidding process is done.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112667</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112667"/>
		<updated>2017-11-08T04:23:37Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
====Bidding Algorithm Overview====&lt;br /&gt;
&lt;br /&gt;
The Bidding algorithm implementation is based on k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. The approach to meeting these criteria is addressed by mining student preferences for topics with a clustering approach, and then matching them in groups to topics that suit their shared interests. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
====Manual Testing====&lt;br /&gt;
* UI testing of the implemented functionality to be done.&lt;br /&gt;
&lt;br /&gt;
====Automated Test Cases====&lt;br /&gt;
* TDD and Feature Test cases to be written.&lt;br /&gt;
&lt;br /&gt;
=====Edge cases=====&lt;br /&gt;
&lt;br /&gt;
* Case 1: Users signing up after bidding is done need to be assigned the papers/journals with no or least reviews done.&lt;br /&gt;
&lt;br /&gt;
* Case 2: Extending edge case 1, if somebody doesn't provide a list of topics s(he) wants to review, the topic with the least number of bids is assigned.&lt;br /&gt;
&lt;br /&gt;
* Case 3: If a participant is assigned to review a paper in the (topics) preference list but decides to drop the review after the bidding process is done.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112660</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112660"/>
		<updated>2017-11-08T04:19:23Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
====Bidding Algorithm Overview====&lt;br /&gt;
&lt;br /&gt;
The Bidding algorithm implementation is based on k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. The approach to meeting these criteria is addressed by mining student preferences for topics with a clustering approach, and then matching them in groups to topics that suit their shared interests. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
====Manual Testing====&lt;br /&gt;
* UI testing of the implemented functionality to be done.&lt;br /&gt;
&lt;br /&gt;
====Automated Test Cases====&lt;br /&gt;
* TDD and Feature Test cases to be written.&lt;br /&gt;
&lt;br /&gt;
=====Edge cases=====&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112659</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112659"/>
		<updated>2017-11-08T04:15:21Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
====Bidding Algorithm Overview====&lt;br /&gt;
&lt;br /&gt;
The Bidding algorithm implementation is based on k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. The approach to meeting these criteria is addressed by mining student preferences for topics with a clustering approach, and then matching them in groups to topics that suit their shared interests. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit?usp=sharing| here].&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112658</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112658"/>
		<updated>2017-11-08T04:14:03Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
====Bidding Algorithm Overview====&lt;br /&gt;
&lt;br /&gt;
The Bidding algorithm implementation is based on k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached. The approach to meeting these criteria is addressed by mining student preferences for topics with a clustering approach, and then matching them in groups to topics that suit their shared interests. You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit| here].&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112656</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112656"/>
		<updated>2017-11-08T04:12:04Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
====Bidding Algorithm Overview====&lt;br /&gt;
&lt;br /&gt;
The Bidding algorithm implementation is based on k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached.  You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit| here].&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112655</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112655"/>
		<updated>2017-11-08T04:11:28Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
The Bidding algorithm implementation is based on k-means clustering and a weighting formula that favors increasing overall student satisfaction and adding members until the maximum allowable team size is reached.  You can read about it in detail [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit| here].&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112653</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112653"/>
		<updated>2017-11-08T04:09:09Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
My recollection is that this terminology is very confusing, and I said it needed to be changed.  You can read about it [https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit| here], or ask sakbar@ncsu.edu.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112651</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112651"/>
		<updated>2017-11-08T04:07:23Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
My recollection is that this terminology is very confusing, and I said it needed to be changed.  You can read about it [[https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit | here]], or ask sakbar@ncsu.edu.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112649</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112649"/>
		<updated>2017-11-08T04:07:03Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
My recollection is that this terminology is very confusing, and I said it needed to be changed.  You can read about it [[https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit|here]], or ask sakbar@ncsu.edu.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112646</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112646"/>
		<updated>2017-11-08T04:05:54Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
My recollection is that this terminology is very confusing, and I said it needed to be changed.  You can read about it [[https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit] here], or ask sakbar@ncsu.edu.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112644</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112644"/>
		<updated>2017-11-08T04:04:47Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
My recollection is that this terminology is very confusing, and I said it needed to be changed.  You can read about it [[https://docs.google.com/document/d/1hyJjqfdSPi0NjzLFygUodVLVqABIE2Lu-RBDMkUDvUs/edit]here], or ask sakbar@ncsu.edu.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112639</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112639"/>
		<updated>2017-11-08T04:00:35Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
My recollection is that this terminology is very confusing, and I said it needed to be changed.  You can read about it here, or ask sakbar@ncsu.edu.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112625</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112625"/>
		<updated>2017-11-08T03:34:42Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be Modified==&lt;br /&gt;
&lt;br /&gt;
* lottery_controller.rb&lt;br /&gt;
* New Controller to be specified for review bidding&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112624</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112624"/>
		<updated>2017-11-08T03:33:07Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
====Possible Extension====&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112623</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112623"/>
		<updated>2017-11-08T03:32:45Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
===Possible Extension===&lt;br /&gt;
&lt;br /&gt;
A possible extension is to combine reviewer assignment by bidding with one of the other assignment methods--instructor assignment, or “automated” assignment, where each new reviewer is assigned one of the least-reviewed submissions so far.  In this case, submissions that are not bid upon would be assigned to reviewers who “show up later,” as would reviews that are not completed by the reviewers who bid on them.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112621</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112621"/>
		<updated>2017-11-08T03:31:02Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112619</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112619"/>
		<updated>2017-11-08T03:30:30Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. &lt;br /&gt;
Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
* To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
* To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112618</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112618"/>
		<updated>2017-11-08T03:30:03Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
* The reviewer bidding for proposed conference papers has not been fully implemented. &lt;br /&gt;
Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
** To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
** To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112615</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112615"/>
		<updated>2017-11-08T03:29:10Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
The reviewer bidding for proposed conference papers has not been fully implemented. &lt;br /&gt;
Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
==Use Case diagram==&lt;br /&gt;
[[File:UML_01.png]]&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112613</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112613"/>
		<updated>2017-11-08T03:28:44Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
The reviewer bidding for proposed conference papers has not been fully implemented. &lt;br /&gt;
Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
To attempt to merge the existing and the new algorithm as much as possible&lt;br /&gt;
&lt;br /&gt;
[[File:UML_01.png]]&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:UML_01.png&amp;diff=112612</id>
		<title>File:UML 01.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:UML_01.png&amp;diff=112612"/>
		<updated>2017-11-08T03:28:04Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: UML diag&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;UML diag&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112609</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112609"/>
		<updated>2017-11-08T03:27:11Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
====Description of project====&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
The reviewer bidding for proposed conference papers has not been fully implemented. &lt;br /&gt;
Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
To attempt to merge the existing and the new algorithm as much as possible&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112606</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112606"/>
		<updated>2017-11-08T03:26:43Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Description of project===&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
* Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
The reviewer bidding for proposed conference papers has not been fully implemented. &lt;br /&gt;
Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
To attempt to merge the existing and the new algorithm as much as possible&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112605</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112605"/>
		<updated>2017-11-08T03:26:19Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Description of project===&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
--&amp;gt; Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;br /&gt;
&lt;br /&gt;
The reviewer bidding for proposed conference papers has not been fully implemented. &lt;br /&gt;
Currently the bidding process for assigning topics is either manual or automatic. Manual means the instructor assigns topics based on the preference provided by the students.  Automatic assignment means that topics are assigned on the basis of an implemented algorithm, which takes into account some parameters, including intelligent-property.&lt;br /&gt;
Our goal here are as follow: &lt;br /&gt;
To implement a bidding algorithm for conference paper reviewer assignment functionality.&lt;br /&gt;
To attempt to merge the existing and the new algorithm as much as possible&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112602</id>
		<title>CSC/ECE 517 Fall 2017/E17A7 Allow Reviewers to bid on what to review</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A7_Allow_Reviewers_to_bid_on_what_to_review&amp;diff=112602"/>
		<updated>2017-11-08T03:24:43Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Description of project===&lt;br /&gt;
&lt;br /&gt;
Expertiza provides a way for students to bid on different topics for proposed assignment topics. This allows the fair topic distribution among students when multiple students or groups are bidding on same topic or paper.&lt;br /&gt;
&lt;br /&gt;
The changes related to this project are required for reviewing conference papers and journals. The users are able to submit their works as either individuals or teams to be scrutinized. The other participants are allowed to review the papers of their interest from the list of submitted papers. The participants are allowed to bid on the papers of their preference in a preference list with the top most entry taking the highest priority. The bidding algorithm already exists as called by a web service in Peerlogic. The goal of this project is to generalize the algorithm for both review and topic based bidding.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviews are often assigned by having reviewers bid on papers they want to review.  This is very similar to the kind of bidding that Expertiza implements for topics, and it should be possible to call the same code (which will be modified to make it more general).&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111711</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111711"/>
		<updated>2017-11-03T04:47:32Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Change==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests (different from the previous review) after discussing with the project mentor and the professor. Updated in Problem statement.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
This is an only Testing project to write feature tests for the process. The same is explained in screen shots and video attached. The previous requirement regarding the modifications in sign_up controller have been changed to feature tests and the following problem statements have been taken care of.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
•	Test for the entirety of the bidding process. &lt;br /&gt;
&lt;br /&gt;
•	Users are able to place bids on interested topics.&lt;br /&gt;
&lt;br /&gt;
•	Users are assigned topics.&lt;br /&gt;
&lt;br /&gt;
==File Modified==&lt;br /&gt;
/spec/features/bidding_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
===Code Coverage===&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
[[File:redCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written.&lt;br /&gt;
&lt;br /&gt;
[[File:greenCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
===Manual Tests===&lt;br /&gt;
Manual testing of features on Local host is done with a running Expertiza environment. ( As seen on video). The following steps have been taken care of to setup ad run the bidding process manually.&lt;br /&gt;
&lt;br /&gt;
•	Login as instructor and create assignment. Create topics under the assignment.&lt;br /&gt;
&lt;br /&gt;
•	Enable bidding and associated properties for the created assignment.&lt;br /&gt;
&lt;br /&gt;
•	Login as student, create teams and bid for projects.&lt;br /&gt;
&lt;br /&gt;
•	Login as instructor and run the bidding algorithm.&lt;br /&gt;
&lt;br /&gt;
•	Login as student and check if topics are assigned&lt;br /&gt;
&lt;br /&gt;
===Automated test cases===&lt;br /&gt;
&lt;br /&gt;
The screen shots for the added feature test cases have been attached below. (Also attached as video file). Test cases written to check for the following scenarios.&lt;br /&gt;
&lt;br /&gt;
•	Check for whole bidding process to run successfully.&lt;br /&gt;
&lt;br /&gt;
•	Check for Error message for unsuccessful bidding run.&lt;br /&gt;
&lt;br /&gt;
•	Check if user is assigned a topic successfully.&lt;br /&gt;
&lt;br /&gt;
•	Highest priority bid assigned when multiple bids are placed.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111710</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111710"/>
		<updated>2017-11-03T04:46:12Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Change==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests (different from the previous review) after discussing with the project mentor and the professor. Updated in Problem statement.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
This is an only Testing project to write feature tests for the process. The same is explained in screen shots and video attached. The previous requirement regarding the modifications in sign_up controller have been changed to feature tests and the following problem statements have been taken care of.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
Test for the entirety of the bidding process. &lt;br /&gt;
&lt;br /&gt;
Users are able to place bids on interested topics.&lt;br /&gt;
&lt;br /&gt;
Users are assigned topics.&lt;br /&gt;
&lt;br /&gt;
==File Modified==&lt;br /&gt;
/spec/features/bidding_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
===Code Coverage===&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
[[File:redCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written.&lt;br /&gt;
&lt;br /&gt;
[[File:greenCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
===Manual Tests===&lt;br /&gt;
Manual testing of features on Local host is done with a running Expertiza environment. ( As seen on video). The following steps have been taken care of to setup ad run the bidding process manually.&lt;br /&gt;
&lt;br /&gt;
•	Login as instructor and create assignment. Create topics under the assignment.&lt;br /&gt;
&lt;br /&gt;
•	Enable bidding and associated properties for the created assignment.&lt;br /&gt;
&lt;br /&gt;
•	Login as student, create teams and bid for projects.&lt;br /&gt;
&lt;br /&gt;
•	Login as instructor and run the bidding algorithm.&lt;br /&gt;
&lt;br /&gt;
•	Login as student and check if topics are assigned&lt;br /&gt;
&lt;br /&gt;
===Automated test cases===&lt;br /&gt;
&lt;br /&gt;
The screen shots for the added feature test cases have been attached below. (Also attached as video file). Test cases written to check for the following scenarios.&lt;br /&gt;
&lt;br /&gt;
•	Check for whole bidding process to run successfully.&lt;br /&gt;
&lt;br /&gt;
•	Check for Error message for unsuccessful bidding run.&lt;br /&gt;
&lt;br /&gt;
•	Check if user is assigned a topic successfully.&lt;br /&gt;
&lt;br /&gt;
•	Highest priority bid assigned when multiple bids are placed.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111709</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111709"/>
		<updated>2017-11-03T04:45:38Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Change==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests (different from the previous review) after discussing with the project mentor and the professor. Updated in Problem statement.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
This is an only Testing project to write feature tests for the process. The same is explained in screen shots and video attached. The previous requirement regarding the modifications in sign_up controller have been changed to feature tests and the following problem statements have been taken care of.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
Test for the entirety of the bidding process. &lt;br /&gt;
&lt;br /&gt;
Users are able to place bids on interested topics.&lt;br /&gt;
&lt;br /&gt;
Users are assigned topics.&lt;br /&gt;
&lt;br /&gt;
==File Modified==&lt;br /&gt;
/spec/features/bidding_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
===Code Coverage===&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
[[File:redCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written.&lt;br /&gt;
&lt;br /&gt;
[[File:greenCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
===Manual Tests===&lt;br /&gt;
Manual testing of features on Local host is done with a running Expertiza environment. ( As seen on video). The following steps have been taken care of to setup ad run the bidding process manually.&lt;br /&gt;
&lt;br /&gt;
•	Login as instructor and create assignment. Create topics under the assignment.&lt;br /&gt;
&lt;br /&gt;
•	Enable bidding and associated properties for the created assignment.&lt;br /&gt;
&lt;br /&gt;
•	Login as student, create teams and bid for projects.&lt;br /&gt;
&lt;br /&gt;
•	Login as instructor and run the bidding algorithm.&lt;br /&gt;
&lt;br /&gt;
•	Login as student and check if topics are assigned&lt;br /&gt;
&lt;br /&gt;
===Automated test cases===&lt;br /&gt;
&lt;br /&gt;
The screen shots for the added feature test cases have been attached below. (Also attached as video file). Test cases written to check for the following scenarios.&lt;br /&gt;
&lt;br /&gt;
•	Check for whole bidding process to run successfully.&lt;br /&gt;
&lt;br /&gt;
•	Check for Error message for unsuccessful bidding run.&lt;br /&gt;
&lt;br /&gt;
•	Check if user is assigned a topic successfully.&lt;br /&gt;
&lt;br /&gt;
•	Highest priority bid assigned when multiple bids are placed.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111708</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111708"/>
		<updated>2017-11-03T04:44:36Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Change==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests (different from the previous review) after discussing with the project mentor and the professor. Updated in Problem statement.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
This is an only Testing project to write feature tests for the process. The same is explained in screen shots and video attached. The previous requirement regarding the modifications in sign_up controller have been changed to feature tests and the following problem statements have been taken care of.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
Test for the entirety of the bidding process. &lt;br /&gt;
&lt;br /&gt;
Users are able to place bids on interested topics.&lt;br /&gt;
&lt;br /&gt;
Users are assigned topics.&lt;br /&gt;
&lt;br /&gt;
==File Modified==&lt;br /&gt;
/spec/features/bidding_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
===Code Coverage===&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
[[File:redCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written.&lt;br /&gt;
&lt;br /&gt;
[[File:greenCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
===Manual Tests===&lt;br /&gt;
Manual testing of features on Local host is done with a running Expertiza environment. ( As seen on video). The following steps have been taken care of to setup ad run the bidding process manually.&lt;br /&gt;
&lt;br /&gt;
Login as instructor and create assignment. Create topics under the assignment.&lt;br /&gt;
&lt;br /&gt;
Enable bidding and associated properties for the created assignment.&lt;br /&gt;
&lt;br /&gt;
Login as student, create teams and bid for projects.&lt;br /&gt;
&lt;br /&gt;
Login as instructor and run the bidding algorithm.&lt;br /&gt;
&lt;br /&gt;
Login as student and check if topics are assigned&lt;br /&gt;
&lt;br /&gt;
===Automated test cases===&lt;br /&gt;
&lt;br /&gt;
The screen shots for the added feature test cases have been attached below. (Also attached as video file). Test cases written to check for the following scenarios.&lt;br /&gt;
&lt;br /&gt;
Check for whole bidding process to run successfully.&lt;br /&gt;
&lt;br /&gt;
Check for Error message for unsuccessful bidding run.&lt;br /&gt;
&lt;br /&gt;
Check if user is assigned a topic successfully.&lt;br /&gt;
&lt;br /&gt;
Highest priority bid assigned when multiple bids are placed.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111707</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111707"/>
		<updated>2017-11-03T04:43:23Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Change==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests (different from the previous review) after discussing with the project mentor and the professor. Updated in Problem statement.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
This is an only Testing project to write feature tests for the process. The same is explained in screen shots and video attached. The previous requirement regarding the modifications in sign_up controller have been changed to feature tests and the following problem statements have been taken care of.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
Test for the entirety of the bidding process. &lt;br /&gt;
&lt;br /&gt;
Users are able to place bids on interested topics.&lt;br /&gt;
&lt;br /&gt;
Users are assigned topics.&lt;br /&gt;
&lt;br /&gt;
==File Modified==&lt;br /&gt;
/spec/features/bidding_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
===Code Coverage===&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
[[File:redCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written.&lt;br /&gt;
&lt;br /&gt;
[[File:greenCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
===Manual Tests===&lt;br /&gt;
Manual testing of features on Local host is done with a running Expertiza environment. ( As seen on video). The following steps have been taken care of to setup ad run the bidding process manually.&lt;br /&gt;
&lt;br /&gt;
Login as instructor and create assignment. Create topics under the assignment.&lt;br /&gt;
Enable bidding and associated properties for the created assignment.&lt;br /&gt;
Login as student, create teams and bid for projects.&lt;br /&gt;
Login as instructor and run the bidding algorithm.&lt;br /&gt;
Login as student and check if topics are assigned&lt;br /&gt;
&lt;br /&gt;
===Automated test cases===&lt;br /&gt;
The screen shots for the added feature test cases have been attached below. (Also attached as video file). Test cases written to check for the following scenarios.&lt;br /&gt;
&lt;br /&gt;
Check for whole bidding process to run successfully.&lt;br /&gt;
&lt;br /&gt;
Check for Error message for unsuccessful bidding run.&lt;br /&gt;
&lt;br /&gt;
Check if user is assigned a topic successfully.&lt;br /&gt;
&lt;br /&gt;
Highest priority bid assigned when multiple bids are placed.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111706</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111706"/>
		<updated>2017-11-03T04:39:26Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Change==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests (different from the previous review) after discussing with the project mentor and the professor. Updated in Problem statement.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
This is an only Testing project to write feature tests for the process. The same is explained in screen shots and video attached. The previous requirement regarding the modifications in sign_up controller have been changed to feature tests and the following problem statements have been taken care of.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
Test for the entirety of the bidding process. &lt;br /&gt;
&lt;br /&gt;
Users are able to place bids on interested topics.&lt;br /&gt;
&lt;br /&gt;
Users are assigned topics.&lt;br /&gt;
&lt;br /&gt;
==File Modified==&lt;br /&gt;
/spec/features/bidding_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
===Code Coverage===&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Manual Tests===&lt;br /&gt;
Manual testing of features on Local host is done with a running Expertiza environment. ( As seen on video). The following steps have been taken care of to setup ad run the bidding process manually.&lt;br /&gt;
&lt;br /&gt;
Login as instructor and create assignment. Create topics under the assignment.&lt;br /&gt;
Enable bidding and associated properties for the created assignment.&lt;br /&gt;
Login as student, create teams and bid for projects.&lt;br /&gt;
Login as instructor and run the bidding algorithm.&lt;br /&gt;
Login as student and check if topics are assigned&lt;br /&gt;
&lt;br /&gt;
===Automated test cases===&lt;br /&gt;
The screen shots for the added feature test cases have been attached below. (Also attached as video file). Test cases written to check for the following scenarios.&lt;br /&gt;
&lt;br /&gt;
Check for whole bidding process to run successfully.&lt;br /&gt;
&lt;br /&gt;
Check for Error message for unsuccessful bidding run.&lt;br /&gt;
&lt;br /&gt;
Check if user is assigned a topic successfully.&lt;br /&gt;
&lt;br /&gt;
Highest priority bid assigned when multiple bids are placed.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111705</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111705"/>
		<updated>2017-11-03T04:38:49Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Change==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests (different from the previous review) after discussing with the project mentor and the professor. Updated in Problem statement.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
This is an only Testing project to write feature tests for the process. The same is explained in screen shots and video attached below. The previous requirement regarding the modifications in sign_up controller have been changed to feature tests and the following problem statements have been taken care of.&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
Test for the entirety of the bidding process. &lt;br /&gt;
&lt;br /&gt;
Users are able to place bids on interested topics.&lt;br /&gt;
&lt;br /&gt;
Users are assigned topics.&lt;br /&gt;
&lt;br /&gt;
==File Modified==&lt;br /&gt;
/spec/features/bidding_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
===Code Coverage===&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Manual Tests===&lt;br /&gt;
Manual testing of features on Local host is done with a running Expertiza environment. ( As seen on video). The following steps have been taken care of to setup ad run the bidding process manually.&lt;br /&gt;
&lt;br /&gt;
Login as instructor and create assignment. Create topics under the assignment.&lt;br /&gt;
Enable bidding and associated properties for the created assignment.&lt;br /&gt;
Login as student, create teams and bid for projects.&lt;br /&gt;
Login as instructor and run the bidding algorithm.&lt;br /&gt;
Login as student and check if topics are assigned&lt;br /&gt;
&lt;br /&gt;
===Automated test cases===&lt;br /&gt;
The screen shots for the added feature test cases have been attached below. (Also attached as video file). Test cases written to check for the following scenarios.&lt;br /&gt;
&lt;br /&gt;
Check for whole bidding process to run successfully.&lt;br /&gt;
&lt;br /&gt;
Check for Error message for unsuccessful bidding run.&lt;br /&gt;
&lt;br /&gt;
Check if user is assigned a topic successfully.&lt;br /&gt;
&lt;br /&gt;
Highest priority bid assigned when multiple bids are placed.&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111630</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111630"/>
		<updated>2017-11-03T02:19:13Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Change==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests. The same has been discussed with the professor and the new changes for tests and writeup will be updated once it is done by the re-submission date.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	Bids are saved using the user id or team id based on how the bidding is done with teams getting higher priorities.&lt;br /&gt;
&lt;br /&gt;
•	When bids are sent to the sign-up controller, all existing bids for the user’s team are destroyed and replaced by the new bids&lt;br /&gt;
&lt;br /&gt;
•	The coloring of the bids is determined by the total number of bids placed on a topic&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities. Also, individuals with similar priorities are combined to form a new team.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
•	Check that only one signed up team is made for each topic&lt;br /&gt;
&lt;br /&gt;
•	Check that users that signed up for the same team stay in the same team&lt;br /&gt;
&lt;br /&gt;
•	Should disband teams that are not assigned any topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
'''Problem 1'''&lt;br /&gt;
&lt;br /&gt;
Existing test cases and Rspec code do not cover the method body statements. Existing test cases only stub a method. Hence code coverage for lottery controller was only at 9%.&lt;br /&gt;
&lt;br /&gt;
'''Problem 2'''&lt;br /&gt;
&lt;br /&gt;
Rspec test code was incorrect which resulted in extremely low code coverage. Whole sign up and bidding functionality are present in the controller whereas a good programming in rails consists of all code in models with controllers just for interface applications. &lt;br /&gt;
&lt;br /&gt;
==Files Modified==&lt;br /&gt;
/spec/controllers/lottery_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
/spec/features/bidding_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Issues and Solutions==&lt;br /&gt;
&lt;br /&gt;
'''Problem 1'''&lt;br /&gt;
&lt;br /&gt;
Existing test cases for lottery controller was written to test small portion of the function rather than one complete function which is a violation of unit testing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:partial_test_case.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test case checks if the web-service is successful in run_intelligent_assignment function. But the function performs other operations along with calling web service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Wrong_test_case.png]]&lt;br /&gt;
&lt;br /&gt;
This rspec test verifies that intelligent assignments are not performed if the is _intelligent variable is set to 0. When the rspec code is executed this test case successfully passes. But when the code is executed by setting the is_intelligent variable to 0, it still executes intelligent assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Problem 2'''&lt;br /&gt;
&lt;br /&gt;
[[File:redCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written for intelligent assignment method.&lt;br /&gt;
&lt;br /&gt;
[[File:greenCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As noticed from the screenshot we were unable to cover the last 2 lines of the method since unit testing does not cover JSON.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:testCasePassed.png]]&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111628</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=111628"/>
		<updated>2017-11-03T02:18:18Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Change==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests. The same has been discussed with the professor and the new changes for tests and writeup will be updated once it is done by the re-submission date.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	Bids are saved using the user id or team id based on how the bidding is done with teams getting higher priorities.&lt;br /&gt;
&lt;br /&gt;
•	When bids are sent to the sign-up controller, all existing bids for the user’s team are destroyed and replaced by the new bids&lt;br /&gt;
&lt;br /&gt;
•	The coloring of the bids is determined by the total number of bids placed on a topic&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities. Also, individuals with similar priorities are combined to form a new team.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
•	Check that only one signed up team is made for each topic&lt;br /&gt;
&lt;br /&gt;
•	Check that users that signed up for the same team stay in the same team&lt;br /&gt;
&lt;br /&gt;
•	Should disband teams that are not assigned any topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
'''Problem 1'''&lt;br /&gt;
&lt;br /&gt;
Existing test cases and Rspec code do not cover the method body statements. Existing test cases only stub a method. Hence code coverage for lottery controller was only at 9%.&lt;br /&gt;
&lt;br /&gt;
'''Problem 2'''&lt;br /&gt;
&lt;br /&gt;
Rspec test code was incorrect which resulted in extremely low code coverage. Whole sign up and bidding functionality are present in the controller whereas a good programming in rails consists of all code in models with controllers just for interface applications. &lt;br /&gt;
&lt;br /&gt;
==Files Modified==&lt;br /&gt;
/spec/controllers/lottery_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
/spec/features/bidding_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Issues and Solutions==&lt;br /&gt;
&lt;br /&gt;
'''Problem 1'''&lt;br /&gt;
&lt;br /&gt;
Existing test cases for lottery controller was written to test small portion of the function rather than one complete function which is a violation of unit testing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:partial_test_case.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test case checks if the web-service is successful in run_intelligent_assignment function. But the function performs other operations along with calling web service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Wrong_test_case.png]]&lt;br /&gt;
&lt;br /&gt;
This rspec test verifies that intelligent assignments are not performed if the is _intelligent variable is set to 0. When the rspec code is executed this test case successfully passes. But when the code is executed by setting the is_intelligent variable to 0, it still executes intelligent assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Problem 2'''&lt;br /&gt;
&lt;br /&gt;
[[File:redCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written for intelligent assignment method.&lt;br /&gt;
&lt;br /&gt;
[[File:greenCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As noticed from the screenshot we were unable to cover the last 2 lines of the method since unit testing does not cover JSON.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:testCasePassed.png]]&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=110905</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=110905"/>
		<updated>2017-10-29T21:11:46Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Change==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests. The same has been discussed with the professor and the new changes for tests and writeup will be updated once it is done by the re-submission date.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	Bids are saved using the user id or team id based on how the bidding is done with teams getting higher priorities.&lt;br /&gt;
&lt;br /&gt;
•	When bids are sent to the sign-up controller, all existing bids for the user’s team are destroyed and replaced by the new bids&lt;br /&gt;
&lt;br /&gt;
•	The coloring of the bids is determined by the total number of bids placed on a topic&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities. Also, individuals with similar priorities are combined to form a new team.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
•	Check that only one signed up team is made for each topic&lt;br /&gt;
&lt;br /&gt;
•	Check that users that signed up for the same team stay in the same team&lt;br /&gt;
&lt;br /&gt;
•	Should disband teams that are not assigned any topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
'''Problem 1'''&lt;br /&gt;
&lt;br /&gt;
Existing test cases and Rspec code do not cover the method body statements. Existing test cases only stub a method. Hence code coverage for lottery controller was only at 9%.&lt;br /&gt;
&lt;br /&gt;
'''Problem 2'''&lt;br /&gt;
&lt;br /&gt;
Rspec test code was incorrect which resulted in extremely low code coverage. Whole sign up and bidding functionality are present in the controller whereas a good programming in rails consists of all code in models with controllers just for interface applications. &lt;br /&gt;
&lt;br /&gt;
==Files Modified==&lt;br /&gt;
/spec/controllers/lottery_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Issues and Solutions==&lt;br /&gt;
&lt;br /&gt;
'''Problem 1'''&lt;br /&gt;
&lt;br /&gt;
Existing test cases for lottery controller was written to test small portion of the function rather than one complete function which is a violation of unit testing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:partial_test_case.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test case checks if the web-service is successful in run_intelligent_assignment function. But the function performs other operations along with calling web service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Wrong_test_case.png]]&lt;br /&gt;
&lt;br /&gt;
This rspec test verifies that intelligent assignments are not performed if the is _intelligent variable is set to 0. When the rspec code is executed this test case successfully passes. But when the code is executed by setting the is_intelligent variable to 0, it still executes intelligent assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Problem 2'''&lt;br /&gt;
&lt;br /&gt;
[[File:redCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written for intelligent assignment method.&lt;br /&gt;
&lt;br /&gt;
[[File:greenCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As noticed from the screenshot we were unable to cover the last 2 lines of the method since unit testing does not cover JSON.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:testCasePassed.png]]&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=110904</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=110904"/>
		<updated>2017-10-29T21:11:27Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Mismatch==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests. The same has been discussed with the professor and the new changes for tests and writeup will be updated once it is done by the re-submission date.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	Bids are saved using the user id or team id based on how the bidding is done with teams getting higher priorities.&lt;br /&gt;
&lt;br /&gt;
•	When bids are sent to the sign-up controller, all existing bids for the user’s team are destroyed and replaced by the new bids&lt;br /&gt;
&lt;br /&gt;
•	The coloring of the bids is determined by the total number of bids placed on a topic&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities. Also, individuals with similar priorities are combined to form a new team.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
•	Check that only one signed up team is made for each topic&lt;br /&gt;
&lt;br /&gt;
•	Check that users that signed up for the same team stay in the same team&lt;br /&gt;
&lt;br /&gt;
•	Should disband teams that are not assigned any topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
'''Problem 1'''&lt;br /&gt;
&lt;br /&gt;
Existing test cases and Rspec code do not cover the method body statements. Existing test cases only stub a method. Hence code coverage for lottery controller was only at 9%.&lt;br /&gt;
&lt;br /&gt;
'''Problem 2'''&lt;br /&gt;
&lt;br /&gt;
Rspec test code was incorrect which resulted in extremely low code coverage. Whole sign up and bidding functionality are present in the controller whereas a good programming in rails consists of all code in models with controllers just for interface applications. &lt;br /&gt;
&lt;br /&gt;
==Files Modified==&lt;br /&gt;
/spec/controllers/lottery_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Issues and Solutions==&lt;br /&gt;
&lt;br /&gt;
'''Problem 1'''&lt;br /&gt;
&lt;br /&gt;
Existing test cases for lottery controller was written to test small portion of the function rather than one complete function which is a violation of unit testing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:partial_test_case.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test case checks if the web-service is successful in run_intelligent_assignment function. But the function performs other operations along with calling web service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Wrong_test_case.png]]&lt;br /&gt;
&lt;br /&gt;
This rspec test verifies that intelligent assignments are not performed if the is _intelligent variable is set to 0. When the rspec code is executed this test case successfully passes. But when the code is executed by setting the is_intelligent variable to 0, it still executes intelligent assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Problem 2'''&lt;br /&gt;
&lt;br /&gt;
[[File:redCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written for intelligent assignment method.&lt;br /&gt;
&lt;br /&gt;
[[File:greenCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As noticed from the screenshot we were unable to cover the last 2 lines of the method since unit testing does not cover JSON.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:testCasePassed.png]]&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=110903</id>
		<title>CSC/ECE 517 Fall 2017/E1753 OSS project bidding tests</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1753_OSS_project_bidding_tests&amp;diff=110903"/>
		<updated>2017-10-29T21:10:53Z</updated>

		<summary type="html">&lt;p&gt;Nvenugo2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Requirement Mismatch==&lt;br /&gt;
Please note that the requirement for the project has been changed to feature tests. The same has been discussed with the professor and the new changes for tests and writeup will be updated before resubmission date.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
Expertiza is an open source project developed by North Carolina State University using Ruby on Rails. It is mainly a tool used to collaborate among students and faculty on a course and act as a common repository to track students’ progress on assignments. It is a simple tool where the instructor creates multiple assignments required and teams are assigned projects. Students submit their work and review other’s work and provide feedback.&lt;br /&gt;
&lt;br /&gt;
===Wiki link===&lt;br /&gt;
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation&lt;br /&gt;
&lt;br /&gt;
===Github link===&lt;br /&gt;
*https://github.com/expertiza/expertiza&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bidding Feature==&lt;br /&gt;
&lt;br /&gt;
The bidding feature allows students to sort topics by preference. This is needed in order run the team assignment algorithm, to match students with others based off the similarity in their topic preferences.&lt;br /&gt;
The feature matches students to teams by calling a team forming algorithm hosted on a web service. Teams are then matched to topics by choosing the most common priority chosen by each member in the team for each topic. Topics are then assigned to students with preference given to the largest team.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	Students submit bids on the sign-up sheet view. The bidding process is done in the lottery controller.&lt;br /&gt;
&lt;br /&gt;
•	Bids are saved using the user id or team id based on how the bidding is done with teams getting higher priorities.&lt;br /&gt;
&lt;br /&gt;
•	When bids are sent to the sign-up controller, all existing bids for the user’s team are destroyed and replaced by the new bids&lt;br /&gt;
&lt;br /&gt;
•	The coloring of the bids is determined by the total number of bids placed on a topic&lt;br /&gt;
&lt;br /&gt;
•	One set of bids is possible for entire team. When one team member changes a bid, it will affect the whole team. Currently, each participant has a bid record. A Json request is sent to a webservice hosted on PeerLogic which responds with the new teams. &lt;br /&gt;
(More information: https://github.com/peerlogic/IntelligentAssignment) &lt;br /&gt;
&lt;br /&gt;
•	During topic assignment the teams’ bids are determined by using whichever priority most students placed on a topic (Ex. If 3 students set topic 3 as their 1st priority and 1 set it as their second. Topic 3 would be set as the priority for the team.)&lt;br /&gt;
&lt;br /&gt;
•	Matching algorithm: Teams are first sorted by size and a matching algorithm assigns each team to its highest available bid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Each team or an individual can go through the list of topics and set priorities for different projects. And once the priorities are set up for all projects, bidding algorithm is executed to assign projects to teams based on the priorities. Also, individuals with similar priorities are combined to form a new team.&lt;br /&gt;
The following need to be taken care of as part of this work package. (E1753)&lt;br /&gt;
&lt;br /&gt;
•	Check that only one signed up team is made for each topic&lt;br /&gt;
&lt;br /&gt;
•	Check that users that signed up for the same team stay in the same team&lt;br /&gt;
&lt;br /&gt;
•	Should disband teams that are not assigned any topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
'''Problem 1'''&lt;br /&gt;
&lt;br /&gt;
Existing test cases and Rspec code do not cover the method body statements. Existing test cases only stub a method. Hence code coverage for lottery controller was only at 9%.&lt;br /&gt;
&lt;br /&gt;
'''Problem 2'''&lt;br /&gt;
&lt;br /&gt;
Rspec test code was incorrect which resulted in extremely low code coverage. Whole sign up and bidding functionality are present in the controller whereas a good programming in rails consists of all code in models with controllers just for interface applications. &lt;br /&gt;
&lt;br /&gt;
==Files Modified==&lt;br /&gt;
/spec/controllers/lottery_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
/spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Issues and Solutions==&lt;br /&gt;
&lt;br /&gt;
'''Problem 1'''&lt;br /&gt;
&lt;br /&gt;
Existing test cases for lottery controller was written to test small portion of the function rather than one complete function which is a violation of unit testing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:partial_test_case.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test case checks if the web-service is successful in run_intelligent_assignment function. But the function performs other operations along with calling web service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Wrong_test_case.png]]&lt;br /&gt;
&lt;br /&gt;
This rspec test verifies that intelligent assignments are not performed if the is _intelligent variable is set to 0. When the rspec code is executed this test case successfully passes. But when the code is executed by setting the is_intelligent variable to 0, it still executes intelligent assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Problem 2'''&lt;br /&gt;
&lt;br /&gt;
[[File:redCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code coverage is extremely low and only limited to the function signature even after executing 6 test cases. Screenshot above shows code coverage before implementation of test cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
Attached screenshot of code coverage after test cases were written for intelligent assignment method.&lt;br /&gt;
&lt;br /&gt;
[[File:greenCoverage.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As noticed from the screenshot we were unable to cover the last 2 lines of the method since unit testing does not cover JSON.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:testCasePassed.png]]&lt;/div&gt;</summary>
		<author><name>Nvenugo2</name></author>
	</entry>
</feed>