Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.

: 3DS_Document_2021

ISIGHT TRAINING
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

2
Introductions

Review Training Plan

Review + Transfer Data


TABLE OF CONTENTS
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

3
TRAINING PLAN
OBJECTIVE

• The objective of the foundation training is give [company] staff a strong technical base to allow them to understand and
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

execute SIMULIA Isight inconjuction with GEOVIA Whittle and GEOVIA MineSched.

• Focused half-day sessions with variety of Dassault Systèmes resources

• Following the training, this knowledge and know-how will allow [company] answer key strategic scheduling questions and
generate more robust schedules, with Dassault Systèmes team available to act in consulting or project assistance capacity

4
TRAINING PLAN

• Session 1 : (Today) – Kickoff


© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Session 2 : (Tomorrow ) – SIMULIA Team - Introduction to SIMULIA Isight


- Interface, application and simulation basics from SIMULIA Team

• Session 3 : (October 12/13/14) - [Geovia Team] - Introduction to GEOVIA x Isight


- Mechanics of how to connect GEOVIA Whittle and GEOVIA Minesched to Isight

• Session 4: (TBC) – [Compnay Team] – Strategic Mine Planning / Advanced Use Cases
- How to use GEOVIA x Isight to answer strategic mine questions / Discuss framework of how [company] should approach key questions

5
QUESTIONS

• Number of participants
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• State of licenses (type of GEOVIA licenses, state of Isight licenses)

• Confirmation of dates

6
DATA REVIEW / TRANSFER

• Does [company] have a Whittle project and MineSched scenario that could be used for the training?
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

- Important considerations include size, processing time, complexity etc.


- Available to show on screen now?
• File Transfer created, must be uploaded tomorrow if going to be used for GEOVIA x Isight session. (must critical for Session
4 though)
• Otherwise standard data will be employed exclusively

7
MOST IMPORTANT RULES
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Many different ways to “skin the cat”. Training will highlight standard or common approach but can tweak/customize
significantly, particularly through scripting (Python)

• De-bugging your simulation is really critical part of building loop. Tips


- Test in pieces, do not wait until the end (a lot can go wrong, sometimes difficult to pinpoint)
- Keep runtime folder post execution during setup/ testing is great way to see what is going wrong
- Start simple and add complexity

8
WHITTLE

Although you don’t see it when running Whittle normally, when you fill in information in the program (ex. mining costs,
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

recovery) this gets stored in instruction text files that Whittle sends to its execution engine when you run something in the
program.

The general idea is that with Isight we will change these instruction files and then perform the execution, all without needing to
open Whittle or manually do anything.

How do we do this?

9
GENERATE TEST FILES
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• First step in the process is we need to generate “test files” that we will use for Isight. We do not run Isight on our original
files.

• File -> Preferences then hit Control + t to expose the testing mode and can select where the data gets stored

• Then we want to run From Top of Tree down to Bottom (ex.schedule or pit x pit). If already executed, just quickly swap a
unit at block model which will required full recalculation.

10
TEST FILES
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• You should now see the files in the destination folder

• Important, you can find out which files correspond to which


node by opening Whittle and right-clicking on a node, Other,
View Node properties)

• In this example, FXPE__3 prefix files relate to pitshell node

11
EDIT .BAT FILE
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• This is the master instructions that will control what happens (which nodes to run, which version of Whittle to run, which
license to use etc.)

• These are the standard changes that must be made for all iterations, and then more tweaks cane be made depending on
situation (more on this later)

12
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

13
EDIT .BAT FILE
EDIT BAT
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• LINE 12 and LINE 13 (~, may change slightly in different run.bat files)
• Remove anything after the = sign for both set comment and set display.
• LINE 18
• Add rem to the start of the line (this comments out that line)
• LINE 19
• Write cd %WhittleDir%
In case you are using a DSLS license:
• -usedsls (on each node execution instruction)

• Update version if you have upgraded Whittle version


14
ISIGHT PROJECT SETUP
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Create New scenario (.zmf) and save in desired location


