Develop an Optimization Program in Python

  • Status: Closed
  • Prize: $100
  • Entries Received: 2
  • Winner: cugamelover

Contest Brief

Develop a simple program (probably in R or Python) to find the top ~1000 routes through an Excel data set.

View the attached diagram: A route is one cell from each columns (D thru W). The value of the route is calculated by taking the product of all the numbers in the route. (I.e., .535 x .791 x .901 x .644...). The optimal routes are those with the HIGHEST values. A route cannot use a cell from the same row more than once.

A sample of dummy data is attached as well. The program must work with other data sets in a similar format.

Other variables:
1) The columns that are used need to be able to be adjusted. I.e., if user wants to find optimal route through Columns D through N, or H through J, or D through W, this must be possible.

2) Certain rows must be able to be eliminated from consideration. I.e., the user can find the optimal routes from D through W, that does NOT use rows 5, 6, and 9.

3) Running the program should take on the order of seconds, not minutes.

4) A simple GUI would be great, but Command line is fine too.

5) Output should be in csv/excel and should have each route as its own row. The row would start with the value of the route (i.e., 0.00914) and the then list the cells that used in that route.

Recommended Skills

Employer Feedback

“Excellent speed and accuracy. Could not ask for more from a freelancer!”

Profile image dmmx3, United States.

Top entries from this contest

View More Entries

Public Clarification Board

  • dmmx3
    Contest Holder
    • 7 months ago

    actually a better check would be to provide the value of the first 1000 routes, and the first cell of each of those routes.

    • 7 months ago
    1. cugamelover
      cugamelover
      • 7 months ago

      OK, will do. Almost done, I need perhaps one more hour.

      • 7 months ago
  • cugamelover
    cugamelover
    • 7 months ago

    Just to let you know, I'm almost done but it's 1:30 am here, so I'll finish it in the morning. How would you like me to submit my entry? I can't upload the code just yet for obvious reasons, but I could generate some output for you, feel free to provide the input conditions if you wish. Please advise.

    • 7 months ago
    1. dmmx3
      Contest Holder
      • 7 months ago

      u can provide the first few routes and maybe the 100tth and 1000th or so?

      • 7 months ago
  • cugamelover
    cugamelover
    • 7 months ago

    This condition is unclear: "2) Certain rows must be able to be eliminated from consideration. I.e., the user can find the optimal routes from D through W, that does NOT use columns 5, 6, and 9."

    So do you want some ROWS or COLUMNS to be excluded?

    • 7 months ago
    1. dmmx3
      Contest Holder
      • 7 months ago

      if you want to use an "x" on the input excel sheet in Column X to signify which rows will or will not be used, that would be fine.

      • 7 months ago
    2. cugamelover
      cugamelover
      • 7 months ago

      thanks, it's clear now!

      • 7 months ago
  • cugamelover
    cugamelover
    • 7 months ago

    Hi, just wanted to tell you that I've figured out the algo to to this and I'm working the Python script. Would the output in the form of a list of cells (in text format) be OK?

    • 7 months ago
    1. dmmx3
      Contest Holder
      • 7 months ago

      output should show the value of the route(s), as well as the cells in the route(s). A list of cells would be fine. Something that would open in excel/csv where each row is a route would probably be ideal. Thank you!

      • 7 months ago

Show more comments

How to get started with contests

  • Post your contest

    Post Your Contest Quick and easy

  • Get tons of entries

    Get Tons of Entries From around the world

  • Award the best entry

    Award the best entry Download the files - Easy!

Post a Contest Now or Join us Today!