智能决策引擎API使公司能够通过根据特定要求和自定义约束评估元素来解决复杂的分配和优化问题。该API旨在最大化收益和最小化成本,集成了高级功能,例如标准加权、违反约束的罚款以及基于自定义参数的动态调整。该工具在物流、金融、电子商务等行业中有广泛应用,提供适应不同工作流程的强大解决方案。简化关键决策,节省时间和资源,让开发人员专注于创新和解决战略问题。
[{"itemAssignments":[{"id":"1","requirements":[{"type":"item.color","scoringLogic":{"method":"Penalize","comparisonLogic":"NotEqual","weight":10,"constraintHardness":"hard","weightRelativePercentage":1.0},"values":["Blue"],"valueType":"string","penalty":10,"penaltyPercentage":0.5}],"budget":{"amount":100.0,"weight":10},"item":{"id":"2","name":"Name 2","descriptors":[{"type":"item.color","value":"Blue"},{"type":"item.capability.Plays Diablo Immortal","value":"true"},{"type":"item.weight","value":"675"},{"type":"item.storage.capacity","value":"128"}],"cost":100.0,"scoreExplanation":{"overallHardScore":0,"overallSoftScore":0,"overallScorePercentage":1.0,"overallScorePercentageWithRewards":1.0,"requirementsScorePercentage":1.0,"budgetScorePercentage":1.0,"brokenRequirements":[],"exceededRequirements":[],"metRequirements":[]}},"requirementsTotalWeight":10,"rejectedSoftRequirements":[]}],"items":[{"id":"2","name":"Name 2","descriptors":[{"type":"item.color","value":"Blue"},{"type":"item.capability.Plays Diablo Immortal","value":"true"},{"type":"item.weight","value":"675"},{"type":"item.storage.capacity","value":"128"}],"cost":100.0,"scoreExplanation":{"overallHardScore":0,"overallSoftScore":0,"overallScorePercentage":1.0,"overallScorePercentageWithRewards":1.0,"requirementsScorePercentage":1.0,"budgetScorePercentage":1.0,"brokenRequirements":[],"exceededRequirements":[],"metRequirements":[]}},{"id":"4","name":"Name 4","descriptors":[{"type":"item.color","value":"Red"},{"type":"item.capability.PLays Minecraft","value":"true"},{"type":"item.weight","value":"850"},{"type":"item.storage.capacity","value":"256"}],"cost":100.0,"scoreExplanation":{"overallHardScore":-10,"overallSoftScore":0,"overallScorePercentage":0.5,"overallScorePercentageWithRewards":0.5,"requirementsScorePercentage":0.0,"budgetScorePercentage":1.0,"brokenRequirements":[{"type":"item.color","scoringLogic":{"method":"Penalize","comparisonLogic":"NotEqual","weight":10,"constraintHardness":"hard","weightRelativePercentage":1.0},"values":["Blue"],"valueType":"string","penalty":10,"penaltyPercentage":0.5}],"exceededRequirements":[],"metRequirements":[]}},{"id":"1","name":"Name 1","descriptors":[{"type":"item.color","value":"Red"},{"type":"item.capability.Plays Roblox","value":"true"},{"type":"item.weight","value":"450"},{"type":"item.storage.capacity","value":"256"}],"cost":200.0,"scoreExplanation":{"overallHardScore":-20,"overallSoftScore":0,"overallScorePercentage":0.0,"overallScorePercentageWithRewards":0.0,"requirementsScorePercentage":0.0,"budgetScorePercentage":0.0,"brokenRequirements":[{"type":"item.color","scoringLogic":{"method":"Penalize","comparisonLogic":"NotEqual","weight":10,"constraintHardness":"hard","weightRelativePercentage":1.0},"values":["Blue"],"valueType":"string","penalty":10,"penaltyPercentage":0.5},{"type":"purchase.budget.amount","scoringLogic":{"method":"Penalize","comparisonLogic":"GreaterThan","weight":10,"constraintHardness":"hard"},"values":["100.0"],"penalty":10,"penaltyPercentage":0.5}],"exceededRequirements":[],"metRequirements":[]}},{"id":"3","name":"Name 3","descriptors":[{"type":"item.color","value":"Red"},{"type":"item.capability.Plays Roblox","value":"true"},{"type":"item.weight","value":"420"},{"type":"item.storage.capacity","value":"128"}],"cost":200.0,"scoreExplanation":{"overallHardScore":-20,"overallSoftScore":0,"overallScorePercentage":0.0,"overallScorePercentageWithRewards":0.0,"requirementsScorePercentage":0.0,"budgetScorePercentage":0.0,"brokenRequirements":[{"type":"item.color","scoringLogic":{"method":"Penalize","comparisonLogic":"NotEqual","weight":10,"constraintHardness":"hard","weightRelativePercentage":1.0},"values":["Blue"],"valueType":"string","penalty":10,"penaltyPercentage":0.5},{"type":"purchase.budget.amount","scoringLogic":{"method":"Penalize","comparisonLogic":"GreaterThan","weight":10,"constraintHardness":"hard"},"values":["100.0"],"penalty":10,"penaltyPercentage":0.5}],"exceededRequirements":[],"metRequirements":[]}}],"solutionSummary":"Explanation of score (0hard/0soft):\n Constraint match totals:\n Indictments:\n"}]
curl --location --request POST 'https://zylalabs.com/api/5745/smart+decision+engine+api/7475/optimize+allocation' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{
"itemAssignments": [
{
"id": "1",
"requirements": [
{
"type": "item.color",
"values": [
"Blue"
],
"valueType": "string",
"scoringLogic": {
"comparisonLogic": "NotEqual",
"method": "Penalize",
"weight": 10,
"constraintHardness": "hard"
}
}
],
"budget": {
"amount": 100,
"weight": 10
}
}
],
"items": [
{
"id": "1",
"name": "Name 1",
"cost": 200,
"descriptors": [
{
"type": "item.color",
"value": "Red"
},
{
"type": "item.capability.Plays Roblox",
"value": "true"
},
{
"type": "item.weight",
"value": "450"
},
{
"type": "item.storage.capacity",
"value": "256"
}
]
},
{
"id": "2",
"name": "Name 2",
"cost": 100,
"descriptors": [
{
"type": "item.color",
"value": "Blue"
},
{
"type": "item.capability.Plays Diablo Immortal",
"value": "true"
},
{
"type": "item.weight",
"value": "675"
},
{
"type": "item.storage.capacity",
"value": "128"
}
]
},
{
"id": "3",
"name": "Name 3",
"cost": 200,
"descriptors": [
{
"type": "item.color",
"value": "Red"
},
{
"type": "item.capability.Plays Roblox",
"value": "true"
},
{
"type": "item.weight",
"value": "420"
},
{
"type": "item.storage.capacity",
"value": "128"
}
]
},
{
"id": "4",
"name": "Name 4",
"cost": 100,
"descriptors": [
{
"type": "item.color",
"value": "Red"
},
{
"type": "item.capability.PLays Minecraft",
"value": "true"
},
{
"type": "item.weight",
"value": "850"
},
{
"type": "item.storage.capacity",
"value": "256"
}
]
}
]
}'
| 标头 | 描述 |
|---|---|
授权
|
[必需] 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。 |
无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。
智能决策引擎API旨在通过将元素映射到约束来优化决策,有效平衡预算和资源管理中的成本与结果
该API根据特定要求和自定义约束评估元素,使公司能够有效解决复杂的分配和优化问题
该API适用于包括物流、金融和电子商务在内的多个行业,提供适应不同工作流程的强大解决方案
该API包含高级功能,如标准加权、约束违规的处罚以及基于自定义参数的动态调整
通过简化关键决策并允许开发者专注于创新和战略问题解决,API帮助组织在决策过程中节省时间和资源
优化分配端点返回一个包含最优项目分配的JSON数组,其中包括每个项目的需求、预算和评分解释的详细信息。这些数据帮助用户了解决策是如何基于他们的约束做出的
响应中的关键字段包括`itemAssignments`,详细说明分配的项目及其要求,`budget`,显示分配的金额,以及`scoreExplanation`,提供对用于优化的评分指标的见解
响应数据被结构化为一个包含两个主要数组的JSON对象:`itemAssignments`用于分配的项目,`items`用于每个项目的详细信息。每个分配包括要求、预算信息和评分指标
用户可以通过包含参数来定制他们的请求,例如`elements`,它指定要优化的项目,以及`assignments`,它定义这些项目应如何根据用户定义的约束进行分配
用户可以分析 `scoreExplanation` 以理解他们分配的有效性,识别未满足要求的任何惩罚,并调整他们的输入参数以改善未来的优化结果
典型的用例包括在物流中优化资源配置在金融中管理预算以及在电子商务中增强库存决策使企业能够最大化效率和最小化成本
通过对输入参数和约束条件进行严格验证来保持数据准确性,确保优化过程反映现实场景并遵循指定要求
用户可以预期出现多种物品的多个itemAssignments,每个物品都有相关的要求和惩罚。评分指标通常反映预算遵循和要求满足之间的平衡
服务级别:
100%
响应时间:
4,492ms
服务级别:
100%
响应时间:
573ms
服务级别:
100%
响应时间:
136ms
服务级别:
100%
响应时间:
78ms
服务级别:
100%
响应时间:
106ms
服务级别:
100%
响应时间:
1,778ms
服务级别:
100%
响应时间:
819ms
服务级别:
100%
响应时间:
1,396ms
服务级别:
100%
响应时间:
42ms
服务级别:
100%
响应时间:
0ms
服务级别:
100%
响应时间:
309ms
服务级别:
100%
响应时间:
1,865ms
服务级别:
100%
响应时间:
258ms
服务级别:
100%
响应时间:
187ms
服务级别:
100%
响应时间:
315ms
服务级别:
100%
响应时间:
16,709ms
服务级别:
100%
响应时间:
287ms
服务级别:
100%
响应时间:
57ms
服务级别:
100%
响应时间:
2,741ms
服务级别:
100%
响应时间:
1,417ms