/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2010-2025 German Aerospace Center (DLR) and others.3// activitygen module4// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)5// This program and the accompanying materials are made available under the6// terms of the Eclipse Public License 2.0 which is available at7// https://www.eclipse.org/legal/epl-2.0/8// This Source Code may also be made available under the following Secondary9// Licenses when the conditions for such availability set forth in the Eclipse10// Public License 2.0 are satisfied: GNU General Public License, version 211// or later which is available at12// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html13// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later14/****************************************************************************/15/// @file AGWorkPosition.h16/// @author Piotr Woznica17/// @author Daniel Krajzewicz18/// @author Walter Bamberger19/// @author Michael Behrisch20/// @date July 201021///22// Location and schedules of a work position: linked with one adult23/****************************************************************************/24#pragma once25#include <config.h>2627#include "AGPosition.h"28#include <stdexcept>293031// ===========================================================================32// class declarations33// ===========================================================================34class AGStreet;35class AGAdult;36class AGDataAndStatistics;373839// ===========================================================================40// class definitions41// ===========================================================================42// TODO: Change name to AGWorkPlace?43// TODO: Counter for free work positions should be in City44// TODO: Change name of openingTime to something like startHour or openingHour45class AGWorkPosition {46public:47AGWorkPosition(AGDataAndStatistics* ds, const AGStreet& inStreet);48AGWorkPosition(AGDataAndStatistics* ds, const AGStreet& inStreet, double pos);49~AGWorkPosition();5051void take(AGAdult* ad);52void let();53bool isTaken() const;5455AGPosition getPosition() const;56int getOpening() const;57int getClosing() const;5859void print() const;6061private:62static int generateOpeningTime(const AGDataAndStatistics& ds);63static int generateClosingTime(const AGDataAndStatistics& ds);6465private:66AGDataAndStatistics* myStatData;67AGPosition myLocation;68AGAdult* myAdult;69int myOpeningTime;70int myClosingTime;71};727374