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,41 @@
|
|
|
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:ProjectCount a rdf:Property ;
|
|
7
|
+
rdfs:label "Number of projects" ;
|
|
8
|
+
rdfs:range xsd:integer ;
|
|
9
|
+
rdfs:comment "Total number of projects to be assigned to consultants." .
|
|
10
|
+
|
|
11
|
+
opt:ConsultantCount a rdf:Property ;
|
|
12
|
+
rdfs:label "Number of Consultants" ;
|
|
13
|
+
rdfs:range xsd:integer ;
|
|
14
|
+
rdfs:comment "Total number of consultants available for project assignment." .
|
|
15
|
+
|
|
16
|
+
opt:FixedCosts a rdf:Property ;
|
|
17
|
+
rdfs:label "Fixed cost for project" ;
|
|
18
|
+
rdfs:range xsd:decimal ;
|
|
19
|
+
rdfs:comment "Fixed cost incurred for each project." .
|
|
20
|
+
|
|
21
|
+
opt:AdditionalCosts a rdf:Property ;
|
|
22
|
+
rdfs:label "Additional cost for assigning consultant to project" ;
|
|
23
|
+
rdfs:range xsd:decimal ;
|
|
24
|
+
rdfs:comment "Additional cost incurred for assigning a specific consultant to a specific project." .
|
|
25
|
+
|
|
26
|
+
opt:MaxProjectsPerConsultant a rdf:Property ;
|
|
27
|
+
rdfs:label "Maximum number of projects per consultant" ;
|
|
28
|
+
rdfs:range xsd:integer ;
|
|
29
|
+
rdfs:comment "Maximum number of projects that can be assigned to a single consultant." .
|
|
30
|
+
|
|
31
|
+
opt:Assignment a rdf:Class ;
|
|
32
|
+
rdfs:label "Assignment of consultants to projects" ;
|
|
33
|
+
rdfs:comment "The assignment of consultants to projects that minimizes the total cost." .
|
|
34
|
+
|
|
35
|
+
opt:Assignment rdfs:subClassOf opt:ProjectCount, opt:ConsultantCount, opt:FixedCosts, opt:AdditionalCosts, opt:MaxProjectsPerConsultant .
|
|
36
|
+
|
|
37
|
+
opt:MinimizeTotalCost a rdf:Class ;
|
|
38
|
+
rdfs:label "Minimize total cost" ;
|
|
39
|
+
rdfs:comment "The objective is to minimize the total cost, which includes fixed costs and additional costs." .
|
|
40
|
+
|
|
41
|
+
opt:MinimizeTotalCost rdfs:subClassOf opt:Assignment .
|
|
@@ -0,0 +1,78 @@
|
|
|
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:NetworkIntrusionProblem a opt:OptimizationProblem ;
|
|
7
|
+
opt:hasParameter opt:N, opt:IsolateCentral, opt:ScanCentral, opt:IsolateDistributed, opt:ScanDistributed, opt:CentralCost, opt:DistributedCost, opt:CentralMaxHours, opt:DistributedMaxHours ;
|
|
8
|
+
opt:hasVariable opt:InterventionType, opt:ProcessingType ;
|
|
9
|
+
opt:hasConstraint opt:CentralProcessingConstraint, opt:DistributedProcessingConstraint ;
|
|
10
|
+
opt:hasObjective opt:CostObjective .
|
|
11
|
+
|
|
12
|
+
opt:N a opt:Parameter ;
|
|
13
|
+
rdfs:label "Number of interventions" ;
|
|
14
|
+
rdfs:comment "The total number of interventions that can be performed." ;
|
|
15
|
+
rdfs:range xsd:integer .
|
|
16
|
+
|
|
17
|
+
opt:IsolateCentral a opt:Parameter ;
|
|
18
|
+
rdfs:label "Processing time for isolating at the central system for each intervention" ;
|
|
19
|
+
rdfs:comment "The time required to isolate each intervention at the central system." ;
|
|
20
|
+
rdfs:range xsd:integer .
|
|
21
|
+
|
|
22
|
+
opt:ScanCentral a opt:Parameter ;
|
|
23
|
+
rdfs:label "Processing time for scanning at the central system for each intervention" ;
|
|
24
|
+
rdfs:comment "The time required to scan each intervention at the central system." ;
|
|
25
|
+
rdfs:range xsd:integer .
|
|
26
|
+
|
|
27
|
+
opt:IsolateDistributed a opt:Parameter ;
|
|
28
|
+
rdfs:label "Processing time for isolating at the distributed system for each intervention" ;
|
|
29
|
+
rdfs:comment "The time required to isolate each intervention at the distributed system." ;
|
|
30
|
+
rdfs:range xsd:integer .
|
|
31
|
+
|
|
32
|
+
opt:ScanDistributed a opt:Parameter ;
|
|
33
|
+
rdfs:label "Processing time for scanning at the distributed system for each intervention" ;
|
|
34
|
+
rdfs:comment "The time required to scan each intervention at the distributed system." ;
|
|
35
|
+
rdfs:range xsd:integer .
|
|
36
|
+
|
|
37
|
+
opt:CentralCost a opt:Parameter ;
|
|
38
|
+
rdfs:label "Cost for central system intervention" ;
|
|
39
|
+
rdfs:comment "The cost of performing an intervention at the central system." ;
|
|
40
|
+
rdfs:range xsd:integer .
|
|
41
|
+
|
|
42
|
+
opt:DistributedCost a opt:Parameter ;
|
|
43
|
+
rdfs:label "Cost for distributed system intervention" ;
|
|
44
|
+
rdfs:comment "The cost of performing an intervention at the distributed system." ;
|
|
45
|
+
rdfs:range xsd:integer .
|
|
46
|
+
|
|
47
|
+
opt:CentralMaxHours a opt:Parameter ;
|
|
48
|
+
rdfs:label "Maximum hours of operation for the central system" ;
|
|
49
|
+
rdfs:comment "The maximum number of hours the central system can operate." ;
|
|
50
|
+
rdfs:range xsd:integer .
|
|
51
|
+
|
|
52
|
+
opt:DistributedMaxHours a opt:Parameter ;
|
|
53
|
+
rdfs:label "Maximum hours of operation for the distributed system" ;
|
|
54
|
+
rdfs:comment "The maximum number of hours the distributed system can operate." ;
|
|
55
|
+
rdfs:range xsd:integer .
|
|
56
|
+
|
|
57
|
+
opt:InterventionType a opt:Variable ;
|
|
58
|
+
rdfs:label "Type of intervention" ;
|
|
59
|
+
rdfs:comment "The type of intervention to be performed (isolate or scan)." ;
|
|
60
|
+
rdfs:range xsd:string .
|
|
61
|
+
|
|
62
|
+
opt:ProcessingType a opt:Variable ;
|
|
63
|
+
rdfs:label "Type of processing" ;
|
|
64
|
+
rdfs:comment "The type of processing to be used (central or distributed)." ;
|
|
65
|
+
rdfs:range xsd:string .
|
|
66
|
+
|
|
67
|
+
opt:CentralProcessingConstraint a opt:Constraint ;
|
|
68
|
+
rdfs:label "Central processing constraint" ;
|
|
69
|
+
rdfs:comment "The constraint on the total processing time at the central system." .
|
|
70
|
+
|
|
71
|
+
opt:DistributedProcessingConstraint a opt:Constraint ;
|
|
72
|
+
rdfs:label "Distributed processing constraint" ;
|
|
73
|
+
rdfs:comment "The constraint on the total processing time at the distributed system." .
|
|
74
|
+
|
|
75
|
+
opt:CostObjective a opt:Objective ;
|
|
76
|
+
rdfs:label "Cost objective" ;
|
|
77
|
+
rdfs:comment "The objective to minimize the total cost of interventions." ;
|
|
78
|
+
opt:isMinimizationObjective true .
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
:TravelingSalesmanProblem a opt:OptimizationProblem ;
|
|
7
|
+
rdfs:label "Traveling Salesman Problem" ;
|
|
8
|
+
opt:hasParameter :NumberOfCities, :StartCity, :Distances ;
|
|
9
|
+
opt:hasVariable :Route ;
|
|
10
|
+
opt:hasConstraint :VisitEachCityOnce, :ReturnToStartCity ;
|
|
11
|
+
opt:hasObjective :MinimizeTotalDistance .
|
|
12
|
+
|
|
13
|
+
:NumberOfCities a opt:Parameter ;
|
|
14
|
+
rdfs:label "Number of cities" ;
|
|
15
|
+
rdfs:comment "The total number of cities that need to be visited" ;
|
|
16
|
+
opt:hasDataType xsd:integer ;
|
|
17
|
+
opt:hasShape "scalar" .
|
|
18
|
+
|
|
19
|
+
:StartCity a opt:Parameter ;
|
|
20
|
+
rdfs:label "Start city" ;
|
|
21
|
+
rdfs:comment "The index of the city where the journey starts" ;
|
|
22
|
+
opt:hasDataType xsd:integer ;
|
|
23
|
+
opt:hasShape "scalar" .
|
|
24
|
+
|
|
25
|
+
:Distances a opt:Parameter ;
|
|
26
|
+
rdfs:label "Distances" ;
|
|
27
|
+
rdfs:comment "The distance from city i to city j" ;
|
|
28
|
+
opt:hasDataType xsd:array ;
|
|
29
|
+
opt:hasShape "[N, N]" .
|
|
30
|
+
|
|
31
|
+
:Route a opt:Variable ;
|
|
32
|
+
rdfs:label "Route" ;
|
|
33
|
+
rdfs:comment "The sequence of cities visited" ;
|
|
34
|
+
opt:hasDataType xsd:array ;
|
|
35
|
+
opt:hasShape "[N]" .
|
|
36
|
+
|
|
37
|
+
:VisitEachCityOnce a opt:Constraint ;
|
|
38
|
+
rdfs:label "Visit each city once" ;
|
|
39
|
+
rdfs:comment "Each city must be visited exactly once" ;
|
|
40
|
+
opt:hasVariables :Route .
|
|
41
|
+
|
|
42
|
+
:ReturnToStartCity a opt:Constraint ;
|
|
43
|
+
rdfs:label "Return to start city" ;
|
|
44
|
+
rdfs:comment "The journey must end at the start city" ;
|
|
45
|
+
opt:hasVariables :Route .
|
|
46
|
+
|
|
47
|
+
:MinimizeTotalDistance a opt:Objective ;
|
|
48
|
+
rdfs:label "Minimize total distance" ;
|
|
49
|
+
rdfs:comment "The total distance of the route should be minimized" ;
|
|
50
|
+
opt:hasVariables :Route ;
|
|
51
|
+
opt:isTypeOf opt:Minimization .
|
|
@@ -0,0 +1,40 @@
|
|
|
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 paper: <http://www.example.com/paper#> .
|
|
5
|
+
|
|
6
|
+
paper:M rdf:type rdfs:Class ;
|
|
7
|
+
rdfs:label "Number of types of smaller rolls" ;
|
|
8
|
+
rdfs:comment "The number of different types of smaller rolls that the company produces." ;
|
|
9
|
+
rdfs:range xsd:integer .
|
|
10
|
+
|
|
11
|
+
paper:N rdf:type rdfs:Class ;
|
|
12
|
+
rdfs:label "Number of different cutting patterns" ;
|
|
13
|
+
rdfs:comment "The number of different cutting patterns available for producing the smaller rolls." ;
|
|
14
|
+
rdfs:range xsd:integer .
|
|
15
|
+
|
|
16
|
+
paper:large_roll_width rdf:type rdfs:Class ;
|
|
17
|
+
rdfs:label "Large Roll Width" ;
|
|
18
|
+
rdfs:comment "The width of the large rolls of paper produced by the company." ;
|
|
19
|
+
rdfs:range xsd:float .
|
|
20
|
+
|
|
21
|
+
paper:demands rdf:type rdfs:Class ;
|
|
22
|
+
rdfs:label "Demands" ;
|
|
23
|
+
rdfs:comment "The demand for each type of smaller roll." ;
|
|
24
|
+
rdfs:range xsd:integer .
|
|
25
|
+
|
|
26
|
+
paper:roll_width_options rdf:type rdfs:Class ;
|
|
27
|
+
rdfs:label "Roll Width Options" ;
|
|
28
|
+
rdfs:comment "The width options for the smaller rolls." ;
|
|
29
|
+
rdfs:range xsd:float .
|
|
30
|
+
|
|
31
|
+
paper:patterns rdf:type rdfs:Class ;
|
|
32
|
+
rdfs:label "The different cutting patterns" ;
|
|
33
|
+
rdfs:comment "The different cutting patterns applied to the large rolls to produce the smaller rolls." ;
|
|
34
|
+
rdfs:range xsd:integer .
|
|
35
|
+
|
|
36
|
+
paper:OptimizationProblem rdf:type rdfs:Class ;
|
|
37
|
+
rdfs:label "Optimization Problem" ;
|
|
38
|
+
rdfs:comment "The optimization problem to determine the minimum number of large rolls needed to fulfill all the orders." .
|
|
39
|
+
|
|
40
|
+
paper:OptimizationProblem rdfs:subClassOf paper:M, paper:N, paper:large_roll_width, paper:demands, paper:roll_width_options, paper:patterns .
|
|
@@ -0,0 +1,53 @@
|
|
|
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:RocketProblem a opt:OptimizationProblem ;
|
|
7
|
+
opt:hasParameter opt:X0, opt:V0, opt:XT, opt:VT, opt:T ;
|
|
8
|
+
opt:hasVariable opt:Acceleration ;
|
|
9
|
+
opt:hasConstraint opt:PositionConstraint, opt:VelocityConstraint ;
|
|
10
|
+
opt:hasObjective opt:MinimizeFuel .
|
|
11
|
+
|
|
12
|
+
opt:X0 a opt:Parameter ;
|
|
13
|
+
rdfs:label "Initial position of the object" ;
|
|
14
|
+
rdfs:comment "The initial position of the rocket at the start of the journey." ;
|
|
15
|
+
rdfs:range xsd:float .
|
|
16
|
+
|
|
17
|
+
opt:V0 a opt:Parameter ;
|
|
18
|
+
rdfs:label "Initial velocity of the object" ;
|
|
19
|
+
rdfs:comment "The initial velocity of the rocket at the start of the journey." ;
|
|
20
|
+
rdfs:range xsd:float .
|
|
21
|
+
|
|
22
|
+
opt:XT a opt:Parameter ;
|
|
23
|
+
rdfs:label "Final position of the object" ;
|
|
24
|
+
rdfs:comment "The target position of the rocket at the end of the journey." ;
|
|
25
|
+
rdfs:range xsd:float .
|
|
26
|
+
|
|
27
|
+
opt:VT a opt:Parameter ;
|
|
28
|
+
rdfs:label "Final velocity of the object" ;
|
|
29
|
+
rdfs:comment "The target velocity of the rocket at the end of the journey." ;
|
|
30
|
+
rdfs:range xsd:float .
|
|
31
|
+
|
|
32
|
+
opt:T a opt:Parameter ;
|
|
33
|
+
rdfs:label "Time duration for the journey" ;
|
|
34
|
+
rdfs:comment "The total time duration for the rocket's journey." ;
|
|
35
|
+
rdfs:range xsd:integer .
|
|
36
|
+
|
|
37
|
+
opt:Acceleration a opt:Variable ;
|
|
38
|
+
rdfs:label "Acceleration at each timestep" ;
|
|
39
|
+
rdfs:comment "The acceleration of the rocket at each timestep, which is under our control." ;
|
|
40
|
+
rdfs:range xsd:float .
|
|
41
|
+
|
|
42
|
+
opt:PositionConstraint a opt:Constraint ;
|
|
43
|
+
rdfs:label "Position constraint" ;
|
|
44
|
+
rdfs:comment "The constraint that the rocket's position at each timestep must follow the equation x_{t+1} = x_t + v_t." .
|
|
45
|
+
|
|
46
|
+
opt:VelocityConstraint a opt:Constraint ;
|
|
47
|
+
rdfs:label "Velocity constraint" ;
|
|
48
|
+
rdfs:comment "The constraint that the rocket's velocity at each timestep must follow the equation v_{t+1} = v_t + a_t." .
|
|
49
|
+
|
|
50
|
+
opt:MinimizeFuel a opt:Objective ;
|
|
51
|
+
rdfs:label "Minimize fuel consumption" ;
|
|
52
|
+
rdfs:comment "The objective to minimize the thrust required, which is max_t |a_t|, subject to the given constraints." ;
|
|
53
|
+
opt:isMinimizationObjective true .
|
|
@@ -0,0 +1,51 @@
|
|
|
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:NumParts a rdf:Property ;
|
|
7
|
+
rdfs:label "Number of Parts" ;
|
|
8
|
+
rdfs:range xsd:integer ;
|
|
9
|
+
rdfs:comment "Number of different types of spare parts the firm can produce." .
|
|
10
|
+
|
|
11
|
+
opt:NumMachines a rdf:Property ;
|
|
12
|
+
rdfs:label "Number of Machines" ;
|
|
13
|
+
rdfs:range xsd:integer ;
|
|
14
|
+
rdfs:comment "Number of machines or shops available for producing the spare parts." .
|
|
15
|
+
|
|
16
|
+
opt:Time a rdf:Property ;
|
|
17
|
+
rdfs:label "Time" ;
|
|
18
|
+
rdfs:range xsd:float ;
|
|
19
|
+
rdfs:comment "The time taken to make one unit of spare part k on machine s." .
|
|
20
|
+
|
|
21
|
+
opt:Profit a rdf:Property ;
|
|
22
|
+
rdfs:label "Profit" ;
|
|
23
|
+
rdfs:range xsd:float ;
|
|
24
|
+
rdfs:comment "Profit from producing one unit of spare part k." .
|
|
25
|
+
|
|
26
|
+
opt:Capacity a rdf:Property ;
|
|
27
|
+
rdfs:label "Capacity" ;
|
|
28
|
+
rdfs:range xsd:float ;
|
|
29
|
+
rdfs:comment "Capacity of machine s for the month." .
|
|
30
|
+
|
|
31
|
+
opt:MaximizeProfit a opt:OptimizationProblem ;
|
|
32
|
+
rdfs:label "Maximize Profit" ;
|
|
33
|
+
rdfs:comment "The objective is to determine how much of each spare part is to be made to maximize profit." ;
|
|
34
|
+
opt:hasParameter opt:NumParts, opt:NumMachines, opt:Time, opt:Profit, opt:Capacity ;
|
|
35
|
+
opt:hasVariable opt:QuantityProduced ;
|
|
36
|
+
opt:hasConstraint opt:MachineCapacityConstraint ;
|
|
37
|
+
opt:hasObjective opt:ProfitObjective .
|
|
38
|
+
|
|
39
|
+
opt:QuantityProduced a rdf:Property ;
|
|
40
|
+
rdfs:label "Quantity Produced" ;
|
|
41
|
+
rdfs:range xsd:float ;
|
|
42
|
+
rdfs:comment "The quantity of each spare part to be produced." .
|
|
43
|
+
|
|
44
|
+
opt:MachineCapacityConstraint a opt:Constraint ;
|
|
45
|
+
rdfs:label "Machine Capacity Constraint" ;
|
|
46
|
+
rdfs:comment "The total time spent on each machine cannot exceed its capacity." .
|
|
47
|
+
|
|
48
|
+
opt:ProfitObjective a opt:Objective ;
|
|
49
|
+
rdfs:label "Profit Objective" ;
|
|
50
|
+
rdfs:comment "The objective is to maximize the total profit from producing the spare parts." ;
|
|
51
|
+
opt:isMaximizationObjective "true"^^xsd:boolean .
|
|
@@ -0,0 +1,58 @@
|
|
|
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:K a rdf:Property ;
|
|
7
|
+
rdfs:label "Number of terms in the sequence" ;
|
|
8
|
+
rdfs:range xsd:integer ;
|
|
9
|
+
rdfs:domain opt:OptimizationProblem .
|
|
10
|
+
|
|
11
|
+
opt:P a rdf:Property ;
|
|
12
|
+
rdfs:label "Coefficients of the linear combination" ;
|
|
13
|
+
rdfs:range xsd:float ;
|
|
14
|
+
rdfs:domain opt:OptimizationProblem .
|
|
15
|
+
|
|
16
|
+
opt:ExpectedZ a rdf:Property ;
|
|
17
|
+
rdfs:label "Expected value of Z" ;
|
|
18
|
+
rdfs:range xsd:float ;
|
|
19
|
+
rdfs:domain opt:OptimizationProblem .
|
|
20
|
+
|
|
21
|
+
opt:ExpectedZSquared a rdf:Property ;
|
|
22
|
+
rdfs:label "Expected value of Z squared" ;
|
|
23
|
+
rdfs:range xsd:float ;
|
|
24
|
+
rdfs:domain opt:OptimizationProblem .
|
|
25
|
+
|
|
26
|
+
opt:Z a rdf:Property ;
|
|
27
|
+
rdfs:label "Random variable Z" ;
|
|
28
|
+
rdfs:range xsd:float ;
|
|
29
|
+
rdfs:domain opt:OptimizationProblem .
|
|
30
|
+
|
|
31
|
+
opt:Z_4 a rdf:Property ;
|
|
32
|
+
rdfs:label "Fourth moment of Z" ;
|
|
33
|
+
rdfs:range xsd:float ;
|
|
34
|
+
rdfs:domain opt:OptimizationProblem .
|
|
35
|
+
|
|
36
|
+
opt:OptimizationProblem a rdfs:Class ;
|
|
37
|
+
rdfs:label "Optimization problem" ;
|
|
38
|
+
rdfs:subClassOf rdfs:Resource .
|
|
39
|
+
|
|
40
|
+
opt:LinearProgramming a rdfs:Class ;
|
|
41
|
+
rdfs:label "Linear programming" ;
|
|
42
|
+
rdfs:subClassOf opt:OptimizationProblem .
|
|
43
|
+
|
|
44
|
+
opt:UpperBound a rdfs:Class ;
|
|
45
|
+
rdfs:label "Upper bound" ;
|
|
46
|
+
rdfs:subClassOf opt:OptimizationProblem .
|
|
47
|
+
|
|
48
|
+
opt:LowerBound a rdfs:Class ;
|
|
49
|
+
rdfs:label "Lower bound" ;
|
|
50
|
+
rdfs:subClassOf opt:OptimizationProblem .
|
|
51
|
+
|
|
52
|
+
opt:Constraint a rdfs:Class ;
|
|
53
|
+
rdfs:label "Constraint" ;
|
|
54
|
+
rdfs:subClassOf opt:OptimizationProblem .
|
|
55
|
+
|
|
56
|
+
opt:Objective a rdfs:Class ;
|
|
57
|
+
rdfs:label "Objective" ;
|
|
58
|
+
rdfs:subClassOf opt:OptimizationProblem .
|
|
@@ -0,0 +1,57 @@
|
|
|
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:ndepts a rdf:Property ;
|
|
7
|
+
rdfs:label "Number of departments" ;
|
|
8
|
+
rdfs:range xsd:integer .
|
|
9
|
+
|
|
10
|
+
opt:ncities a rdf:Property ;
|
|
11
|
+
rdfs:label "Number of cities" ;
|
|
12
|
+
rdfs:range xsd:integer .
|
|
13
|
+
|
|
14
|
+
opt:ncitiesm1 a rdf:Property ;
|
|
15
|
+
rdfs:label "Number of cities without the host city" ;
|
|
16
|
+
rdfs:range xsd:integer .
|
|
17
|
+
|
|
18
|
+
opt:benefit a rdf:Property ;
|
|
19
|
+
rdfs:label "Benefits in £k for each department in each city" ;
|
|
20
|
+
rdfs:range xsd:float .
|
|
21
|
+
|
|
22
|
+
opt:dist a rdf:Property ;
|
|
23
|
+
rdfs:label "Communication costs per unit (£) between cities" ;
|
|
24
|
+
rdfs:range xsd:float .
|
|
25
|
+
|
|
26
|
+
opt:comm a rdf:Property ;
|
|
27
|
+
rdfs:label "Quantities of communication (k units) between departments" ;
|
|
28
|
+
rdfs:range xsd:float .
|
|
29
|
+
|
|
30
|
+
opt:Department a rdfs:Class ;
|
|
31
|
+
rdfs:label "Department" ;
|
|
32
|
+
rdfs:subClassOf opt:Entity .
|
|
33
|
+
|
|
34
|
+
opt:City a rdfs:Class ;
|
|
35
|
+
rdfs:label "City" ;
|
|
36
|
+
rdfs:subClassOf opt:Entity .
|
|
37
|
+
|
|
38
|
+
opt:Entity a rdfs:Class ;
|
|
39
|
+
rdfs:label "Entity" .
|
|
40
|
+
|
|
41
|
+
opt:Constraint a rdfs:Class ;
|
|
42
|
+
rdfs:label "Constraint" ;
|
|
43
|
+
rdfs:subClassOf opt:Entity .
|
|
44
|
+
|
|
45
|
+
opt:Objective a rdfs:Class ;
|
|
46
|
+
rdfs:label "Objective" ;
|
|
47
|
+
rdfs:subClassOf opt:Entity .
|
|
48
|
+
|
|
49
|
+
opt:MaximizeSavings a opt:Objective ;
|
|
50
|
+
rdfs:label "Maximize the total savings" ;
|
|
51
|
+
rdfs:comment "The sum of the benefits of each department in each city minus the communication costs between each pair of departments in each pair of cities." .
|
|
52
|
+
|
|
53
|
+
opt:DepartmentLocationConstraint a opt:Constraint ;
|
|
54
|
+
rdfs:label "Each department must be located in one city" .
|
|
55
|
+
|
|
56
|
+
opt:CityCapacityConstraint a opt:Constraint ;
|
|
57
|
+
rdfs:label "There can be at most 3 departments in each city" .
|
|
@@ -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:DirichletProblemLaplace
|
|
7
|
+
rdf:type opt:OptimizationProblem ;
|
|
8
|
+
opt:hasParameter opt:r, opt:c, opt:Z, opt:M ;
|
|
9
|
+
opt:hasVariable opt:cellValue ;
|
|
10
|
+
opt:hasConstraint opt:averageNeighborConstraint ;
|
|
11
|
+
opt:hasObjective opt:minimizeCellValue .
|
|
12
|
+
|
|
13
|
+
opt:r
|
|
14
|
+
rdf:type opt:Parameter ;
|
|
15
|
+
rdfs:label "r" ;
|
|
16
|
+
rdfs:comment "Number of rows in the Laplace grid" ;
|
|
17
|
+
rdfs:range xsd:integer .
|
|
18
|
+
|
|
19
|
+
opt:c
|
|
20
|
+
rdf:type opt:Parameter ;
|
|
21
|
+
rdfs:label "c" ;
|
|
22
|
+
rdfs:comment "Number of columns in the Laplace grid" ;
|
|
23
|
+
rdfs:range xsd:integer .
|
|
24
|
+
|
|
25
|
+
opt:Z
|
|
26
|
+
rdf:type opt:Parameter ;
|
|
27
|
+
rdfs:label "Z" ;
|
|
28
|
+
rdfs:comment "Zero value (constant)" ;
|
|
29
|
+
rdfs:range xsd:float .
|
|
30
|
+
|
|
31
|
+
opt:M
|
|
32
|
+
rdf:type opt:Parameter ;
|
|
33
|
+
rdfs:label "M" ;
|
|
34
|
+
rdfs:comment "Maximum value (constant)" ;
|
|
35
|
+
rdfs:range xsd:float .
|
|
36
|
+
|
|
37
|
+
opt:cellValue
|
|
38
|
+
rdf:type opt:Variable ;
|
|
39
|
+
rdfs:label "cellValue" ;
|
|
40
|
+
rdfs:comment "Value of a cell in the grid" ;
|
|
41
|
+
opt:hasLowerBound opt:Z ;
|
|
42
|
+
opt:hasUpperBound opt:M .
|
|
43
|
+
|
|
44
|
+
opt:averageNeighborConstraint
|
|
45
|
+
rdf:type opt:Constraint ;
|
|
46
|
+
rdfs:label "averageNeighborConstraint" ;
|
|
47
|
+
rdfs:comment "The value of a cell is determined by the average of its four neighboring cells (top, bottom, left, and right)" ;
|
|
48
|
+
opt:involvesVariable opt:cellValue .
|
|
49
|
+
|
|
50
|
+
opt:minimizeCellValue
|
|
51
|
+
rdf:type opt:Objective ;
|
|
52
|
+
rdfs:label "minimizeCellValue" ;
|
|
53
|
+
rdfs:comment "Minimize the value of the cell at position (1,1)" ;
|
|
54
|
+
opt:involvesVariable opt:cellValue ;
|
|
55
|
+
opt:isMinimizationObjective true .
|
|
@@ -0,0 +1,42 @@
|
|
|
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:CurrencyArbitrage a opt:OptimizationProblem ;
|
|
7
|
+
rdfs:comment "Detect arbitrage loops in currency exchange markets where profitable trading sequences can be identified based on exchange rates between currencies."@en ;
|
|
8
|
+
opt:hasParameter opt:n, opt:m, opt:currencies, opt:currencies_s, opt:start ;
|
|
9
|
+
opt:hasVariable opt:arbitrageLoop ;
|
|
10
|
+
opt:hasConstraint opt:profitableLoop ;
|
|
11
|
+
opt:hasObjective opt:maxProfit .
|
|
12
|
+
|
|
13
|
+
opt:n a opt:Parameter ;
|
|
14
|
+
rdfs:comment "Total number of currencies."@en ;
|
|
15
|
+
rdfs:range xsd:integer .
|
|
16
|
+
|
|
17
|
+
opt:m a opt:Parameter ;
|
|
18
|
+
rdfs:comment "Number of involved currencies in the arbitrage loop."@en ;
|
|
19
|
+
rdfs:range xsd:integer .
|
|
20
|
+
|
|
21
|
+
opt:currencies a opt:Parameter ;
|
|
22
|
+
rdfs:comment "Exchange rates between different currencies."@en ;
|
|
23
|
+
rdfs:range xsd:float .
|
|
24
|
+
|
|
25
|
+
opt:currencies_s a opt:Parameter ;
|
|
26
|
+
rdfs:comment "Names of the currencies."@en ;
|
|
27
|
+
rdfs:range xsd:string .
|
|
28
|
+
|
|
29
|
+
opt:start a opt:Parameter ;
|
|
30
|
+
rdfs:comment "Initial amount in the base currency for trading."@en ;
|
|
31
|
+
rdfs:range xsd:float .
|
|
32
|
+
|
|
33
|
+
opt:arbitrageLoop a opt:Variable ;
|
|
34
|
+
rdfs:comment "Sequence of currencies that can be traded into from the starting currency."@en ;
|
|
35
|
+
rdfs:range xsd:string .
|
|
36
|
+
|
|
37
|
+
opt:profitableLoop a opt:Constraint ;
|
|
38
|
+
rdfs:comment "When we end the loop and exchange into the final currency again, we return with more than what we started with."@en .
|
|
39
|
+
|
|
40
|
+
opt:maxProfit a opt:Objective ;
|
|
41
|
+
rdfs:comment "Maximize the total profit generated by following a specific sequence of currency exchanges."@en ;
|
|
42
|
+
opt:isTypeOf opt:maximization .
|
|
@@ -0,0 +1,61 @@
|
|
|
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:P_Median_Problem rdf:type rdfs:Class ;
|
|
7
|
+
rdfs:subClassOf opt:Optimization_Problem ;
|
|
8
|
+
rdfs:comment "The P-Median problem involves selecting P warehouses from a set of candidate locations to minimize the demand-weighted distance of serving all customers." .
|
|
9
|
+
|
|
10
|
+
opt:hasParameter rdf:type rdf:Property ;
|
|
11
|
+
rdfs:domain opt:Optimization_Problem ;
|
|
12
|
+
rdfs:range opt:Parameter .
|
|
13
|
+
|
|
14
|
+
opt:hasVariable rdf:type rdf:Property ;
|
|
15
|
+
rdfs:domain opt:Optimization_Problem ;
|
|
16
|
+
rdfs:range opt:Variable .
|
|
17
|
+
|
|
18
|
+
opt:hasConstraint rdf:type rdf:Property ;
|
|
19
|
+
rdfs:domain opt:Optimization_Problem ;
|
|
20
|
+
rdfs:range opt:Constraint .
|
|
21
|
+
|
|
22
|
+
opt:hasObjective rdf:type rdf:Property ;
|
|
23
|
+
rdfs:domain opt:Optimization_Problem ;
|
|
24
|
+
rdfs:range opt:Objective .
|
|
25
|
+
|
|
26
|
+
opt:P rdf:type opt:Parameter ;
|
|
27
|
+
rdfs:label "Number of warehouses to open" ;
|
|
28
|
+
rdfs:comment "P is the number of warehouses to be opened." ;
|
|
29
|
+
opt:hasValue "2"^^xsd:integer .
|
|
30
|
+
|
|
31
|
+
opt:num_customers rdf:type opt:Parameter ;
|
|
32
|
+
rdfs:label "Number of customers" ;
|
|
33
|
+
rdfs:comment "num_customers is the total number of customers." ;
|
|
34
|
+
opt:hasValue "4"^^xsd:integer .
|
|
35
|
+
|
|
36
|
+
opt:num_warehouses rdf:type opt:Parameter ;
|
|
37
|
+
rdfs:label "Number of warehouses" ;
|
|
38
|
+
rdfs:comment "num_warehouses is the total number of warehouses." ;
|
|
39
|
+
opt:hasValue "3"^^xsd:integer .
|
|
40
|
+
|
|
41
|
+
opt:Demand rdf:type opt:Parameter ;
|
|
42
|
+
rdfs:label "Demand of each customer" ;
|
|
43
|
+
rdfs:comment "Demand is the demand of each customer." ;
|
|
44
|
+
opt:hasValue "100.0,80.0,80.0,70.0"^^xsd:string .
|
|
45
|
+
|
|
46
|
+
opt:Distance rdf:type opt:Parameter ;
|
|
47
|
+
rdfs:label "Distance between each customer and warehouse" ;
|
|
48
|
+
rdfs:comment "Distance is the distance between each customer and warehouse." ;
|
|
49
|
+
opt:hasValue "array2d(Customers, Warehouses)"^^xsd:string .
|
|
50
|
+
|
|
51
|
+
opt:Allocation rdf:type opt:Variable ;
|
|
52
|
+
rdfs:label "Allocation of warehouses to customers" ;
|
|
53
|
+
rdfs:comment "Allocation is the assignment of warehouses to customers." .
|
|
54
|
+
|
|
55
|
+
opt:Distance_Constraint rdf:type opt:Constraint ;
|
|
56
|
+
rdfs:label "Distance constraint" ;
|
|
57
|
+
rdfs:comment "Each customer is served by exactly one warehouse." .
|
|
58
|
+
|
|
59
|
+
opt:Minimize_Demand_Weighted_Distance rdf:type opt:Objective ;
|
|
60
|
+
rdfs:label "Minimize demand-weighted distance" ;
|
|
61
|
+
rdfs:comment "The goal is to minimize the sum of demand weighted distances of the customers to the warehouse that serves them." .
|
|
@@ -0,0 +1,64 @@
|
|
|
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:GridOptimizationProblem
|
|
7
|
+
rdf:type rdfs:Class ;
|
|
8
|
+
rdfs:subClassOf opt:OptimizationProblem .
|
|
9
|
+
|
|
10
|
+
opt:hasNumberOfRows
|
|
11
|
+
rdf:type rdf:Property ;
|
|
12
|
+
rdfs:domain opt:GridOptimizationProblem ;
|
|
13
|
+
rdfs:range xsd:integer .
|
|
14
|
+
|
|
15
|
+
opt:hasNumberOfColumns
|
|
16
|
+
rdf:type rdf:Property ;
|
|
17
|
+
rdfs:domain opt:GridOptimizationProblem ;
|
|
18
|
+
rdfs:range xsd:integer .
|
|
19
|
+
|
|
20
|
+
opt:hasGrid
|
|
21
|
+
rdf:type rdf:Property ;
|
|
22
|
+
rdfs:domain opt:GridOptimizationProblem ;
|
|
23
|
+
rdfs:range opt:Grid .
|
|
24
|
+
|
|
25
|
+
opt:Grid
|
|
26
|
+
rdf:type rdfs:Class .
|
|
27
|
+
|
|
28
|
+
opt:hasCombination
|
|
29
|
+
rdf:type rdf:Property ;
|
|
30
|
+
rdfs:domain opt:GridOptimizationProblem ;
|
|
31
|
+
rdfs:range opt:Combination .
|
|
32
|
+
|
|
33
|
+
opt:Combination
|
|
34
|
+
rdf:type rdfs:Class .
|
|
35
|
+
|
|
36
|
+
opt:hasMaximumSum
|
|
37
|
+
rdf:type rdf:Property ;
|
|
38
|
+
rdfs:domain opt:GridOptimizationProblem ;
|
|
39
|
+
rdfs:range xsd:integer .
|
|
40
|
+
|
|
41
|
+
opt:hasPath
|
|
42
|
+
rdf:type rdf:Property ;
|
|
43
|
+
rdfs:domain opt:GridOptimizationProblem ;
|
|
44
|
+
rdfs:range opt:Path .
|
|
45
|
+
|
|
46
|
+
opt:Path
|
|
47
|
+
rdf:type rdfs:Class .
|
|
48
|
+
|
|
49
|
+
opt:hasConstraint
|
|
50
|
+
rdf:type rdf:Property ;
|
|
51
|
+
rdfs:domain opt:GridOptimizationProblem ;
|
|
52
|
+
rdfs:range opt:Constraint .
|
|
53
|
+
|
|
54
|
+
opt:Constraint
|
|
55
|
+
rdf:type rdfs:Class .
|
|
56
|
+
|
|
57
|
+
opt:hasObjective
|
|
58
|
+
rdf:type rdf:Property ;
|
|
59
|
+
rdfs:domain opt:GridOptimizationProblem ;
|
|
60
|
+
rdfs:range opt:Objective .
|
|
61
|
+
|
|
62
|
+
opt:Objective
|
|
63
|
+
rdf:type rdfs:Class ;
|
|
64
|
+
rdfs:subClassOf opt:MaximizationObjective .
|