public SimulationMap(String mapName, int walkingDistancePerSec, int startId, 
            Collection<Person> people, int dotsPerMeter, Collection<Sensor> sr, SQLiteConnection db){
        this.mapName = mapName;
        this.people = people;
        this.sensors = sr;
        
        this.walkingSpeedPerSec = walkingDistancePerSec;
        this.dotsPerMeter = dotsPerMeter;
        this.startNodeId = startId;
        if(db != null) this.nodes = Node.getNodes(db);
        else nodes = new ArrayList<>();
        objects = new ArrayList<>();
        for(Node node: nodes){
            if(node.id == startNodeId) startNode = node;
            if(!node.types.isEmpty()){
                for(Appliance obj: node.types){
                    objects.add(obj);
                }
            }
        }
        this.items = new ArrayList<>();
        this.runningTasks = new ArrayList<>();
    }