• Can create a run folder to store simulation results (optional, but nice to store near model). Edit- Model Properties –
Execution
- Ex. one approach is to go {modeldir}/Runs

15
SIMULATION SETUP
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Core node we will need for Whittle is Simcode

• This will allow us to parse inputs and outputs + execute Whittle through Windows batch command

16
SIMCODE BASICS

Command Window
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Change to Windows Batch

• Specifiy core code that will run Whittle

Set WhittleDir={rundir}
run.bat

There is a bit more we will add here

17
INPUT
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• In order for Isight to run Whittle, Isight will need all the key files (instructions, data etc.) in the runtime directory.
• We can categorize these into two groups
- Files we want to alter before executing
- Files we just want to copy into the runtime directory

• For the files we want to alter (ex. change instructions to have a different mining limit, different costs etc.), these we will
handle manually in the Input Window of Simcode)

• For the files we just need to copy, we can use input file approach tab to copy them in (organized by file extension) but I
prefer to use a windows batch command called robocopy (more on this later)

18
EXAMPLE 1 : FLEX INPUT PARAMETERS TO SCHEDULE
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• To understand mechanics, lets start with a simple use case : fixed pushbacks but want to vary some schedule inputs
(mining cost, metal price, production rates, recoveries etc.)

• Now we have to decide on our input files

• Schedule node I am looking to manipulate is node 5 so there are potentially 2 files I need to manipulate : log and par.

• Rule : Only need to modify the par unless I have expressions in which case will modify par to change expressions

19
PARSING INPUT LOG FILE
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Select item in Log you want to vary (ex. Gold price)


• Whittle quite particular about how file is stored (spaces etc.) so for a baseline parameter, use Characters 26-40
• Create a new parameter and write to the spot in file
• Repeat for as many parameters as desired

20
PARSING INPUT PAR FILE
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• If you having expressions that need to be simulated, you will notice in log file, there is only the name of the expression (ex.
POX)

• To vary the expression, we will need to parse the par file and define parameters in there. Same idea as for log

21
AUXILIARY INPUT FILES
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Option 1 : With Simcode selected, go to input tab and select file you want to copy into runtime directory

• Can go file by file or file set (but need to be sure not to double select key log /par files)

22
AUXILIARY INPUT FILES
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Option 2 : In the command tab of Simcode, can use windows batch coding to move the files we need.

Syntax is as follows

Robocopy “source_folder” “destination folder” “switches”

Important switches include /e : copy subfolders and files within them


/xf : exclude certain files from the copy

If you google robocopy, you will see a lot of additional switches are possible

23
If you use robocopy, go to advanced setting and uncheck Output to Error Stream
ROBOCOPY EXAMPLE
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

robocopy E:\SIMULIA\Maaden\Whittle\Whittle\Test007 {rundir} /XF FXPE__5.par FXPE__5.log

Copy everything in Test007 folder to my simulation directory, excluding FXPE_5 par and log. Also will ignore the known folder,
by default only looks at loose in the main folder

If you use robocopy, go to advanced setting and uncheck Output to Error Stream

24
OUTPUT
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Whittle will now execute and for each iteration we can pass different values to the different parameters
• However we need to capture the results or values from each iteration so that we can look at the solution space once all
iterations are complete

• For Whittle, we will use the standard spreadsheet outputs that we get at most nodes (ex. pit shells, pit x pit, schedule etc.) In
advanced cases, we could grab different outputs (.mod file, pit list file) but most common is a spreadsheet

• This we will use as an Output file template in the Simcode node.

25
OUTPUT FILE MAPPING
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• In our Schedule example, FXPE__5 was our key node so a template for the output will be found in our test files, under the
known folder.

• This is the file we use to map the parameters we can to track as schedule KPIs

• First generally want to make the area where the data sits a table, by using the New Section button .

26
OUTPUT FILE MAPPING
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Now depending on what we are trying to grab, we can map a parameter to an individual cell or an array of values, such has
discounted cash flow.

