You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I would like to get the required CPU time in the function TNLP::finalize_solution. Did I understand the changelog correctly that it should be possible via the command ip_data->TimingStats().OverallAlgorithm().StartCpuTime() in the new version (instead of ip_data->cpu_time_start())?
There I run into the problem that IpoptData::TimingStats is not a const function, but the pointer ip_data in finalize_solution is const.
Did I misunderstand something or would it be possible to provide a const function TimingStatistics& TimingStats() const?
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered:
StartCpuTime() (or ip_data->cpu_time_start()) gives the time when Ipopt started. To get the elapsed time, use CpuTime() - ipdata->TimingStats().OverallAlgorithm().StartCpuTime(), where CpuTime() is declared in IpUtils.hpp.
That a const variant of TimingStats() was missing is indeed an oversight.
I added this now on the default branch (stable/3.14).
Hello,
I would like to get the required CPU time in the function TNLP::finalize_solution. Did I understand the changelog correctly that it should be possible via the command
ip_data->TimingStats().OverallAlgorithm().StartCpuTime()
in the new version (instead ofip_data->cpu_time_start()
)?There I run into the problem that IpoptData::TimingStats is not a const function, but the pointer
ip_data
infinalize_solution
is const.Did I misunderstand something or would it be possible to provide a const function
TimingStatistics& TimingStats() const
?Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: