Planit()

Top-level PLANit instance
Description

This class is the starting point for anything PLANit, whether it be an assignment project or the reader/writing, conversion of networks. You start here by creating an instance and then either collect/create an assignment project (to conduct a traffic assignment) or a conversion factory (to conduct parse/persist/conversion of a network of some kind).

Methods

Planit exposes the following methods

Name Description
.create_project(+) create a novel assignment project with user configurable input directory

Properties

Planit exposes the following properties

Property Availability Description
.project Always Access assignment project instance, if .create_project(+) is not called beforehand, a default project is created and returned
.converter_factory Always Access to converter factory that allows you to create (network) converters

Example 1

from planit import *

# create a planit assignment project instance using "." as the location for the input files
planit_instance = Planit()
planit_project = planit_instance.create_project()

Example 2

from planit import *

# create a planit assignment project using a custom location to search for input files instead
planit_instance = Planit()
planit_project = planit_instance.create_project("c:/users/<username>/my_project")

Example 3

from planit import *

# create a planit network converter to convert a network from one format to another
planit_instance = Planit()
converter_factory = planit_instance.converter_factory.create(ConverterType::NETWORK)

See also

Source code

Class Planit in Planit.py


.create_project(+)

Planit method

.converter_factory

Planit property

.project

Planit property

Last modified January 1, 0001