ELD Console Java
 
Loading...
Searching...
No Matches
InputLoader Class Reference

Utility class for handling user input related to generator parameters. More...

Static Public Member Functions

static ArrayList< GeneratorloadFromUser ()
 Accepts the no.of generators and generator parameters for each one as inputs from the user , creates generator object for each generator, adds all of them into arraylist and returns the arraylist.
 
static ArrayList< GeneratorloadFromCSV (String filePath)
 Loads generator data from a CSV file.
 

Detailed Description

Utility class for handling user input related to generator parameters.

Prompts the user to enter total load demand, number of generators, and each generator's cost coefficients and capacity limits.

Creates and returns a list of Generator objects for further dispatch logic.

Author
Sree Sai Nandini
Version
1.0

Member Function Documentation

◆ loadFromCSV()

static ArrayList< Generator > InputLoader.loadFromCSV ( String filePath)
inlinestatic

Loads generator data from a CSV file.

Each line in the file should contain generator parameters in the format: gen_id, min_capacity, max_capacity, a, b, c

Parameters
filePathpath to the CSV file
Returns
ArrayList of Generator objects

◆ loadFromUser()

static ArrayList< Generator > InputLoader.loadFromUser ( )
inlinestatic

Accepts the no.of generators and generator parameters for each one as inputs from the user , creates generator object for each generator, adds all of them into arraylist and returns the arraylist.

Returns
genlist the arraylist of generator objects

The documentation for this class was generated from the following file: