-
Notifications
You must be signed in to change notification settings - Fork 0
jCOS Components #1
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
Draft
JCruiz15
wants to merge
10
commits into
main
Choose a base branch
from
feat/jCOS
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cc0efff
jCOS first component
JCruiz15 bb2c34c
jCOS first component purged
JCruiz15 d3c9552
Deleted jar from createRestrictions
JCruiz15 5fbd564
Fixed maven dependencies and knapsack issue
JCruiz15 40b6901
Added solveWithJMetal component
JCruiz15 802b165
Added new files to createRestrictions input
JCruiz15 6f82b80
Added component solveWithFABIOLA
JCruiz15 17dd417
Add component restrictions2recipe
JCruiz15 35e38c1
Minor changes to prepare for workflow
JCruiz15 e4dd309
Final changes according to the workflow architecture
JCruiz15 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| .vscode | ||
| target | ||
| jMetal.log | ||
| .idea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # NAME | ||
|
|
||
| createRestrictions | ||
|
|
||
| # VERSION | ||
|
|
||
| 1.0 | ||
|
|
||
| # AUTHOR | ||
|
|
||
| Khaos Research Group | ||
|
|
||
| Juan Carlos Ruiz Ruiz (juancaruru@uma.es) | ||
|
|
||
| # DATE | ||
|
|
||
| 20/09/2023 | ||
|
|
||
| # DESCRIPTION | ||
| Generate the semantics JSON file from an OWL ontology for an specific optimization problem. | ||
|
|
||
| > :exclamation: It is important that the JSON input full is not a formated JSON or a JSON array. If multiple cases want to be resolved, the input file must be a JSON file with multiple JSON objects separated by a new line. | ||
|
|
||
| # DOCKER | ||
|
|
||
| ## Build | ||
|
|
||
| ``` | ||
| docker build -t docker.io/create_restrictions -f createRestrictions.dockerfile . | ||
| ``` | ||
|
|
||
| ## Run | ||
|
|
||
| ``` | ||
| docker run -v $(pwd)/data:/usr/local/src/data/ docker.io/create_restrictions <problem-type> <semantics> (optional) <input-file> <clients-number> | ||
| ``` | ||
|
|
||
| # Parameters | ||
|
|
||
| * **`problem-type` (str)** -> The type of problem we want to resolve ('electric', 'knapsack' or 'multiobjective-knapsack'). | ||
| * **`semantics` (str)** -> The ontology (OWL file) we want to insert into our problem input. | ||
| * **`input-file` (str)** -> The JSON file with the problem information. | ||
| * **`clients-number` (int)** -> For the electric problem we need the number of clients to extract from \<input-file\>. | ||
|
|
||
| # Outputs | ||
|
|
||
| * restrictions.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Type: Dockerfile | ||
| # Description: Dockerfile for the jCOS createRestrictions component | ||
|
|
||
| # Create the build image | ||
|
|
||
| FROM maven:3.6.3-jdk-11 AS build | ||
|
|
||
| LABEL Khaos Research Group <khaos.uma.es> | ||
|
|
||
| # Set the working directory | ||
|
|
||
| WORKDIR /usr/local/src/ | ||
|
|
||
| # Copy the pom.xml file to the working directory | ||
|
|
||
| COPY ./script/pom.xml . | ||
|
|
||
| # Download the dependencies | ||
|
|
||
| RUN mvn dependency:go-offline -B | ||
|
|
||
| # Build the component jar file | ||
|
|
||
| COPY ./script/src ./src | ||
| RUN mvn package | ||
|
|
||
| # Create the java image | ||
|
|
||
| FROM openjdk:11-jre-slim as app | ||
|
|
||
| WORKDIR /usr/local/src/ | ||
|
|
||
| # Copy the jar file from the build image to the java image | ||
|
|
||
| COPY --from=build /usr/local/src/target/jCOS_CreateRestrictions-1.0-SNAPSHOT-jar-with-dependencies.jar . | ||
|
|
||
| # Set the working directory | ||
|
|
||
| COPY . /usr/local/src/ | ||
|
|
||
| # Set the entrypoint | ||
|
|
||
| ENTRYPOINT ["java","-jar","jCOS_CreateRestrictions-1.0-SNAPSHOT-jar-with-dependencies.jar"] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.