OptaPlanner: Gaps in Chained Through Time Pattern












0















I'm just starting learning to use OptaPlanner recently. Please pardon me if there is any technically inaccurate description below.



Basically, I have a problem to assign several tasks on a bunch of machines. Tasks have some precedence restrictions such that some task cannot be started before the end of another task. In addition, each task can only be run on certain machines. The target is to minimize the makespan of all these tasks.



I modeled this problem with Chained Through Time Pattern in which each machine is the anchor. But the problem is that tasks on certain machine might not be executed sequentially due to the precedence restriction. For example, Task B can only be started after Task A completes while Tasks A and B are executed on machines I and II respectively. This means during the execution of Task A on machine I, if there is no other task that can be run on machine II, then machine II can only keep idle until Task A completes at which point Task B could be started on it. This kind of gap is not deterministic as it depends on the duration of Task A with respect to this example. According to the tutorial of OptaPlanner, it seems that additional planning variable gaps should be introduced for this kind of problem. But I have difficulty in modeling this gap variable now. In general, how to integrate the gap variable in the model using Chained Through Time Pattern? Some detailed explanation or even a simple example would be highly appreciated.



Moreover, I'm actually not sure whether chained through time pattern is suitable for modeling this kind of task assigning problem or I just used an entirely inappropriate method. Could someone please shed some light on this? Thanks in advance.










share|improve this question























  • I think the timeslot pattern would be a better fit, as you can write rules that enforce that certain tasks can't be in the same timeslot. But then your tasks must have the same length (which I guess they don't). Or maybe even better, use the time grain pattern with a fine time granularity (though this could be slower, as stated in the docs). Chained through time would be quite difficult I think.

    – n1ck
    Nov 16 '18 at 13:58
















0















I'm just starting learning to use OptaPlanner recently. Please pardon me if there is any technically inaccurate description below.



Basically, I have a problem to assign several tasks on a bunch of machines. Tasks have some precedence restrictions such that some task cannot be started before the end of another task. In addition, each task can only be run on certain machines. The target is to minimize the makespan of all these tasks.



I modeled this problem with Chained Through Time Pattern in which each machine is the anchor. But the problem is that tasks on certain machine might not be executed sequentially due to the precedence restriction. For example, Task B can only be started after Task A completes while Tasks A and B are executed on machines I and II respectively. This means during the execution of Task A on machine I, if there is no other task that can be run on machine II, then machine II can only keep idle until Task A completes at which point Task B could be started on it. This kind of gap is not deterministic as it depends on the duration of Task A with respect to this example. According to the tutorial of OptaPlanner, it seems that additional planning variable gaps should be introduced for this kind of problem. But I have difficulty in modeling this gap variable now. In general, how to integrate the gap variable in the model using Chained Through Time Pattern? Some detailed explanation or even a simple example would be highly appreciated.



Moreover, I'm actually not sure whether chained through time pattern is suitable for modeling this kind of task assigning problem or I just used an entirely inappropriate method. Could someone please shed some light on this? Thanks in advance.










share|improve this question























  • I think the timeslot pattern would be a better fit, as you can write rules that enforce that certain tasks can't be in the same timeslot. But then your tasks must have the same length (which I guess they don't). Or maybe even better, use the time grain pattern with a fine time granularity (though this could be slower, as stated in the docs). Chained through time would be quite difficult I think.

    – n1ck
    Nov 16 '18 at 13:58














0












0








0








I'm just starting learning to use OptaPlanner recently. Please pardon me if there is any technically inaccurate description below.



Basically, I have a problem to assign several tasks on a bunch of machines. Tasks have some precedence restrictions such that some task cannot be started before the end of another task. In addition, each task can only be run on certain machines. The target is to minimize the makespan of all these tasks.



I modeled this problem with Chained Through Time Pattern in which each machine is the anchor. But the problem is that tasks on certain machine might not be executed sequentially due to the precedence restriction. For example, Task B can only be started after Task A completes while Tasks A and B are executed on machines I and II respectively. This means during the execution of Task A on machine I, if there is no other task that can be run on machine II, then machine II can only keep idle until Task A completes at which point Task B could be started on it. This kind of gap is not deterministic as it depends on the duration of Task A with respect to this example. According to the tutorial of OptaPlanner, it seems that additional planning variable gaps should be introduced for this kind of problem. But I have difficulty in modeling this gap variable now. In general, how to integrate the gap variable in the model using Chained Through Time Pattern? Some detailed explanation or even a simple example would be highly appreciated.



