Ejemplo n.º 1
0
def runModel():
  
  #read config
  
  model = temoa_create_model()
  
  from temoa_lib import temoa_solve
  temoa_solve( model )
Ejemplo n.º 2
0
"""
Temoa - Tools for Energy Model Optimization and Analysis
  linear optimization; least cost; dynamic system visualization

Copyright (C) 2011-2014  Kevin Hunter, Joseph DeCarolis

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.

Developers of this script will check out a complete copy of the GNU Affero
General Public License in the file COPYING.txt.  Users uncompressing this from
an archive may not have received this license file.  If not, see
<http://www.gnu.org/licenses/>.
"""

from temoa_model import model
from temoa_lib import temoa_solve, TemoaError

try:
	temoa_solve( model )
except TemoaError, e:
	raise SystemExit( '\n' + str(e) )
Ejemplo n.º 3
0
"""
Tools for Energy Model Optimization and Analysis (Temoa): 
An open source framework for energy systems optimization modeling

Copyright (C) 2015,  NC State University

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

A complete copy of the GNU General Public License v2 (GPLv2) is available 
in LICENSE.txt.  Users uncompressing this from an archive may not have 
received this license file.  If not, see <http://www.gnu.org/licenses/>.
"""

from temoa_model import model
from temoa_lib import temoa_solve, TemoaError

try:
	temoa_solve( model )
except TemoaError, e:
	raise SystemExit( '\n' + str(e) )
Ejemplo n.º 4
0
# is determined using DEMAND_RANGE. The Price, MinDemand and MaxDemand
# are written to the file, price.dat.

# Usage: same as temoa_model.py.
# Addition output: writes file price.dat in the current directory.

DEMAND_RANGE = 0.3 # Max/MinDemand = (1 +/- DEMAND_RANGE)* Demand
DEMAND_SEGMENTS = 27  # Keep this an odd number to reproduce fixed demand results!

from temoa_model import temoa_create_model, temoa_create_model_container
from temoa_lib import temoa_solve
import sys

model = temoa_create_model()
model_data = temoa_create_model_container(model)
temoa_solve(model_data)
instance = model_data.instance
price_data = open("price.dat", "w")

ConstantDemandConstraint = instance.DemandConstraint
Demand = instance.Demand

print >> price_data, """\
data;

param: MinDemand    MaxDemand  :=
    # year      # min    # max
"""

for key in sorted(Demand.sparse_keys()):
    for l in key: