Community
Search Options
Search Options
Log in
Skip to main content (Press Enter).
Sign in
Skip auxiliary navigation (Press Enter).
IBM TechXchange
Community
Cloud Global
Cloud Native Apps
Cloud Partner Accelerator
Cloud Platform as a Service
Cloud Training
High Performance Computing
IBM Cloud for SAP
Infrastructure as a Service
VMware on Cloud
Groups
AI
Automation
Data
Security
Sustainability
Cloud
IBM Z & LinuxONE
Power
Storage
IBM Champions
IBM Japan
All Groups
My Groups
Champions
User Groups
Cloud user groups
All user groups
Events
Conference
Community Events
User Groups Events
All TechXchange Events
Participate
TechXchange Group
Welcome Corner
Blogging in the Community
Directory
Community Leaders
Resources
Marketplace
Marketplace
AI and Data Science
Master the art of AI and Data Science.
Ask a question
Learn more about TechXchange Dev Days virtual and in-person events
here
Skip main navigation (Press Enter).
Toggle navigation
Decision Optimization
AI and Data Science
View Only
Community Home
Threads
57.9K
Library
2K
Blogs
27
Events
0
Members
2.6K
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
0
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
0
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?
IBM TechXchange
Community
Cloud Global
Cloud Native Apps
Cloud Partner Accelerator
Cloud Platform as a Service
Cloud Training
High Performance Computing
IBM Cloud for SAP
Infrastructure as a Service
VMware on Cloud
Groups
AI
Automation
Data
Security
Sustainability
Cloud
IBM Z & LinuxONE
Power
Storage
IBM Champions
IBM Japan
All Groups
My Groups
Champions
User Groups
Cloud user groups
All user groups
Events
Conference
Community Events
User Groups Events
All TechXchange Events
Participate
TechXchange Group
Welcome Corner
Blogging in the Community
Directory
Community Leaders
Resources
Marketplace
Marketplace
Powered by Higher Logic