Commit 05388d93 authored by KUNAL GOYAL's avatar KUNAL GOYAL

final

parents 244c4535 3714fc33
......@@ -35,7 +35,7 @@ General Allocation Portal
6. Click on the 'Register with us' link on the homepage to register an institute and create its portal.
7. Once your institute has registered click on the link 'Institute login' to login to your dashboard.
8. You will find links for applicants and choices and on clicking them, all the corresponding existing database will be displayed.
9. Initially there will be no choices available. To add applicats and choices, click on the upload file button to and select a csv file with the appropriate format.
9. Initially there will be no choices available. To add applicants and choices, click on the upload file button to and select a csv file with the appropriate format.
10. The csv file format of the choices is: choice name, choice capacity
11. The csv file format of the applicants is: name, rank, email-id, account-password
12. After uploading the file for applicants, corresponding users with the username as 'name' and password as 'user_password' will be created.
......@@ -46,9 +46,9 @@ General Allocation Portal
Task-wise details:
--------------------------------------------------------------------------------------------------------------------------------------------------------
1. **Allocation:**
* Sort the students in order of their rank and allocated as per the rank list.
* Checking it's correctness is tough. One needs to solve the test cases manually and then check with the program output.
1. **Institute registration**
* New Institutes can register using a form.
* The portal, once active, allows various institutes to use the matchmaking problem solver and so it can cater a wide variety of matchmaking problems.
2. **Institute Login:**
* The various institutes using the portal are admins with access to all the information of the applicants and the choices made available.
......@@ -58,14 +58,14 @@ Task-wise details:
* The various applicant users of the portal are also provided with a username and a password as given by their institute.
* They can use this to login and fill in their preferences.
4. **Freeze, Float, Drop:**
4. **Allocation:**
* Sort the students in order of their rank and allocated as per the rank list.
* Checking it's correctness is tough. One needs to solve the test cases manually and then check with the program output.
5. **Freeze, Float, Drop:**
* After allocating once, all the applicants can choose to either freeze, float or drop their current branch.
1. **Freeze**: Accept the current allocated choice and be removed from further rounds of allocation.
2. **Float**: Be included in further rounds of allocation thus risking the current allocated seat in hope for a better allocation.
3. **Drop**: To drop the current seat and not be included in further rounds of allocation.
5. **Institute registration**
* New Institutes can register using a form.
* The portal, once active, allows various institutes to use the matchmaking problem solver and so it can cater a wide variety of matchmaking problems.
## File containing allocator function
from allocation.models import *
from django.shortcuts import get_object_or_404
## Allocator Function
# @brief Function to allocate choices to applicants based on their preferences
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-26 09:33
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Allocationcl',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
options={
'verbose_name': 'Allocated Choice',
'verbose_name_plural': 'Allocated Choice',
'ordering': ['applicant__rank'],
},
),
migrations.CreateModel(
name='Applicant',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('rank', models.IntegerField(validators=[django.core.validators.MinValueValidator(1)])),
('is_float', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='Application',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('priority', models.IntegerField(validators=[django.core.validators.MinValueValidator(1)])),
('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='allocation.Applicant')),
],
options={
'ordering': ['priority'],
},
),
migrations.CreateModel(
name='Choice',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('choice_name', models.CharField(max_length=200)),
('capacity', models.IntegerField()),
],
),
migrations.CreateModel(
name='Institute',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('is_allocated', models.BooleanField(default=False)),
],
options={
'verbose_name': 'Institute',
'verbose_name_plural': 'Institutes',
},
),
migrations.AddField(
model_name='choice',
name='institute',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='choices', to='allocation.Institute'),
),
migrations.AddField(
model_name='application',
name='choice',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='allocation.Choice'),
),
migrations.AddField(
model_name='applicant',
name='alloted_choice',
field=models.ManyToManyField(related_name='alloted_applicant', through='allocation.Allocationcl', to='allocation.Choice'),
),
migrations.AddField(
model_name='applicant',
name='choices',
field=models.ManyToManyField(related_name='applicants', through='allocation.Application', to='allocation.Choice'),
),
migrations.AddField(
model_name='applicant',
name='institute',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applicants', to='allocation.Institute'),
),
migrations.AddField(
model_name='allocationcl',
name='applicant',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='allocation.Applicant'),
),
migrations.AddField(
model_name='allocationcl',
name='choice',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='allocation.Choice'),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-28 19:07
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('allocation', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='applicant',
options={'ordering': ['institute__name', 'rank']},
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-28 19:53
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('allocation', '0002_auto_20171029_0037'),
]
operations = [
migrations.AlterModelOptions(
name='choice',
options={'ordering': ['institute__name', 'choice_name']},
),
migrations.AddField(
model_name='institute',
name='round_num',
field=models.IntegerField(default=1),
),
]
......@@ -24,7 +24,7 @@
</div>
</form>
</li>
<table style="width:100%">
<table style="width:50%">
<tr>
<th>Name</th>
<th>Rank</th>
......
......@@ -21,7 +21,7 @@
<br>
<p>List of Applicants who have been allocated {{ choice.choice_name }} choice: </p>
<ul>
<table style="width:100%">
<table style="width:60%">
<tr>
<th>Name</th>
<th>Rank</th>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment