TSP with max node and time limit - time

I have to creat a CPLEX model to the GTSP, I have to maximize the visits with a time limit and some obligation visits!
Is there a general modeling for this? If not, can anyone help me with this and I will send him my code to catch the error.

Related

Managing time limit in Deep Q-learning

I'm trying to implement a python's Deep RL program, where the agent has to resolve the problem (approach a target) before the expiry of the time limit.
Which is the best way to manage the time? It's a good idea to pass the remaining time as an input of the neural network?
I tried to do that (remaining time as one of the entries describing the state of the environment) but the algorithm is not converging...
Any idea or tip?
Thanks a lot!!
Assuming you are trying to implement deep q learning, I think it's better to subtract the time remaining from the reward, like:
Q_target = (reward-time_remaining)+gamma*max(Q(s',a))

Need an algorithm in python to spot breakouts in price action trading

I need an algorithm to spot breakouts in a given pair (in financial markets) using raw OHLC data thats received from API.
And the algorithm should help me spot prices levels. I am not sure if I am clear since I know the matter but I don't have programming background. In a basic sense the algorithm should spot a break out as in the following image.
Since I don't know anyone who develops algorithm like this I would appreciate some advise on how to get this algorithm complete.
Thanks for your time for reading.

lpsolve feedback during solve

I am using lpsolver inside RStudio to solve a supply chain network optimization problem. The MILP model I am trying to solve is taking a lot of time. I want to know if it is possible to get some feedback from the model when it is solving. Feedback like current objective, current upper bound, etc should be sufficient for me.

alternative algorithm for the activity selection

I have a problem where I need to determine if the following pseudocode solves the activity selection problem optimally (eg. no overlapping events while getting the maximum number of activities).
I have gone through a few tries on paper with it and with the tried and true version i see which is by sorting the activities by ending time and it seems to work, but i am suspicious. Can anyone point me in the right direction to find a definitive proof if this does or doesnt work?

Using graph theory to generate an exam schedule

I came across this website while looking for help on the internet regarding adj. matrix / graph theory.
My program layout is as follows:
student name + courses stored in a 2D
array array with all distinct courses
I am trying to achieve the following:
use adjacency matrix to create an
exam schedule where no student needs
to write more than one exam a day
Once the matrix is made, the results on the screen should be displayed as:
output a day by day exam schedule by course
output the exam days of any student inquired
I am not really sure how to work on this. AFAIK, the best approach would be to create an overall exam schedule of all the distinct courses and computing it in such a way that no exams conflict with one another.
Any help/advice/links is greatly appreciated.
Any suggestions on how to program this? I can't seem to find any pseudo code or guidance on programming the graph coloring problem.
You can model your problem as a graph coloring-problem.
Edit:
Another heuristic approach using genetic algorithms.
I would suggest taking the brute-force approach, to start. The number of possible arrangements of exams is likely small enough to exhaustively search them.
To give more detail for a solution, it would help to know more about the problem: How many exams per day? Is it possible for there to be multiple simultaneous exams, or are they all sequential?

Resources