int szumma = 0;
c = new GeomIntMatrix(Mvesszo.gmMeret());
for(int i=1; i<=c.getMeret().getX(); i++){
GeomTeam team = (GeomTeam)Evesszo.gmIedikElem(i);
for(int j=1; j<=c.getMeret().getY(); j++){
GeomWork work = (GeomWork)Mvesszo.gmIedikElem(j);
if(team.isFiktiv() || work.isFiktiv()){
c.setElement(i, j, 0);
}else if(!parosithatokTipusSzerint(team, work)){
c.setElement(i, j, W);
}else{
int ars = resources.matrixRoadCost.getElementByIndex(team.getActualPlace().getId(),work.getPlace().getId());
int asp = resources.matrixRoadCost.getElementByIndex(work.getPlace().getId(), team.getBasicPlace().getId());
double additivErtek = K * 100 * resources.getMaxRoadCost() * work.getRendezesiSuly();
double vesztesegErtek = L * (GeomWork.getMaxEgysegnyiVeszteseg() - (double)work.getEgysegnyiVeszteseg() / (ars+1));
int vi1 = team.getIdoablak().getX();
int vi2 = team.getIdoablak().getY();
int tj1 = work.getIdoablak().getX();
int tj2 = work.getIdoablak().getY();
int tetaj = work.getVegrehajtasiIdo();
double ertek = W;
if(max(vi1 + ars, tj1) + tetaj <= min(tj2, vi2, vi2+hp-asp)){
if(team.getActualPlace() == work.getPlace()){
if(tj1 <= vi1){
ertek = 0;
}else{
ertek = (double)(tj1 - vi1) / (resources.getMaxRoadCost()+1);
}
}else if(KAP(team.getActualPlace().getId(), team.getType()) - KAP(work.getPlace().getId(), team.getType()) > epszilon && vi2 - vi1 - ars >= kappa){
if(tj1 <= vi1 + ars){
ertek = ars;
}else if(vi1 + ars < tj1){
ertek = ars * (lambda + (double)(tj1 - vi1 - ars) / (tj1 - vi1));
}