Network API and phase

Hi !
I look at Network.cpp and have some questions. I found some code by @vkruglikov, Maybe somebody can explain me what do the function means:

    void setPhases(const std::string& name, std::set<UInt32>& phases);
     UInt32 getMinPhase() const.

Thanx a lot,

I’m not familiar with this area of the codebase, but I found some references to a network’s phase in the docs:

Thanx @rhyolight Matt for your links. It is very useful information. But I want to clarify some moments. I look at pseudocode Running a network on Network API Guide.
for iteration in (1, …, n):
for phase in (minPhase, …, maxPhase):
for each region associated with this phase:
invoke all network callbacks

What value can I set on phase, minPhase, maxPhase? 
Can I compute only necessary region?

@scott do you know any answers to these questions?

Every region in a network has a phase and the regions are executed in the order of phase (ascending). When you call, all regions are executed in this order. If you want to execute a single region, you can call the methods on the region directly.

That’s exactly what I’m looking for! Could you specify how to do it?

Thanx a lot!

you can get your region by its name like:

Network *netA;
Region* myRegion = netA->getRegions().getByName("name");
1 Like