Confronting dates in a constrain
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I am implementing an optimisation problem on matlab and one of the constraints imposes an inequality of the type: date(x) * decision variable> date(y) + duration
Obviously I cannot multiply a date by a number so how could I solve the problem?
Thanks in advance for the help!
0 Kommentare
Antworten (1)
Walter Roberson
am 26 Feb. 2024
Verschoben: Walter Roberson
am 26 Feb. 2024
Perhaps
decision_variable * (date(x) > date(y) + duration)
leading to
date(y) - date(x) + duration
multiplied by something. But the something is not necessarily the decision variable: it depends on what the intent is when the decision variable is false, whether that is intended to cause the constraint to pass or to fail.
5 Kommentare
Eric Sofen
am 28 Feb. 2024
@Walter Roberson, whoops! Of course, you're right about the epoch for datenum. I went back and edited my post.
Siehe auch
Kategorien
Mehr zu Time Series Objects finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!