Skip main navigation (Press Enter).
Log in
Toggle navigation
Log in
Community
Topic Groups
Champions
Directory
Program overview
Rising Champions
IBM Champions group
User Groups
Directory
Benefits
Events
Dev Days
Conference
Community events
User Groups events
All TechXchange events
Participate
TechXchange Group
Welcome Corner
Blogging
Member directory
Community leaders
Resources
IBM TechXchange
Community
Conference
Events
IBM Developer
IBM Training
IBM TechXchange
Community
Conference
Events
IBM Developer
IBM Training
Decision Optimization
×
Decision Optimization
Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.
Group Home
Threads
58.1K
Blogs
28
Events
0
Library
2K
Members
2.7K
View Only
Share
Share on LinkedIn
Share on X
Share on Facebook
Back to discussions
Expand all
|
Collapse all
sort by most recent
sort by thread
generate release time randomly
Junaid
Mon August 10, 2020 10:12 AM
I wanna to generate release time randomly and make the trains' departure time equals to it. I write it ...
ALEX FLEISCHER
Mon August 10, 2020 01:21 PM
Hi similar to https://community.ibm.com/community/user/datascience/communities/community-home/digestviewer/viewthread?GroupId=5557&MessageKey=f3516283-3fb7-437c-81bd-3247e99fdcec&CommunityKey=ab7de0fd-6f43-47a9-8261-33578a231bb7&tab=digestviewer&ReturnUrl=%2fcommunity%2fuser%2fdatascience%2fcommunities%2fcommunity-home%2fdigestviewer%3fcommunitykey%3dab7de0fd-6f43-47a9-8261-33578a231bb7%26tab%3ddigestviewer ...
1.
generate release time randomly
Like
Junaid
Posted Mon August 10, 2020 10:12 AM
Reply
Options Dropdown
I wanna to generate release time randomly and make the trains' departure time equals to it. I write it as follows and I got something wrong with assignment statement.
execute {
cplex.tilim = 120;
for (var k in orders)
{ writeln("\n origin release time is"+k.release_time);
k.release_time = Opl.rand(7); //
This is wrong.
}
}
my data file is :
// volume due_time release_time
orders = {<1, {"Beijing"},{"Hamburg"}, 24, 26, 0>,
<2, {"Yinchuan"},{"Hamburg"}, 26, 20, 0>,
<3, {"Shanghai"},{"Hamburg"}, 18, 28, 0> };
Is it because I already define the value of release time in data file? How can I change it ? I need to change the release time of every order in each iteration.
Regards
Programmer
------------------------------
Junaid -
Ainit Dubai
------------------------------
#DecisionOptimization
2.
RE: generate release time randomly
Like
ALEX FLEISCHER
Posted Mon August 10, 2020 01:21 PM
Reply
Options Dropdown
Hi
similar to
https://community.ibm.com/community/user/datascience/communities/community-home/digestviewer/viewthread?GroupId=5557&MessageKey=f3516283-3fb7-437c-81bd-3247e99fdcec&CommunityKey=ab7de0fd-6f43-47a9-8261-33578a231bb7&tab=digestviewer&ReturnUrl=%2fcommunity%2fuser%2fdatascience%2fcommunities%2fcommunity-home%2fdigestviewer%3fcommunitykey%3dab7de0fd-6f43-47a9-8261-33578a231bb7%26tab%3ddigestviewer
regards
------------------------------
ALEX FLEISCHER
------------------------------
Original Message
Original Message:
Sent: Mon August 10, 2020 03:12 AM
From: Junaid
Subject: generate release time randomly
I wanna to generate release time randomly and make the trains' departure time equals to it. I write it as follows and I got something wrong with assignment statement.
execute {
cplex.tilim = 120;
for (var k in orders)
{ writeln("\n origin release time is"+k.release_time);
k.release_time = Opl.rand(7); //
This is wrong.
}
}
my data file is :
// volume due_time release_time
orders = {<1, {"Beijing"},{"Hamburg"}, 24, 26, 0>,
<2, {"Yinchuan"},{"Hamburg"}, 26, 20, 0>,
<3, {"Shanghai"},{"Hamburg"}, 18, 28, 0> };
Is it because I already define the value of release time in data file? How can I change it ? I need to change the release time of every order in each iteration.
Regards
Programmer
------------------------------
Junaid -
Ainit Dubai
------------------------------
#DecisionOptimization
×
New Best Answer
This thread already has a best answer. Would you like to mark this message as the new best answer?
Related Content
Using Multiobjective Optimization with Distinct KPIs
Theodore Nelson
Added Wed November 04, 2020
Discussion Thread
2
How to Leverage the Power of Palantir with Cloud Pak for Data Industry Accelerators webinar
Doug Moran
Added Mon January 10, 2022
Library Entry
The Power of Decision Optimization
Youssef Sbai Idrissi
Added Tue July 18, 2023
Blog Entry
Submit Decision Optimization jobs to WML using dowml
Xavier Nodet
Added Wed August 18, 2021
Blog Entry
Optimize Decisions with Operational Insights
Shannon Cardwell
Added Thu March 24, 2016
Blog Entry
Powered by Higher Logic