summaryrefslogtreecommitdiffstats
path: root/conductor/etc
diff options
context:
space:
mode:
authorkrishnaa96 <krishna.moorthy6@wipro.com>2020-08-15 22:29:23 +0530
committerkrishnaa96 <krishna.moorthy6@wipro.com>2020-09-06 21:35:14 +0530
commitf7a27497dd184da6259ea8bd87c3c704df519923 (patch)
tree9facc131eaab53783e01cc7f0ec172c800914245 /conductor/etc
parent11f579c76967eec1c4959ba02dbdfc6f19575a84 (diff)
Add support to generic optimization structure
Add a new template version to support the new optmization model Issue-ID: OPTFRA-730 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com> Change-Id: I286f7ae1bad0af1fac0da7e96f7274eb9518e031
Diffstat (limited to 'conductor/etc')
-rw-r--r--conductor/etc/conductor/opt_schema.json138
1 files changed, 138 insertions, 0 deletions
diff --git a/conductor/etc/conductor/opt_schema.json b/conductor/etc/conductor/opt_schema.json
new file mode 100644
index 0000000..cdf04de
--- /dev/null
+++ b/conductor/etc/conductor/opt_schema.json
@@ -0,0 +1,138 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "description": "The root schema comprises the entire JSON document.",
+ "required": [
+ "goal",
+ "operation_function"
+ ],
+ "title": "The root schema",
+ "properties": {
+ "goal": {
+ "description": "Goal of the optimization.",
+ "enum": [
+ "minimize",
+ "maximize"
+ ],
+ "title": "The goal schema",
+ "type": "string"
+ },
+ "operation_function": {
+ "$id": "#operation_function",
+ "description": "The operation function that has to be optimized.",
+ "required": [
+ "operator",
+ "operands"
+ ],
+ "title": "The operation_function schema",
+ "properties": {
+ "operator": {
+ "description": "The operation which will be a part of the objective function.",
+ "enum": [
+ "sum",
+ "min",
+ "max"
+ ],
+ "title": "The operator schema",
+ "type": "string"
+ },
+ "operands": {
+ "description": "The operand on which the operation is to be performed.",
+ "title": "The operands schema",
+ "type": "array",
+ "additionalItems": true,
+ "items": {
+ "anyOf": [
+ {
+ "default": {},
+ "description": "An explanation about the purpose of this instance.",
+ "required": [
+ "function",
+ "params"
+ ],
+ "title": "function operand schema",
+ "properties": {
+ "function": {
+ "default": "",
+ "description": "Function to be performed on the parameters",
+ "enum": [
+ "distance_between",
+ "latency_between",
+ "attribute"
+ ],
+ "title": "The function schema",
+ "type": "string"
+ },
+ "weight": {
+ "default": 1.0,
+ "description": "Weight for the operand.",
+ "title": "The weight schema",
+ "type": "number"
+ },
+ "params": {
+ "description": "key-value pair which will be passed as kwargs to the function.",
+ "title": "The params schema",
+ "type": "object",
+ "additionalProperties": true
+ },
+ "normalization": {
+ "description": "Set of values used to normalize the operand.",
+ "$id": "#normalization",
+ "required": [
+ "start",
+ "end"
+ ],
+ "title": "The normalization schema",
+ "properties": {
+ "start": {
+ "description": "Start of the range.",
+ "title": "The start schema",
+ "type": "number"
+ },
+ "end": {
+ "description": "End of the range.",
+ "title": "The end schema",
+ "type": "number"
+ }
+ },
+ "additionalProperties": true
+ }
+ },
+ "additionalProperties": true
+ },
+ {
+ "description": "operation function operand.",
+ "required": [
+ "operation_function"
+ ],
+ "title": "The operation function operand schema",
+ "properties": {
+ "operation_function": {
+ "description": "The operation function which same as the top level object.",
+ "title": "The operation_function schema",
+ "$ref": "#/properties/operation_function",
+ "additionalProperties": true
+ },
+ "normalization": {
+ "description": "Set of values used to normalize the operand.",
+ "title": "The normalization schema",
+ "$ref": "#/properties/operation_function/properties/operands/items/anyOf/0/properties/normalization",
+ "additionalProperties": true
+ },
+ "weight": {
+ "default": 1.0,
+ "description": "An explanation about the purpose of this instance.",
+ "title": "The weight schema",
+ "type": "number"
+ }
+ },
+ "additionalProperties": true
+ }
+ ]
+ }
+ }
+ },
+ "additionalProperties": true
+ }
+ },
+ "additionalProperties": true
+}