Hello [User],
To examine resource usage (RAM and CPU) when running a Docplex optimization model with the CPLEX engine in Python, you can retrieve performance details using the get_statistics()
method. Here's an example:
from docplex.mp.model import Model
model = Model(name='my_model')
# ... (Define your optimization model here)
solution = model.solve()
performance_details = model.get_cplex().get_statistics()
print(f"Memory Usage: {performance_details['memory']} bytes")
print(f"CPU Time: {performance_details['time']} seconds")
To monitor CPLEX in Windows Task Manager, look for processes related to CPLEX or your optimization model under the "Processes" tab. The names may vary, but they typically consume CPU and memory resources.
Feel free to reach out if you have more questions.
Best regards,
serverflake
------------------------------
server flake
------------------------------
Original Message:
Sent: Wed December 02, 2020 10:38 PM
From: Suresh Abeyweera
Subject: How to Find the memory (RAM) , CPU Usage when running docplex model
1. Imagine I ran an optimization model written on docplex successfully. I need to know how I can find to run that model what are the resource usage for using cplex engine. I think we can find this by the cplex optimization studio - profiler section when running OPL models. I need to know how we an get this using python docplex.
2. In Windows Task Manager enables monitor the applications, processes, and services currently running PC. When running cplex optimization studio what is reflected in this services area to show that cplex is running.
------------------------------
Suresh Abeyweera
------------------------------
#DecisionOptimization