emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [ANN] org-conflict add-on: timing conflicts detector and resolve


From: Daniel Clemente
Subject: Re: [O] [ANN] org-conflict add-on: timing conflicts detector and resolver for Org agenda
Date: Sun, 9 Jun 2019 15:18:34 +0300

Hi,
  I'm surprised that noone answered yet.
  This package is great! You're addressing one of the large shortcomings of org-mode's planning features: org has information about several planning details (estimation, duration, holidays, start date, deadline, …) and still doesn't use any of that to offer help to the user in very simple cases.
  Like for instance, I would expect org-mode to say „you shouldn't have >20 tasks scheduled for the same day, because at a default duration of 1 h, you'll find that there aren't enough working hours to do them“. Or if you have a 10-hour task and a 12-hour task in the same day, it should trigger some warning. Or scheduling a work task during a holiday. Or conflicts. Or work which is scheduled after a deadline. Or 10 tasks scheduled one after the other without taking into account that humans need to take breaks from time to time. Or schedules based on out-of-date information like overrun deadlines or overrun budgets. I want the freedom to be able to do all those mistakes but I'd also appreciate some help from org-mode or any other tool…
  Scheduling algorithms are very hard. Repetitions, time zones, summer time changes, …

  As for org-conflict itself:

I like how it has not only the part about detecting conflicts, but also an interface to see conflicting items, propose a solution and try to find the right time; that's many steps ahead. I would be fine with just being able to detect conflicts, but I see how detecting+resolving can be useful to many people.
I like how you included the part about having breathing time or „coffee breaks“ between tasks. This is all very user-friendly.

I'm not sure about the entry point; that is, how to invoke the conflict resolution step. From the documentation and from using it, it seems that you must actively say „right now I'd like to write a date to see whether it would conflict with anything“; this is a use case I never have thought of or needed previously. My needs have rather been:
    1) „right now I'd like to schedule a task“ (hopefully at a date which doesn't create conflicts). That means, I'd prefer if the conflict resolution happened as part of the normal C-c C-s scheduling process, instead of an optional step that you must remember to invoke with C-c C-c. Reschedulings (including rescheduling after a repetition) should be subject to the same checks. Even if this means having to wait more. I think you could provide some code or instructions about how to make automatic checks after C-c C-s (maybe only if the specified date includes a duration)
    2) from time to time I wish I could check not only 1 timestamp, but all my existing appointments (mainly the future ones) for conflicts. This means comparing each one against each other! (including repetitions) or producing a timeline and checking for overlaps. This is very hard, I know! And the interactive part (seeing proposed resolutions) is heavy because there are infinite possible resolutions. This turns very fast into an optimization problem 

An issue that makes org-conflict less helpful than it could is that it only works for agenda appointments that have a duration. You implemented a default duration for the new event (the one just inputted) and then compare this event against all existing agenda events that have a duration. But I think that all agenda events should have a default duration too (because in real life, no task takes 0 minutes). So the new event should be compared against all future timestamps, not only those with a duration. This is slower, I know.
Actually, a better way to implement this would be: let's forget about durations and just take the day, not the hour. If you want to schedule an event at day X, and there's already another event at day X (no duration specified), let's call this a conflict and prevent scheduling a second one. If you don't want to consider it a conflict (because you really plan to do both things the same day) then you should be required to choose a time for the existing event, and then another time (non-conflicting) for the new event. This experiment may help in teaching the user to do better planning, i.e. if you want to do many things the same day, choose at which times.

  
I tried to implement some programs to do similar things, and to get some useful information from my org agenda (which is a mess because of too many tasks). Like for instance, I take a list of tasks, „enhance them“ with scheduling information like a default duration and a deadline, and then I add the human requirements that org doesn't know about: for instance complaining if there are more than 24 h of work in a day (actually I delay them to the next day), or adding pauses for lunch or for sleep (this will also shift everything forwards). This is all more complex than expected and in the end I'm doing the processing outside org; actually I prefer to use a very simple list (1. xxxxx, 2. yyyyyy, 3. zzzz, …) in an org file to do my planning, and ignore org-mode tasks, since org scheduling isn't helpful yet.
My ideal goal would be to tell org „take all open tasks in my files and auto-schedule them well, that means: consider that each one will take some time (even if it doesn't specify a duration) and will start at some date (even if it isn't scheduled yet), put one after the other, leave short resting pauses between tasks, don't schedule tasks during lunch and dinner and sleep time, don't schedule tasks during holidays, don't schedule tasks at times when there's a known appointment“. This is just the starting point! To do this very well, it would also have to schedule tasks according to their priority (e.g. the more important ones first), according to their deadline (do tasks before deadline, not after), according to habits description (habits must be regular), according to performance information (e.g. time-overrun tasks must be dealt with earlier), etc. All this is an attempt to model common sense!

I realize that org-mode might not be the right tool (yet). I don't expect it to define all decision rules and run optimization algorithms (simulated annealing, etc.) for minutes to find the best schedule. However, I still want that.
Do you know any external program that can process all scheduling information (ideally, from org) and produce a good schedule according to common-sense rules? (i.e. no more than 24 hour per day, no conflicts, etc.)

Some of the topics above can be described very well with „constraint programming“. Like with minizinc and others, with which producing conflict-free schedules should be easy.
Now who can integrate org-mode scheduling with minizinc…? Or with a logic programming framework in Emacs Lisp like reazon


More about org-conflict: it's a useful tool and it's very well written, with documentation and explanations. You could put that in some repository to make it easy to track changes or to know about the latest version.

Thanks (for the idea, the interest, the code, the documentation, …)!


On Thu, Apr 4, 2019 at 10:41 PM Thomas Plass <address@hidden> wrote:
With this post, I'd like to submit org-conflict, a new Org add-on, to
the community for enjoyment, scrutiny and feedback.

Org-conflict aims to help Org agenda users prevent creating scheduling
conflicts.  If you use the agenda for calendar purposes, you might
benefit from validating timestamps before you commit them.

My own demand for conflict-free timestamps arose from using Org as the
back end of an iCalendar client I created for VM which exports Org
entries.  Most people who send me meeting requests use MS Outlook and
I got envious when I saw that Outlook informs them immediately of any
scheduling conflict when it processes incoming iCalendar data.
Initially, org-conflict was intended just as a Lisp predicate called
from the VM presentation buffer.  Adding an interactive mode, so that
it could be used on regular Org timestamps, was fairly easy.  Having
then added conflict resolution, I thought this might have enough
functionality to count as an Org add-on.

So here it is as the attached org-conflict.el, tested with Org 9.0 and
9.2.  Its implementation is "pure Org" and relies only on code that is
loaded anyway when Org is running.

Instead of posting a longish message to this list, I opted to explain
org-conflict in the attached FAQ document, of course a .org file.  The
added benefit being that the document is a self-contained demo.
Following the guided tour, you know after a couple of minutes
interaction if this package is for you.

If this is all tl;dr, here's org-conflict in brief:

 - compares a test time/timestamp/-range against 'org-agenda-files.
   Eligible timestamps in there are event-type, ie. contain a
   time-of-day and encode a duration

 - detects overlaps ("conflicts"), computes a resolution

 - supports intervals between events ("coffee breaks")

 - supports virtual ranges (end time is before start time)

 - customizable levels of automation

 - designed to be put on the C-c C-c hook, makes timestamps magic

 - dedicated interactive and non-interactive modes

Please let me know if this package is remotely useful, completely
misses the point or has crippling bugs and oversights.

Regards,

Thomas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]