opticoder-binding-cases / cases /case_assignment.json
alirezaaminzadeh's picture
Publish OptiCoder structured binding cases
b3aa878 verified
Raw
History Blame Contribute Delete
3.1 kB
{
"case_id": "case_assignment",
"problem_type": "assignment",
"natural_language": "Assign 4 workers to 4 tasks. Processing times: Worker 1 takes 9, 2, 7, 8 hours; Worker 2 takes 6, 4, 3, 7; Worker 3 takes 5, 8, 4, 6; Worker 4 takes 7, 5, 6, 4. Each worker handles exactly one task and each task is assigned to exactly one worker. Minimize total processing time.",
"binding": {
"problem_hint": "assignment",
"entities": {
"workers": [
{
"id": "W1",
"label": null,
"attributes": {}
},
{
"id": "W2",
"label": null,
"attributes": {}
},
{
"id": "W3",
"label": null,
"attributes": {}
},
{
"id": "W4",
"label": null,
"attributes": {}
}
],
"tasks": [
{
"id": "T1",
"label": null,
"attributes": {}
},
{
"id": "T2",
"label": null,
"attributes": {}
},
{
"id": "T3",
"label": null,
"attributes": {}
},
{
"id": "T4",
"label": null,
"attributes": {}
}
]
},
"parameters": {
"processing_time": {
"name": "processing_time",
"value": [
[
9.0,
2.0,
7.0,
8.0
],
[
6.0,
4.0,
3.0,
7.0
],
[
5.0,
8.0,
4.0,
6.0
],
[
7.0,
5.0,
6.0,
4.0
]
],
"unit": null,
"source_span": null
}
},
"scalars": {},
"binding_confidence": 0.9
},
"formulation": {
"problem_type": "assignment",
"sets": {
"I": "workers",
"J": "tasks"
},
"parameters": [
"processing_time"
],
"variables": [
{
"name": "x",
"indices": [
"i",
"j"
],
"domain": "binary",
"non_negative": true,
"description": "1 if worker i assigned to task j"
}
],
"objective": {
"sense": "minimize",
"expression": "sum(processing_time[i,j] * x[i,j] for i in I for j in J)",
"description": "Minimize total processing time"
},
"constraints": [
{
"name": "one_task_per_worker",
"expression": "sum(x[i,j] for j in J)",
"sense": "==",
"rhs_expression": "1",
"description": "Each worker gets exactly one task"
},
{
"name": "one_worker_per_task",
"expression": "sum(x[i,j] for i in I)",
"sense": "==",
"rhs_expression": "1",
"description": "Each task assigned to exactly one worker"
}
],
"notes": []
},
"ground_truth_objective": 14.0
}