Skip to content

Commit 4830aa1

Browse files
committed
Fixed error messages
1 parent e06276f commit 4830aa1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ps/psse.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ PetscErrorCode ConvertToPS(PS ps, const Network &nw) {
757757
}
758758
auto bus_ii = nw.bus_mapping.GetInternalIndex(shunt.i);
759759
if (ps->bus[bus_ii].nshunt > 0) {
760-
Error("Bus " + std::to_string(shunt.i) +
760+
Error("Bus " + std::to_string(shunt.i.id) +
761761
": more than one fixed shunt at bus not supported");
762762
}
763763
ps->bus[bus_ii].nshunt++;
@@ -811,8 +811,9 @@ PetscErrorCode ConvertToPS(PS ps, const Network &nw) {
811811
bus.MVAbasetot += dgen.mbase;
812812
if (!Approx(dgen.vs, bus.vm)) {
813813
std::stringstream ss;
814-
ss << "Generator at bus " << bus.i << ": voltage setpoint (" << dgen.vs
815-
<< ") different from bus voltage magnitude (" << bus.vm << ")";
814+
ss << "Generator at bus " << bus.bus_i << std::fixed << ": voltage setpoint ("
815+
<< dgen.vs << ") different from bus voltage magnitude (" << bus.vm
816+
<< ")";
816817
Error(ss.str());
817818
}
818819
bus.ngenON++;

0 commit comments

Comments
 (0)