1

私はJavaとrepastの初心者です。タイプ gridcells (valuelayer セル) のグリッド セル (グリッド セル) のリストを作成しようとしていますが、「タイプ GridCell は一般的ではありません。引数でパラメータ化することはできません」というエラーが表示され続けます。

これを修正するにはどうすればよいですか?

package tester;

import java.util.List;

import repast.simphony.context.Context;
import repast.simphony.engine.environment.RunEnvironment;
import repast.simphony.engine.schedule.ScheduledMethod;
import repast.simphony.parameter.Parameters;
//import repast.simphony.query.space.grid.GridCell;
import repast.simphony.query.space.grid.GridCellNgh;
import repast.simphony.space.grid.Grid;
import repast.simphony.space.grid.GridPoint;
import repast.simphony.valueLayer.AbstractGridFunction;
import repast.simphony.valueLayer.BufferedGridValueLayer;
import repast.simphony.valueLayer.BufferedGridValueLayer.Buffer;
import repast.simphony.valueLayer.GridCell;
import repast.simphony.valueLayer.MaxGridFunction;
import repast.simphony.valueLayer.MinGridFunction;

            private void Move() {
                // TODO Auto-generated method stub

                BufferedGridValueLayer heat = (BufferedGridValueLayer) context.getValueLayer("Heat Layer");
                Grid <Object> grid = (Grid <Object>) context.getProjection("Insulation Grid");

                //Get the Grid Location of this insulation unit.
                GridPoint pt = grid.getLocation(this);

                //Use the GridCellNgh to retrieve the list of of Gridcells (grid) contianing Gridcells (valueLayergrid). 
                GridCellNgh <GridCell> nghCreator = new GridCellNgh <GridCell> (grid, pt, GridCell.class, 1, 1);


                List <GridCell <GridCell>> gridCells = nghCreator.getNeighborhood(true);
            }  
4

1 に答える 1