Bug 2044 - mettre simpatix88 en production
- added debug informations that helped debugging power diagram database issue while working on bug 2044
This commit is contained in:
parent
95e3f4a3ed
commit
b7c60939a7
|
@ -150,12 +150,15 @@ class Plug(object):
|
||||||
if in_con:
|
if in_con:
|
||||||
# apply incoming connection amperes limitation
|
# apply incoming connection amperes limitation
|
||||||
capacity = add_capacity_constraints (capacity, in_con.get_max_amperes())
|
capacity = add_capacity_constraints (capacity, in_con.get_max_amperes())
|
||||||
|
# print(str(self)+ 'after incoming connection amperes limitation, capacity = ' + str(capacity))
|
||||||
else:
|
else:
|
||||||
# apply the machine containing this plug's amperes limitation
|
# apply the machine containing this plug's amperes limitation
|
||||||
capacity = add_capacity_constraints (capacity, self.machine.get_max_amperes())
|
capacity = add_capacity_constraints (capacity, self.machine.get_max_amperes())
|
||||||
|
# print(str(self)+'apply the machine containing this plug s amperes limitation, capacity = ' + str(capacity))
|
||||||
|
|
||||||
# apply this plug's amperes limitation
|
# apply this plug's amperes limitation
|
||||||
capacity = add_capacity_constraints (capacity, self.current_capacity_constraint)
|
capacity = add_capacity_constraints (capacity, self.current_capacity_constraint)
|
||||||
|
# print(str(self)+'after apply this plug s amperes limitation, capacity = ' + str(capacity))
|
||||||
|
|
||||||
return capacity
|
return capacity
|
||||||
|
|
||||||
|
@ -178,7 +181,7 @@ class Connection(object):
|
||||||
self.current_capacity_constraint = None # the maximum amperes in this connection
|
self.current_capacity_constraint = None # the maximum amperes in this connection
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(self.from_plug) + ' -> ' + str(self.to_plug)
|
return str(self.from_plug) + ' -> ' + str(self.to_plug) + ' (' + str(self.from_plug.get_max_amperes()) + str(self.get_max_amperes()) + 'A)'
|
||||||
|
|
||||||
def get_max_amperes(self):
|
def get_max_amperes(self):
|
||||||
capacity = self.from_plug.get_max_amperes()
|
capacity = self.from_plug.get_max_amperes()
|
||||||
|
@ -248,6 +251,7 @@ class PowerConfig(object):
|
||||||
plug_capacity = get_plug_type_attr(cur, plug_type, 'max_amps')
|
plug_capacity = get_plug_type_attr(cur, plug_type, 'max_amps')
|
||||||
#if plug_capacity:
|
#if plug_capacity:
|
||||||
# print('plug_capacity : %f A' % plug_capacity)
|
# print('plug_capacity : %f A' % plug_capacity)
|
||||||
|
# print("read_plug_capacity : plug capacity for plug.machine.name="+plug.machine.name+" plug="+str(plug)+" : "+ str(plug_capacity)+ "A")
|
||||||
return plug_capacity
|
return plug_capacity
|
||||||
|
|
||||||
sqliteDbPath=':memory:' # sqlite-specific special name for a file stored in memory. We could use something like '/tmp/simpadb.sqlite' here but this would make parsing really slow (1 minute instead of 1s), unless either :
|
sqliteDbPath=':memory:' # sqlite-specific special name for a file stored in memory. We could use something like '/tmp/simpadb.sqlite' here but this would make parsing really slow (1 minute instead of 1s), unless either :
|
||||||
|
|
Loading…
Reference in New Issue