text2model 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- text2model/__init__.py +1 -0
- text2model/grammar.mzn +277 -0
- text2model/knowledge_graphs/CSPLib_12.ttl +41 -0
- text2model/knowledge_graphs/CSPLib_14.ttl +51 -0
- text2model/knowledge_graphs/CSPLib_2.ttl +59 -0
- text2model/knowledge_graphs/CSPLib_22.ttl +62 -0
- text2model/knowledge_graphs/CSPLib_28.ttl +28 -0
- text2model/knowledge_graphs/CSPLib_30.ttl +72 -0
- text2model/knowledge_graphs/CSPLib_34.ttl +52 -0
- text2model/knowledge_graphs/CSPLib_39.ttl +51 -0
- text2model/knowledge_graphs/CSPLib_54.ttl +50 -0
- text2model/knowledge_graphs/CSPLib_6.ttl +36 -0
- text2model/knowledge_graphs/CSPLib_8.ttl +53 -0
- text2model/knowledge_graphs/LPWP_128.ttl +79 -0
- text2model/knowledge_graphs/LPWP_232.ttl +95 -0
- text2model/knowledge_graphs/LPWP_53.ttl +58 -0
- text2model/knowledge_graphs/LPWP_66.ttl +52 -0
- text2model/knowledge_graphs/LPWP_85.ttl +95 -0
- text2model/knowledge_graphs/OR_LP_IP_Scheduling_problem_1.ttl +34 -0
- text2model/knowledge_graphs/OR_LP_IP_Scheduling_problem_18.ttl +59 -0
- text2model/knowledge_graphs/OR_LP_IP_Scheduling_problem_2.ttl +43 -0
- text2model/knowledge_graphs/OR_LP_IP_Scheduling_problem_28.ttl +42 -0
- text2model/knowledge_graphs/OR_LP_IP_Scheduling_problem_31.ttl +44 -0
- text2model/knowledge_graphs/OR_LP_IP_Scheduling_problem_4.ttl +48 -0
- text2model/knowledge_graphs/OR_LP_IP_Scheduling_problem_5.ttl +40 -0
- text2model/knowledge_graphs/OR_LP_IP_Scheduling_problem_6.ttl +61 -0
- text2model/knowledge_graphs/OR_LP_IP_Scheduling_problem_8.ttl +54 -0
- text2model/knowledge_graphs/combinatorial_problem_1.ttl +48 -0
- text2model/knowledge_graphs/combinatorial_problem_31.ttl +43 -0
- text2model/knowledge_graphs/combinatorial_problem_32.ttl +39 -0
- text2model/knowledge_graphs/combinatorial_problem_7.ttl +52 -0
- text2model/knowledge_graphs/complexor_AircraftAssignment.ttl +73 -0
- text2model/knowledge_graphs/complexor_AircraftLanding.ttl +53 -0
- text2model/knowledge_graphs/complexor_CFLP.ttl +43 -0
- text2model/knowledge_graphs/complexor_CapacitatedWarehouseLocation.ttl +59 -0
- text2model/knowledge_graphs/complexor_CarSelection.ttl +30 -0
- text2model/knowledge_graphs/complexor_TSP.ttl +52 -0
- text2model/knowledge_graphs/complexor_VRPTW.ttl +67 -0
- text2model/knowledge_graphs/nlp4lp_1.ttl +56 -0
- text2model/knowledge_graphs/nlp4lp_10.ttl +46 -0
- text2model/knowledge_graphs/nlp4lp_11.ttl +57 -0
- text2model/knowledge_graphs/nlp4lp_12.ttl +48 -0
- text2model/knowledge_graphs/nlp4lp_13.ttl +48 -0
- text2model/knowledge_graphs/nlp4lp_14.ttl +82 -0
- text2model/knowledge_graphs/nlp4lp_15.ttl +60 -0
- text2model/knowledge_graphs/nlp4lp_16.ttl +64 -0
- text2model/knowledge_graphs/nlp4lp_17.ttl +72 -0
- text2model/knowledge_graphs/nlp4lp_18.ttl +64 -0
- text2model/knowledge_graphs/nlp4lp_19.ttl +98 -0
- text2model/knowledge_graphs/nlp4lp_2.ttl +103 -0
- text2model/knowledge_graphs/nlp4lp_20.ttl +129 -0
- text2model/knowledge_graphs/nlp4lp_21.ttl +65 -0
- text2model/knowledge_graphs/nlp4lp_22.ttl +72 -0
- text2model/knowledge_graphs/nlp4lp_23.ttl +63 -0
- text2model/knowledge_graphs/nlp4lp_24.ttl +99 -0
- text2model/knowledge_graphs/nlp4lp_25.ttl +77 -0
- text2model/knowledge_graphs/nlp4lp_27.ttl +75 -0
- text2model/knowledge_graphs/nlp4lp_28.ttl +50 -0
- text2model/knowledge_graphs/nlp4lp_29.ttl +63 -0
- text2model/knowledge_graphs/nlp4lp_3.ttl +49 -0
- text2model/knowledge_graphs/nlp4lp_30.ttl +49 -0
- text2model/knowledge_graphs/nlp4lp_31.ttl +35 -0
- text2model/knowledge_graphs/nlp4lp_32.ttl +33 -0
- text2model/knowledge_graphs/nlp4lp_33.ttl +49 -0
- text2model/knowledge_graphs/nlp4lp_34.ttl +67 -0
- text2model/knowledge_graphs/nlp4lp_35.ttl +75 -0
- text2model/knowledge_graphs/nlp4lp_36.ttl +56 -0
- text2model/knowledge_graphs/nlp4lp_37.ttl +52 -0
- text2model/knowledge_graphs/nlp4lp_38.ttl +55 -0
- text2model/knowledge_graphs/nlp4lp_39.ttl +58 -0
- text2model/knowledge_graphs/nlp4lp_4.ttl +64 -0
- text2model/knowledge_graphs/nlp4lp_40.ttl +49 -0
- text2model/knowledge_graphs/nlp4lp_41.ttl +62 -0
- text2model/knowledge_graphs/nlp4lp_42.ttl +49 -0
- text2model/knowledge_graphs/nlp4lp_43.ttl +98 -0
- text2model/knowledge_graphs/nlp4lp_44.ttl +41 -0
- text2model/knowledge_graphs/nlp4lp_45.ttl +56 -0
- text2model/knowledge_graphs/nlp4lp_46.ttl +35 -0
- text2model/knowledge_graphs/nlp4lp_47.ttl +68 -0
- text2model/knowledge_graphs/nlp4lp_48.ttl +74 -0
- text2model/knowledge_graphs/nlp4lp_49.ttl +66 -0
- text2model/knowledge_graphs/nlp4lp_5.ttl +69 -0
- text2model/knowledge_graphs/nlp4lp_50.ttl +51 -0
- text2model/knowledge_graphs/nlp4lp_51.ttl +53 -0
- text2model/knowledge_graphs/nlp4lp_52.ttl +51 -0
- text2model/knowledge_graphs/nlp4lp_53.ttl +55 -0
- text2model/knowledge_graphs/nlp4lp_54.ttl +74 -0
- text2model/knowledge_graphs/nlp4lp_55.ttl +50 -0
- text2model/knowledge_graphs/nlp4lp_56.ttl +67 -0
- text2model/knowledge_graphs/nlp4lp_57.ttl +59 -0
- text2model/knowledge_graphs/nlp4lp_58.ttl +65 -0
- text2model/knowledge_graphs/nlp4lp_6.ttl +63 -0
- text2model/knowledge_graphs/nlp4lp_60.ttl +36 -0
- text2model/knowledge_graphs/nlp4lp_61.ttl +83 -0
- text2model/knowledge_graphs/nlp4lp_62.ttl +44 -0
- text2model/knowledge_graphs/nlp4lp_63.ttl +49 -0
- text2model/knowledge_graphs/nlp4lp_64.ttl +41 -0
- text2model/knowledge_graphs/nlp4lp_65.ttl +78 -0
- text2model/knowledge_graphs/nlp4lp_66.ttl +51 -0
- text2model/knowledge_graphs/nlp4lp_67.ttl +40 -0
- text2model/knowledge_graphs/nlp4lp_7.ttl +53 -0
- text2model/knowledge_graphs/nlp4lp_8.ttl +51 -0
- text2model/knowledge_graphs/nlp4lp_9.ttl +58 -0
- text2model/knowledge_graphs/non_linear_problem_10.ttl +57 -0
- text2model/knowledge_graphs/non_linear_problem_15.ttl +55 -0
- text2model/knowledge_graphs/non_linear_problem_23.ttl +42 -0
- text2model/knowledge_graphs/non_linear_problem_9.ttl +61 -0
- text2model/knowledge_graphs/puzzles_problem_1.ttl +64 -0
- text2model/knowledge_graphs/puzzles_problem_11.ttl +65 -0
- text2model/knowledge_graphs/puzzles_problem_12.ttl +79 -0
- text2model/knowledge_graphs/puzzles_problem_13.ttl +50 -0
- text2model/knowledge_graphs/puzzles_problem_31.ttl +62 -0
- text2model/main.py +771 -0
- text2model/prompts/assembler_prompt.txt +104 -0
- text2model/prompts/code_stitching_prompt.txt +49 -0
- text2model/prompts/code_validation_prompt.txt +36 -0
- text2model/prompts/constraint_generation_prompt.txt +35 -0
- text2model/prompts/cot_prompt.txt +45 -0
- text2model/prompts/global_constraint_prompts/all_different_prompt.txt +67 -0
- text2model/prompts/global_constraint_prompts/count_prompt.txt +75 -0
- text2model/prompts/global_constraint_prompts/cumulative_prompt.txt +88 -0
- text2model/prompts/global_constraint_prompts/global_cardinality_prompt.txt +76 -0
- text2model/prompts/global_constraint_prompts/increasing_prompt.txt +81 -0
- text2model/prompts/global_constraint_prompts/lex_less_prompt.txt +68 -0
- text2model/prompts/grammar_validation_prompt.txt +18 -0
- text2model/prompts/kg_code_generation_prompt.txt +20 -0
- text2model/prompts/kg_generation_prompt.txt +40 -0
- text2model/prompts/objective_generation_prompt.txt +34 -0
- text2model/prompts/parameter_and_variable_generation_prompt.txt +35 -0
- text2model/utils.py +350 -0
- text2model-0.1.0.dist-info/METADATA +221 -0
- text2model-0.1.0.dist-info/RECORD +135 -0
- text2model-0.1.0.dist-info/WHEEL +5 -0
- text2model-0.1.0.dist-info/entry_points.txt +2 -0
- text2model-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
2
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix opt: <http://www.example.org/optimization#> .
|
|
5
|
+
|
|
6
|
+
opt:M rdf:type rdfs:Class ;
|
|
7
|
+
rdfs:label "Number of machines" ;
|
|
8
|
+
rdfs:comment "The total number of machines available for production" ;
|
|
9
|
+
rdfs:range xsd:integer .
|
|
10
|
+
|
|
11
|
+
opt:P rdf:type rdfs:Class ;
|
|
12
|
+
rdfs:label "Number of parts" ;
|
|
13
|
+
rdfs:comment "The total number of different parts produced" ;
|
|
14
|
+
rdfs:range xsd:integer .
|
|
15
|
+
|
|
16
|
+
opt:TimeRequired rdf:type rdfs:Class ;
|
|
17
|
+
rdfs:label "Time required to produce a batch of part" ;
|
|
18
|
+
rdfs:comment "The time required to produce a batch of part p on machine m" ;
|
|
19
|
+
rdfs:range xsd:float .
|
|
20
|
+
|
|
21
|
+
opt:MachineCosts rdf:type rdfs:Class ;
|
|
22
|
+
rdfs:label "Cost associated with running machine" ;
|
|
23
|
+
rdfs:comment "The cost associated with running machine m per hour" ;
|
|
24
|
+
rdfs:range xsd:float .
|
|
25
|
+
|
|
26
|
+
opt:Availability rdf:type rdfs:Class ;
|
|
27
|
+
rdfs:label "Availability of machine for production each month" ;
|
|
28
|
+
rdfs:comment "The total hours machine m is available for production each month" ;
|
|
29
|
+
rdfs:range xsd:integer .
|
|
30
|
+
|
|
31
|
+
opt:Prices rdf:type rdfs:Class ;
|
|
32
|
+
rdfs:label "Price obtained from selling a batch of part" ;
|
|
33
|
+
rdfs:comment "The price obtained from selling a batch of part p" ;
|
|
34
|
+
rdfs:range xsd:float .
|
|
35
|
+
|
|
36
|
+
opt:MinBatches rdf:type rdfs:Class ;
|
|
37
|
+
rdfs:label "Minimum number of batches of part that should be produced" ;
|
|
38
|
+
rdfs:comment "The minimum number of batches of part p that should be produced to fulfill a contract" ;
|
|
39
|
+
rdfs:range xsd:integer .
|
|
40
|
+
|
|
41
|
+
opt:ExtraCosts rdf:type rdfs:Class ;
|
|
42
|
+
rdfs:label "Extra cost incurred when running machine beyond regular operation" ;
|
|
43
|
+
rdfs:comment "The extra cost incurred when running machine m beyond regular operation" ;
|
|
44
|
+
rdfs:range xsd:float .
|
|
45
|
+
|
|
46
|
+
opt:MaxExtra rdf:type rdfs:Class ;
|
|
47
|
+
rdfs:label "Maximum extra hours machine can be run" ;
|
|
48
|
+
rdfs:comment "The maximum extra hours machine m can be run in a month" ;
|
|
49
|
+
rdfs:range xsd:integer .
|
|
50
|
+
|
|
51
|
+
opt:OptimizationProblem rdf:type rdfs:Class ;
|
|
52
|
+
rdfs:label "Optimization problem" ;
|
|
53
|
+
rdfs:comment "The optimization problem to maximize profit by determining the number of batches of each part to produce each month" .
|
|
54
|
+
|
|
55
|
+
opt:OptimizationProblem rdfs:subClassOf opt:M, opt:P, opt:TimeRequired, opt:MachineCosts, opt:Availability, opt:Prices, opt:MinBatches, opt:ExtraCosts, opt:MaxExtra .
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
2
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix opt: <http://www.example.org/optimization#> .
|
|
5
|
+
|
|
6
|
+
opt:AdvertisementCampaign a rdfs:Class ;
|
|
7
|
+
rdfs:label "Advertisement Campaign" ;
|
|
8
|
+
rdfs:comment "An online advertising campaign with different ad types across two web companies." .
|
|
9
|
+
|
|
10
|
+
opt:AdType a rdfs:Class ;
|
|
11
|
+
rdfs:label "Advertisement Type" ;
|
|
12
|
+
rdfs:comment "Different types of advertisements used in the campaign." .
|
|
13
|
+
|
|
14
|
+
opt:AdType rdfs:subClassOf opt:AdvertisementCampaign .
|
|
15
|
+
|
|
16
|
+
opt:Budget a rdf:Property ;
|
|
17
|
+
rdfs:label "Budget" ;
|
|
18
|
+
rdfs:comment "Total budget for purchasing clicks." ;
|
|
19
|
+
rdfs:domain opt:AdvertisementCampaign ;
|
|
20
|
+
rdfs:range xsd:integer .
|
|
21
|
+
|
|
22
|
+
opt:Costs a rdf:Property ;
|
|
23
|
+
rdfs:label "Costs" ;
|
|
24
|
+
rdfs:comment "Cost of purchasing a click from advertisement type a." ;
|
|
25
|
+
rdfs:domain opt:AdType ;
|
|
26
|
+
rdfs:range xsd:integer .
|
|
27
|
+
|
|
28
|
+
opt:MaxClicks a rdf:Property ;
|
|
29
|
+
rdfs:label "MaxClicks" ;
|
|
30
|
+
rdfs:comment "Number of maximum clicks that can be purchased from advertisement type a." ;
|
|
31
|
+
rdfs:domain opt:AdType ;
|
|
32
|
+
rdfs:range xsd:integer .
|
|
33
|
+
|
|
34
|
+
opt:YoungClicks a rdf:Property ;
|
|
35
|
+
rdfs:label "YoungClicks" ;
|
|
36
|
+
rdfs:comment "Number of young audience clicks from advertisement type a." ;
|
|
37
|
+
rdfs:domain opt:AdType ;
|
|
38
|
+
rdfs:range xsd:integer .
|
|
39
|
+
|
|
40
|
+
opt:OldClicks a rdf:Property ;
|
|
41
|
+
rdfs:label "OldClicks" ;
|
|
42
|
+
rdfs:comment "Number of old audience clicks from advertisement type a." ;
|
|
43
|
+
rdfs:domain opt:AdType ;
|
|
44
|
+
rdfs:range xsd:integer .
|
|
45
|
+
|
|
46
|
+
opt:UniqueClicks a rdf:Property ;
|
|
47
|
+
rdfs:label "UniqueClicks" ;
|
|
48
|
+
rdfs:comment "Number of unique clicks from advertisement type a." ;
|
|
49
|
+
rdfs:domain opt:AdType ;
|
|
50
|
+
rdfs:range xsd:integer .
|
|
51
|
+
|
|
52
|
+
opt:GoalYoung a rdf:Property ;
|
|
53
|
+
rdfs:label "GoalYoung" ;
|
|
54
|
+
rdfs:comment "Goal for number of clicks from young audience." ;
|
|
55
|
+
rdfs:domain opt:AdvertisementCampaign ;
|
|
56
|
+
rdfs:range xsd:integer .
|
|
57
|
+
|
|
58
|
+
opt:GoalOld a rdf:Property ;
|
|
59
|
+
rdfs:label "GoalOld" ;
|
|
60
|
+
rdfs:comment "Goal for number of clicks from old audience." ;
|
|
61
|
+
rdfs:domain opt:AdvertisementCampaign ;
|
|
62
|
+
rdfs:range xsd:integer .
|
|
63
|
+
|
|
64
|
+
opt:GoalUniqueYoung a rdf:Property ;
|
|
65
|
+
rdfs:label "GoalUniqueYoung" ;
|
|
66
|
+
rdfs:comment "Goal for number of unique clicks from young audience." ;
|
|
67
|
+
rdfs:domain opt:AdvertisementCampaign ;
|
|
68
|
+
rdfs:range xsd:integer .
|
|
69
|
+
|
|
70
|
+
opt:GoalUniqueOld a rdf:Property ;
|
|
71
|
+
rdfs:label "GoalUniqueOld" ;
|
|
72
|
+
rdfs:comment "Goal for number of unique clicks from old audience." ;
|
|
73
|
+
rdfs:domain opt:AdvertisementCampaign ;
|
|
74
|
+
rdfs:range xsd:integer .
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
2
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix opt: <http://www.example.org/optimization#> .
|
|
5
|
+
|
|
6
|
+
opt:PowerPlant a rdfs:Class ;
|
|
7
|
+
rdfs:label "Power Plant" ;
|
|
8
|
+
rdfs:comment "A power plant that supplies electricity." .
|
|
9
|
+
|
|
10
|
+
opt:City a rdfs:Class ;
|
|
11
|
+
rdfs:label "City" ;
|
|
12
|
+
rdfs:comment "A city that demands electricity." .
|
|
13
|
+
|
|
14
|
+
opt:Supply a rdf:Property ;
|
|
15
|
+
rdfs:label "Supply" ;
|
|
16
|
+
rdfs:comment "Electricity supply capacity of a power plant." ;
|
|
17
|
+
rdfs:domain opt:PowerPlant ;
|
|
18
|
+
rdfs:range xsd:integer .
|
|
19
|
+
|
|
20
|
+
opt:Demand a rdf:Property ;
|
|
21
|
+
rdfs:label "Demand" ;
|
|
22
|
+
rdfs:comment "Electricity demand of a city." ;
|
|
23
|
+
rdfs:domain opt:City ;
|
|
24
|
+
rdfs:range xsd:integer .
|
|
25
|
+
|
|
26
|
+
opt:TransmissionCost a rdf:Property ;
|
|
27
|
+
rdfs:label "Transmission Cost" ;
|
|
28
|
+
rdfs:comment "Transmission cost from a power plant to a city." ;
|
|
29
|
+
rdfs:domain opt:PowerPlant ;
|
|
30
|
+
rdfs:range opt:City .
|
|
31
|
+
|
|
32
|
+
opt:OptimizationProblem a rdfs:Class ;
|
|
33
|
+
rdfs:label "Optimization Problem" ;
|
|
34
|
+
rdfs:comment "An optimization problem to minimize the total transmission cost." .
|
|
35
|
+
|
|
36
|
+
opt:hasObjective a rdf:Property ;
|
|
37
|
+
rdfs:label "has Objective" ;
|
|
38
|
+
rdfs:comment "The objective of the optimization problem." ;
|
|
39
|
+
rdfs:domain opt:OptimizationProblem ;
|
|
40
|
+
rdfs:range xsd:string .
|
|
41
|
+
|
|
42
|
+
opt:hasConstraint a rdf:Property ;
|
|
43
|
+
rdfs:label "has Constraint" ;
|
|
44
|
+
rdfs:comment "A constraint of the optimization problem." ;
|
|
45
|
+
rdfs:domain opt:OptimizationProblem ;
|
|
46
|
+
rdfs:range xsd:string .
|
|
47
|
+
|
|
48
|
+
opt:OptimizationProblem opt:hasObjective "Minimize total transmission cost." ;
|
|
49
|
+
opt:hasConstraint "Each city's peak demand must be met." ;
|
|
50
|
+
opt:hasConstraint "Each power plant's supply capacity must not be exceeded." .
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
2
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix opt: <http://www.semanticweb.org/ontologies/optimization#> .
|
|
5
|
+
|
|
6
|
+
:Problem1 a opt:OptimizationProblem ;
|
|
7
|
+
opt:hasObjective :Objective1 ;
|
|
8
|
+
opt:hasConstraint :Constraint1, :Constraint2 ;
|
|
9
|
+
opt:hasParameter :NumPorts, :NumTerminals, :Cost, :Demand, :Supply ;
|
|
10
|
+
opt:hasVariable :Quantity .
|
|
11
|
+
|
|
12
|
+
:NumPorts a opt:Parameter ;
|
|
13
|
+
rdfs:label "Number of Ports" ;
|
|
14
|
+
rdfs:comment "Number of Ports" ;
|
|
15
|
+
opt:hasDataType xsd:integer ;
|
|
16
|
+
opt:hasExample "NumPorts = 4" ;
|
|
17
|
+
opt:hasShape "scalar" .
|
|
18
|
+
|
|
19
|
+
:NumTerminals a opt:Parameter ;
|
|
20
|
+
rdfs:label "Number of Terminals" ;
|
|
21
|
+
rdfs:comment "Number of Terminals" ;
|
|
22
|
+
opt:hasDataType xsd:integer ;
|
|
23
|
+
opt:hasExample "NumTerminals = 3" ;
|
|
24
|
+
opt:hasShape "scalar" .
|
|
25
|
+
|
|
26
|
+
:Cost a opt:Parameter ;
|
|
27
|
+
rdfs:label "Cost of transportation for route from k to l" ;
|
|
28
|
+
rdfs:comment "Cost of transportation for route from k to l" ;
|
|
29
|
+
opt:hasDataType xsd:array ;
|
|
30
|
+
opt:hasExample "Cost = array2d(1..3, 1..4, [34, 49, 17, 26, 52, 64, 23, 14, 20, 28, 12, 17])" ;
|
|
31
|
+
opt:hasShape "[K, L]" .
|
|
32
|
+
|
|
33
|
+
:Demand a opt:Parameter ;
|
|
34
|
+
rdfs:label "Demand at destination l" ;
|
|
35
|
+
rdfs:comment "Demand at destination l" ;
|
|
36
|
+
opt:hasDataType xsd:array ;
|
|
37
|
+
opt:hasExample "Demand = [65, 70, 50, 45]" ;
|
|
38
|
+
opt:hasShape "[L]" .
|
|
39
|
+
|
|
40
|
+
:Supply a opt:Parameter ;
|
|
41
|
+
rdfs:label "Supply at terminal k" ;
|
|
42
|
+
rdfs:comment "Supply at terminal k" ;
|
|
43
|
+
opt:hasDataType xsd:array ;
|
|
44
|
+
opt:hasExample "Supply = [150, 100, 100]" ;
|
|
45
|
+
opt:hasShape "[K]" .
|
|
46
|
+
|
|
47
|
+
:Quantity a opt:Variable ;
|
|
48
|
+
rdfs:label "Quantity of soybeans to transport along each route from source to destination" ;
|
|
49
|
+
rdfs:comment "Quantity of soybeans to transport along each route from source to destination" ;
|
|
50
|
+
opt:hasDataType xsd:array ;
|
|
51
|
+
opt:hasShape "[K, L]" .
|
|
52
|
+
|
|
53
|
+
:Constraint1 a opt:Constraint ;
|
|
54
|
+
rdfs:label "Supply constraint" ;
|
|
55
|
+
rdfs:comment "The total quantity of soybeans transported from each terminal should not exceed its supply" ;
|
|
56
|
+
opt:hasMathematicalExpression "sum(Quantity[k, l] for all l) <= Supply[k] for all k" .
|
|
57
|
+
|
|
58
|
+
:Constraint2 a opt:Constraint ;
|
|
59
|
+
rdfs:label "Demand constraint" ;
|
|
60
|
+
rdfs:comment "The total quantity of soybeans transported to each destination should meet its demand" ;
|
|
61
|
+
opt:hasMathematicalExpression "sum(Quantity[k, l] for all k) >= Demand[l] for all l" .
|
|
62
|
+
|
|
63
|
+
:Objective1 a opt:Objective ;
|
|
64
|
+
rdfs:label "Minimize transportation costs" ;
|
|
65
|
+
rdfs:comment "Minimize the total cost of transporting soybeans from terminals to destinations" ;
|
|
66
|
+
opt:hasMathematicalExpression "minimize sum(Cost[k, l] * Quantity[k, l] for all k, l)" ;
|
|
67
|
+
opt:hasOptimizationDirection opt:Minimize .
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
2
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
4
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
5
|
+
@prefix : <http://www.example.com/ontology#> .
|
|
6
|
+
|
|
7
|
+
:NumMachines a owl:DatatypeProperty ;
|
|
8
|
+
rdfs:domain :Problem ;
|
|
9
|
+
rdfs:range xsd:integer .
|
|
10
|
+
|
|
11
|
+
:NumParts a owl:DatatypeProperty ;
|
|
12
|
+
rdfs:domain :Problem ;
|
|
13
|
+
rdfs:range xsd:integer .
|
|
14
|
+
|
|
15
|
+
:TimeRequired a owl:ObjectProperty ;
|
|
16
|
+
rdfs:domain :Problem ;
|
|
17
|
+
rdfs:range :TimeMatrix .
|
|
18
|
+
|
|
19
|
+
:MachineCosts a owl:ObjectProperty ;
|
|
20
|
+
rdfs:domain :Problem ;
|
|
21
|
+
rdfs:range :CostVector .
|
|
22
|
+
|
|
23
|
+
:Availability a owl:ObjectProperty ;
|
|
24
|
+
rdfs:domain :Problem ;
|
|
25
|
+
rdfs:range :AvailabilityVector .
|
|
26
|
+
|
|
27
|
+
:Prices a owl:ObjectProperty ;
|
|
28
|
+
rdfs:domain :Problem ;
|
|
29
|
+
rdfs:range :PriceVector .
|
|
30
|
+
|
|
31
|
+
:MinBatches a owl:ObjectProperty ;
|
|
32
|
+
rdfs:domain :Problem ;
|
|
33
|
+
rdfs:range :BatchVector .
|
|
34
|
+
|
|
35
|
+
:StandardCost a owl:DatatypeProperty ;
|
|
36
|
+
rdfs:domain :Problem ;
|
|
37
|
+
rdfs:range xsd:decimal .
|
|
38
|
+
|
|
39
|
+
:OvertimeCost a owl:DatatypeProperty ;
|
|
40
|
+
rdfs:domain :Problem ;
|
|
41
|
+
rdfs:range xsd:decimal .
|
|
42
|
+
|
|
43
|
+
:OvertimeHour a owl:ObjectProperty ;
|
|
44
|
+
rdfs:domain :Problem ;
|
|
45
|
+
rdfs:range :OvertimeVector .
|
|
46
|
+
|
|
47
|
+
:Problem a owl:Class .
|
|
48
|
+
|
|
49
|
+
:TimeMatrix a owl:Class .
|
|
50
|
+
|
|
51
|
+
:CostVector a owl:Class .
|
|
52
|
+
|
|
53
|
+
:AvailabilityVector a owl:Class .
|
|
54
|
+
|
|
55
|
+
:PriceVector a owl:Class .
|
|
56
|
+
|
|
57
|
+
:BatchVector a owl:Class .
|
|
58
|
+
|
|
59
|
+
:OvertimeVector a owl:Class .
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
2
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix opt: <http://www.example.org/optimization#> .
|
|
5
|
+
|
|
6
|
+
opt:Machines rdf:type rdfs:Class ;
|
|
7
|
+
rdfs:label "Machines" ;
|
|
8
|
+
rdfs:comment "Number of machines" ;
|
|
9
|
+
rdfs:range xsd:integer .
|
|
10
|
+
|
|
11
|
+
opt:Parts rdf:type rdfs:Class ;
|
|
12
|
+
rdfs:label "Parts" ;
|
|
13
|
+
rdfs:comment "Number of parts to be produced" ;
|
|
14
|
+
rdfs:range xsd:integer .
|
|
15
|
+
|
|
16
|
+
opt:TimeRequired rdf:type rdfs:Class ;
|
|
17
|
+
rdfs:label "Time Required" ;
|
|
18
|
+
rdfs:comment "Time required to produce each part 'p' on machine 'm'" ;
|
|
19
|
+
rdfs:range xsd:integer .
|
|
20
|
+
|
|
21
|
+
opt:MachineCosts rdf:type rdfs:Class ;
|
|
22
|
+
rdfs:label "Machine Costs" ;
|
|
23
|
+
rdfs:comment "Cost associated with each machine 'm'" ;
|
|
24
|
+
rdfs:range xsd:integer .
|
|
25
|
+
|
|
26
|
+
opt:Availability rdf:type rdfs:Class ;
|
|
27
|
+
rdfs:label "Availability" ;
|
|
28
|
+
rdfs:comment "Availability in hours of each machine 'm' per month" ;
|
|
29
|
+
rdfs:range xsd:integer .
|
|
30
|
+
|
|
31
|
+
opt:Prices rdf:type rdfs:Class ;
|
|
32
|
+
rdfs:label "Prices" ;
|
|
33
|
+
rdfs:comment "Price obtained from selling each part 'p'" ;
|
|
34
|
+
rdfs:range xsd:integer .
|
|
35
|
+
|
|
36
|
+
opt:MinBatches rdf:type rdfs:Class ;
|
|
37
|
+
rdfs:label "Minimum Batches" ;
|
|
38
|
+
rdfs:comment "Minimum number of batches of part 'p' that must be produced" ;
|
|
39
|
+
rdfs:range xsd:integer .
|
|
40
|
+
|
|
41
|
+
opt:StandardCost rdf:type rdfs:Class ;
|
|
42
|
+
rdfs:label "Standard Cost" ;
|
|
43
|
+
rdfs:comment "Standard cost for a machine to run for one hour" ;
|
|
44
|
+
rdfs:range xsd:integer .
|
|
45
|
+
|
|
46
|
+
opt:OvertimeCost rdf:type rdfs:Class ;
|
|
47
|
+
rdfs:label "Overtime Cost" ;
|
|
48
|
+
rdfs:comment "Overtime cost for a machine to run for one hour beyond the standard availability" ;
|
|
49
|
+
rdfs:range xsd:integer .
|
|
50
|
+
|
|
51
|
+
opt:OvertimeHour rdf:type rdfs:Class ;
|
|
52
|
+
rdfs:label "Overtime Hour" ;
|
|
53
|
+
rdfs:comment "Numbers of overtime hours available for a machine to run beyond standard availability" ;
|
|
54
|
+
rdfs:range xsd:integer .
|
|
55
|
+
|
|
56
|
+
opt:MinProfit rdf:type rdfs:Class ;
|
|
57
|
+
rdfs:label "Minimum Profit" ;
|
|
58
|
+
rdfs:comment "The minimum profit the manufacturer wants to achieve" ;
|
|
59
|
+
rdfs:range xsd:integer .
|
|
60
|
+
|
|
61
|
+
opt:OptimizationProblem rdf:type rdfs:Class ;
|
|
62
|
+
rdfs:label "Optimization Problem" ;
|
|
63
|
+
rdfs:comment "The optimization problem to determine the quantity of batches for each part the manufacturer should produce every month, ensuring all constraints are met" .
|
|
64
|
+
|
|
65
|
+
opt:OptimizationProblem rdfs:subClassOf opt:Machines, opt:Parts, opt:TimeRequired, opt:MachineCosts, opt:Availability, opt:Prices, opt:MinBatches, opt:StandardCost, opt:OvertimeCost, opt:OvertimeHour, opt:MinProfit .
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
2
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix opt: <http://www.example.org/optimization#> .
|
|
5
|
+
|
|
6
|
+
opt:InitialPosition a rdf:Property ;
|
|
7
|
+
rdfs:label "Initial position of the object" ;
|
|
8
|
+
rdfs:range xsd:float .
|
|
9
|
+
|
|
10
|
+
opt:InitialVelocity a rdf:Property ;
|
|
11
|
+
rdfs:label "Initial velocity of the object" ;
|
|
12
|
+
rdfs:range xsd:float .
|
|
13
|
+
|
|
14
|
+
opt:FinalPosition a rdf:Property ;
|
|
15
|
+
rdfs:label "Final position of the object" ;
|
|
16
|
+
rdfs:range xsd:float .
|
|
17
|
+
|
|
18
|
+
opt:FinalVelocity a rdf:Property ;
|
|
19
|
+
rdfs:label "Final velocity of the object" ;
|
|
20
|
+
rdfs:range xsd:float .
|
|
21
|
+
|
|
22
|
+
opt:TotalTime a rdf:Property ;
|
|
23
|
+
rdfs:label "Total time over which the object is moving" ;
|
|
24
|
+
rdfs:range xsd:integer .
|
|
25
|
+
|
|
26
|
+
opt:Rocket a rdfs:Class ;
|
|
27
|
+
rdfs:label "Rocket" ;
|
|
28
|
+
rdfs:subClassOf rdfs:Resource .
|
|
29
|
+
|
|
30
|
+
opt:rocket1 a opt:Rocket ;
|
|
31
|
+
opt:InitialPosition "0"^^xsd:float ;
|
|
32
|
+
opt:InitialVelocity "0"^^xsd:float ;
|
|
33
|
+
opt:FinalPosition "1"^^xsd:float ;
|
|
34
|
+
opt:FinalVelocity "0"^^xsd:float ;
|
|
35
|
+
opt:TotalTime "20"^^xsd:integer .
|
|
36
|
+
|
|
37
|
+
opt:Acceleration a rdf:Property ;
|
|
38
|
+
rdfs:label "Acceleration at each timestep" ;
|
|
39
|
+
rdfs:range xsd:float .
|
|
40
|
+
|
|
41
|
+
opt:MinimizeFuel a rdf:Property ;
|
|
42
|
+
rdfs:label "Minimize total fuel consumption" ;
|
|
43
|
+
rdfs:range xsd:float .
|
|
44
|
+
|
|
45
|
+
opt:Constraint a rdfs:Class ;
|
|
46
|
+
rdfs:label "Constraints of the optimization problem" ;
|
|
47
|
+
rdfs:subClassOf rdfs:Resource .
|
|
48
|
+
|
|
49
|
+
opt:constraint1 a opt:Constraint ;
|
|
50
|
+
rdfs:label "Rocket's position and velocity at each timestep" ;
|
|
51
|
+
rdfs:comment "x_{t+1} = x_t + v_t, v_{t+1} = v_t + a_t" .
|
|
52
|
+
|
|
53
|
+
opt:constraint2 a opt:Constraint ;
|
|
54
|
+
rdfs:label "Rocket's final position and velocity" ;
|
|
55
|
+
rdfs:comment "Rocket should reach the target position with the target speed at the target time" .
|
|
56
|
+
|
|
57
|
+
opt:Objective a rdfs:Class ;
|
|
58
|
+
rdfs:label "Objective of the optimization problem" ;
|
|
59
|
+
rdfs:subClassOf rdfs:Resource .
|
|
60
|
+
|
|
61
|
+
opt:objective1 a opt:Objective ;
|
|
62
|
+
rdfs:label "Minimize total fuel consumption" ;
|
|
63
|
+
rdfs:comment "Minimize \sum_{t=0}^{T-1} |a_t|" .
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
2
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix opt: <http://www.example.org/optimization#> .
|
|
5
|
+
|
|
6
|
+
opt:N rdf:type rdfs:Class ;
|
|
7
|
+
rdfs:label "Number of east-west streets" ;
|
|
8
|
+
rdfs:comment "Scalar value representing the number of east-west streets in the grid" .
|
|
9
|
+
|
|
10
|
+
opt:W rdf:type rdfs:Class ;
|
|
11
|
+
rdfs:label "Number of north-south streets" ;
|
|
12
|
+
rdfs:comment "Scalar value representing the number of north-south streets in the grid" .
|
|
13
|
+
|
|
14
|
+
opt:WestTime rdf:type rdfs:Class ;
|
|
15
|
+
rdfs:label "Time to cross street segment going west" ;
|
|
16
|
+
rdfs:comment "2D array representing the time to cross each street segment going west, for given street n and segment w" .
|
|
17
|
+
|
|
18
|
+
opt:NorthTime rdf:type rdfs:Class ;
|
|
19
|
+
rdfs:label "Time to cross street segment going north" ;
|
|
20
|
+
rdfs:comment "2D array representing the time to cross each street segment going north, for given street n and segment w" .
|
|
21
|
+
|
|
22
|
+
opt:Path rdf:type rdfs:Class ;
|
|
23
|
+
rdfs:label "Path" ;
|
|
24
|
+
rdfs:comment "Variable representing the path taken by the delivery person" .
|
|
25
|
+
|
|
26
|
+
opt:Time rdf:type rdfs:Class ;
|
|
27
|
+
rdfs:label "Time" ;
|
|
28
|
+
rdfs:comment "Variable representing the total time taken by the delivery person to deliver the package" .
|
|
29
|
+
|
|
30
|
+
opt:Constraint rdf:type rdfs:Class ;
|
|
31
|
+
rdfs:label "Constraint" ;
|
|
32
|
+
rdfs:comment "Constraints of the optimization problem, including the limitation of movement to only north or west" .
|
|
33
|
+
|
|
34
|
+
opt:Objective rdf:type rdfs:Class ;
|
|
35
|
+
rdfs:label "Objective" ;
|
|
36
|
+
rdfs:comment "Objective of the optimization problem, which is to minimize the total time taken to deliver the package" .
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
2
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix opt: <http://www.example.org/optimization#> .
|
|
5
|
+
|
|
6
|
+
opt:SeaportOptimizationProblem a opt:OptimizationProblem ;
|
|
7
|
+
opt:hasParameter opt:T, opt:Demands, opt:UnloadCosts, opt:UnloadCapacity, opt:HoldingCost, opt:MaxContainer, opt:InitContainer, opt:NumCranes, opt:CraneCapacity, opt:CraneCost ;
|
|
8
|
+
opt:hasVariable opt:ContainersUnloaded, opt:ContainersHeld, opt:CranesRented ;
|
|
9
|
+
opt:hasConstraint opt:UnloadingCapacityConstraint, opt:StorageCapacityConstraint, opt:CraneCapacityConstraint, opt:InitialFinalContainerConstraint ;
|
|
10
|
+
opt:hasObjective opt:MinimizeCostObjective .
|
|
11
|
+
|
|
12
|
+
opt:T a opt:Parameter ;
|
|
13
|
+
rdfs:label "The number of time periods" ;
|
|
14
|
+
rdfs:range xsd:integer .
|
|
15
|
+
|
|
16
|
+
opt:Demands a opt:Parameter ;
|
|
17
|
+
rdfs:label "Demand at time t" ;
|
|
18
|
+
rdfs:range xsd:integer .
|
|
19
|
+
|
|
20
|
+
opt:UnloadCosts a opt:Parameter ;
|
|
21
|
+
rdfs:label "Unloading cost at time t" ;
|
|
22
|
+
rdfs:range xsd:integer .
|
|
23
|
+
|
|
24
|
+
opt:UnloadCapacity a opt:Parameter ;
|
|
25
|
+
rdfs:label "Unloading capacity at time t" ;
|
|
26
|
+
rdfs:range xsd:integer .
|
|
27
|
+
|
|
28
|
+
opt:HoldingCost a opt:Parameter ;
|
|
29
|
+
rdfs:label "Cost for holding containers" ;
|
|
30
|
+
rdfs:range xsd:integer .
|
|
31
|
+
|
|
32
|
+
opt:MaxContainer a opt:Parameter ;
|
|
33
|
+
rdfs:label "Maximum number of containers that can be held" ;
|
|
34
|
+
rdfs:range xsd:integer .
|
|
35
|
+
|
|
36
|
+
opt:InitContainer a opt:Parameter ;
|
|
37
|
+
rdfs:label "Initial number of containers at the start" ;
|
|
38
|
+
rdfs:range xsd:integer .
|
|
39
|
+
|
|
40
|
+
opt:NumCranes a opt:Parameter ;
|
|
41
|
+
rdfs:label "Number of cranes available for unloading" ;
|
|
42
|
+
rdfs:range xsd:integer .
|
|
43
|
+
|
|
44
|
+
opt:CraneCapacity a opt:Parameter ;
|
|
45
|
+
rdfs:label "Capacity of each crane" ;
|
|
46
|
+
rdfs:range xsd:integer .
|
|
47
|
+
|
|
48
|
+
opt:CraneCost a opt:Parameter ;
|
|
49
|
+
rdfs:label "Cost for renting each crane" ;
|
|
50
|
+
rdfs:range xsd:integer .
|
|
51
|
+
|
|
52
|
+
opt:ContainersUnloaded a opt:Variable ;
|
|
53
|
+
rdfs:label "Number of containers unloaded at time t" ;
|
|
54
|
+
rdfs:range xsd:integer .
|
|
55
|
+
|
|
56
|
+
opt:ContainersHeld a opt:Variable ;
|
|
57
|
+
rdfs:label "Number of containers held at time t" ;
|
|
58
|
+
rdfs:range xsd:integer .
|
|
59
|
+
|
|
60
|
+
opt:CranesRented a opt:Variable ;
|
|
61
|
+
rdfs:label "Number of cranes rented at time t" ;
|
|
62
|
+
rdfs:range xsd:integer .
|
|
63
|
+
|
|
64
|
+
opt:UnloadingCapacityConstraint a opt:Constraint ;
|
|
65
|
+
rdfs:label "Unloading capacity constraint" ;
|
|
66
|
+
opt:hasVariable opt:ContainersUnloaded .
|
|
67
|
+
|
|
68
|
+
opt:StorageCapacityConstraint a opt:Constraint ;
|
|
69
|
+
rdfs:label "Storage capacity constraint" ;
|
|
70
|
+
opt:hasVariable opt:ContainersHeld .
|
|
71
|
+
|
|
72
|
+
opt:CraneCapacityConstraint a opt:Constraint ;
|
|
73
|
+
rdfs:label "Crane capacity constraint" ;
|
|
74
|
+
opt:hasVariable opt:CranesRented .
|
|
75
|
+
|
|
76
|
+
opt:InitialFinalContainerConstraint a opt:Constraint ;
|
|
77
|
+
rdfs:label "Initial and final container constraint" ;
|
|
78
|
+
opt:hasVariable opt:ContainersHeld .
|
|
79
|
+
|
|
80
|
+
opt:MinimizeCostObjective a opt:Objective ;
|
|
81
|
+
rdfs:label "Minimize total cost" ;
|
|
82
|
+
opt:hasVariable opt:ContainersUnloaded, opt:ContainersHeld, opt:CranesRented ;
|
|
83
|
+
opt:isTypeOf opt:Minimization .
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
2
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix opt: <http://www.example.org/optimization#> .
|
|
5
|
+
|
|
6
|
+
opt:Machines rdf:type rdfs:Class ;
|
|
7
|
+
rdfs:label "Machines" ;
|
|
8
|
+
rdfs:comment "The number of machines available" ;
|
|
9
|
+
rdfs:range xsd:integer .
|
|
10
|
+
|
|
11
|
+
opt:Parts rdf:type rdfs:Class ;
|
|
12
|
+
rdfs:label "Parts" ;
|
|
13
|
+
rdfs:comment "The number of types of parts to produce" ;
|
|
14
|
+
rdfs:range xsd:integer .
|
|
15
|
+
|
|
16
|
+
opt:TimeRequired rdf:type rdfs:Class ;
|
|
17
|
+
rdfs:label "Time Required" ;
|
|
18
|
+
rdfs:comment "The time required to produce a batch on machine m for part p" ;
|
|
19
|
+
rdfs:range xsd:integer .
|
|
20
|
+
|
|
21
|
+
opt:MachineCosts rdf:type rdfs:Class ;
|
|
22
|
+
rdfs:label "Machine Costs" ;
|
|
23
|
+
rdfs:comment "The cost of operating machine m for a month" ;
|
|
24
|
+
rdfs:range xsd:integer .
|
|
25
|
+
|
|
26
|
+
opt:Availability rdf:type rdfs:Class ;
|
|
27
|
+
rdfs:label "Availability" ;
|
|
28
|
+
rdfs:comment "The time each machine m is available for production each month" ;
|
|
29
|
+
rdfs:range xsd:integer .
|
|
30
|
+
|
|
31
|
+
opt:Prices rdf:type rdfs:Class ;
|
|
32
|
+
rdfs:label "Prices" ;
|
|
33
|
+
rdfs:comment "The price at which part p can be sold" ;
|
|
34
|
+
rdfs:range xsd:integer .
|
|
35
|
+
|
|
36
|
+
opt:SetupTime rdf:type rdfs:Class ;
|
|
37
|
+
rdfs:label "Setup Time" ;
|
|
38
|
+
rdfs:comment "The setup time required before producing a batch of part p" ;
|
|
39
|
+
rdfs:range xsd:integer .
|
|
40
|
+
|
|
41
|
+
opt:MaximizeProfit rdf:type rdfs:Class ;
|
|
42
|
+
rdfs:label "Maximize Profit" ;
|
|
43
|
+
rdfs:comment "The objective is to maximize profit by determining the number of batches of each part to produce each month" ;
|
|
44
|
+
rdfs:range xsd:integer .
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
2
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix opt: <http://www.example.org/optimization#> .
|
|
5
|
+
|
|
6
|
+
opt:TranslatorSelectionProblem a opt:OptimizationProblem ;
|
|
7
|
+
opt:hasParameter opt:N, opt:Cost, opt:TranslatorLanguagesMatrix, opt:M, opt:RequiredLanguages ;
|
|
8
|
+
opt:hasVariable opt:TranslatorSelection ;
|
|
9
|
+
opt:hasConstraint opt:LanguageCoverageConstraint ;
|
|
10
|
+
opt:hasObjective opt:MinimizeCostObjective .
|
|
11
|
+
|
|
12
|
+
opt:N a opt:Parameter ;
|
|
13
|
+
rdfs:label "Number of translators" ;
|
|
14
|
+
rdfs:comment "Total number of translators available for selection." ;
|
|
15
|
+
rdfs:range xsd:integer .
|
|
16
|
+
|
|
17
|
+
opt:Cost a opt:Parameter ;
|
|
18
|
+
rdfs:label "Cost of translator" ;
|
|
19
|
+
rdfs:comment "The cost associated with each translator." ;
|
|
20
|
+
rdfs:range xsd:float .
|
|
21
|
+
|
|
22
|
+
opt:TranslatorLanguagesMatrix a opt:Parameter ;
|
|
23
|
+
rdfs:label "Translator languages matrix" ;
|
|
24
|
+
rdfs:comment "Binary decision matrix representing the languages each translator can translate." ;
|
|
25
|
+
rdfs:range xsd:boolean .
|
|
26
|
+
|
|
27
|
+
opt:M a opt:Parameter ;
|
|
28
|
+
rdfs:label "Number of required languages" ;
|
|
29
|
+
rdfs:comment "Total number of languages that need to be translated." ;
|
|
30
|
+
rdfs:range xsd:integer .
|
|
31
|
+
|
|
32
|
+
opt:RequiredLanguages a opt:Parameter ;
|
|
33
|
+
rdfs:label "List of required languages" ;
|
|
34
|
+
rdfs:comment "List of languages that need to be translated." ;
|
|
35
|
+
rdfs:range xsd:string .
|
|
36
|
+
|
|
37
|
+
opt:TranslatorSelection a opt:Variable ;
|
|
38
|
+
rdfs:label "Translator selection" ;
|
|
39
|
+
rdfs:comment "Binary decision variable representing whether a translator is selected or not." ;
|
|
40
|
+
rdfs:range xsd:boolean .
|
|
41
|
+
|
|
42
|
+
opt:LanguageCoverageConstraint a opt:Constraint ;
|
|
43
|
+
rdfs:label "Language coverage constraint" ;
|
|
44
|
+
rdfs:comment "Constraint ensuring all required languages are covered by the selected translators." .
|
|
45
|
+
|
|
46
|
+
opt:MinimizeCostObjective a opt:Objective ;
|
|
47
|
+
rdfs:label "Minimize cost objective" ;
|
|
48
|
+
rdfs:comment "Objective to minimize the total cost of selected translators." ;
|
|
49
|
+
opt:optimizationType opt:Minimization .
|