Nama : Fillah Anjany

Nim : 230605110033

Dosen Pengampu : Prof. Dr. Suhartono, M.Kom

Universitas : Universitas Islam Negeri Maulana Malik Ibrahim Malang

Fakultas : Sains dan Teknologi

Program Studi : Teknik Informatika

library(mosaicCalc)
## Loading required package: mosaic
## Registered S3 method overwritten by 'mosaic':
##   method                           from   
##   fortify.SpatialPolygonsDataFrame ggplot2
## 
## The 'mosaic' package masks several functions from core packages in order to add 
## additional features.  The original behavior of these functions should not be affected by this.
## 
## Attaching package: 'mosaic'
## The following objects are masked from 'package:dplyr':
## 
##     count, do, tally
## The following object is masked from 'package:Matrix':
## 
##     mean
## The following object is masked from 'package:ggplot2':
## 
##     stat
## The following objects are masked from 'package:stats':
## 
##     binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
##     quantile, sd, t.test, var
## The following objects are masked from 'package:base':
## 
##     max, mean, min, prod, range, sample, sum
## Loading required package: mosaicCore
## 
## Attaching package: 'mosaicCore'
## The following objects are masked from 'package:dplyr':
## 
##     count, tally
## The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
## which was just loaded, will retire in October 2023.
## Please refer to R-spatial evolution reports for details, especially
## https://r-spatial.org/r/2023/05/15/evolution4.html.
## It may be desirable to make the sf package available;
## package maintainers should consider adding sf to Suggests:.
## The sp package is now running under evolution status 2
##      (status 2 uses the sf package in place of rgdal)
## 
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
## 
##     D

Disini kita akan membahas apa itu Optimisasi Grafis. Secara sederhana, optimalisasi grafis adalah salah satu cara yang dapat digunakan untuk menyelesaikan masalah optimalisasi. Optimasi adalah proses untuk menemukan nilai terbesar atau terkecil dari suatu fungsi tujuan; ini biasanya berkaitan dengan efisiensi, biaya, kualitas, atau keuntungan. Seringkali, masalah optimasi memiliki batasan atau persyaratan yang harus dipenuhi oleh variabel yang dicari.

h <- rfun (~ x, seed=7293)
x <- seq(-15, 10, by = 0.1)
y <- h(x)
plot(x, y, type = "l")

  1. Di sini, kita akan menggunakan fungsi yang sudah ada dalam pembahasan Optimalisasi Matematika. Fungsi rfun adalah untuk membuat fungsi acak yang tergantung pada x. Setiap kali kode dijalankan, fungsi ini dapat menghasilkan berbagai jenis fungsi acak, tetapi tetap tergantung pada nilai x.

  2. Kita membuat vektor x yang memiliki deret angka dari -10 hingga 10 dengan selang 0.1. Kemudian, kita menghitung vektor y dengan fungsi acak h, yang berarti bahwa pada setiap titik x, kita akan menghasilkan nilai y yang sesuai dengan fungsi acak tersebut.

  3. Pada langkah terakhir, kita menggambar fungsi y terhadap x dengan tipe “l” dengan plot. Ini menghasilkan grafik garis lurus.

Daftar Pustaka

https://dtkaplan.github.io/MC2/Modeling/06-operations.html