27
CALCULATOR
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Particularly when dealing with arrays, can be useful to use a calculator to combine, tabulate or do other mathematical
operations on the raw data in the spreadsheet

28
DESIGN OF EXPERIMENT
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Key Part where we determine what values we want to iterate over, how many runs and what results we want to track

29
EXAMPLE 2 – TARGETED RUNNING
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Before we do a significant amount of runs, need to think about efficiency / time of execution. Very light data set so we don’t
see it, but for larger projects, will be very important.

• When we created the test files, we executed the nodes from the block model down to the schedule; therefore each time we
run Isight it is doing the same

30
EXAMPLE 2 – TARGETED RUNNING
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• However, we only changed some of the schedule parameters meaning we are wasting time recalculating the block model,
slope set and pitshells each time!

• Therefore lets tell Isight to jump straight to schedule and only run that.

• Two mains steps :


- Change BAT File (execution instructions)
- Make sure Isight has access to the results of earlier nodes (required to then execute schedule)

31
EXAMPLE 2 – TARGETED RUNNING
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Make a copy of Isight Scenario and save it under a new


name in same location

• Open BAT file in Test files (make a backup first and store
somewhere else)

• Use “rem” to comment out lines related to preliminary


node until you get to schedule node (FXPE__5 in this
case)
• Could also just delete code

32
EXAMPLE 2 – TARGETED RUNNING
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Next we need the results from the earlier nodes (fixed) to be placed in the runtime directory so we can jump straight to schedule

• Use robocopy (or manually define as input files) to grab files from known folder and place them into runtime directory (loose,
not in subfolder)

33
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

34
RESULTS ANALYSIS
EXAMPLE 3 – PITSHELL SIMULATION
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Lets go earlier in process and look more at pitshells

• Vary slope parameters + some economic parameters to change the shells

• Track the impact of this on pit by pit graph of best case scenario (strip ratio, IRR, NPV etc.)

35
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

36
EXAMPLE 4 – SCRIPTING
MAIN MINESCHED STEPS

• Baseline MineSched Scenario Preparation


© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Create Isight Simulation Scenario


• Edit Scenario
• Run Scenario
• Pre & Post Execution Data Manipulation / Handling

37
BASELINE SCHEDULE PREPARATION

Before connecting with Isight, we need to setup / create a baseline schedule. Two important items of note
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

1. Create custom reports that track key metrics of schedule. This is what Isight will use to track outputs of each simulation
1. Notes : Period by Row , Regional Settings, Etc.

2. Strip away from some of rules/ parameters in baseline schedule (we will add new rules during simulation)
1. In most cases, this isn’t necessary since MineSched recognizes last rule in the event of a tie.

38
ISIGHT SIMULATION SCENARIO

First step is to create a new Isight Scenario (zmf) Key steps to remember :
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

1. Location
2. Create Runtime Directory
3. Tell Model to execute in Runtime Directory

39
EDIT SCHEDULE

Main Connection to MineSched is done in 2 steps. The first of which we consider is the Edit Scenario.
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

In this step, we will take our baseline schedule scenario file (.minesched) and tweak the scenario with my variable Isight
parameters (mining direction, processing rate, mining rate, # benches etc.) to store this as a new .minesched file which will be
executed in a later step.

Drag an OS Command Node into the loop and rename to Edit Schedule.

*Once configured, this is a good one to have in your palette for easy access on other simulation loops

40
EDIT SCHEDULE

-Set Type to Windows Batch


© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

-Fill out Code w/ following structure


-Path to Scenario Tool Exe
-Create Mode
-Licensing
-New scenario name
-baseline scenario name
-commands (rules we want to add to scenario)
-Add in parameters for values

- Add baseline scenario file as a required input file and new scenario file as output file for that node.
41
- Turn Off output to Error Stream
LICENSING
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

• Network :
-lm XXXXXX ^ URL of network license manager.
-class XXXXX ^
• Local :
-dongleid aa028102 ^
-token ad2e2c388a1be9cf ^

• DSLS:
-ls localhost:4085 -l JMP ^

42
COMMANDS LIST

See document for different commands that are available to control with Isight. Can specify in node or in separate csv
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

43
EDIT SCHEDULE

Notes to remember :
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

-Careful with syntax, no unnecessary spaces and need ^ to end each line
-licensing format changes depending on network vs dsls vs roaming
-make sure to update to correct version of MineSched
-test with simple commands with fixed values (no parameters) to test first

Test Execute this node (turn on keep runtime folder after execution), should see new scenario file and can open in MineSched
to see if new commands were taken correctly.

44
RUN SCHEDULE

Next Step is to create node where minesched will actually run.


© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

1. Create SIMFLOW node called Run_Schedule (could also do OS Command and then a Data Reader)
2. Map the new scenario file from Edit Schedule into Run_Schedule (Dataflow)
3. Create the Windows Batch code
1. This should include copying the files (otherwise you have to add manually and also recreate schedule to look for data right beside it)
2. Code that executes the program
4. Map the custom report as an output file

45
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

46
RUN SCHEDULE
RUN SCHEDULE

Windows Batch
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

First need to copy all the files minesched will need to run.

Option that I like is using robocopy


-source folder I want to copy
-destination (always rundir)
Different switches
/e - all sub-folders and the files inside of them
/xf - exclude a particular file

*Google robocopy and you will see a full list of different options
47
RUN SCHEDULE

Windows Batch
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

Then have the code that executes MineSched

-Path to Command Line Exe (make sure its right version of MineSched)
- Licensing information (different depending on type of license)
- Name of new scenario
- List of what we want minesched to run (keep all turned on)

*Turn off output to error stream

48
RUN SCHEDULE

Parse Output files


© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

-either in SIMFLOW or in separate Data node


-Many alternate ways as well (Excel workbook that reads csv and calculates, text parsing macro, etc.)

In original folder location, grab the csv from MineSched to act as a guide
-The actual file being used will be located in rundir (make sure this is where Isight is looking for it)
-Define a section that covers table area of report

49
RUN SCHEDULE

Select Entire columns as an array or individual cells and map as read to new parameters
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

50
RUN SCHEDULE

Sometimes it could be useful to store these key output files outside of rundir, so you can review results later.
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

In output files destination, point this to specific location where you would like to store it. Note, need to have a variable name
otherwise will overwrite.
1 approach is to add Run # to the name:
-Map Run # attribute from DOE to this node
Add {var Run #} as a suffix to name

51
POST PROCESSING

Continuation of post processing of data, based on data we have grabbed from output report, may want to perform additional
© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

calculations (particularly on Arrays)

Can use calculator to as an example calculate the min, max, mean of an array.

52
SURPAC

Much more streamlined than Whittle and Minesched


© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

Structure is as follows :

After creating a working TCL Macro in Surpac, we will use Isight to pass different arguments to the script.

Main node will be SIMFLOW (if pasing text input/output) or OS Command

53
SURPAC

In Isight, Batch file structure is quite simple :


© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

-Link to Surpac Executable


- Name of script
- Any parameters that will be passed to script

• Obviously need all files that macro relies on to be in runtime directory. Generally here we will just define the input files
manually (script for sure, block model, composites etc.) but could also use robocopy type operations as well
• If macro produces an report (ex. block model), can parse the output just like we did before

54
SURPAC

In Surpac macro, a few things we need to watch for:


© Dassault Systèmes | Confidential Information | 23/07/2021 | ref.: 3DS_Document_2021

- At the end of macro, must have the following line to close Surpac program once execution complete.

set status [ SclFunction "EXIT" {}]

-Watch out for absolute/path relative issues. Macro is going to executing in runtime directory so need to think about that when
creating macro

-When arguments are passed to script from Isight (ex. trying different search ellipse distances), the syntax is as follows in
macro
[lindex $argv position] where position you will put the number of the parameter you wrote in Isight ***List starts at 0 so 0 is
first parameter, 1 is 2nd ..etc

55

You might also like