Matrix Optimization using optimization toolbox
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Patrick Martin
il 13 Feb 2019
Commentato: Patrick Martin
il 14 Feb 2019
I have a matrix with each row being a task and each column being a worker. The cells contain a performance for each worker on each task. Each worker can take up to two tasks with each task only requiring one worker. I want to alocate workers in a way that maximizes performance. How would i go about doing this?
0 Commenti
Risposta accettata
Matt J
il 13 Feb 2019
Modificato: Matt J
il 13 Feb 2019
Should be pretty easy with the problem-based linear program solver,
X = optimvar('X',numTasks,numWorkers,'Type','integer','LowerBound',0,'UpperBound',1);
prob = optimproblem('ObjectiveSense','maximize');
prob.Constraints.oneworker=sum(X,2)<=1;
prob.Constraints.maxTasks=sum(X,1)<=2;
prob.Objective=sum(performances(:).*X(:));
Xsolution = solve(prob);
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Problem-Based Optimization Setup in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!