Moreover, I'm actually not sure whether chained through time pattern is suitable for modeling this kind of task assigning problem or I just used an entirely inappropriate method. Could someone please shed some light on this? Thanks in advance.










share|improve this question














I'm just starting learning to use OptaPlanner recently. Please pardon me if there is any technically inaccurate description below.



Basically, I have a problem to assign several tasks on a bunch of machines. Tasks have some precedence restrictions such that some task cannot be started before the end of another task. In addition, each task can only be run on certain machines. The target is to minimize the makespan of all these tasks.



I modeled this problem with Chained Through Time Pattern in which each machine is the anchor. But the problem is that tasks on certain machine might not be executed sequentially due to the precedence restriction. For example, Task B can only be started after Task A completes while Tasks A and B are executed on machines I and II respectively. This means during the execution of Task A on machine I, if there is no other task that can be run on machine II, then machine II can only keep idle until Task A completes at which point Task B could be started on it. This kind of gap is not deterministic as it depends on the duration of Task A with respect to this example. According to the tutorial of OptaPlanner, it seems that additional planning variable gaps should be introduced for this kind of problem. But I have difficulty in modeling this gap variable now. In general, how to integrate the gap variable in the model using Chained Through Time Pattern? Some detailed explanation or even a simple example would be highly appreciated.



Moreover, I'm actually not sure whether chained through time pattern is suitable for modeling this kind of task assigning problem or I just used an entirely inappropriate method. Could someone please shed some light on this? Thanks in advance.







optaplanner






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 16 '18 at 1:20









gerrykengerryken

13




13













  • I think the timeslot pattern would be a better fit, as you can write rules that enforce that certain tasks can't be in the same timeslot. But then your tasks must have the same length (which I guess they don't). Or maybe even better, use the time grain pattern with a fine time granularity (though this could be slower, as stated in the docs). Chained through time would be quite difficult I think.

    – n1ck
    Nov 16 '18 at 13:58



















  • I think the timeslot pattern would be a better fit, as you can write rules that enforce that certain tasks can't be in the same timeslot. But then your tasks must have the same length (which I guess they don't). Or maybe even better, use the time grain pattern with a fine time granularity (though this could be slower, as stated in the docs). Chained through time would be quite difficult I think.

    – n1ck
    Nov 16 '18 at 13:58

















I think the timeslot pattern would be a better fit, as you can write rules that enforce that certain tasks can't be in the same timeslot. But then your tasks must have the same length (which I guess they don't). Or maybe even better, use the time grain pattern with a fine time granularity (though this could be slower, as stated in the docs). Chained through time would be quite difficult I think.

– n1ck
Nov 16 '18 at 13:58





I think the timeslot pattern would be a better fit, as you can write rules that enforce that certain tasks can't be in the same timeslot. But then your tasks must have the same length (which I guess they don't). Or maybe even better, use the time grain pattern with a fine time granularity (though this could be slower, as stated in the docs). Chained through time would be quite difficult I think.

– n1ck
Nov 16 '18 at 13:58












1 Answer
1






active

oldest

votes


















0














I'am using chained through time pattern to solve the same question as yours.And to solve the precedence restriction you can write drools rules.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53330125%2foptaplanner-gaps-in-chained-through-time-pattern%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I'am using chained through time pattern to solve the same question as yours.And to solve the precedence restriction you can write drools rules.






    share|improve this answer




























      0














      I'am using chained through time pattern to solve the same question as yours.And to solve the precedence restriction you can write drools rules.






      share|improve this answer


























        0












        0








        0







        I'am using chained through time pattern to solve the same question as yours.And to solve the precedence restriction you can write drools rules.






        share|improve this answer













        I'am using chained through time pattern to solve the same question as yours.And to solve the precedence restriction you can write drools rules.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 20 '18 at 14:30









        李其武李其武

        1




        1
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53330125%2foptaplanner-gaps-in-chained-through-time-pattern%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Florida Star v. B. J. F.

            Error while running script in elastic search , gateway timeout

            Adding quotations to stringified JSON object values