Conversation
|
אני גם פה |
… the courses of them, added test to demand function in algorithm1
… the courses of them, added test to demand function in algorithm1
אחרי שינויים של אראל
| graphics card = None | ||
| and youtube in the background... | ||
| ''' No newline at end of file | ||
| pytest.main(args=["fairpy/course_allocation"]) No newline at end of file |
There was a problem hiding this comment.
כמו שכתבתי לכם כבר (נראה לי): תשנו כאן ל:
pytest.main(args=[__file__])
וכן בשאר הקבצים. כך שזה יעבוד על כל המחשבים בלי תלות במסלולים.
| @@ -0,0 +1,230 @@ | |||
| ''' | |||
| Heuristic search algorithm through price space, originally developed in Othman et al. 2010 | |||
There was a problem hiding this comment.
יש להוסיף כאן (ובכל שאר הקבצים) את השם המלא של המאמר, שמות המחברים, וקישור למאמר.
| import logging | ||
|
|
||
|
|
||
| logger = logging.getLogger(__name__) |
There was a problem hiding this comment.
כל השורות שמשנות את תצורת הלוג הגלובלית (בקובץ זה שורות 22-28, וכן בשאר הקבצים) לא צריכות להיות ביחידה, אלא רק בתוכנית הראשית.
| year=year, courses=courses, preferences=preferences)) | ||
|
|
||
| max_budget = 25 | ||
| price_vector1 = adaptors.divide(algorithm1,input=students,courses=courses, max_budget=max_budget, seed=3, time_to=10) |
There was a problem hiding this comment.
לא הצלחתי להבין מהדמו שלכם, איפה בדיוק נמצא האלגוריתם שמקבל כקלט את ההעדפות של השחקנים, ומחזיר כפלט את חלוקת הקורסים (איזה קורסים מקבל כל שחקן)?
תסתכלו בשאר הקבצים בספריה, למשל round_robin.py ו round_robin_demo.py ותראו למה הכוונה. הפונקציות של החלוקה מקבלות כקלט מבנה שמכיל את הערכים של השחקנים (איזה ערך הם מייחסים לכל חפץ), ומחזיר כפלט חלוקה של חפצים בין השחקנים (עבור כל שחקן, איזה חפצים הוא קיבל).
There was a problem hiding this comment.
preferences = random.sample(courses, random.randint(3, 7))
לקלט של העדפות,
אמרת שלגבי הערך המוחזר אפשר להדפיס בסוף...
There was a problem hiding this comment.
התכוונתי לשאול: איפה יש לכם פונקציה כמו נניח round_robin, שמקבלת כקלט את ההעדפות של השחקנים, ומחזירה כפלט איזה קורסים כל שחקן קיבל?
No description provided.