Class PlanitDemandsReaderFactory


  • public class PlanitDemandsReaderFactory
    extends Object
    Factory class for creating demands reader in the native PLANit format
    Author:
    markr
    • Constructor Detail

      • PlanitDemandsReaderFactory

        public PlanitDemandsReaderFactory()
    • Method Detail

      • create

        public static PlanitDemandsReader create​(String pathDirectory,
                                                 LayeredNetwork<?,​?> referenceNetwork,
                                                 Zoning referenceZoning)
        Factory method
        Parameters:
        pathDirectory - to use
        referenceNetwork - to extract references from (if any)
        referenceZoning - to extract references from (if any)
        Returns:
        created PLANit demands reader
      • create

        public static PlanitDemandsReader create​(String pathDirectory,
                                                 String xmlFileExtension,
                                                 LayeredNetwork<?,​?> network,
                                                 Zoning referenceZoning)
        Factory method
        Parameters:
        pathDirectory - to use
        xmlFileExtension - to use
        network - to extract references from (if any)
        referenceZoning - to extract references from (if any)
        Returns:
        created PLANit demands reader
      • create

        public static PlanitDemandsReader create​(org.goplanit.xml.generated.XMLElementMacroscopicDemand xmlRawDemands,
                                                 LayeredNetwork<?,​?> referenceNetwork,
                                                 Zoning referenceZoning)
        Factory method where file has already been parsed and we only need to convert from raw XML objects to PLANit memory model
        Parameters:
        xmlRawDemands - to extract from
        referenceNetwork - to use
        referenceZoning - to use
        Returns:
        created PLANit demands reader
      • create

        public static PlanitDemandsReader create​(PlanitZoningReader zoningReader)
        Factory method where all contextual information is to be set afterwards via settings and zoning is to be obtained from provided reader.
        Parameters:
        zoningReader - to extract reference zoning from
        Returns:
        created PLANit demands reader
      • create

        public static PlanitDemandsReader create​(PlanitDemandsReaderSettings settings,
                                                 PlanitZoningReader zoningReader)
        Factory method where all contextual information is derived from settings and zoning is to be obtained from provided reader.
        Parameters:
        settings - to use
        zoningReader - to extract reference zoning from
        Returns:
        created PLANit demands reader