mathematical model of an assignment/scheduling problem

I am solving a scheduling problem and I am able to abstract it into an assignment problem of assigning 45 machines to 42 jobs. the assignment problem was given as having 14 jobs, each with 3 tasks and 5 available machines that can be used for no more than 9 tasks.

so 14 times 3 is 42 and 5 times 9 is 45, my constraints are that no two shifts can be taken same day, and that each machine can take up to 9 jobs or a task given that no two task are during one job.

jobs are to be executed in a sequential manner.

because of that the values in the cost matrix are not static.
the cost of assigning machine $M_i$ to perform Job $J_i$ depends on how recent one of the machines in the same cluster was used.

and I am ending up with a dynamic cost matrix for the assignment problem.
How can I solve this assignment problem ? or maybe I should just model the problem differently ?