{"action":"created","issue":{"url":"https://api.github.com/repos/strands-project/strands_executive/issues/200","labels_url":"https://api.github.com/repos/strands-project/strands_executive/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/strands-project/strands_executive/issues/200/comments","events_url":"https://api.github.com/repos/strands-project/strands_executive/issues/200/events","html_url":"https://github.com/strands-project/strands_executive/pull/200","id":74007671,"number":200,"title":"Fixing the issue that drop method should work with all tasks, even though previously scheduled","user":{"login":"mudrole1","id":655574,"avatar_url":"https://avatars.githubusercontent.com/u/655574?v=3","gravatar_id":"","url":"https://api.github.com/users/mudrole1","html_url":"https://github.com/mudrole1","followers_url":"https://api.github.com/users/mudrole1/followers","following_url":"https://api.github.com/users/mudrole1/following{/other_user}","gists_url":"https://api.github.com/users/mudrole1/gists{/gist_id}","starred_url":"https://api.github.com/users/mudrole1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mudrole1/subscriptions","organizations_url":"https://api.github.com/users/mudrole1/orgs","repos_url":"https://api.github.com/users/mudrole1/repos","events_url":"https://api.github.com/users/mudrole1/events{/privacy}","received_events_url":"https://api.github.com/users/mudrole1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-07T14:33:14Z","updated_at":"2015-05-09T16:06:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/strands-project/strands_executive/pulls/200","html_url":"https://github.com/strands-project/strands_executive/pull/200","diff_url":"https://github.com/strands-project/strands_executive/pull/200.diff","patch_url":"https://github.com/strands-project/strands_executive/pull/200.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/strands-project/strands_executive/issues/comments/100510547","html_url":"https://github.com/strands-project/strands_executive/pull/200#issuecomment-100510547","issue_url":"https://api.github.com/repos/strands-project/strands_executive/issues/200","id":100510547,"user":{"login":"cdondrup","id":4293484,"avatar_url":"https://avatars.githubusercontent.com/u/4293484?v=3","gravatar_id":"","url":"https://api.github.com/users/cdondrup","html_url":"https://github.com/cdondrup","followers_url":"https://api.github.com/users/cdondrup/followers","following_url":"https://api.github.com/users/cdondrup/following{/other_user}","gists_url":"https://api.github.com/users/cdondrup/gists{/gist_id}","starred_url":"https://api.github.com/users/cdondrup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdondrup/subscriptions","organizations_url":"https://api.github.com/users/cdondrup/orgs","repos_url":"https://api.github.com/users/cdondrup/repos","events_url":"https://api.github.com/users/cdondrup/events{/privacy}","received_events_url":"https://api.github.com/users/cdondrup/received_events","type":"User","site_admin":false},"created_at":"2015-05-09T16:06:00Z","updated_at":"2015-05-09T16:06:00Z","body":"here is my current experience. The infor terminal is running and schedules up to 5 tasks with priority 1 every 5 minutes. The current schedule looks like this:\r\n\r\n```\r\ncurrently_executing: False\r\nexecution_queue: \r\n  - \r\n    task_id: 28\r\n    start_node_id: ChargingPoint\r\n    end_node_id: ChargingPoint\r\n    action: /info_task_server\r\n    start_after: \r\n      secs: 1431187805\r\n      nsecs: 0\r\n    end_before: \r\n      secs: 1431188098\r\n      nsecs: 0\r\n    max_duration: \r\n      secs: 180\r\n      nsecs: 0\r\n    execution_time: \r\n      secs: 1431187805\r\n      nsecs: 0\r\n    priority: 1\r\n    arguments: []\r\n  - \r\n    task_id: 31\r\n    start_node_id: WayPoint5\r\n    end_node_id: WayPoint5\r\n    action: /info_task_server\r\n    start_after: \r\n      secs: 1431188105\r\n      nsecs: 0\r\n    end_before: \r\n      secs: 1431188398\r\n      nsecs: 0\r\n    max_duration: \r\n      secs: 180\r\n      nsecs: 0\r\n    execution_time: \r\n      secs: 1431188105\r\n      nsecs: 0\r\n    priority: 1\r\n    arguments: []\r\n  - \r\n    task_id: 34\r\n    start_node_id: WayPoint5\r\n    end_node_id: WayPoint5\r\n    action: /info_task_server\r\n    start_after: \r\n      secs: 1431188405\r\n      nsecs: 0\r\n    end_before: \r\n      secs: 1431188698\r\n      nsecs: 0\r\n    max_duration: \r\n      secs: 290\r\n      nsecs: 0\r\n    execution_time: \r\n      secs: 1431188405\r\n      nsecs: 0\r\n    priority: 1\r\n    arguments: []\r\n```\r\n\r\nNow when I schedule a task with priority 2:\r\n\r\n```\r\n[INFO] [WallTime: 1431187433.072982] updating from google calendar https://www.googleapis.com/calendar/v3/calendars/hanheide.net_6hgulf44ij7ctjrf2iscj0m24o@group.calendar.google.com/events?key=AIzaSyC1rqV2yecWwV0\r\neLgmoQH7m7PdLNX1p6a0&singleEvents=true&orderBy=startTime&maxResults=2500&timeMin=2015-05-08T17:03:53.072653Z&timeMax=2015-05-11T17:03:53.072653Z\r\n[INFO] [WallTime: 1431187433.237092] changes in the calendar to process +1 -1\r\n[INFO] [WallTime: 1431187433.238371] instantiate 18813gi38eg9rg0rvedok4e25k2015-05-09T16:03:29.378Z\r\n[INFO] [WallTime: 1431187433.240799] calling with pre-populated yaml: {start_after: {secs: 1431187500, nsecs: 0}, end_before: {secs: 1431192300, nsecs: 0}, start_node_id: 'WayPoint9', end_node_id: 'WayPoint9'}\r\n[INFO] [WallTime: 1431187433.251267] got the task back: task_id: 0\r\nstart_node_id: WayPoint9\r\nend_node_id: WayPoint9\r\naction: walking_group_fast\r\nstart_after: \r\n  secs: 1431187500\r\n  nsecs: 0\r\nend_before: \r\n  secs: 1431192300\r\n  nsecs: 0\r\nmax_duration: \r\n  secs: 4800\r\n  nsecs: 0\r\nexecution_time: \r\n  secs: 0\r\n  nsecs: 0\r\npriority: 3\r\narguments: []\r\n[INFO] [WallTime: 1431187433.252510] adding 18813gi38eg9rg0rvedok4e25k2015-05-09T16:03:29.378Z to the waiting queue. Now we have 1 tasks in the waiting queue.\r\n[WARN] [WallTime: 1431187433.253526] task 18813gi38eg9rg0rvedok4e25k2015-05-09T15:57:49.230Z to be deleted was not in the waiting set. It may be from the past\r\n[INFO] [WallTime: 1431187433.710632] task 18813gi38eg9rg0rvedok4e25k2015-05-09T16:03:29.378Z to start after 2015-05-09 17:05:00  1431187500 should be scheduled now.\r\n[INFO] [WallTime: 1431187433.711997] removing 18813gi38eg9rg0rvedok4e25k2015-05-09T16:03:29.378Z from the waiting queue. Now we have 0 tasks in the waiting queue.\r\n[INFO] [WallTime: 1431187433.716636] setting priority of tasks to 2\r\n[INFO] [WallTime: 1431187433.717761] Sending 1 tasks to the scheduler\r\n[INFO] [WallTime: 1431187433.726905] Got a further 1 tasks to schedule\r\n[INFO] [WallTime: 1431187433.804128] The specification is R{\"time\"}min=? [ ( F \"ChargingPoint\") ]\r\nreceived: get_vector\r\n[INFO] [WallTime: 1431187433.820184] Expected times to target state: [0.0, 31.349629026, 66.42971645042866, 69.4613042185111, 40.17280965843592, 56.10845355553032, 68.07604671747717, 56.07161313368348, 63.848862728090964, 46.73939370173442, 41.005135547553266, 36.220454114]\r\n[INFO] [WallTime: 1431187433.933143] The specification is R{\"time\"}min=? [ ( F \"WayPoint5\") ]\r\nreceived: get_vector\r\n[INFO] [WallTime: 1431187433.950349] Expected times to target state: [53.90301100966245, 30.175972042722158, 18.254143266285393, 19.64990045, 22.860199437065905, 7.932878744, 12.004433588079687, 0.0, 14.03745821$, 12.234737301518319, 39.83147419026106, 30.27563314481657]\r\n[INFO] [WallTime: 1431187434.025830] The specification is R{\"time\"}min=? [ ( F \"WayPoint5\") ]\r\nreceived: get_vector\r\n[INFO] [WallTime: 1431187434.042858] Expected times to target state: [53.90301100966245, 30.175972042722158, 18.254143266285393, 19.64990045, 22.860199437065905, 7.932878744, 12.004433588079687, 0.0, 14.03745821$, 12.234737301518319, 39.83147419026106, 30.27563314481657]\r\n[INFO] [WallTime: 1431187434.087850] The specification is R{\"time\"}min=? [ ( F \"WayPoint9\") ]\r\nreceived: get_vector\r\n[INFO] [WallTime: 1431187434.107179] Expected times to target state: [29.43163145504697, 5.704592488, 40.78468082907955, 43.81626818656443, 14.527773120430236, 30.46341702294025, 42.43101018146809, 30.42657659569\r\n0033, 38.203826242436264, 21.094357163728738, 15.360099173669756, 0.0]\r\n[ INFO] [1431187434.114579767]: SCHEDULER: Got a request for a schedule 4 tasks \r\n[ INFO] [1431187434.133367467]: SCHEDULER: Going to solve\r\n[ INFO] [1431187434.136803998]: SCHEDULER: The input problem had a flaw, scheduler didnt attempt\r\n\r\n[INFO] [WallTime: 1431187434.137155] No schedule found\r\n[INFO] [WallTime: 1431187434.138463] Schedule not found, trying to discard 1 tasks with priority 1\r\n[INFO] [WallTime: 1431187434.143512] The specification is R{\"time\"}min=? [ ( F \"WayPoint9\") ]\r\nreceived: get_vector\r\n[INFO] [WallTime: 1431187434.155680] Expected times to target state: [29.43163145504697, 5.704592488, 40.78468082907955, 43.81626818656443, 14.527773120430236, 30.46341702294025, 42.43101018146809, 30.42657659569\r\n0033, 38.203826242436264, 21.094357163728738, 15.360099173669756, 0.0]\r\n[INFO] [WallTime: 1431187434.177677] The specification is R{\"time\"}min=? [ ( F \"ChargingPoint\") ]\r\nreceived: get_vector\r\n[INFO] [WallTime: 1431187434.196447] Expected times to target state: [0.0, 31.349629026, 66.42971645042866, 69.4613042185111, 40.17280965843592, 56.10845355553032, 68.07604671747717, 56.07161313368348, 63.8488627\r\n28090964, 46.73939370173442, 41.005135547553266, 36.220454114]\r\n[INFO] [WallTime: 1431187434.273307] The specification is R{\"time\"}min=? [ ( F \"WayPoint5\") ]\r\nreceived: get_vector\r\n[INFO] [WallTime: 1431187434.292262] Expected times to target state: [53.90301100966245, 30.175972042722158, 18.254143266285393, 19.64990045, 22.860199437065905, 7.932878744, 12.004433588079687, 0.0, 14.037458211\r\n, 12.234737301518319, 39.83147419026106, 30.27563314481657]\r\n[ INFO] [1431187434.298323905]: SCHEDULER: Got a request for a schedule 3 tasks \r\n[ INFO] [1431187434.315537677]: SCHEDULER: Going to solve\r\n[ INFO] [1431187434.319525019]: SCHEDULER: The input problem had a flaw, scheduler didnt attempt\r\n\r\n[INFO] [WallTime: 1431187434.319809] No schedule found\r\n[INFO] [WallTime: 1431187434.321624] Schedule not found, trying to discard 1 tasks with priority 1\r\n[INFO] [WallTime: 1431187434.364554] The specification is R{\"time\"}min=? [ ( F \"WayPoint9\") ]\r\nreceived: get_vector\r\n[INFO] [WallTime: 1431187434.387880] Expected times to target state: [29.43163145504697, 5.704592488, 40.78468082907955, 43.81626818656443, 14.527773120430236, 30.46341702294025, 42.43101018146809, 30.42657659569\r\n0033, 38.203826242436264, 21.094357163728738, 15.360099173669756, 0.0]\r\n[INFO] [WallTime: 1431187434.417182] The specification is R{\"time\"}min=? [ ( F \"ChargingPoint\") ]\r\nreceived: get_vector\r\n[INFO] [WallTime: 1431187434.439619] Expected times to target state: [0.0, 31.349629026, 66.42971645042866, 69.4613042185111, 40.17280965843592, 56.10845355553032, 68.07604671747717, 56.07161313368348, 63.8488627\r\n28090964, 46.73939370173442, 41.005135547553266, 36.220454114]\r\n[ INFO] [1431187434.445659251]: SCHEDULER: Got a request for a schedule 2 tasks \r\n[ INFO] [1431187434.459463334]: SCHEDULER: Going to solve\r\n[ INFO] [1431187434.462283742]: SCHEDULER: The input problem had a flaw, scheduler didnt attempt\r\n\r\n[INFO] [WallTime: 1431187434.462555] No schedule found\r\n[INFO] [WallTime: 1431187434.463495] Schedule not found, trying to discard 1 tasks with priority 1\r\n[INFO] [WallTime: 1431187434.504504] The specification is R{\"time\"}min=? [ ( F \"WayPoint9\") ]\r\nreceived: get_vector\r\n[INFO] [WallTime: 1431187434.527363] Expected times to target state: [29.43163145504697, 5.704592488, 40.78468082907955, 43.81626818656443, 14.527773120430236, 30.46341702294025, 42.43101018146809, 30.42657659569\r\n0033, 38.203826242436264, 21.094357163728738, 15.360099173669756, 0.0]\r\n[ INFO] [1431187434.531962032]: SCHEDULER: Got a request for a schedule 1 tasks \r\n[ INFO] [1431187434.539314058]: SCHEDULER: Going to solve\r\n[ INFO] [1431187434.553962183]: SCHEDULER: found a solution\r\n[WARN] [WallTime: 1431187434.554574] Number of scheduled tasks mismatch: given 1, had 3\r\n[INFO] [WallTime: 1431187434.555965] Added 1 tasks into the schedule to get total of 2\r\n```\r\n\r\nAfter which the current schedule looks like this:\r\n```\r\ncurrently_executing: False\r\nexecution_queue: \r\n  - \r\n    task_id: 31\r\n    start_node_id: WayPoint5\r\n    end_node_id: WayPoint5\r\n    action: /info_task_server\r\n    start_after: \r\n      secs: 1431188105\r\n      nsecs: 0\r\n    end_before: \r\n      secs: 1431188398\r\n      nsecs: 0\r\n    max_duration: \r\n      secs: 180\r\n      nsecs: 0\r\n    execution_time: \r\n      secs: 1431188105\r\n      nsecs: 0\r\n    priority: 1\r\n    arguments: []\r\n  - \r\n    task_id: 34\r\n    start_node_id: WayPoint5\r\n    end_node_id: WayPoint5\r\n    action: /info_task_server\r\n    start_after: \r\n      secs: 1431188405\r\n      nsecs: 0\r\n    end_before: \r\n      secs: 1431188698\r\n      nsecs: 0\r\n    max_duration: \r\n      secs: 290\r\n      nsecs: 0\r\n    execution_time: \r\n      secs: 1431188405\r\n      nsecs: 0\r\n    priority: 1\r\n    arguments: []\r\n---\r\n```\r\n\r\nSo apparently it dropped task 28 but that wasn't enough to fit my task in. Why didn't it drop the others? @mudrole1 any idea?"}}