Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GSoC 2022: Manas Sivakumar Week 10 #252

Merged
merged 22 commits into from
Aug 21, 2022

Conversation

Manas23601
Copy link

@Manas23601 Manas23601 commented Aug 15, 2022

Changes proposed in this pull request:

  • pgTAP:
    • inner_query
    • no_crash
    • types_check
  • docqueries
    • vrp_knapsack
    • vrp_multiple_knapsack
    • vrp_bin_packing
  • doc : Partially completed documentation
    • Inner query and result table data pending.
  • Build Google OR Tools in Github Actions
  • Made necessary changes to tool scripts to support ortools tables

@Manas23601 Manas23601 added the manas-2022 Done by Manas Sivakumar label Aug 15, 2022
@Manas23601 Manas23601 changed the title [pgtap]pgtap no-crash-test GSoC22 Week 10: Manas Sivakumar Aug 20, 2022
@Manas23601 Manas23601 changed the title GSoC22 Week 10: Manas Sivakumar GSoC22 : Manas Sivakumar Week 10 Aug 20, 2022
@Manas23601 Manas23601 changed the title GSoC22 : Manas Sivakumar Week 10 GSoC 2022: Manas Sivakumar Week 10 Aug 20, 2022
Copy link
Member

@krashish8 krashish8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for now, but you may consider looking at the review comments.

NOTICE: Exiting Bin Packing program
vrp_bin_packing
-----------------
Success
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the NOTICE, INFO, etc are just additional info to the user and are not generally considered as the "result" of the query. The result of your query is just "Success", so it would be better if you instead output some helpful information in the query result.

As an example, maybe you can take as input a set of rows containing (id, weight) in the inner query instead of (weight), and output set of (bin_number, item_id) as the result.

NOTICE: Exiting program
vrp_knapsack
--------------
Success
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Example:
INPUT: (id, weight, cost) in the inner query.
OUTPUT: (id) or maybe all three columns. I think just id is sufficient because other column values can be found out by SQL JOIN query.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially implemented something similar to what you are suggesting. but for the other two functions multiple knapsack and bin_packing, this approach won't make sense because each bin should have its own output table so that the user can differentiate which items are in which box

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tried printing the output for each bin one by one, the outputs got merged into one single result query

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also Vicky Mentioned something about not wanting to user-defined types. I made some examples on that inside the sql/or_tools/plpython folder. I'll remove that in the final PR.

Copy link
Author

@Manas23601 Manas23601 Aug 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to break the result query?? Same columns but different output tables.
Like

 Bin1
-------
   180
(1 row)
 BIn2
-------
   170
(1 row)

NOTICE: Exiting Multiple Knapsack program
vrp_multiple_knapsack
-----------------------
Success
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Example:
INPUT: (id, weight, cost) in the inner query
OUTPUT: (bin_number, item_id)

@krashish8
Copy link
Member

For using GitHub actions, if you are facing some issues, then you can probably refer to the GitHub actions workflow used by the or-tools repository.

https://github.com/google/or-tools/blob/stable/.github/workflows/cmake_linux_python.yml#L59 or https://github.com/google/or-tools/blob/stable/.github/workflows/make_linux_python.yml#L28

@Manas23601
Copy link
Author

For using GitHub actions, if you are facing some issues, then you can probably refer to the GitHub actions workflow used by the or-tools repository.

https://github.com/google/or-tools/blob/stable/.github/workflows/cmake_linux_python.yml#L59 or https://github.com/google/or-tools/blob/stable/.github/workflows/make_linux_python.yml#L28

I'm not building Google OR-tools from the source. I'm rather using the pip command to install it

@Manas23601 Manas23601 self-assigned this Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manas-2022 Done by Manas Sivakumar
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants