Java College Project

Hey everyone, I'm about to start working on a Java project about a task and event scheduling system in a calendar based on urgency. For a task, I'll have the following fields: taskId taskFrequency taskName taskDescription taskLastDate taskDuration For an event: eventId eventName eventDescription eventDate eventStartHour eventEndHour The system will intelligently and efficiently allocate tasks and events into a calendar (likely using the Google Calendar API). Events must be scheduled on their defined date and within their start and end times, but task scheduling is dynamic. I’m considering using two algorithms for scheduling: greedy and backtracking: The greedy algorithm will perform an initial scheduling of tasks based on their urgency, trying to fill the available time slots in the calendar. Backtracking will come into play if the calendar runs out of space or encounters unresolvable conflicts. It will check the possibility of modifying the schedule for previously allocated tasks to make room for a more urgent task. Now for the question: What data structure should I use to implement the algorithm? For a task, I have both priority and a latest possible completion date. This suggests I need an initial sorting based on dates, followed by priority. Additionally, when adding a new task, it could impact the entire calendar. For example, there might be tasks like studying for an exam, requiring 10 hours that could be split across several days .
4 Replies
JavaBot
JavaBot2mo ago
This post has been reserved for your question.
Hey @Eshley! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Eshley
EshleyOP2mo ago
Constraints: Calendar Availability The system must ensure that tasks are scheduled only during available times in the calendar. If the user's calendar is full or there are overlaps between tasks, the system should update or rearrange the schedule to ensure the most urgent tasks are completed on time. Resource Limitations Each task requires different resources—time, calendar space, or even continuous work hours. Scheduling must consider these limitations. For example, if a task requires one continuous hour but no such time is available, the system should try to split the task or schedule it elsewhere. Task Dependencies If there are dependencies between tasks (e.g., one task cannot be performed before another is completed), the algorithm must ensure that the schedule respects the required order of completion. The system cannot schedule tasks that conflict with their dependencies. Time Constraints and Critical Deadlines Every task has a critical deadline, which is an important constraint. As a task's deadline approaches, the system must prioritize its completion to avoid missing an important due date. Flexibility for Unexpected Changes The system needs to handle unexpected changes in the calendar, such as adding new tasks or postponing existing ones. Such changes might require rescheduling tasks, and the system must ensure that urgent tasks are not disrupted during this process. I’m not sure yet if I should address task dependencies or not—what do you think?
JavaBot
JavaBot2mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
JavaBot
JavaBot5w ago
Post Closed
This post has been closed by <@427751466585948160> for the following reason:
not relevant

Did you find this page helpful?