LpProblem Module¶
Module containing PowerGAMA LpProblem class
-
class
powergama.LpProblemPyomo.
LpProblem
(grid, lossmethod=0)¶ Class containing problem definition as a LP problem, and function calls to solve the problem
Methods
setProgressBar
(value)Specify how to show simulation progress solve
(results[, solver, solver_path, …])Solve LP problem for each time step in the time range -
setProgressBar
(value)¶ Specify how to show simulation progress
Parameters: - value : string
‘fancy’ or ‘default’
-
solve
(results, solver='cbc', solver_path=None, warmstart=False, savefiles=False, aclossmultiplier=1, dclossmultiplier=1, logfile='lpsolver_log.txt')¶ Solve LP problem for each time step in the time range
Parameters: - results : Results
PowerGAMA Results object reference
- solver : string (optional)
name of solver to use (“cbc” or “gurobi”). Gurobi uses python interface, whilst CBC uses command line executable
- solver_path :string (optional, only relevant for cbc)
path for solver executable
- warmstart : Boolean
Use warmstart option (only some solvers, e.g. gurobi)
- savefiles : Boolean
Save Pyomo model file and LP problem MPS file for each timestep This may be useful for debugging.
- aclossmultiplier : float
Multiplier factor to scale computed AC losses, used with method 1
- dclossmultiplier : float
Multiplier factor to scale computed DC losses, used with method 1
- logfile : string
Name of log file for LP solver. Will keep only last iteration
Returns: - results : Results
PowerGAMA Results object reference
-