Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 206291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:37:57+00:00 2026-05-11T17:37:57+00:00

The domain of this question is scheduling operations on constrained hardware. The resolution of

  • 0

The domain of this question is scheduling operations on constrained hardware. The resolution of the result is the number of clock cycles the schedule fits within. The search space grows very rapidly where early decisions constrain future decisions and the total number of possible schedules grows rapidly and exponentially. A lot of the possible schedules are equivalent because just swapping the order of two instructions usually result in the same timing constraint.

Basically the question is what is a good strategy for exploring the vast search space without spending too much time. I expect to search only a small fraction but would like to explore different parts of the search space while doing so.

The current greedy algorithm tend to make stupid decisions early on sometimes and the attempt at branch and bound was beyond slow.

Edit:
Want to point out that the result is very binary with perhaps the greedy algorithm ending up using 8 cycles while there exists a solution using only 7 cycles using branch and bound.

Second point is that there are significant restrictions in data routing between instructions and dependencies between instructions that limits the amount of commonality between solutions. Look at it as a knapsack problem with a lot of ordering constraints as well as some solutions completely failing because of routing congestion.

Clarification:
In each cycle there is a limit to how many operations of each type and some operations have two possible types. There are a set of routing constraints which can be varied to be either fairly tight or pretty forgiving and the limit depends on routing congestion.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:37:58+00:00Added an answer on May 11, 2026 at 5:37 pm

    Integer linear optimization for NP-hard problems

    Depending on your side constraints, you may be able to use the critical path method or
    (as suggested in a previous answer) dynamic programming. But many scheduling problems are NP-hard just like the classical traveling sales man — a precise solution has a worst case of exponential search time, just as you describe in your problem.

    It’s important to know that while NP-hard problems still have a very bad worst case solution time there is an approach that very often produces exact answers with very short computations (the average case is acceptable and you often don’t see the worst case).

    This approach is to convert your problem to a linear optimization problem with integer variables. There are free-software packages (such as lp-solve) that can solve such problems efficiently.

    The advantage of this approach is that it may give you exact answers to NP-hard problems in acceptable time. I used this approach in a few projects.

    As your problem statement does not include more details about the side constraints, I cannot go into more detail how to apply the method.

    Edit/addition: Sample implementation

    Here are some details about how to implement this method in your case (of course, I make some assumptions that may not apply to your actual problem — I only know the details form your question):

    Let’s assume that you have 50 instructions cmd(i) (i=1..50) to be scheduled in 10 or less cycles cycle(t) (t=1..10). We introduce 500 binary variables v(i,t) (i=1..50; t=1..10) which indicate whether instruction cmd(i) is executed at cycle(t) or not. This basic setup gives the following linear constraints:

    v_it integer variables
    0<=v_it; v_it<=1;       # 1000 constraints: i=1..50; t=1..10
    sum(v_it: t=1..10)==1   # 50 constraints:   i=1..50
    

    Now, we have to specify your side conditions. Let’s assume that operations cmd(1)…cmd(5) are multiplication operations and that you have exactly two multipliers — in any cycle, you may perform at most two of these operations in parallel:

    sum(v_it: i=1..5)<=2    # 10 constraints: t=1..10
    

    For each of your resources, you need to add the corresponding constraints.

    Also, let’s assume that operation cmd(7) depends on operation cmd(2) and needs to be executed after it. To make the equation a little bit more interesting, lets also require a two cycle gap between them:

    sum(t*v(2,t): t=1..10) + 3 <= sum(t*v(7,t): t=1..10)   # one constraint
    

    Note: sum(t*v(2,t): t=1..10) is the cycle t where v(2,t) is equal to one.

    Finally, we want to minimize the number of cycles. This is somewhat tricky because you get quite big numbers in the way that I propose: We give assign each v(i,t) a price that grows exponentially with time: pushing off operations into the future is much more expensive than performing them early:

    sum(6^t * v(i,t): i=1..50; t=1..10) –> minimum. # one target function

    I choose 6 to be bigger than 5 to ensure that adding one cycle to the system makes it more expensive than squeezing everything into less cycles. A side-effect is that the program will go out of it’s way to schedule operations as early as possible. You may avoid this by performing a two-step optimization: First, use this target function to find the minimal number of necessary cycles. Then, ask the same problem again with a different target function — limiting the number of available cycles at the outset and imposing a more moderate price penalty for later operations. You have to play with this, I hope you got the idea.

    Hopefully, you can express all your requirements as such linear constraints in your binary variables. Of course, there may be many opportunities to exploit your insight into your specific problem to do with less constraints or less variables.

    Then, hand your problem off to lp-solve or cplex and let them find the best solution!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is similar to this: Asp.net Profile Across Sub-Domain I'm basically wondering if
I feel silly asking this question... Sometimes I have a domain that I want
I've started to become a Good Citizen, as per this question here: Domain compatibility:
This is a practical Domain Driven Design question: Conceptually, I think I get Aggregate
This question regards how one can effectively create and persist event domain objects on
I know this question was asked a number of times on this site alone,
Apologies for not knowing the right way to phrase this question. Given a domain
I have a domain object, that for the purposes of this question I will
In my domain, I have 2 bounded contexts that are relevant to this question:
I have this question; jQuery Cross Domain Errors I was wondering whether changing the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.